Argh! Trying to make a batch of custom units.

Mylon

Amateur Game Designer
Joined
Nov 4, 2005
Messages
1,013
I want to try making the holy city missionaries used in my mod as a modular component, but the game fails to load these files on startup. I get an error message that simply says, "Failed to load X", but it unhelpfully doesn't tell me why.

The units are all in one file, use existing artdefs and even existing unitclasses. So I only have the UnitInfos file and the UnitSchema file. They're named with the X_Civ4UnitInfos.xml style, and I changed the schema line of the unitinfo file to point to the right file. But on load it just says, "Failed to load X." Any help on how to do this?
 
A Modular unit should include 5 files

*_Civ4GameText.XML
*_Civ4UnitInfos.Xml
*_Civ4ArtDefines_Unit.xml
*_Civ4Artdefinesschema.xml
*_civ4UnitinfosSchema.Xml

For every unit you are creating you should put them in there own seperate folders

The artdefines should have a path which points to this folder.

If you have a large package of units put all of these folders within the package of units folders.

Check out the 2nd Unique Units package available in the Units section as a reference on how to do all of this
Hope this helps
 
What if the units are not using custom art files? Can more than one unit be included in the same file? The missionaries all use the same skins as the old ones. There's no need to split them up, either.

And the text file does not need to be named anything in particular. The text loading was modular before BTS.
 
you need to put in the "unitinfos" and the "artidefines" with (respectively)

<Civ4UnitInfos xmlns="x-schema:"unit"_CIV4UnitSchema.xml">


<Civ4ArtDefines xmlns="x-schema:"unit"_CIV4ArtDefinesSchema.xml">

*7th line down in the xml files
 
What if the units are not using custom art files? Can more than one unit be included in the same file? The missionaries all use the same skins as the old ones. There's no need to split them up, either.

And the text file does not need to be named anything in particular. The text loading was modular before BTS.

If you are using original skins I don't see an issue in you trying to put the old art pathway in. But you still need to include the artdefines and schemas in
 
Top Bottom