Modifying TopPanel

GammaNova

Chieftain
Joined
Oct 31, 2014
Messages
12
For my Beyond Health mod I'm trying to add some additional detail to the health tooltip as well as make it clickable to bring up the civilopedia.

Now, I can already do this decently enough by just replacing the existing TopPanel.lua file, but it feels awfully invasive to do this. Since this file effects every one of the top panel display (strategic resources, culture, health, science, etc) I don't want to have this change totally muck with any other mods.

Edited: Code irrelevant, TopPanel.lua much more worrisome. See my reply below.
 
I'm actually even more concerned about TopPanel, now.

I'm noticing a number of mods that alter the lua or xml file, all for a simple UI tweak here and there, but there's just so much packed into this, it's going to make a lot of mods incompatible very quickly. For example, both the display on the main screen and all of the tooltip data for every single one of these buttons is all in the same file.

I'm actually thinking a good preliminary mod would be to break up TopPanel.lua into a number of smaller files that just get included by the original, then later modders can just use this as a dependency.

Does this make sense to anyone? Am I totally off base here?
 
Top Bottom