[Freeciv-Dev] Inheritance of fields in rulesets
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
If somebody will do default entries for rulesets, there should be only
small problem with extending it to something more powerful.
[template default]
hp = 20
movetype = ground
...
[template air extends default]
movetype = air
...
[unit explorer]
Name = "Explorer"
hp = 10
...
[unit fighter extends air]
Name = "Interceptor"
Flags = require-fuel
...
[unit stealth-fighter extends fighter]
Name = "Stealth Fighter"
Flags = stealth require-fuel
Few points there.
[template ...] would not get to final rules - it is just during loading.
Maybe in last case construct like
Flags += "Stealth"
could be used, but I think it is too much complication ( -= would be
also required and in many cases it would have to be specified whole
anyway).
I think that it would be good to use "" only for strings that are
displayed to player. This way all "" strings could be marked for i18l.
Rest - tech id names (as opposed to displayed names), flags etc would be
one word, without any quotes. They would be provided in [] at top of
entry. It would also simplify scripting later - because for now
units/terrains/techs etc do not have constant id string by which they
could be reffered to from scripts.
So for example techs would look like this:
[advance chivalry]
name = "Chivalry"
req1 = feudalism
req2 = horseback-riding
[advance horseback-riding]
name = "Horseback Riding"
Of course it require keeping one more name for every entity, but I think
it is a lot clearer.
Only fields that would stay quoted are names which have no effect on
game - this means names for
units,buildings,techs,terrains,terrain-resources, goverments + all these
stuff for goverments (city names, leader names/titles etc).
If somebody do not like this idea please tell me why. If nobody will
implement it for some time, I'll be forced to do this myself to
integrate with script module - and in this case I would prefer not to do
work that won't be later included for no reasons.
If somebody would like to code this, please do it - it will be
beneficial for both main trunk and my scripting experiments.
Artur
- [Freeciv-Dev] Inheritance of fields in rulesets,
Artur Biesiadowski <=
|
|