Nation Class
Posted: Sun May 27, 2018 2:37 am
The fundament of this idea is to create a 'virtual object class' that would *include individual nations. It would be able to define some default values that would be inherited by all *included nations within that nation class. This would allow easier modding of nations without actually having to modify the individual nations, allowing modders to still use the many hundreds available in the distribution.
For example, one might take 16 nations that are packaged in a commercial Civilization game, and make a nation class for each of these, then add all the remaining nations to whatever nation class is best fitting.
I'm not aware how easy or hard this would be with Freeciv's code.
More:
It would be awesome if there was, I don't know, some kind of intermediary nation file set that could easily slot in the existing nations? I'll call it... Nation Class. Something that would allow use of init_techs, init_buildings, init_units, and init_flags. AFAIK, the first three must be in each individual nation; all "" ones would be removed and that would be reserved as an override. The last doesn't exist at all, and would have flags (like the list mentioned in the OP) that could likewise be overwritten.
I've specifically separated it from (nation) groups, as there would be either too many nation class files or they would get overwritten in every single nation.
The nation class files would be *included in nationlist, and the nations would be *included in the nation class files.
So instead of simply this setup:
For example, one might take 16 nations that are packaged in a commercial Civilization game, and make a nation class for each of these, then add all the remaining nations to whatever nation class is best fitting.
I'm not aware how easy or hard this would be with Freeciv's code.
More:
It would be awesome if there was, I don't know, some kind of intermediary nation file set that could easily slot in the existing nations? I'll call it... Nation Class. Something that would allow use of init_techs, init_buildings, init_units, and init_flags. AFAIK, the first three must be in each individual nation; all "" ones would be removed and that would be reserved as an override. The last doesn't exist at all, and would have flags (like the list mentioned in the OP) that could likewise be overwritten.
I've specifically separated it from (nation) groups, as there would be either too many nation class files or they would get overwritten in every single nation.
The nation class files would be *included in nationlist, and the nations would be *included in the nation class files.
So instead of simply this setup:
It would be like this by default:nationlist.ruleset wrote: *include "nation/abkhaz.ruleset"...etcabkhaz.ruleset wrote: [nation_abkhaz]
name=_("Abkhaz")
...etc
A more customized setup would not have a single nation class, but potentially several in their own files:nationlist.ruleset wrote: [class_a]
init_techs = ""
init_buildings = ""
init_units = ""
init_flags = ""
*include "nation/abkhaz.ruleset"...etcabkhaz.ruleset wrote: [nation_abkhaz]
name=_("Abkhaz")
...etc
nationlist.ruleset wrote: *include "modname/class_a.ruleset"...etcclass_a.ruleset wrote: [class_a]
init_techs = ""
init_buildings = ""
init_units = ""
init_flags = ""
*include "nation/abkhaz.ruleset"...etcabkhaz.ruleset wrote: [nation_abkhaz]
name=_("Abkhaz")
...etc