Sid Meier's Civilization V

Sid Meier's Civilization V

All Promotions Dynamic Tooltip BNW
 This topic has been pinned, so it's probably important
Mavoc  [developer] 15 Nov, 2018 @ 9:03am
For Modders, How grouping works with pattern matching
Example Promotion:
Description Key = TXT_KEY_PROMOTION_TARGETING_2
Description Text = Targeting II
Help Key = TXT_KEY_PROMOTION_TARGETING_2_HELP
Help Text = +20% [ICON_STRENGTH] Combat Strength against [COLOR_POSITIVE_TEXT]Naval Units[ENDCOLOR].

Description:
First qualification is to have matching Description Keys that end in a "_#" where the # is arabic numerals (0-9). All the Description Texts should also match while ending with a roman numeral which should match the value in the Key (ie: 2 in Key with II in Text). Only the first Text will be used while the number in the Keys of the others will be converted to roman and added to the first's Text. If there are less then 5 matching promotions then the roman numerals in the Text will be concated with commas (ie: I,II,III,IV). If there are 5 or more then only the first and last will be displayed (ie: I-VII)

Help:
Help Key can be in any format you like. In grouped promotions, matching Help Texts will have their arabic numbers combined and their roman numerals concated. Help Text will be determined to be matching if a cleaned version matches. The cleaned version will be made by having all arabic numbers, roman numbers, white spaces, and markup code stripped out and the text becomes all caps. In the above example, the cleaned Help Text would be "+%D%%COMBATSTRENGTHAGAINSTNAVALUNITS.". If the Help Text does not match, then the Help Text will concat with the non-matching Help Text.

Example:
3 levels of scouting
"Scouting I" - "+1 Visibility Range."
"Scouting II" - "+1 Movement."
"Scouting III" - "+1 Visibility Range."
would be displayed as
Scouting I,II,III +2 Visibility Range. +1 Movement.


Last edited by Mavoc; 7 May, 2020 @ 11:29am