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

GUIDE: Adding new units

Discussion in 'Civ4 - Modding Tutorials & Reference' started by sovarn, Nov 10, 2005.

  1. gepapado

    gepapado Chieftain

    Joined:
    Dec 2, 2007
    Messages:
    22
    Location:
    Greece
    Excellent tutorial Sovarn. However, there's one thing still bugging me. I'm trying to create my first mini-mod (yes, I'm new to this) but in order to do this, I need to find the file that "defines" the <EarlyArtDefineTag><EarlyArtDefineTag/>, the <MiddleArtDefineTag><MiddleArtDefineTag/> and the <LateArtDefineTag><LateArtDefineTag/>, so that I may edit it. I've looked for files containing these lines, or part of them, but found nothing useful. Do you know where these files are? Any help is appreciated, thanks.
     
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,195
    Location:
    Germany / Netherlands
    What do you mean?
    Do you mean in which file the ART_DEF_NEW_UNIT_OR_SO is mentioned?
     
  3. gepapado

    gepapado Chieftain

    Joined:
    Dec 2, 2007
    Messages:
    22
    Location:
    Greece
    What I mean is that there probably is a file that specifies which ages belong to the early game, which to the middle game and which to the late game. And what I want to do is to edit the file so that I can add a VeryLateArtDefineTag.
     
  4. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    Adding a new tag will require C++ coding. See the "Idiot's guide to the dll" thread by Xienwolf here in the tutorials section forum for how to do that. The EarlyArtDefineTag, LateArtDefineTag, and MiddleArtDefineTag tags are found in the UnitInfos and UnitArtStyleTypeInfos XML files. Reference the vanilla files that came with BtS to see how to use them, and remember the order must be the same, ie Early, Late, Middle (which is a bit counterintuitive as it should be early, middle, late).
     
  5. gepapado

    gepapado Chieftain

    Joined:
    Dec 2, 2007
    Messages:
    22
    Location:
    Greece
    Thanks for the reply. So it's a C++ "issue". I thought so but I still couldn't find it. Anyway, I'll try it and report back. As I mentioned before, it's going to be a mini mod, but I'll have to get permission from the creator of the 3D models and give him and possibly (I don't know if I'll make it) to Xienwolf for helping me. I'm planning on releasing it as a mod and as a CustomAssets "mod" contaning the neccessary instructions, of course.
     
  6. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,195
    Location:
    Germany / Netherlands
    Early = ancient + classical, middle = middle age + Rennaissance, late = industrial, modern and future.

    For the rest phungus is right, but if you want to go into coding, you should take a look at this (not updated) modcomp by tholish which adds a tag for every era.

    edit: crosspost.
     
  7. gepapado

    gepapado Chieftain

    Joined:
    Dec 2, 2007
    Messages:
    22
    Location:
    Greece
    Thanks again. Oh and, in case I accidentally misled you before, the mini mod isn't about the "Very Late" thing. Now that I think of it, I can make it a full-scale mod.
     
  8. dewell

    dewell Warlord

    Joined:
    Jun 29, 2007
    Messages:
    171
    Little question:

    What do the following 4 tags?

    iCultureGarrison
    iExtraCost
    iAsset
    iPower
     
  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,195
    Location:
    Germany / Netherlands
  10. Wraithed

    Wraithed Chieftain

    Joined:
    Jun 16, 2010
    Messages:
    4
    I am having the same exact problem... did this ever get answered?
     
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,195
    Location:
    Germany / Netherlands
    You know, this question is 5 years old ;).

    You've probably disabled in the .ini public maps from being used, and when you don't provide a map/mapscript within your mod, you can't play anything.
    -> do one of these things and you should be fine.
     
  12. Wraithed

    Wraithed Chieftain

    Joined:
    Jun 16, 2010
    Messages:
    4
    Yeah... I couldn't find the answer. But then I was thinking and thinking about it and I figured it out. It was my ini.

    That will teach me to copy someone else's config file.
     
  13. progressregress

    progressregress Chieftain

    Joined:
    Jul 5, 2010
    Messages:
    12
    Location:
    England
    I have a hopefully very simply answered question.

    How can I change the elevation of land units?

    I am adding some new units which I'd like to operate like helicopters/land units, but unlike the gunship, they slide along the floor instead of hover. I can't find anything which controls this in the artdefines or the unitinfos, which is where I thought it should be.

    I know I can make the units elevated by setting them as domain_air, however that makes the units operate like fighter/bombers, not like land units :(

    Thank you in advance.
     
  14. Vortilex

    Vortilex Imperator Mundi

    Joined:
    Oct 6, 2007
    Messages:
    1,457
    Location:
    St. Augustine, FL
    I think this is done in NifSkope, but I'm not sure, I've never tried it.
     
  15. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,195
    Location:
    Germany / Netherlands
    Welcome to CFC :).

    This can't be done via XML, but relativly easy graphically. Edit: Vortilex beat me.
    Download nifskope and install it.
    Open the .nifs of your unit with it (only the ones with the whole unit), rightclick on the unit, and there should somewhere be the option "transform" (or similar) available, where you can change the x, y and z coordinates of the unit. Just raise the unit on the z axis and save it, and you're done.
     
  16. Doomwyte

    Doomwyte History Freak

    Joined:
    May 20, 2010
    Messages:
    239
    Location:
    Manitoba
    is the download you linked legal and free if so what is nifscope:confused:
     
  17. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,195
    Location:
    Germany / Netherlands
    Yes, it's free and legal.
    Everything which is hosted on the website sourceforge is open source, this means it is free and everyone can even download the source code to look at it, how it works (okay, the normal user doesn't need this).

    Nifskope is a basic programm for looking and modifying .nif files.
    You can do a lot of stuff with it, look at the tutorials from The_Coyote.
    Even if you don't want to modify anything: It's perfect to look at units and buildings before you put them ingame. Makes it a lot easier to see, what you want to add or what not.
     
  18. Doomwyte

    Doomwyte History Freak

    Joined:
    May 20, 2010
    Messages:
    239
    Location:
    Manitoba
    can you make new units with it?
     
  19. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,195
    Location:
    Germany / Netherlands
    No, not completly, as far as i know.
    you can exchange parts from units to parts from other units, exchange textures, shrink parts, modify animations (if i'm right)....i can't really say that much about it, you should read some of the tutorials in this subforum ;).
     
  20. Doomwyte

    Doomwyte History Freak

    Joined:
    May 20, 2010
    Messages:
    239
    Location:
    Manitoba
    Can you give me the link to those guides

    As for nifscope i think i will be editing units soon;)
     

Share This Page