Notification Messages (building icon? name?)

Tomatekh

Emperor
Joined
Aug 6, 2012
Messages
1,426
Hi, is there any way to make a notification message that displays the icon of a specific building? Or am I stuck using the generic message exclamation mark?

I've tried using the various Wonder completed, completed player, beaten types with my building ID but it always ends up showing the Hagia Sophia.

Related to this, is it possible to display the name of the building in the message?

I've tried using " .. GameInfo.Buildings[BuildingID].Description .. " in the descr but that only displayed the TXT_KEY

Thanks for any help.
 
Hi, is there any way to make a notification message that displays the icon of a specific building?

Not easily as the required icons don't exist. Notifications use the 80x80 icon and BW_ATLAS_1 (the one used for normal buildings) doesn't include that size (whereas BW_ATLAS_2 as used by the wonders does)

I've tried using " .. GameInfo.Buildings[BuildingID].Description .. " in the descr but that only displayed the TXT_KEY

Use Locale.ConvertTextKey(GameInfo.Buildings[BuildingID].Description) to convert the TXT_KEY_ to a (locale specific) text string
 
Not easily as the required icons don't exist. Notifications use the 80x80 icon and BW_ATLAS_1 (the one used for normal buildings) doesn't include that size (whereas BW_ATLAS_2 as used by the wonders does)

Hmm, If theoretically I were to add 80x80 icons for the specific buildings, would it work then (there's only a limited set of buildings the mod adds the message for)?

And thanks again for all your help.
 
Probably easier said (typed) than done, as Firaxis use some weird encoding scheme for their DDS files which means you can't simply grab the 128x128 icon sheet (say) and resize it for 80x80 icons. So you'll have to find each graphic somehow and manually add it to a template (to get the correct alpha channel settings) at the correct index
 
Okay, I just quickly tested it with one of my mods (where I've always just included every atlas size) and it worked!

I'm familiar with decoding the DDS files, and done it before. Now I just need to decide if it's worth the effort in my final mod.

One last question, if you don't mind.

Using NOTIFICATION_WONDER_COMPLETED doesn't automatically go to every player (like some weird hard coded flaw that always seems to pop up with Civ V) right? As long as I specifically use pPlayer:AddNotification it should only show up to pPlayer?

Thanks again for the help.
 
Notifications only go to the player they were added to (hence the pPlayer: bit of that code and not pTeam: or even Game.)
 
Back
Top Bottom