Thread Tools
Old January 18, 2001, 01:12   #1
kormer
Chieftain
 
Local Time: 09:50
Local Date: October 31, 2010
Join Date: Jan 2001
Posts: 58
setting alliances
Does anyone know how to set an alliance at the beginning of a scenario? I know there has to be a way to set regard/pacts/alliances through slic. If someone could just show me how to do it with one nation I can probably handle the rest just fine.
kormer is offline  
Old January 18, 2001, 02:35   #2
heardie
Prince
 
heardie's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Aug 1999
Posts: 684
You can check diplmacy.slc, it has some examples.

There is (i think)
SetRegard
LogRegardEvent and other
Get the excel spreadsheet from Locutus' website. Dont know where it is, see his profile
heardie is offline  
Old January 18, 2001, 03:51   #3
OmniGod
Civilization IV CreatorsCiv4 SP Democracy Game
Prince
 
OmniGod's Avatar
 
Local Time: 04:50
Local Date: October 31, 2010
Join Date: Dec 1999
Location: Welland, ON
Posts: 751
Also check out the slic code from WW2 scenario. It has a section where it sets the level of hate and trust for the allies and germans.

Rich
OmniGod is offline  
Old January 18, 2001, 08:48   #4
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Harlan uses a non-SLIC way of doing this that may be easier: temporary replace the regular diplomacy files with ones that make the AI really, really like and trust you when you give him gold. Give gold a couple of times and then ask him for any treaty you want. Once you did this, safe the scenario, exit and put the regular files back in place. SLIC can probably do it as well, but I wouldn't know exactly how. I do know that a lot of SLIC diplo changes need one turn to take effect so it's not ideal.

If really needed, this can be solved with another piece of SLIC code though, one that turns off the AIs, so you can move the turns forward as often as you want without having the AIs attacking or moving or screwing anything else up, I'll see if I can find this code and post it here, just in case it helps anyone. (BTW, once you moved the turns forward as often as you needed you can use the cheat menu to set the year back at the original starting year of the scenario). This code should also temporarily replace all existing SLIC code to prevent anything else gets screwed up.
Locutus is offline  
Old January 18, 2001, 12:01   #5
kormer
Chieftain
 
Local Time: 09:50
Local Date: October 31, 2010
Join Date: Jan 2001
Posts: 58
Thanks for the help. The idea about turning the AI will definetly help me out with a few things besides diplomacy. BTW, why was this moved to creation? Since its for creating a scenario shouldn't it be in the scenarios forum?
kormer is offline  
Old January 18, 2001, 15:32   #6
kormer
Chieftain
 
Local Time: 09:50
Local Date: October 31, 2010
Join Date: Jan 2001
Posts: 58
Here's what my scenario.slc file looks like as of right now. It doesn't appear to be working. It should make the canadians(civ 2) love the americans(civ1) Also I couldn't find any functions for creating embassies, alliances, or pacts.

// Scenario script for Dawn of New Millenium

HandleEvent(BeginTurn) 'DMStartGame_F' pre {

//set starting regard and Trust
LogRegardEvent(2,1,8000);
SetTrust(2,1,2000);

}
kormer is offline  
Old January 18, 2001, 16:57   #7
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
No, the scenario's forum is for announcing scenarios and for discussion gameplay issues (how many civs? should I include this feature? tech tree discussion) and bugreports and the like, like the MedMod threads. The creation forum is for technical issues: how do I do this? is it possible to do that?

Onto the more important stuff. To turn off the AIs, there are two options. The first is this one, I tested it and it seems to work (doesn't crash, AI units don't move at all, haven't tested what happens with buildqueues and stuff), only it doesn't turn off the barbarians, so you might want to keep an eye on that. The second one will turn off barbarians as well, but I just wrote it so it's untested (don't see why it shouldn't work though). Note that 8s should be replaced by the number of civs in the scenario (so this example assumes you have 8 civs).

Code:
HandleEvent(BeginTurn) 'TurnOffAIs' post {
int_t i;
    for (i = 2; i <= 8; i = i + 1) {
        DetachRobot(i);
    }
}
Code:
HandleEvent(BeginTurn) 'TurnOffAIs' post {
int_t i;
    for (i = 0; i <= 8; i = i + 1) {        
        if (!IsHumanPlayer(i)) {
            DetachRobot(i);
        }
    }
}
As far as the code you posted goes, I'm not surprised it doesn't work. In fact, when this code is executed, the game should crash to desktop and give some error messages (after which you can play on but without changing regard or trust). LogRegardEvent needs 6 arguments, not three, so this is never gonna work. This is from scenario.slc from the Alexander the Great scenario:

LogRegardEvent(4, 1, -9999, 0, ID_AG_REGARD_EVENT_NEG, 9999);

I'd suggest you try this for your example, not sure if it'll work in any other scenario but when you experiment a little with the arguments you can probably figure it out. The SetTrust thing is AFAIK never been used so I don't know how many arguments it needs (or which ones), you'll have to experiment around with that as well. I probably need this stuff myself as well in a while so eventually I'll try to figure it out myself, but I don't know yet when exactly 'in a while' is, so you may well not have the time to wait for that.
Locutus is offline  
Old January 18, 2001, 20:16   #8
heardie
Prince
 
heardie's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Aug 1999
Posts: 684
from diplomacy.slc
Code:
LogRegardEvent(player, foreigner, regardDelta, regardEventType, explainstr)
There is also an optional vaue, after explainstr, which is length in turns.
heardie is offline  
Old January 18, 2001, 22:25   #9
kormer
Chieftain
 
Local Time: 09:50
Local Date: October 31, 2010
Join Date: Jan 2001
Posts: 58
The trust function is working just fine. As for the regard...I tested the thing you said, and the error message said something like, "ID_AG_REGARD_EVENT_NEG is not defined. Well anyways I searched everywhere, for ID_AG_REGARD_EVENT_NEG and found its used many places to reduce regard, but nowhere does it initialize it. I know I can always do the old, stop, create diplomats method, but if activision can use slic in their scenarios then I should too.
kormer is offline  
Old January 19, 2001, 01:01   #10
heardie
Prince
 
heardie's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Aug 1999
Posts: 684
Anything with ID as a prefix is a string. To set iun you scenario folder go scenxxx/english/gamedata. Then create a scen_str. Then if your id was ID_NOREASON you would go

Code:
NO_REASON      "There is no reaon why you are at war"
heardie is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:50.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team