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

[BNW] Civ 5 retexturing a unit

Discussion in 'Civ5 - Creation & Customization' started by MinhazMurks, Mar 10, 2018.

  1. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    Hello I am working on a mod for Civilization in which I am creating a civilization. It's going well so far and is in a working state, but for one of the unique units is a worker replacement called Laborer which has a higher work rate. But I want to be able to have a different texture for this unit but i'm not sure how to do it. All i know is that i need to create a reference to the new DDS texture from the art_defines but i don't know how to do it. I've attached the mod. Any help is much appreciated!
     

    Attached Files:

  2. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,181
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    The .dds files aren't referenced in the art defines; the .fxsxml is. The .fxsxml file is a text (XML) file that references the .dds textures (but those references aren't even necessary), and (importantly) the .gr2 3D model. The CiV implementation of .gr2 model references the .dds files, so you need to edit the model to change the references to the textures.

    The community has made tools to make it easy. I prefer the old version of Nexus Buddy for this purpose (don't get confused between Nexus, a tool that comes with the SDK, and Nexus Buddy).

    So I don't have to repeat myself, see this post.
     
  3. Nomad or What

    Nomad or What Wayfarer Supporter

    Joined:
    Nov 25, 2012
    Messages:
    711
    Location:
    Wherever the winds take me
    Civitar's thread may be useful for you if you are doing a simple unit re-skin:

    Guide to 3D Modding in Civilization V : Part II - Reskinning
     
  4. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    Thanks for the reply!
    I also decided to look at part 1 and am going through it incase I also wanted to do some modeling, is this completely outdated or can it still be used?
     
  5. Nomad or What

    Nomad or What Wayfarer Supporter

    Joined:
    Nov 25, 2012
    Messages:
    711
    Location:
    Wherever the winds take me
    It's a bit dated but not much has changed that would greatly impact typical re-rigging or re-skinning. Per Nutty above, even an older version of NexusBuddy can be used for simple re-skins and such. If you start doing custom animations or animation conversions from other sources then you may want to see more in-depth tutorials like the following from Deliverator:

    Getting Civ 4 Units into Civ 5 - Full Conversion
    Extract GR2 to Blender with mesh AND skeleton and re-export to GR2
    Extract GR2 Animations into Blender and Re-Import to Civ V/Civ BE

    However, if all you plan to do is re-texture a single unit, then I would recommend skipping them as they might just be confusing if you don't already have a solid baseline working with units.
     
  6. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    I've done similar unit modeling in the past in Medieval 2: Total War, I probably will just reskin for my worker unit but I want to be able to do more than just that if I wanted to. But I followed Deliverator's steps but my 3d viewer just stays blue/black it does say it's displaying the model of whater fxml I loaded in, but the screen just stays blue. Do you know what might be wrong?
     
  7. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,712
    Location:
    London, UK
    The Nexus Viewer was broken by Firaxis at some point and never fixed. You can download the older version with the working 3D viewer from here.
     
  8. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    @Deliverator @Nomad or What

    lol i'm so dumb, thanks a lot. I was following your tutorial but I missed a step. I appreciate all the help.
     
  9. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    Ok I am finally able to view the files in Nexus viewer. I also wanted to look at the worker gr2 models through your program, the NexusBuddy and gr2viewer. But for some reason (on the latest version, with .NET 2.4 downloaded) whenever i try to load a file into gr2viewer it crashes. the crash dump indicates the following exception was thrown:
    The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
    I have also tried running as administrator, with no luck.
     
  10. Nomad or What

    Nomad or What Wayfarer Supporter

    Joined:
    Nov 25, 2012
    Messages:
    711
    Location:
    Wherever the winds take me
    I haven't seen this error before, but if I were to troubleshoot the issue I would download a mod, extract the files, open the .gr2 with NexusBuddy and try to view it. If that fails then you have a problem with either .NET, the paths where you installed Nexus and/or NexusBuddy, or a corrupt file. If it succeeds then I would recommend downloading a worker.gr2 model that does not originate from your source Civ files (assuming that is where you got the worker.gr2 file) and using that as your base model instead.

    EDIT: Additionally, I actually recommend .NET 4 or greater, and make sure that your NexusBuddy .config file looks like this:

    Code:
    <?xml version="1.0"?>
    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      </startup>
    
      <runtime>
        <loadFromRemoteSources
       enabled="true"/>  
      </runtime>
    </configuration>
    
    To avoid any future pitfalls, make sure your registry entries point to the correct location per the tutorials:

    Code:
    [HKEY_CURRENT_USER\SOFTWARE\Firaxis\Nexus\Viewer]
    "Executable"="<the location where you put the OLD (working) Nexus Viewer>\\Viewer.exe"
    "AssetPath"="C:\\Program Files (x86)\\Steam\\steamapps\\common\\Sid Meier's Civilization V\\Assets" (Usually, if you use Steam; otherwise, the path to your Civ V Assets folder)
    
     
    Last edited: Mar 20, 2018
  11. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    Damn, what a shame. I imported a gr2 file from Danrell's Civ5's Units Thread and it worked. Somehow my source files (from the fbk) using the dragon unpacker might be corrupting it in the eyes of the gr2 viewer somehow? I don't get it because unpacking the fxsxml files using the dragon unpacker and upon import into the nexus viewer works fine. Is there any online resource where I could download these gr2 files from the base game or am I out of luck?
     
  12. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,181
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
  13. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    You're a genius. Everything is working now thanks a lot!
     
  14. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,712
    Location:
    London, UK
    In fact, you always have to resave the vanilla Civ 5 .gr2s with Nexus Buddy before you can view them in Granny Viewer. This is one reason I created the batch “Resave all GR2 flies in directory” function.
     
  15. Nomad or What

    Nomad or What Wayfarer Supporter

    Joined:
    Nov 25, 2012
    Messages:
    711
    Location:
    Wherever the winds take me
    I actually considered this but didn't think it was related to the issue since (with my version of NexusBuddy at least) it kindly informs me that I must save it before viewing it in Granny instead of crashing it. Perhaps the earlier versions weren't so kind. My advice to you, MinhazMurks, is that if you do intend to get into advanced unit modding that you use the latest NexusBuddy as it has been greatly perfected since its earlier iterations and is far more powerful at simplifying some of the more advanced modding processes.
     
  16. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    Thanks a lot for all of both of your help. I've gotten passed that part and have "remodeled" (very slightly, added a visor and changed the arms) the unit I wanted to, which was my Laborer unit (replaces worker). I wanted to do things one at a time, so I remodeled the modern one first. Here's what it looks like



    But for some reason the regular worker model/texture loads. I'm not sure what I did wrong. I've attached the mod if any of you want to look at it.
    Spoiler Pictures :





    IT WASN'T WORKING AT FIRST BUT NOW IT IS! :D



    Albeit there are a few graphical glitches to iron out... Do you think this has to do with the export format?
     

    Attached Files:

    Last edited: Mar 21, 2018
    Troller0001 likes this.
  17. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    I still haven't fixed the small graphical glitches in my unit. do you think it has to do with the way the model is exported?
     
  18. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,712
    Location:
    London, UK
    Are you referring to the screenshot above? It looks like the legs are twisted so it may be an issue with the model, rigging or export. You can test animations in Granny Viewer by dragging and dropping the animation .gr2s onto the Viewer. Check that no part of the model looks unnaturally twisted there first.
     
  19. MinhazMurks

    MinhazMurks Chieftain

    Joined:
    Mar 8, 2018
    Messages:
    30
    Gender:
    Male
    OK I looked at it in the granny viewer and I think it's what I originally thought it was.
    If you look at the image below, you will see in the ambient lighting the dark parts of the model are what are missing (for the most part) in the graphical glitches in game:
    Spoiler Screenshot :


    And looking at this further, here is the normal map view of the model:
    Spoiler Screenshot :


    But the problem is, I don't know how to solve this. In Blender I recalculated normals multiple times but this didn't help.

    EDIT: I may have just fixed it!
     
    Last edited: Mar 23, 2018
  20. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,181
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    I don't know about modeling, but as for the textures, I'd suggest DXT3 for units. For UI stuff with transparency, go with DXT5 or 32bit ARGB (8:8:8:8).
     

Share This Page