Fully Modifiable Custom Notifications

Hi
I'm trying to add your custom notifications to my Emigration mod but it does not work

Runtime Error: [string "D:\My Documents\My Games\Sid Meier's Civili..."]:250: attempt to index field 'FingerTitle' (a nil value)

How to get it working?
Thanks!
 
I am not so sure the version on here is still working or if the NotificationPanel is out of date. Either way, doing a quick scan through the Lua should make clear what does and does not work.

Also, I believe there is a version of Emigration with Custom Notifications in the CCMAT II I made.
 
Thanks for answering my question.
I've tried to use TreeGrowth 4 as a reference, that didnt help much though. I am getting the same error, plus some crazy visual effects as on the screenshot below.

I dont know what I'm doing wrong.

p.s. problem resolved; i've made xml more similar to TreeGrowth and it seems all is fine now.

Thanks for the mod Sneaks :goodjob:
 

Attachments

  • 2012-02-05_00001.jpg
    2012-02-05_00001.jpg
    284.8 KB · Views: 101
Hello!
working on Emigration 4.
i'm having a problem again, now in CustomNotification.lua:
Runtime Error: [string "D:\My Documents\My Games\Sid Meier's Civili..."]:74: attempt to call method 'BuildInstanceForControl' (a nil value)

:help:
strange thing is, i'm pretty sure i havent changed anything about notifications at all.

ps: hmm.. Treegrowth notifications are working at the same time..
 
There were code lines missing from G&K, so the only change made to the module was that I just added them to the NotificationPanel.lua file.

File posted as RAR and ZIP.

For a recent example of how to use this very handy module, take a look at the last posted versions of TreeGrowth, and Emigration.
 

Attachments

Can anybody explain how to use icon tables?
I didnt understand anything

Heres an example:
Code:
MyNotificationTable = {{"Civ1", Player1ID, 45, true, 0},{"Resource1",resourcechosen,0,0,0}}
In this case, we are hooking up a Civilization Icon and a Resource Icon. The Civilization icon has an ID of "Civ1" in the XML. The value of Player1ID is the ID of the Civ we want to display. The image size will be 45, and true means the game will check to see if we have met the Civ in question before displaying their picture. If we have not, it will default to a '?' image. The Resource has an ID of "Resource1" in the xml. resourcechosen has the value of the resource. Since the next 2 values are 0, the size will default to 80, and HasMet check to false.
Whats an id of a civilization icon in the XML? What xml, what icon?
and where this icon will show up? in the tool tip or as a notification icon? and if the latter, why there are more than 1 possible?
Player1ID here is a "CIVILIZATION_SIAM" for example, right?
 
I'm not sure I understand everything you can do with this. Is it possible to add a custom notification that, upon clicking, opens another popup (preferably a custom popup). So far that doesn't look possible.
 
doesnt work in BNW:
Runtime Error: C:\Users\Миша\Documents\My Games\Sid Meier's Civilization 5\MODS\Emigration (v 6)\Lua\CustomNotifications\NotificationPanel.lua: 539: attempt to perform arithmetic on field 'NUM_NOTIFICATION_TYPES' (a nil value)

i'd be glad if anyone said how to fix it...
 
Back
Top Bottom