adding XML tags with SDK

oki thx for answering.

Here you have 3 directories.
1st) Oil Cost per Move - works and it add a tag to units to assaign a certain value for 1 plot move to be subtracted from oil reserve
2nd) with Oil Reserve (excaly like Gold reserve) creation
3rd) with Oil Production per turn.

To find the part I've modded you can look for word "OIL".

Thx very very much in advance.
 

Attachments

I looked at a couple of the files and here's what I noticed.

For one thing, the syntax checker in my XMLSpy is complaining about:

Code:
<!--------------------------------------------------- OIL EXTRACTION PER TURN ---------------------------------->
	<ElementType name="iOilExtractionPerTurn" content="textOnly" dt:type="int"/>
<!-------------------------------------------------------------- END --------------------------------------------------------->
	</ElementType>

It doesn't like all those dashes you put in (it's looking for a ">" after the first four "-"s). Change it to

Code:
<!-- OIL EXTRACTION PER TURN -->
	<ElementType name="iOilExtractionPerTurn" content="textOnly" dt:type="int"/>
<!-- END -->
	</ElementType>

and likewise for the comments in the other file.


In CvInfos.cpp, move 'return true;' to after you've read the tag:

Code:
//----------------------------------------- OIL EXTRACTION PER TURN -----------------------------------
	pXML->GetChildXmlValByName(&m_iOilExtractionPerTurn, "iOilExtractionPerTurn");
//----------------------------------------------------------- END 

	return true;

I didn't look at the Player files but try that to start with.
 
yep, I concur with PeteT. I think its a syntax problem in your XML. Fix all of those and you will probably get it to work :).

Aussie_Lurker.
 
seems it works :D
Thx.

What is really strange is why, after recompiling (before modding xml files), the game was returning me an error like "<!-------------- string error" .... and before it was returning me the other one...

:confused:
Mah.
Anyway the important thing is that now I can test the mod :D:D:D:D:D

meanwhile do you know if main interface design is contained into Interface.py file?
And if you know exaclty which one? (I'm trying to make the screen showing a 4th row after Gold/Culture/Science... Oil )

Thx again for help anyway :goodjob: :king:
 
Nice that everybody solved their problems :)

Pete, you talked about XMLspy ? What is it exactly ? A software to check syntax mistakes in XML files ?
 
Not just that, though. It also happens to be-in my humble opinion-the best XML editor on the market, and was the editor of choice of the Firaxis team (just look at the top 5 lines of any of their XML files if you don't believe me :p ;) ).

Aussie_Lurker.
 
Back
Top Bottom