What an action is called in the action selection dialog and what mnemonic it should have can now be set in the ruleset. See
patch #4582,
patch #5615,
patch #5651,
patch #5717,
patch #5769 and
bug #23127
The mnemonics of some actions had to change in 2.6 because a custom ruleset may enable them all at the same time. Adding this patch allowed setting those that wouldn't appear at the same time to their old mnemonics in the bundled rulesets. That was the primary motivation for adding this feature to 2.6.
The feature can also be used to give ruleset specific action names. A word of warning: other texts related to the action aren't ruleset configurable. Even if you tune the action UI names to preserve the suspension of disbelief unconfigurable texts may still break it.
The action UI names are set in the actions section of game.ruleset. If an action UI name isn't set it a default name is used.
Example 1: A ruleset where the action to sabotage a unit and the actions to sabotage a random city improvement never happens at once can use the same mnemonic for them both. In the case below it is 'S'.
Code: Select all
[actions]
ui_name_sabotage_unit = _("%sSabotage Enemy Unit%s")
ui_name_sabotage_city = _("%sSabotage City%s")
Example 2: A ruleset with a wonder called Federal Reserve. Its owner can send a Diplomat to the capital of any player he isn't at war with and... accept... a deposits of up to 90% of the other player's gold.
Set the action name.
Code: Select all
[actions]
ui_name_steal_gold = _("Accept %sGold Deposit%s")
Add the action enabler. Notice that the ruleset still refers to the action as "Steal Gold".
Code: Select all
[actionenabler_federal_reserve]
action = "Steal Gold"
actor_reqs =
{ "type", "name", "range", "present"
"Building", "Federal Reserve", "Player", TRUE
"UnitType", "Diplomat", "Local", TRUE
"DiplRel", "War", "Local", FALSE
}
target_reqs =
{ "type", "name", "range", "present"
"Building", "Palace", "City", TRUE
}
Set limit on how much may be stolen.
Code: Select all
[effect_steal_gold_capital]
type = "Max_Stolen_Gold_Pct"
value = 90
reqs =
{ "type", "name", "range", "present"
"Building", "Palace", "City", TRUE
}
On top of this the Federal Reserve wonder must be added to buildings.ruleset