xml modding questions

ok when ever i try to load the game it will say cannot find xml file for (enter unit name i.e. swordsman) for every unit i will try to upload the file.
OK.
What operating system are you running on your machine?
Did you install the game here C:\Program Files\Firaxis Games ?
To what directory did you copy the modified unitinfos.XML?
 
windows 98
yes
mygames/bts/mods/newmod/assets/xml/units
 
windows 98
really, :think: I thought the minimum was windows 2000, unless its an upgraded version of 98, anyway if it works it works.

Try putting it here My Games\Beyond the Sword\CustomAssets\xml\units it should see it then.

Of course in doing that it will alter the base bts game, the best way to create a separate mod would be to navigate to C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\. the create a new folder named"your mod name" and add these folders to it Assets\xml\units and pop the unitinfos in there, meaning you keep bts in its original sate and launch your mod through the advanced>mods in game menu.
 
uploading file, the errors i got before
 

Attachments

  • CIV4UnitInfos.zip
    17.1 KB · Views: 48
XML Load Error
Failed loading
File: unitinfos.xml
Reason: element content is invalid according to the DTD/Schema
Expecting: bQuickCombat
Line: 29,21
Source: bRivalterritory

So I know where the error is: line 29,21 (notepad++ numbers the lines which is another good reason to use it) of the unitinfos.xml.
The Schema defines all the tags and their order for the XML, there is a Schema.xml in each of the XML folders, so there is one in the Unit folder another in the Technologies folder and so on.
And I know what the error is:
It's expecting to find a tag bQuickCombat but is getting bRivalterritory, so it fails loading.

The reason is: Wrong UnitInfos.xml file. BTS unitinfos.xml has a bQuickCombat tag which vanilla does not.
The XML file you have copied and pasted is from Firaxis Games\Sid Meier's Civilization 4\Assets\XML\Units
instead of Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Assets\XML\Units
to make a mod for BTS you need to copy files from the BTS folder.


It is useful to know that only the XMl that has superseded previous files are in the Assets folders of Warlords and BTS (the same is true for our Mods).
Therefore the game loads xml from BTS first, it will then look in Warlords and load what is there and not in BTS, then Vanilla and load what is there and not in Warlords.
When we are looking for a specific XML file to copy, paste and modify we need to do the same.
 
ok thanks for the help i will try to recreate it using bts
 
ok new problem it says it cant find the right art here is the file
 

Attachments

  • CIV4UnitInfos.zip
    24.1 KB · Views: 28
oh and i didnt create any new art
 
You have to link the art to the unit.
In UnitInfos.xml the tag
<EarlyArtDefineTag>ART_DEF_UNIT_RIFLEMAN</EarlyArtDefineTag> links to ArtDefines_Unit.xml in the Assets\XML\Art folder. Here you'll find all the entries for the units art which are located in the Assets\Art\Units folder.

Create a folder in Assets\Art\Units called Karolin, put your unit art files in this folder (you can download it from the downloads section if you haven't done so already). Copy and paste the entry for ART_DEF_UNIT_RIFLEMAN and rename it ART_DEF_UNIT _SWEDISH_KAROLIN.
I'm using the Swedish Karolin Download Uploaded by Bakuel as an example; you will need to edit this section of the art def unit like this, to link it to the new unit art.
Code:
<NIF>Art/Units/Karolin/KarolinWarriorfinal.nif</NIF>
<KFM>Art/Units/Unique_Ethiopia_OromoWarrior/Ethiopian_OromoWarrior.kfm</KFM>
<SHADERNIF>Art/Units/Karolin/KarolinWarriorfinal.nif</SHADERNIF>
Finally change the ART_DEF_UNIT_ tag in UnitInfos.xml to ART_DEF_UNIT _SWEDISH_KAROLIN
 
it still doesnt work is there another way?
 
also how do you stop from the names reading TXT_KEY_typeofitem_name
 
it still doesnt work is there another way?
It does if you do right,
I've attached the files so you can see how. I've tested this file it loaded without errors and works correctly.

also how do you stop from the names reading TXT_KEY_typeofitem_name
you either replace
<Description>TXT_KEY_UNIT_RIFLEMAN</Description>
with
<Description>Swedish Karolin</Description>
in unitinfos.xml.

or edit the unitinfos.xml. and GameText_Objects_BTS.xml and add the new tags.
Code:
	<TEXT>
		<Tag>TXT_KEY_UNIT_KAROLIN</Tag>
		<English>Swedish Karolin</English>
		<French/>
		<German/>
		<Italian/>
		<Spanish/>
	</TEXT>
 

Attachments

  • Assets.7z
    99.5 KB · Views: 43
ok new problem it says it cant find the right art here is the file

...um...checked the line which you mentioned before, didn't see a problem.
Loaded now a test mod with your unit infos, and your file works.

You have to link the art to the unit.
[...]

He linked it to a preexisting art defines entry, so that was not the problem.
 
He linked it to a preexisting art defines entry, so that was not the problem.
I know, but the file he uploaded doesn't throw up any errors, but it does have a unit he added with preexisting art work. I thought if he knows how to add the art work properly he won't get any errors. Unless of course he's attached the wrong xml file.:dunno:
 
its the right file i dont know what the problem is
 
Top Bottom