[MODDING]Civic Change : A not so easy XML issue.

P&nny

Warlord
Joined
Sep 1, 2007
Messages
210
Hi Folks, I just registered on this Forum, but I have been reading it for a while.
After playing insanely lots both SP and MP, I tried to MOD some stuff, and here is my -so far- couple of struggle.

1/
It's a general question, as I'm not that good with XML yet, but I'll ask it over my Civics issue.
Context : It's A Post-reny era MOD, basically, it looks kinda colonization similar.
Anyway, I'v decided that I'd put no Religion, which I did, so that let me the whole Last column of civics available.

First sub-question, How do you RENAME such a thing ?
I'd just want to Rename the CIVIC_OPTION_RELIGION, so that it appear like "elite unit" column, do I need to go through all the pain of retagging 3 Files
with CIVIC_OPTION_ELITE ? (--> is There a <name> Tag ? I can't put my finger on it.)

Anyway, So I've decided that the 3 first RelCivic would be so that :
1 - -25% Military Prod, +3XP for Siege.
2 - -25% Military Prod, +3XP for Mounted.
3 - -25% Military Prod, +3XP for Guns.

Here was the Initial Code :
In CivicInfos.XML, for all Civics
Code:
<iFreeExperience>0</iFreeExperience>
in GameInfo Schemas :
Code:
<ElementType name="iFreeExperience" content="textOnly" dt:type="int"/>

Further on :
<ElementType name="CivicInfo" content="eltOnly">
	...
       <element type="iFreeExperience"/
       ...

So, I though It would work with this :
Civic Info (just an example, here for Vassalage maybe
Code:
<iFreeExperiences>
				<iFreeExperience>
					<UnitCombatType>UNITCOMBAT_SIEGE</UnitCombatType>	
					<iExperience>3</iExperience>
				</iFreeExperience>
			
				<iFreeExperience>
					<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>	
					<iExperience>3</iExperience>	
				</iFreeExperience>	
			
				<iFreeExperience>
					<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>	
					<iExperience>3</iExperience>	
				</iFreeExperience>
	

			</iFreeExperiences>

And the GameInfoscheme :

Code:
<ElementType name="iFreeExperience" content="eltOnly">
			<element type="UnitCombatType"/>
			<element type="iExperience"/>
		</ElementType>
	<ElementType name="iFreeExperiences" content="eltOnly">
				<element type="UnitCombatFreeExperience" minOccurs="0" maxOccurs="*"/>

Also, I had change the regarding line in the Civic Element Type
<ElementType name="CivicInfo" content="eltOnly">
	...
       <element type="iFreeExperience[U]s[/U]"/
       ...

Well, that code is FAR From working out...
So I was wondering if you guys could help me,
Knowing if I'm heading towards a wall or something ?

I'm just wondering if :
- This should be dealt with those 2 files, but differently
- There is another upper file, a upper schem sorta.
- This command is not-understood, this has to be explained in a Python file (I've checked, didn't see anything)
 
I'd Really like to understand that really, so that would broaden my range of action !

Here is my second question, it's my end-game:lol: ,
How hard it it to Add a new Tile production ?
So that a tile could produce : Food, Hammer, Commerce, Sushi/Friends/Whatever.

I'd like to add "Victory point", and set only victory point on a specific ressource, and that ressource to be unique, or very rare, on a self-made map.

My guess is that it's very deep Python made,
Could I do the trick with a ressource producing numerous amount of Culture ?
(I.E Gold set to very rare, gold produce 500 Culture, victory set 100 000 Culture, ...)
Is the second possible with only XML Dynamic ?
 
You don't need to rename CIVIC_OPTION_RELIGION to change what it says in the game. The <type> is what the game see, the <description> is what the player see.



You can't add or remove tags from the schema without also modifying the SDK. A schema is only an instruction for how to create/read an XML file. There's a tutorial on the subject but you will need a basic understand of c++ to add new XML tags.

You can do it in python but the AI will not understand it (can be somewhat mitigated by changing iAIWeight in the XML file) and you still can't add it to the XML file without modifying the SDK.



There's a(n almost year old) modcomp which adds a new yield. To do it on your own requires SDK modification.
 
Top Bottom