Page 2 of 2
Posted: Wed Aug 15, 2007 6:26 am
This thread contains extremely useful information, may I respectfully request that it be stickied?
Posted: Wed Aug 22, 2007 10:18 pm
Hieronymus wrote:CloseTradeRoute(uint inRouteIndex)
This closes the trade route identified by its world site index in the XML file. Example use:
This closes world site 7. This can be used when certain specified conditions are met or randomly to reflect periodic disruptions to trade. If the site is visible then the player can re-open the trade route again by paying the appropriate price. If invisible, then it can only be opened again through OpenTradeRoute (described below). Note that trade route closure by this route does not take immediate effect - traders only stop appearing when a new year starts.
Something else I noticed when using this command is that number of units traded does not reset at year's end when the trade route is closed. So if it is re-opened during a subsequent year it will already indicate the number of units traded in the year the route was closed, thus reducing trade potential in the year it re-opens.
Correction to this: it does reset, but only when the route re-opens.
Posted: Thu Sep 20, 2007 8:53 am
StopInvasion(ref string inInvasionName, bool inStopFutureRecurrences)
This seems to perform a similar function, but is aimed at the identified invasion. The additional effect is (potentially) to stop this invasion recurring again, as directed by the Boolean flag. For example:
String invasion = mGame.RunInvasion;
bool bStop = true;
game.StopInvasion(ref invasion, bStop);
I have used this functuin in The Final Deception, and it causes the invaders to immediately stop attacking and leave the city, or else prevents the invasion arriving at all if it hasn't arrived yet.
Posted: Thu Sep 20, 2007 11:25 am
Yes I'm using in it too in Pulchritudo Vincit to stop a recurring invasion from happening again, once a particular condition is met. I'm also trying out a bit of code to limit the "circus exploit".
Posted: Fri Oct 02, 2009 6:35 pm
Does anyone know if the script techniques described in this thread apply only to Caesar 4 or to other games as well?
I tried to send a PM to Hieronymus but was unable to.
Does anyone know how I can get in touch with him?
Posted: Mon Oct 26, 2009 9:33 pm
I think only C4. CotN uses scripting as well, Azeem's your man there, I think it is substantially different to how C4 is done. Significantly, Azeem is most proficient in CotN but won't touch C4 (AFAIK) and Hiero is the opposite, so this points to the two being very different. There may be other non-TM games using a similar scripting model.
Since many of the commands come from files within the C4 engine, I'd suggest what you read here applies only to C4. Other games using C# would use similar syntax but I'd think often different command lines.
You may be able to raise Hieronymus on CBC