Modding the Civilopedia - How?

Bosparan

Chieftain
Joined
Oct 27, 2014
Messages
23
Hi fellow Civ players / modders,

I've been doing some modding in Civ 5 - virtually all of it XML modding, manipulating, adding or removing content - and now have my eyes set on Civ BE. Given the similarities between the games (heck, there still are Global Defines for religions in there, though I doubt they get much use these days) I don't foresee any trouble with picking up where I left.

Only, one thing I'm looking into now is on how to mod the Civilopedia. Expecting this to be as simple as checking out other mods that did it and steal from their methods to implement my own ideas ... I hit a very dry hole. The only reference to a mod that ever did this was from WHoward - thanks for all the other things I learned from you - but his page did no longer host this mod. And I personally never did any UI modding either.

Do I need to completely study up on modding UI to do this, or are there some shortcuts I can take? (In General, I do not have much need for UI modifications for my mods, and not as much time as I'd like to dump on the project)

Some basic actions I'd like to be able to do:
- Add a main Civilopedia Category (Tab)
- Create a structure for that Category
- Remove Civilopedia Categories
- Reorder the 'Ped Categories

The primary issue I care about is adding another Category, but the other aspects would be very good to know as well.

Finally, when I have a new tab, how do I tell it what goes where? Let's use the Units tab for an example: If I want to see a new unit placed there, all I need to do is create a new unit in XML and assign the proper Pedia Categories (a field on the unit table) and the game will handle the rest. But how do I define those rules? How do I create custom categories and ensure that my content gets added properly?

Thanks in advance for any help and insights into the matter.

Cheers,
Bosparan
 
Figured it out on my own. Basically, I stole the old Promotions tab from Civ 5 and restored it to its former glory. But generally, it involves ...

- Adding another button in the XML (they're numbered, somewhere in the middle, just increment the number).
- Adding the Category number at the top of the Lua file
- Incrementing the total categories counter
- Adding entries in the two dictionaries (.buttonTexture and .labelString)

Finally, filling in the following entries. I'll give the lines where I had to add them after doing the previous steps. Working upwards from the last allowed me to keep the line numbers accurate throughout the process:
6524: Add a display list (.DisplayList)
5773: Add Select Heading (.SelectHeading)
5127: Add Select Article (.SelectArticle)
2001: Add Homepage for Category (.DisplayHomePage)
1489: Add list logic (.PopulateList)

For what to add, see other entries. Feel free to be creative :)

Cheers,
Bosparan
 
Back
Top Bottom