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.
Announcement
Collapse
No announcement yet.
setting alliances
Collapse
X
-
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.
Comment
-
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);
}
Comment
-
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); } } }
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.
Comment
-
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.
Comment
Comment