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

Getting Reskinned UU in-game?

Discussion in 'Civ5 - Creation & Customization' started by TheManFromMars, May 18, 2012.

  1. TheManFromMars

    TheManFromMars Chieftain

    Joined:
    Oct 25, 2010
    Messages:
    102
    Hi there,

    I can't get a reskinned unit in game to show up with my Civ. Instead I just see what appears to be warriors.

    I reskinned the normal knight, and it shows up nicely in nexus asset viewer.
    It is JUST a reskin, no new animations, not a new model etc etc. I assume this must be possible since I found a 'German Knight' mod,which basically contained only the Civ5ArtDefines_Unit.xml and Civ5ArtDefines_UnitMembers.xml (plus a 'unit.xml' file which assigns the knight to the Germans) and a custom gr2, a custom fxsxml file and finally a custom diff.dds file.

    Actually the mod contained multiple gr2s etc because it had five different skins for five different knight members but that isn't important.

    What is important is that at first I wondered if I required animations to get it into game, that Deliverators tutorial just covered reskinning a unit, not reskinning an existing unit and placing it in as a unique unit. However that must be wrong, the German Knight mod (which I've tested) works great and it contains no animation files at all, it just looks like a simple reskin.

    So, what could i be doing wrong? Could it be a problem when I created the reskin? Could it be an xml error? Well I know the last one is possible, it's just non of my reskins seem to show up.

    My file name for the knight is knight_camelot.fxsxml (I have placed the Gr2 and both dds files in the mod too). Could someone either suggest what I might have done wrong, do a checklist of things to check, or even make up both ArtDefines files code for me so I could look at it, the ART_DEF_ tags would be something like KNIGHTCAMELOT.

    I hope my question was clear, and that someone could help in some way, if necessary I can upload my mod and someone can have a look or I could upload the reskinned model and someone else can test it. I'm basically out of ideas at this point. Any help is massively appreciated.

    Cheers,
    -Mars
     
  2. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,156
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    No, you needn't worry about animations... And there probably isn't an issue with the XML if the unit is showing up ingame (wrong artwork notwithstanding).

    The big one is: Did you remember to import everything into VFS? (other than the XML or SQL file that adds the unit, which you used an ImportDatabase on, instead.) This includes the civ5artdefines files.

    It's possible it's some kind of typo if you weren't consistent with the naming between the different files.

    I'd love to take a look if you want to post it.
     
  3. TheManFromMars

    TheManFromMars Chieftain

    Joined:
    Oct 25, 2010
    Messages:
    102
    Hey again Nutty,

    Cheers for the continued help - I didn't add the ArtDefines files into VFS, but I did add all the others - I have tried adding the ArtDefines to VFS now but it still shows up as warriors :(

    My XML names are perfect I think (probably post it and be made a fool - after a good solid amount of time modding this now I wouldn't be surprised if I've missed something) so I think the code is fine. I've got everything else to show up, including Unit Flag icons etc (although they turn into Spearmen icons on the Strategic View for some reason) - so generally the artwork is fine, the text entries are fine, grr, it's just this unit. I also plan to reskin the Castle if I can, but I'm sure I read somewhere that buildings can't be reskinned?

    Anyway, I'm going to have a crack at placing the German Knight art into the Mod, and repoint everything to that - if it doesn't work then there is something wrong with my code, if it does, there is something wrong with my FXSXML :( I'll try it, if it doesn't work I'll post up the file for you to have a look (thanks for offering).

    If you can think of any other reasons that'd be great in the meantime, a checklist of 'files needed' and so on might be helpful.

    Thanks
    -Mars
     
  4. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,156
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Did you see Gedemon's excellent tutorial here <link>?

    I'm assuming you're adding a new unique or "ethnic" unit for one (or some) Civs.

    Checklist:
    • You need the 2 civ5artdefines files, the entire contents copied with your additions added (both VFS true).
    • You'll need the 4 art files (all VFS true):
      [*]the gr2 (for a reskin, you would have just copied the vanilla one, renamed it, and revised it with IndieStone Nexus Buddy to point to the new dds files)
      [*]the fxsxml, also pointing to the new dds files
      [*]your edited dds's (diff and sref)​
    • Finally, the XML or SQL file that adds the new unit (VFS false, but set to OnModActivated/ImportDatabase).

    I prefer Gedemon's method using SQL rather than XML, because you can easily just copy all the rows from an existing unit and make your changes without worrying about missing anything.

    If you aren't making a new unique/ethnic unit, and just want to change the default for everyone, you can skip the XML/SQL file and not worry about adding any new entries to the civ5artdefines. You just edit the civ5artdefines_unitmembers.xml and change the fxsxml reference for, e.g., UNIT_KNIGHT to your new fxsxml. Don't include a path, only "<Granny>knight_camelot.fxsxml</Granny>" (or whatever you called it).

    EDIT:
     
  5. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,156
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Oh! And...

    It's a different entry you need to change for the SV icon.

    EDIT: It's the ArtDefine_StrategicView table.

    I've tried and failed, and I don't know of anyone else that's been able to do it successfully.
     
  6. TheManFromMars

    TheManFromMars Chieftain

    Joined:
    Oct 25, 2010
    Messages:
    102
    Hey again,

    I saw from looking in the DLCs that strategic view icons are changed that way and it seems to be an sv_xxxx.dds file that is 128x128 BUT every thread i've seen on this topic says it isn't possible, or more accurately, it up everything - so Settler Icons are Warrior Icons, Workers are Missile Icons etc. Is that something that just used to happen, but is no longer the case, fixed in a patch or something?

    Is there a guide to it? I'd think to just make a sv_camelotknight.dds file, and point to it after adding the artdefines strategic view file (VFSd too?) Would that just work?

    And yes, it is a unique unit btw. Which Nexus Buddy is this you are speaking of? There seem to be a couple, one that has a menu (with lots of greyed out options, including 'reskin a unit' or whatever it is called) and one that seems to be some kind of import and export.

    I used the grannymaterialhacker to change the skin - does that not work anymore? I've never gotten the nexus buddy to work I think.

    By the way, how do I tell the game the difference between a unique building/unit and a simple ethnic reskin? What I mean by this is, some Mods have more than one buildingclassoverride, yet when you go in game, the game has no probs deciding what is the unique building, and what is an ethnic diversity reskin thing. This also seems the case with some DLC like the Polynesians have a fair few reskinned/modelled buildings. Probably a question for a different thread, but hey, I have you here, might as well ask - and it is relevant actually to what I'm doing.

    Cheers again,
    -Mars
     
  7. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,156
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    I'm not sure about that one. I also heard about that issue, but I haven't played with the SV icons much, and I just reuse vanilla ones.

    I knew that. That's the title of the thread! :rolleyes:

    This is the only way I've ever done it, but it works for my reskins: I use the old version, v0.1a <link>. Make a copy of the vanilla .gr2, change the material's BaseTextureMap to your diff, and the SREFMap to... yeah, your sref. Save. Done! (EDIT: It also works to convert FBXs to GR2s, if you're going to mod in your own 3-D model). I don't bother with the Smart Exporter.

    They're the same thing as far as the game is concerned. I put "ethnic" in quotes because it's just a UU that's a copy of a vanilla unit using a new model.

    My E.D. mod's thread has a discussion of this: You must have 2 unique units, buildings, and/or improvements, but you can have many more (I haven't run into an upper limit yet). The only problem is that the game only has 2 slots for the display, and by default all units come before all buildings which come before all improvements. You can mod a fix for the loading screen, but it doesn't affect the Game Setup, Select Civ, or 'Pedia entry without copying over the UniqueBonuses.lua file in your CiV installation.
     
  8. TheManFromMars

    TheManFromMars Chieftain

    Joined:
    Oct 25, 2010
    Messages:
    102
    Hey again,

    Yeah, I'm fairly happy having my Knight icon turn into the games default knight icon when I go to Strategic View - I've had enough frustrations so far without banging my head against a wall when it comes to getting SV_Icons working :)

    You mentioned Unique Improvements? I didn't know they were possible to do - I tried and failed a good deal of time ago (just a couple of months after Civ 5 came out) to make an 'impaler Display' for my Wallachian Empire (grim I know...) but could never get it to show up in game at all. How is it done? Can they be reskinned? I know it isn't the proper thread again, but it is all very relevant and helpful to me, I'd like nothing more than to know how to do Unique Improvements etc - I never found any thread on it - I wasn't experienced much with modding back then in Civ 5, so might have missed something more obvious, but I don't think I did, plus after the Polynesian and Incan DLC came out I always wondered about returning to trying to make improvements (since they both had Unique Improvements and nothing else did before I don't think) - so help would be great appreciated.

    I'll also post back how the reskinning unit goes etc, and hey you asked to see it, I'll post it up if it works - and if it doesn't too probably :)

    Cheers again,
    -Mars
     
  9. Nutty

    Nutty Chieftain

    Joined:
    Mar 9, 2011
    Messages:
    3,156
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    :) I thought you might ask me about that. I don't know anything about custom UI's, but I'm given to understand that we're probably stuck with the ones Firaxis has given us.

    Please do!
     

Share This Page