How to add new virtue text?

Polygleek

Chieftain
Joined
Nov 7, 2014
Messages
12
So I am modifying the effect of a virtue (Liberation Army), but the text is only linked to the virtue by the effect as far as I can tell. Using the "Help" element does only work on the pedia page, but leaves the mouseover tooltip of the virtue blank.

Here is what I tried:

Code:
<Policies>
		<Update>
			<Set CaptureOutpostsForSelf="false" CultureFromKills="100" Help="TXT_KEY_POLICY_MIGHT_5_HELP"/>
			<Where Type="POLICY_MIGHT_5"/>
		</Update>
</Policies>
<Language_en_US>
		<Row Tag="TXT_KEY_POLICY_MIGHT_5_HELP">
			<Text>Earn 100% of any unit's strength as [ICON_CULTURE] Culture after killing it</Text>
		</Row>
</Language_en_US>

This only adds the text to the "Game Info" part of the Pedia page.

Code:
<Policies>
		<Update>
			<Set CaptureOutpostsForSelf="false" CultureFromKills="100"/>
			<Where Type="POLICY_MIGHT_5"/>
		</Update>
</Policies>
<Language_en_US>
		<Row Tag="TXT_KEY_POLICY_EFFECT_CULTURE_FROM_KILLS">
			<Text>Earn 100% of any unit's strength as [ICON_CULTURE] Culture after killing it</Text>
		</Row>
</Language_en_US>

This has no effect whatsoever.

PS: While we're at it: How could I change it to grant a free colonizer unit instead of capturing the outpost ?
 
I can't answer your question specifically, but generally it would be on the relevant event you check if they have the policy then call InitUnit for the player to add the unit to the units they control. As for you original question it seems you're a bit out of luck. There's no table tying policies to policy effects. That's seems to be actually hardcoded in UI\InGame\InfoTooltipInclude.lua starting at line 2429. It links the text to the column of the policies table. That particular column doesn't happen to have a link. I don't think you actually have to hardcode in the 100% and can get it to just use the value from the table.
 
Back
Top Bottom