That really is funny. But nice to hear that since i couldnt get the function AddUnitToBuildList(city, unittype) to wortk either. The BuildUnit(city_t, int_t) will be the perfect replacement to my plans.
Announcement
Collapse
No announcement yet.
What Govt Am I? THE SOLUTION!
Collapse
X
-
That really is funny. But nice to hear that since i couldnt get the function AddUnitToBuildList(city, unittype) to wortk either. The BuildUnit(city_t, int_t) will be the perfect replacement to my plans."Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
-
Hi everybody!
As I am working on my own humble MOD, in which governements should be more important in some aspects, I am very interested in the „SLICability“ of government-types. I read this thread & SLIC, also Martin’s “getting the government by comparing GovernmentDB-entries”, finally I recurred to the “placeholder”-lines in IW’s “AI-superpowers-script”:
PHP Code:if(player[0].govttype == GovernmentDB(GOVERNMENT_ANARCHY)){
…;
}
SomeDB(DATABASE_ITEM)
always returns the database-index (integer) of that item – as for unit.type you may use
either- unit.type == 99
or- unit.type == UnitDB(UNIT_SOMEUNIT)
So IMHO the above govttype-example doesen’t work because it compares some string with the database-index of GOVERNMENT_ANARCHY rather than the string ‘GOVERNMENT_ANARCHY’. The obvious thing for me would be trying something like
PHP Code:if(player[0].govttype == ‘GOVERNMENT_ANARCHY’){
…;
}
Obviously I have to admit that I haven’t tested that at all – taking into consideration that most likely someone in this forum would explain to me in five words that my ‘idea’ is merely useless and what the heck am I thinking why the whole experienced community is researching some more advanced workarounds for months …. ????
BUT after some hesitating I just had to post this before messing around for some hours or days – thank you for your patience!The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.
Comment
-
So why don't you test it on your own, BureauBert. Well in this case I tested it, and it does not work, I did not test the a String from the gl_str.txt, I doubt that this would work. And the disadvantage of this method would be that you have to modify the slic code for every language version of CTP2, so it is not a good idea. Actual noone got the idea to make it like this, because there is a not working StringCompare function, so why is there such a function if it would be so easy. Well it could have worked...
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
-
Nah, I tested both ways, using GOVERNMENT_* and the string from gl_str.txt, eg. "Monarchy", neither method even loads in the game.Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Comment
-
this is really usefull, it can be used in loads of ways to help keep the AI's game up to pace.......Dale i'm glad this has stayed in your mind for the last two years! Hey i'm glad you are still around to think on CTP2'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you.info here. prove me wrong.
Bush's Republican=Neo-con for all intent and purpose. be afraid.
Comment
-
Originally posted by child of Thor
this is really usefull, it can be used in loads of ways to help keep the AI's game up to pace.......Dale i'm glad this has stayed in your mind for the last two years! Hey i'm glad you are still around to think on CTP2
-MartinCiv2 military advisor: "No complaints, Sir!"
Comment
Comment