Logo Platform
logo amplifiers simplified

Is there a way to call the number of empire plans that have passed?

Reply
Copied to clipboard!
8 years ago
Mar 18, 2017, 2:12:29 AM

In the attempt to write code for this that comes into affect after a certain portion of the game has been played either being able to call the number of empire plans that have passed (best option I can think of) or the number of winters that have passed (okay, but then it is also subject to winter harshness) seem preferable to using the number of turns that have passed on account of the various game speed settings. That said I have no idea if there is a way to access that, if the game keeps track of it (I know it does for number of winters but that's a lot less useful), etc.


In particular:

1) Does the game keep track of the number of empire plans that have passed?

1a) If not how might one try to implement this?

2) If so, is there a way to call that information in the code. For instance "$(CurrentTurn)" calls the number of turns that have passed. Can that be down instead for the number of empire plans (a much more reliable version of 'relative time' not subject to game speed)?

2a) If yes to 1 but no to 2 is there a way to define a command that would do this?

3) If the above are not implemented, would be hard to implement, etc. then is there some other way of keeping track of how far the game has progressed that isn't subject to game speed?


Some example uses for this would be creating mods that progressive increase the AI difficulty, causing events to occur based off of how long the game has gone on instead of the number of techs researched by the active player or player in the lead, etc.  But those are just a few off the top of my head and it seems like a very useful tool in general for creating mods.


My apologies in advance if this is something I should have been able to find out on my own. I'm a fairly inexperienced modder but I'm trying to get better/more experienced. In any case, thank you for your time in responding to this, whenever you are able (to whoever responds)



0Send private message
8 years ago
Mar 18, 2017, 6:10:04 AM

By experience, I think only available propertys you can use are classified before.

The file for that is :

SimulationDescriptors[Class].xml


Problem here, I don't see any property about empire plan count.


I think it's possible to create a new property BUT :

- You need to modify a <SimulationDescriptor> for that. And modify a SimulationDescriptor like ClassEmpire is not very nice to do because if another mod do the same, both mods will not be compatibles.

- Hopefully, I see there is an empty <SimulationDescriptor Name="ClassEmpirePlan" Type="Class">

- Maybe it is possible to create your own <SimulationDescriptor Name="MyNewClass" Type="Class">. I never tried, but it look very interesting to do. With that you could track what you want and make new propertys.


A property tracking number of empire plan could be made the same way others property tracking something. 

Example : if you look at the Technologys count. I remember there is an operation done somewhere, and each time player achieve a research, there is an incrementation, you could study that.

Then, you could increment your property and add a line like this if you find where empire plan trigger in the xml files.


Anyway, you need a tool like "MultiFind" for working on that.


Damn, if it work, my progressive difficulty mod could be based on something else than currentturn, and auto adaptable for any game speed. But it's a too big update for being made quick. And I have another major mod to work on it for now.

Updated 8 years ago.
0Send private message
?

Click here to login

Reply
Comment