adding unit/techs/buildings

clanky4

Emperor
Joined
Jul 11, 2012
Messages
1,262
Location
USA
Are there any specific bits of python or C++ that need to be edited in order to add basic units/techs/buildings? Are there any other special considerations should be undertaken when adding there things?

I searched the subforum but I didn't really find any clear answers. Thank you for any help.
 
if you add new stuff add it at the end of the existing stuff, not in the middle. you don't have to add anything to the c++ or python unless you want to use those things to manipulate the new stuff you've added (like spawn units, add buildings to cities etc).

enable python exceptions (in your ini file) or you will not know when things go wrong.
 
So unless the units/buildings/techs either spawn with a civ or affect stability then I don'y need to do anything special to add them in?
 
When you add a new building/unit/tech, you always have to edit the const.py. But this is just adding a new value into a list, which is very easy.

You do need to edit the C++ if you want to add building, because of the embassy mechanic.

But then, you only have added the new units/buildings. I guess you also want some RFC mechanics to use the new units/buildings, like recieving a unit upon spawn, you also have to edit some other python files.
 
I think you can add units or buildings to the xml without changing anything else and the game will load and run fine. however, the game may check for wonders with a iBuilding > the first wonder in the list check or things like that.

the embassies aren't listed in CvRhyes.h. are they listed somewhere else?
 
I don't know exactly what you should change. But from my experience with my 2nd UB modcomp, I know it will not work without it.

The mod will load fine with the new buildings, but you can't build them, as the game sees them as embassies. (You also get the embassy info tag in the civilopedia)

Leoreth made the changes for me. I'm not complete sure what you should change.

I think that every building that comes after the list in Rhyes.h is counted as an embassy. So if you add buildings, they are not in the list and come after that list. Therefore they are counted as embassy.
 
Top Bottom