Modding Question for New Era Popups

Sebitudoreci

Chieftain
Joined
Jul 21, 2016
Messages
18
Location
Romania
Hello, I've been having problems implementing United Nations for Diplo win in a renaissance themed mod I'm working on (Tech Tree ends in mid renaissance era), so i decided to bypass the problem by adding 2 techs form further along eras, namely radio and globalization (eras modern and future). My question is if there is any way to disable the new era popups you get, so as not to clash with the idea that this mod is taking place in the renaissance (I will of course rename the techs and the eras, but the futuristic popups are distracting)

So far I've managed to find something that disables the voice lines for the popups:
<Era_NewEraVOs>
<!--Disable New Era Voice Overs-->
<Delete EraType="ERA_CLASSICAL"/>
<Delete EraType="ERA_MEDIEVAL"/>
<Delete EraType="ERA_RENAISSANCE"/>
<Delete EraType="ERA_INDUSTRIAL"/>
<Delete EraType="ERA_MODERN"/>
<Delete EraType="ERA_POSTMODERN"/>
<Delete EraType="ERA_FUTURE"/>
</Era_NewEraVOs>
And I assume something similar should do, but I have no idea where to even start looking.

This is my first thread on this site/forum so I'm sorry if this question has been asked, or if i should place the thread in a different place for help with this type of thing. But so far I've yet to find the answer I'm looking for, and it drove me to registering here for help :)
 
Why dont you change era column for radio and globalization?


It has to do with the first part of the thread, I can't (aren't skilled enough to) modify the world congress resolutions to work for other techs, so i decided to work around the problem by adding techs that already are in the eras where they trigger World congress changing of host, and United Nations (needed for diplo win) respectively.

Also, knowing whether i can disable the new era popups or not, would be a great information to have for future projects ^^
 
You can replace, alter or suppress pop-ups ... but you'll need to use Lua - see here

For your specific era requirements you'll need some Lua that detects if the popup is for an era being kept, and if so do nothing, otherwise suppress the popup (see posts #3 and #4 in that thread)
 
I haven't tried my hand at lua yet, but from the guide you linked, that shouldn't be a problem. thanks for your help here as well 69. I take it you're the go to guy around these parts? :)
 
The pop-up is generated by NewEraPopup.lua (and .xml), files with which I became intimitely familiar for ZN-Era Popups. As indicated in whoward69's link, you can add a copy of the .lua file from the base game:
Code:
{Install folder}\Assets\DLC\Expansion2\UI\InGame\Popups\NewEraPopups.lua
(assuming you're using BNW) to your mod, and set it to VFS=true, then make your edits. Of course it'll be incompatible with mods like the aforementioned.

I'd replace the lastBackgroundImage lines at 32, 34, 36, 38 with something like:
Code:
OnClose()
return true
 
Top Bottom