While I was working on the database code, I was reading a question regarding Park Rangers, and their enabling. The question was basically asking if they were hard coded, which they essentially are. People mentioned that you could use SLIC to solve it.
I brainstormed an idea, which went further... related to what I was working on... the data structure.
I was thinking of incorporating a universal Build Class, that could be assigned to anything and everything you can build, that can be enabled by things other than just advances (being prequisites)... like wonders enabling units, for example.
To make it flexible, you'd probably want a reasonable range of values to work with... say 1000. Anything that can be produced, build or researched would have a build class. If no Build Class was assigned to something, it would default to 0. By default every player and city could use build class 0, so the system would be completely optional in the data files.
Players and each city would have build class lists (of 1000 items)... much like flags.
If an item had a global enabling property, like, say a wonder enabling units, then it would turn the particular flag on for that player, then the particular items enabled by that build class would be possible to build.
There is another enabling class... local, which works for the city (and only that city) where the particular produced item was made. For example, if you built a foundry city improvement in your capital, then that may enable a class, which allows for cannons to be built in that capital city.
The properties would be available for SLIC to inspect, and alter, to allow for maximum flexibility, but for the most part, changes should be possible just through a few text file properties.
Essentially, the properties I'd suggest would be...
BuildClass int
optionally for Advances, City Improvements, Feats, Governments, Population, Goods/Resources, Terrain Improvements, Units and Wonders
For the Global items... that is... Advances, Civilization, Feats, Governments, Population, Units and Wonders, you could have:
EnableBuildClassGlobal int
EnableBuildClassGlobalMin int (min of the range enabled)
EnableBuildClassGlobalMax int (max of the range enabled)
DisableBuildClassGlobal int
DisableBuildClassGlobalMin int (min of the range enabled)
DisableBuildClassGlobalMax int (max of the range enabled)
You'd have Local versions (subtituting Local for the word Global in the above identifiers) for the local properties
City Improvements, Goods/Resources, Terrain Improvements and Wonders
That's nice... but what will this system allow us to do?
Some (although certainly not all) of the applications would be:
As I've mentioned... nothing is mandatory, and it won't impact current text files, just allow them to be extended.
I brainstormed an idea, which went further... related to what I was working on... the data structure.
I was thinking of incorporating a universal Build Class, that could be assigned to anything and everything you can build, that can be enabled by things other than just advances (being prequisites)... like wonders enabling units, for example.
To make it flexible, you'd probably want a reasonable range of values to work with... say 1000. Anything that can be produced, build or researched would have a build class. If no Build Class was assigned to something, it would default to 0. By default every player and city could use build class 0, so the system would be completely optional in the data files.
Players and each city would have build class lists (of 1000 items)... much like flags.
If an item had a global enabling property, like, say a wonder enabling units, then it would turn the particular flag on for that player, then the particular items enabled by that build class would be possible to build.
There is another enabling class... local, which works for the city (and only that city) where the particular produced item was made. For example, if you built a foundry city improvement in your capital, then that may enable a class, which allows for cannons to be built in that capital city.
The properties would be available for SLIC to inspect, and alter, to allow for maximum flexibility, but for the most part, changes should be possible just through a few text file properties.
Essentially, the properties I'd suggest would be...
BuildClass int
optionally for Advances, City Improvements, Feats, Governments, Population, Goods/Resources, Terrain Improvements, Units and Wonders
For the Global items... that is... Advances, Civilization, Feats, Governments, Population, Units and Wonders, you could have:
EnableBuildClassGlobal int
EnableBuildClassGlobalMin int (min of the range enabled)
EnableBuildClassGlobalMax int (max of the range enabled)
DisableBuildClassGlobal int
DisableBuildClassGlobalMin int (min of the range enabled)
DisableBuildClassGlobalMax int (max of the range enabled)
You'd have Local versions (subtituting Local for the word Global in the above identifiers) for the local properties
City Improvements, Goods/Resources, Terrain Improvements and Wonders
That's nice... but what will this system allow us to do?
Some (although certainly not all) of the applications would be:
- A flexible boolean (and/or/not) tech tree
- Implementing Strategic Goods (or being a big help)
- Wonder/City Improvement units/tile improvements (or pretty much anything you can imagine)
- Civilization traits
As I've mentioned... nothing is mandatory, and it won't impact current text files, just allow them to be extended.
Comment