As with the other Quick Questions threads in the other games' subforums, this is a thread to ask quick questions about modding. This will make it a lot easier for people to find answers to both common and not so common issues.
tooltip = [InGameTopbar.GetPlayer.GetTyrannyTooltip]
TYRANNY_TT:0 "#T Tyranny#!\n$EFFECT$\n$CHANGE$\n\n#TF The Tyranny value represents the level of oppression within the country. There are various actions that can increase this.#!"
TYRRANY_EFFECT:0 "Your Tyranny has the following effects:\n$EFFECT$"
TYRANNY_CHANGE:1 "Tyranny change by by $VAL|-=$ every month due to:\n"
I definitely being an idiot, but where exactly is/how do you get the map editor they've shown off? Is it in-game via console command, or in the game files somewhere, or a separate download?
You can apply a visible = BoolReturningFunction to an object to control if it appears.Has anyone been fiddling with the GUI yet? I'm trying to find some way to conditionally show tooltips for a GUI element, but couldn't figure anything out yet
GetTyrannyTooltip is hardcoded in some way right? I found the individual localisation strings but they looked tied together in some mannerCode:tooltip = [InGameTopbar.GetPlayer.GetTyrannyTooltip]
Code:TYRANNY_TT:0 "#T Tyranny#!\n$EFFECT$\n$CHANGE$\n\n#TF The Tyranny value represents the level of oppression within the country. There are various actions that can increase this.#!" TYRRANY_EFFECT:0 "Your Tyranny has the following effects:\n$EFFECT$" TYRANNY_CHANGE:1 "Tyranny change by by $VAL|-=$ every month due to:\n"
I definitely being an idiot, but where exactly is/how do you get the map editor they've shown off? Is it in-game via console command, or in the game files somewhere, or a separate download?
Anyone can help me find this line in the Localization files?
View attachment 474211
I'm working on an improved Spanish localization mod, and I'm trying to change the order of the culture and religion in this particular line, for Spanish grammar reasons.
Thank you, very helpful. Could you elaborate a little on how I would use the visible function in relation to a tooltip?You can apply a visible = BoolReturningFunction to an object to control if it appears.
GetTyrannyTooltip is defined in code yes.
widget = {
name = "national_unity"
size = { 116 40 }
icon = {
name = "value_frame"
position = { 0 -2 }
texture = "gfx/interface/tiles/icon_value_tiles.dds"
spriteType = Corneredtiled
spriteborder = { 48 48 }
size = { 110 40 }
}
icon = {
name = "loyalty_icon"
position = { 2 0 }
size = { 36 36 }
using = icon_loyalty
}
textbox = {
name = "national_unity"
position = { 72 3 }
using = MarbleButtonFont
autoresize = yes
text = "total_national_unity"
tooltip = "national_unity_desc"
widgetanchor = top|hcenter
}
tooltip = "national_unity_modifiers"
}
By memory, that's in interface_l_english.yml
POPULATION_TOOLTIP_ITEM:0 "$COUNT|Y$ [RELIGION.GetName] [CULTURE.GetName]"
You probably will have to use a periphrase, like "X pops of religion X and of culture X"
Thank you for the answer, but it seems that wasn't the line. The one I'm looking for would only show (AFAIK) in the province/city view, when looking at the different types of POPs.
Ah on the thing with the tooltip you can have a tooltip_enabled = FunctionReturningBool which will workThank you, very helpful. Could you elaborate a little on how I would use the visible function in relation to a tooltip?
As I see it when I create a widget I have the ability to attach a single tooltip, but not define any behaviour of said tooltip
Code:widget = { name = "national_unity" size = { 116 40 } icon = { name = "value_frame" position = { 0 -2 } texture = "gfx/interface/tiles/icon_value_tiles.dds" spriteType = Corneredtiled spriteborder = { 48 48 } size = { 110 40 } } icon = { name = "loyalty_icon" position = { 2 0 } size = { 36 36 } using = icon_loyalty } textbox = { name = "national_unity" position = { 72 3 } using = MarbleButtonFont autoresize = yes text = "total_national_unity" tooltip = "national_unity_desc" widgetanchor = top|hcenter } tooltip = "national_unity_modifiers" }
Thank you for the answer, but it seems that wasn't the line. The one I'm looking for would only show (AFAIK) in the province/city view, when looking at the different types of POPs.
Hmm, you're right. I confused with the nation interface, where this may displayed more in line with grammar rules, but this ones is entirely hardcoded
Ok nifty, can I add more than one tooltip to the same widget?Ah on the thing with the tooltip you can have a tooltip_enabled = FunctionReturningBool which will work