How much do you need to include to mod one line?

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
I've been trying to find this, so please forgive me if I've overlooked it. Exactly how much of a file do you need to include to mod something? For example, if I wish to change the tech tree requirement for a cannon, can I place an XML file in the appropriate directory with just this text:

Code:
<Civ4UnitInfos xmlns="x-schema:CIV4UnitSchema.xml">
	<UnitInfos>
		<UnitInfo>
			<Class>UNITCLASS_CANNON</Class>
			<Type>UNIT_CANNON</Type>
			<PrereqTech>TECH_STEEL</PrereqTech>
		</UnitInfo>
	</UnitInfos>
</Civ4UnitInfos>

Or, do I need to include the entire entry for the Cannon, or instead the entire 400k xml file with that one change?
 
unfortunately you need to include the whole file, I think. I tried it out this morning just having my changes in another file and it didn't work.

I wonder if there is a way to tell the xml parser to include the default XML file, and override their stuff with your changes. That would be a really nice thing to add in a patch anyways - distributing these large files is really unnecessary.
 
Weasel Op said:
You always have to include the complete XML file. Or any file for that matter.

I'm not so sure. I think it should work with only part of the files. At least it's working with the files in assets/xml/text/
 
I sure do hope there's some way to alter just 1 or two things...requiring the entire file precludes the possibility of different mods altering different attributes in the same file. I like mix-and-matching mods that all do little things, ala WoW, rather than huge mods that do lots of things.

Modularity is good...
 
Back
Top Bottom