UI Tooltip addition

Mylon

Amateur Game Designer
Joined
Nov 4, 2005
Messages
1,013
Is it possible to add an extra line into a tooltip without copying over a whole chunk of interface code? Or perhaps there's some other means to get the information I need to across?

Specifically, I've created a mod that grants a civ happiness based on the size of their treasury. This change involves giving the civilization multiple copies of a +1 happiness building in their capital. The interface gives no indication that multiple copies of the building exist but the happiness bonus is working properly. Can anyone suggest a means of letting the player know how much their treasury is improving happiness without overwriting a big chunk of code and removing plug-in capabilities?
 
I've been wondering about this as well. What would be really nice would be someone rewriting relevant bits of the top panel to be modular so one can add elements to the gold per turn, happiness, and so forth, through some simple mechanism (such as a LuaEvent).
 
Is it possible to add an extra line into a tooltip without copying over a whole chunk of interface code? Or perhaps there's some other means to get the information I need to across?

maybe this tutorial by Onni could help you : Creating UI mods with lua & xml (see the part about the ContextPtr)
 
Back
Top Bottom