How to add a new element to leader traits?

siva

Chieftain
Joined
May 12, 2008
Messages
6
I want to add the three warlords leader traits (charismatic, imperialist, protective) to my vanilla civ mod.

The CIV4TraitInfos.xml of warlords has 4 more elements per trait than vanilla civ does. I deleted two of them that have something to do with great general emerge. The remaining two are <iHappiness> and <iLevelExperienceModifier>, both relevant for the charismatic trait. I left them in there and added the file to my mod.

When i started civ, i got an error, because the two new elements had no connection to CIV4CivilizationsSchema.xml. I added them there so that the program ran without error message. The protective trait works fine, charismatic does nothing.

I have a hunch i need to tell the program somehow, what it should do with these new integers stored inTraitInfos, but i have hardly a clue how this can be accomplished. My hope is that somebody knows in what files i need to look and what i need to look for.


I know there is this thread:
Case Study: Adding new XML attributes and using them in the SDK
that basically explains how to do this. The python part is a bit above my level though and i wished somebody would show me, how to connect what is explained in that thread to my problem here.


EDIT: I just ran into the exact problem again in CIV4PromotionInfos. I'm basically figuring out how to implement parts of Warlords and BtS into Vanilla Civ. I can handle XML and Art files and am looking for a road into phyton. Adding new variables and making them work is something i know i'll need to do a lot.

EDIT2: Now i feel a bit silly for even posting this, because, now that i slept over it, Kaels thread suddenly makes much more sense to me. The code i need to change is in the same files as in the example: CvInfos.cpp and CvInfos.h The code even looks almost the same and can be found under the header "CvTraitInfo" (instead of the header "CvLeaderHeadInfo", where the changes in the example where made). The changes to this two files have to be compiled according to this thread: Installing and using the SDK though.

EDIT3: Well i thought i update my progress. When i finally get this to work i'll rwork this thread, so that it is more helpful to others. Anyway.. i just can't get my mod to start with the new core.dll. (Although i'm glad i even managed to compile this thing. Took me long enough) Right now i'll see the loading screen for a split second, then nothing - not even an error message. The dll is write enabled, as were the source files. Any ideas greatly appreciated.
 
Back
Top Bottom