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

[BTS] Changing unit skin?

Discussion in 'Civ4 - Unit Graphics' started by ztrapon, May 23, 2018.

  1. ztrapon

    ztrapon Chieftain

    Joined:
    May 15, 2014
    Messages:
    92
    I'm creating a new unit: Longboat for the Vikings.

    It's a Trireme with 2 cargo space. I've copied and modified XMLs (Trireme for UnitInfos, Galley for ArtDefines_Unit).
    My unit shows up just fine in-game and Civilopedia.

    The problem:

    I have a .dds image that is a slightly altered Galley.

    I want to use this skin for my Longboat only, not for Galleys. But I want to use Galley animations for my Longboat.

    How do I do this?


    Some more information:

    I have the game installed on Steam, there are currently:
    1. CustomAssets directories
    2. Assets/Art folder in BTS folder
    3. Assets/Art folder in my mod folder.

    These folders contain various DDS, NIF and KFM files for some units, whereas some are empty.

    Naming my dds image "galley_128.dds" and placing it in CustomAssets/Art/Units/galley replaces the Galley skin entirely. In other words the image works, I just want to alter my Longboat only. I can't find any relevant line for skin in ArtDefines, only for animations.

    Thanks!
     
  2. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    3,651
    That's because skins are not defined in the XML. The way textures work is, as you noticed simply by placing the dds file next to the .nif file for the unit you are changing.

    So if you want to have a new unit that uses the same model but a different skin you need to copy the .nif file to a new folder, put your new skin in that new folder next to the .nif and than have your custom XML point to that new location. So something like: your mod folder/Assets/Art/Units/ztrapons units/Galley.nif

    And yes, that does mean that if you have 100 units using the same model but a different texture you are going to have 100 folders and 100 copies of the .nif file. That's how it works.
     
    ztrapon likes this.
  3. ztrapon

    ztrapon Chieftain

    Joined:
    May 15, 2014
    Messages:
    92
    Where do I find the nif-files? They're not in my Art folders, most of those are empty (including hidden files). Or do I just point to a nif/kfm file within my new folder regardless?
     
  4. ztrapon

    ztrapon Chieftain

    Joined:
    May 15, 2014
    Messages:
    92
    I think I found them, checked CustomAssets, BTS and Vanilla - but for some reason most nif-files for common units were located in the Warlords Art/Units-folder. :crazyeye:
     
  5. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    3,651
    Note that not all units are unpacked and easily available. Some are packed up in the assets.fpk files. If you run into that issue you'll need to unpack them. You'll find the tool to do that here: https://forums.civfanatics.com/threads/civ4-pakbuild.136023/#post-3247291

    Just run that and make sure to unpack to a folder that's different from your game installation.
     
    ztrapon likes this.
  6. ztrapon

    ztrapon Chieftain

    Joined:
    May 15, 2014
    Messages:
    92
    Awesome, thanks a lot.

    I got the unit itself to work just fine now (can place them in World Builder, animates properly and stats correct), except when I click the button to train a Longship (not Longboat :mischief:) the game crashes. No error message, just freezes and immediately closes. Any ideas?
     
  7. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    3,651
    Upload your XML.
     
  8. ztrapon

    ztrapon Chieftain

    Joined:
    May 15, 2014
    Messages:
    92
    Sorry for not responding but I managed to get it to work, except redid more or less the entire the thing from scratch again.
     
  9. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    3,651
    Don't be sorry if it worked. :)
     

Share This Page