We want to provide scenarios to the players. Currently, these scenarios are hard-coded as java classes, and referenced by a java file, so that is not open at all.
This thread is to define a design to allow for more openness.
We want something like a xml definition for scenarios. It means we need a set of files describing unit types, techs, etc. (we already have some of that). We also have to be able to save the map, units on field, economy (this is underway).
When we have all this completed, it will be possible to generate a scenario without compiling anything IF:
-We change the resources/ directory. Currently we have a resources directory in the jar. All files are read from there (except settings). We should probably have one subdirectory per scenario.
-We are able to identify a list of available scenarios: Probably add a scenarios.xml file in /resources, which a modder could edit, or propose a file open (which may be a pain in java).
Additionnally, I want to add some events capabilities so that you can check a condition and do something at the beginning of each turn. For example, to implement Mark's example government scenario, the condition would be turnId = 20, the action being: set ai civ#2 behaviour to aggressive.
This means we will also need a xml file for events in the scenario subdirectory.
The syntax could be {event}
{if}turnId=20{/if}
{then}
{affect}(same tags to set ai attitude as in save file){/affect}
{/then}
{/event}
A list of possible actions would include: affect values, increase/decrease values, show events (text, images, sounds) to the player.
Remarks upon the whole scheme are welcome. In particular, Gary, if you have any ideas on how things should/could be done, or plans of doing some of the scenario stuff.
Once we get a design, I will be able to know how much time this requires so we can decide when to do it (soon, later, much later, much much later).
This thread is to define a design to allow for more openness.
We want something like a xml definition for scenarios. It means we need a set of files describing unit types, techs, etc. (we already have some of that). We also have to be able to save the map, units on field, economy (this is underway).
When we have all this completed, it will be possible to generate a scenario without compiling anything IF:
-We change the resources/ directory. Currently we have a resources directory in the jar. All files are read from there (except settings). We should probably have one subdirectory per scenario.
-We are able to identify a list of available scenarios: Probably add a scenarios.xml file in /resources, which a modder could edit, or propose a file open (which may be a pain in java).
Additionnally, I want to add some events capabilities so that you can check a condition and do something at the beginning of each turn. For example, to implement Mark's example government scenario, the condition would be turnId = 20, the action being: set ai civ#2 behaviour to aggressive.
This means we will also need a xml file for events in the scenario subdirectory.
The syntax could be {event}
{if}turnId=20{/if}
{then}
{affect}(same tags to set ai attitude as in save file){/affect}
{/then}
{/event}
A list of possible actions would include: affect values, increase/decrease values, show events (text, images, sounds) to the player.
Remarks upon the whole scheme are welcome. In particular, Gary, if you have any ideas on how things should/could be done, or plans of doing some of the scenario stuff.
Once we get a design, I will be able to know how much time this requires so we can decide when to do it (soon, later, much later, much much later).
Comment