Page 2 of 2

Posted: Sun Apr 01, 2007 6:09 am
by goonsquad
That is a possibility but its a bit messy. We normally get players to save each December and if we have any doubts we can call upon those saves. I'm thinking more and more that most scripted events, while fine for regular standalone scenarios, are not viable for competitive contests. I have never encountered a player cheating since I've been involved at CBC, but still it would be nice to close as many loopholes as possible.

Posted: Wed Apr 11, 2007 6:54 pm
by Hieronymus
A note to add to the Example Scenario script. In OnTick there is a line of code as follows:
mMilitaryAI.Update(game, 0.1);
From Tools.cs it seems that the second parameter is used to determine a limit to the number of buildings that will be razed by raiders. So a value of 0.1 means that the raid will end when the raiders have razed 1/10 of the total number of buildings in the city.

Posted: Wed Feb 17, 2010 4:18 pm
by Trium
Since nearly three years have passed, I wanted to resurrect goonsquad's question in reply #17 in the probably forlorn hope that something might have been discovered since.

I know that placeholders for variables can be inserted into strings in the XML using standard C-family stuff like '%d, %f, %s etc' (see languagestext.xml for examples) but I see no way to pass arguments to fill those placeholders into the supplied 'display message' functions normally used in scripts.

Any recent information? How do you guys currently get variable values out of the game, eg for checking how many buildings of type x are present in a save or what values are stored in an array set up to record city funds each year? Are you just getting that from VisualStudio?

Posted: Mon Mar 29, 2010 5:21 am
by goonsquad
You can set pleb and/or equite wages to equal just about any variable integer you like, particularly in a special "checking" script, but I've long given up on being able to put the value of a variable into a displayed message. The brute force method works perfectly well, and doesn't take THAT much work to do, but it does lead to rather large scripts and xml's.