[help] add a mission to an unit

theSeby

Chieftain
Joined
Feb 5, 2006
Messages
19
Location
Europa
First, hello to all (I'm new in the civ modding communauty).
I've got quite good programming skills and a good knowledge of the XML format.

For my fist attempt to made a mod, I'd like to improve the existing unit "spy" with a "steal technology" ability.
I've been looking for the XML-files and think I should modify:
CIV4UnitInfos.xml -> to "add" the mission to the spy,
CIV4MissionInfos.xml -> to create the mission,
maybe CIV4UnitSchema.xml -> to add the mission tag: bStealTech for UnitInfos (i had to define <bStealTech>0</bStealTech> for each other unit in order to avoid parsing error, but it made the app crashes when starting a game...).

Do someone know what I have to do to make my "mission" ?
Can I find some doc about this somewhere ?

Thanks and sorry for my bad english
 
To add a mission you would have to also add a button for it and call the proper functions that actually do whatever is needed (obviously, all this is done in python). Talchas put a nice thread on how to add extra mission buttons, this would be a good place for you to start.
 
You can't really add anything to the schemas until the SDK is out as far as I know.

Another thing is, I think it'd be a better solution to put this to each of the other units other than the spy:

Code:
<StealTech/>

...instead of

Code:
<StealTech>
     <bStealTech>0</bStealTech>
</StealTech>
 
> spincrus

Well in my test I didn't have any <StealTech> tag, just a <bStealTech>.

Anyway, i think i'll go on with Python, as in Talchas' tutorial.
 
Top Bottom