Firstly, let there be user interface name configurable per enabler (backed with a common one defined for the enabled action). The client will put into the menu one from the first found active enabler for the selected unit(s), it's up to the ruleset author to avoid much messup. Let also the name be accessible for Lua action_started_* callbacks by the parameter of the "Action" value type (it provides the one name now and not much more, let's redefine the action as a more multipliable object). This will make customized actions configured more easily then just multiplying hardcoded values by "fake generalization" (actually, don't know the exact developers' plan of what they think to be the not fake generalization).
Next, let the enabler track some parameters that requirements can't, basically, the relations between the actor and the target (e.g. distance, dominance by culture or other parameters etc.). This is also a development of "fake generalized" bombard ranges for three splitted "Bombard"s.
Finally, we can put some parameters we now have in effects (like basic cost, success and survive probability etc.) into the enabler as we test there some requirements any way. Putting "actor can survive" into a field will require merging the actions devs have done much work to split

Code: Select all
[action_enabler_cheat_savages]
action = "Enter Marketplace"
ui_name = _("Exchange glass beads for gold sand")
survive_base_pct = 90 ; 10% they just cook your rascal explorer
effects_base = {"type", "value"
"Trade_Revenue_Bonus", 3200
}
relations = {"type", "name", "range" ; actor_val / target_val
"MinCultureRel", 10.0, "Player"
"MinTechsRel", 2.5, "Player"
"MaxFirstContactTurns", 10 ; they'll know you too good later
}
actor_reqs = {"type", "name", "range"
"UnitType", "Explorer", "Local"
"Tech", "Trade", "Player"
}
target_reqs = {"type", "name", "range", "present"
"Tech", "Trade", "Player", FALSE
"Extra" , "Gold", "City"
}