1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[TUT] Adding newly created units to Civ4 in 6 "easy" steps

Discussion in 'Civ4 - Modding Tutorials & Reference' started by Rabbit, White, Jul 5, 2006.

  1. Mallin

    Mallin Supreme Meerkat Dictator

    Joined:
    Nov 11, 2007
    Messages:
    213
    Location:
    A burrow in the Kalahari Desert
    And here are the other files.
     
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,960
    Location:
    DE/NL/FR
    Erm, you have to copy the normal UnitInfos.xml, ArtDefines_Units.xml, etc, etc to your mod folder, and then you can add these things (the entries itself look correct).
     
  3. Mallin

    Mallin Supreme Meerkat Dictator

    Joined:
    Nov 11, 2007
    Messages:
    213
    Location:
    A burrow in the Kalahari Desert
    Sorry I didnt mention this in my last reply but I did add the normal xml files first. I just copied the battlecruiser infos so you wouldn't have to go searching through all the files to find them. Im just about out of information at this point but thanks for all your help so far.
     
  4. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,960
    Location:
    DE/NL/FR
    Your unitInfos entry doesn't point to the ArtDefines entry, instead it still points to the normal missile cruiser ArtDefine.
    You said, there's also an error in CIV4UnitArtStyleTypeInfos.xml, what did you there modify?
     
  5. Mallin

    Mallin Supreme Meerkat Dictator

    Joined:
    Nov 11, 2007
    Messages:
    213
    Location:
    A burrow in the Kalahari Desert
    I guess the problem was the UnitArtStyle since I redid the mod and left that file out. And it worked!:)
    Thanks for all your help!:goodjob:

    I checked out your Mars mod, looks way cool and I'll probably download it after I blow something somethig up with my battlecruiser.
     
  6. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    I have a problem/bug when i try to replace a standart-unit with a FfH-Unit in my mod.

    I changed the Civ4ArtDefines_Unit.xml and Civ4UnitInfos.xml. Everything should be fine, like a lot of other units i managed to insert into my mod....

    BUT in game: The unit has the look of the KFM-ArtDefines_Unit-Entry. Only if a mark the unit and do some action the unit gets the look of the NIF-ArtDefines_Unit-Entry. After marking another unit, the graphic change again back to the look of the KFM-ArtDefines_Unit-Entry?????????

    Can someone help me please?
     
  7. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,960
    Location:
    DE/NL/FR
    Check your graphics options, and enable the animations there ;).
     
  8. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    @The_J
    That it is! Thank you for the promt answer. Sorry fot this simple question. I would never get the solution by my self!
     
  9. raymag9

    raymag9 Chieftain

    Joined:
    Sep 14, 2009
    Messages:
    5
    Heres a problem I have; I have an A10 and SR71 blackbird custom unit in game I even added custom sounds they all work fine. To test these units I went into worldbuilder. Everything worked great. So then I play a game when it came time to actually build these units; (click on the icon to put them in the build que) my game freezes/ locks up.

    Again I tested them in world builder by just adding these units to a city to see if they work and everything is fine but when I click on the icon to put it in build que to actually build the unit my game locks up.

    Any help or hints where my problem may be?
     
  10. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    What's the path for the button of these units?
     
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,960
    Location:
    DE/NL/FR
    And how big are the buttons?
    If they are bigger than 64*64, Civ will just crash.
     
  12. raymag9

    raymag9 Chieftain

    Joined:
    Sep 14, 2009
    Messages:
    5
    Thanks for the help guys. You got me thinking to look at the button info. Found I had a typo in the XML art defines button info line. Problem solved. thanks for the quick response.
     
  13. JaeChunDaeSung

    JaeChunDaeSung Prince

    Joined:
    Jan 27, 2009
    Messages:
    314
    Location:
    Korea
    Not to sound daft, but these procedures also apply to variable designs (e.g. ethnic diverse designs) for currently existing units too right?
     
  14. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,960
    Location:
    DE/NL/FR
    No it doesn't.
    The information for the ethnic unit artstyles is in Civilizations\CIV4UnitArtStyleTypeInfos.xml.
     
  15. JaeChunDaeSung

    JaeChunDaeSung Prince

    Joined:
    Jan 27, 2009
    Messages:
    314
    Location:
    Korea
    Is there a tutorial for that elsewhere, or is the procedure relatively the same?
     
  16. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,960
    Location:
    DE/NL/FR
    I don't know of any tutorial for this :dunno:.
    But shouldn't be to complicated ;).
    It's nearly the same as adding an entry to the ArtDefines_units.xml.
     
  17. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    @JaeChunDaeSung: Just look in the CIV4UnitArtStyleTypeInfos.xml (in the Assets/xml/Civilizations folder).

    1. See <Type>UNIT_ARTSTYLE_Sung empire</Type>

    this leads to the CIV4CivilizationInfos.xml file, there

    <UnitArtStyleType>UNIT_ARTSTYLE_Sung empire</UnitArtStyleType>

    2. Back to CIV4UnitArtStyleTypeInfos.xml, find <UnitType>UNIT_Sung Raider</UnitType>

    leads to the CIV4UnitInfos.xml, find
    <Type>UNIT_Sung Raider</Type>
    (give him <iCombat>99</iCombat>)

    3. Again at CIV4UnitArtStyleTypeInfos.xml, there comes <EarlyArtDefineTag>ART_DEF_UNIT_Sung Raider</EarlyArtDefineTag>

    The Art-Definition is in the CIV4ArtDefines_Unit.xml
    <Type>ART_DEF_UNIT_Sung Raider</Type>

    Mostly important are
    <NIF>Art/Units/Sung Raider/xxxxx.nif</NIF>
    <KFM>Art/Units/Sung Raider/xxxx.kfm</KFM>
    <SHADERNIF>Art/Units/Sung Raider/xxxx_FX.nif</SHADERNIF>

    Find the xxxx.nif, xxxx.kfm and xxxx_fx.nif in Assets/art/units/sungraider folder

    4. Thats it.
     
  18. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    I am standing behind closed gates! Here is my problem:

    I try the water_lizard-Unit from the Animal_Empire-Mod. But now i see, that the unit jams the Civilopedia and has no InterfaceScale????

    ...<fInterfaceScale>1.0</fInterfaceScale>...

    It must be as simple as my other silly question. Please look at the sreenshots.
     
  19. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    Ensure the kfm (animation file) is pointing to an existing kfm, and that there is a nif with the same name as the kfm file in the same folder as the kfm.
     
  20. Manifold

    Manifold ModderProtectionAdvocate

    Joined:
    Aug 27, 2007
    Messages:
    1,580
    They named different:( But i cant easy rename one of this files, can i?

    On the other hand, i see a lot of newly created units, where the names are different!?
     

Share This Page