How to Install Unit graphics?

Garamea

Chieftain
Joined
Oct 28, 2011
Messages
2
I downloaded a M1a1 Tank from blazekid , it comes with a .dds , fxsxml and a .gr2 there's an instruction to make an xml file but i don't know what it is. How do i replace the Modern Armor Of the american civilization with this one? Please Help I'm new to modding ,but i already installed some using the easy one in-game mod installer. please reply back

Moderator Action: Moved to the main forum.
Because the tutorials subforum is only for tutorials ;).
 
If you want to use a custom graphic in a mod, you'll need to alter the XML files the game uses to store its own art definitions. Kael's guide does not cover this well, as this mechanism hinges on a system (the VFS) introduced after his creation of that guide, so no, you can't just go read his guide to understand what's going on.

I'll give the instructions, but fair warning: this is not beginner's modding. If you've never made a mod for Civ5, this is NOT a good point to start from. Asset modification is not the most complex part of the modders' toolset, but it's definitely not the easiest to manage either.

-----------------

First of all, do NOT edit the core game's actual files. Even if you wanted to ignore all of the dangers of editing the core game (and there are many), it generally wouldn't work anyway as you're adding new asset files as well.

What you need to do is this:
> Start up Nexus, the asset manager tool included in the SDK.
> Extract the game's assets, using the "Extract .fpk" option in the script viewer window. It'll place the packaged game assets in three directories within your vanilla game's "resources" directory: Common, DX9, and DX10/11. This is NOT the directory structure the actual game uses; definition files will refer to a variety of subdirectories that will not exist in your directories. (This is one of the reasons changing the vanilla definitions doesn't work well, but it's not the only reason.)
> Find civ5artdefine_units.xml and civ5artdefine_unitmembers.xml in the Common resource directory. In your particular case, we're only going to need to alter the latter of these two since you're not adding a NEW art definition, and are simply modifying an existing one.
> Create a new empty mod. (This one follows Kael's guide.)
> In the right-hand window, the one showing your mod's contents, choose "Add Existing Item" and go select the unitmembers file mentioned above. This'll add a copy of that file in its entirety. This is how it works; unlike normal XML modding, you cannot only update the one entry you want to change. You have to import a file in its entirety, make whatever changes you need, and hope that no one else is going to alter that same file for any other mods you might want to use.
NOTE #1: Do not rename this file, it MUST have the same name as its twin in the vanilla archive. Directory names aren't important, but file names are critical.
NOTE #2: Do NOT do any sort of OnModActivated command to try loading this XML file. It is not a GameData file, you can't load it that way.
> Right-click the unitmembers XML file you just added, select Properties, and at the bottom of the properties window will be "Import into VFS". The default is False, you need to change it to True for this file.
> Now that you've got a copy of the vanilla game's unitmembers definition in your mod, find the part you want to edit (in this case, the Modern Armor definition). Change the relevant lines to point to the filenames of your modified graphical assets.
> Import the various art files for your custom unit into the mod, in the same way you imported the definition file. As with the above, set the VFS for all of these graphical files to True.
> Build your mod, and load it as normal.

Now, the next time you load the game using your mod, it'll replace the existing game's Modern Armor graphic with the one you selected. However, to get this effect you MUST play a modded game, going through the Mods menu instead of the main menu's New Game option. This has a few downsides (no achievements, for instance), and most mods also require inclusion when a game is started and can't affect games already in progress.

If you don't generally use mods, then it'll work just fine. But your graphics-altering mod will be purely incompatible with any other mods altering unit graphics in any way, because of the "copied in its entirety" part of the unitmembers importation. If you REALLY care about making it compatible with other mods, it's not that hard to do; find what changes or additions they make to the file, and do the same in your own version. (It's okay to have unused definition declarations in the file.)
 
Q:Is there a max number of UU?

No. If you wanted to, you could have each civ in the game have an entirely unique set of units, and it'd work just fine. It'd be a tremendous amount of work, of course.

The only notable limit that we've run into is in the number of promotions in the database. With the vanilla promotions taking up most of the allocated slots, you can only add about ~55 custom promotions to the game. If you exceed that by N, then it'll give every unit in the game N free promotions from the end of the list, which obviously breaks a lot of things. But other than that, the database can handle as many UUs as you want.

The only other problem comes in the UI: the startup Dawn of Man screen, and the non-advanced Setup screen, both show the unique units and buildings for each civ. The way they're laid out only shows a couple units/buildings; if you want to change things to where each civ has 20 unique units, then those UI elements will fail. I don't think they'll actually CRASH, per se, but they won't look right.
 
The only other problem comes in the UI: the startup Dawn of Man screen, and the non-advanced Setup screen, both show the unique units and buildings for each civ. The way they're laid out only shows a couple units/buildings; if you want to change things to where each civ has 20 unique units, then those UI elements will fail. I don't think they'll actually CRASH, per se, but they won't look right.

It only shows 2 unique units/buildings, regardless of the actual number.

I'm pretty sure what happens is it will show unique units before buildings, so civs with 2 unique units will appear as usual, but civs with 1 UU and 1 UB will show the vanilla UU on the left and the first modded UU on the right.
 
I downloaded and installed an M4 sherman, and this is what i get.

Spoiler :
22CC53B240357F21B7FE628C4DAB15703B8274B0



Any ideas how to fix it?
 
I downloaded and installed an M4 sherman, and this is what i get.

Spoiler :
22CC53B240357F21B7FE628C4DAB15703B8274B0



Any ideas how to fix it?

Where did you get that unit? That problem usually comes from the model not being connected to the root bone.

Try this pack that includes several Shermans.
 
Back
Top Bottom