1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice

Argh! Trying to make a batch of custom units.

Discussion in 'Civ4 - Plug and Play Project' started by Mylon, Sep 6, 2007.

  1. Mylon

    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?
     
  2. purplexus

    purplexus Prince

    Joined:
    Feb 13, 2002
    Messages:
    477
    Location:
    Calgary Alberta, Canada
    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
     
  3. Mylon

    Mylon Amateur Game Designer

    Joined:
    Nov 4, 2005
    Messages:
    1,013
    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.
     
  4. domino36963

    domino36963 Chieftain

    Joined:
    Aug 2, 2007
    Messages:
    76
    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
     
  5. purplexus

    purplexus Prince

    Joined:
    Feb 13, 2002
    Messages:
    477
    Location:
    Calgary Alberta, Canada
    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
     

Share This Page