Split up the helptext field across effects
Posted: Tue Nov 17, 2015 4:28 am
Currently we have something like this (I am using the building aqueduct as an example), in the file cities.ruleset we have the help text
While in file effect.ruleset we have the effects
This can make it very hard to keep the help text up to date while changing the effects.
What I propose is that the help text can be put directly in the effect file like this:
Also more than one target can be specified to make the help text appear in multiple places.
Code: Select all
[building_aqueduct]
name = _("Aqueduct")
...
helptext = _("\
Allows a city to grow larger than size 8 and reduces the chance of plague\
within the city (-30%). A Sewer System is required for a city to grow larger\
than size 16.\
")
Code: Select all
[effect_aqueduct_base]
name = "Size_Adj"
value = 8
[effect_aqueduct]
name = "Size_Adj"
value = 8
reqs =
{ "type", "name", "range"
"Building", "Aqueduct", "City"
}
[effect_aqueduct_1]
name = "Health_Pct"
value = 30
reqs =
{ "type", "name", "range"
"Building", "Aqueduct", "City"
}
What I propose is that the help text can be put directly in the effect file like this:
Code: Select all
[effect_aqueduct_base]
name = "Size_Adj"
value = 8
helptexttargets =
{ "type", "name"
"Building", "Aqueduct"
}
helptext = _("\
Allows a city to grow larger than size 8.\
")
[effect_aqueduct]
name = "Size_Adj"
value = 8
reqs =
{ "type", "name", "range"
"Building", "Aqueduct", "City"
}
helptexttargets =
{ "type", "name"
"Building", "Aqueduct"
}
helptext = _("\
A Sewer System is required for a city to grow larger than size 16.\
")
[effect_aqueduct_1]
name = "Health_Pct"
value = 30
reqs =
{ "type", "name", "range"
"Building", "Aqueduct", "City"
}
helptexttargets =
{ "type", "name"
"Building", "Aqueduct"
}
helptext = _("\
Reduces the chance of plague within the city (-30%).\
")