Importing custom textures or 3d meshes into the Assembly Kit
The purpose of this tutorial is primarily for custom skins, however it is the exact same process for custom meshes created in 3ds max too. The benefit of using the unit editor when creating custom skins - is that you can preview your changes in the editor without ever having to fire up shogun 2 (which is extremely time consuming). This also allows for quick and dirty unit cards/icons to be created in the correct folders, in .tga format without ever having to fire up GIMP or Photoshop and resize screenshots. (they can of course be cleaned up and edited afterwards)
Folder Structure - an explanation of where the files go, and how they work
The Folder structure for the mod tools work similar to how things are structured in the packfile. All changes you make to your database, and any additions you make to variantmodels, text and UI have to be saved in the "Working_Data" folder (from here the paths are identical to those of PFM) - default path should be -
"C:\*moddingfolderpath*\working_data\"
In my case it is -
"C:\modding\working_data\"
This means that any custom unit parts, textures or unit_variants that we wish to add to our mod need to be placed in the "C:\modding\working_data\Variantmodels", folder so that they are visible in the editor and can be exported by BOB when we create our packfile.
Variant model's
A variant model (saved with the extension .soldier.unit_variant or .officer.unit_variant), is the template/blueprint file which defines what unitparts and skins a unit uses. It is not actually a 3d model itself, and only tells the engine how to build a model from the numerous heads, torso's models etc saved in the UnitParts folder. This is how units can have individual looking models - the unit makes each man with a random choice of parts specified in the unit_variant file. The Variant model is referenced to in the "db/uniforms_table" - telling the engine to use a variant model file for it's intended unit in game. It is straight forward enough.
I already have two custom variant files called "Toku_ninja_inf_kisho_ninjas.soldier.unit_variant" and "Toku_ninja_inf_kisho_ninjas.officer.unit_variant" for my mod, but you can create these from scratch or edit a currently existing unit then add the custom textures in the unit_variant after we add the custom files to our working_data folder.
Save your unit_variant files, or copy an existing one to "C:\moddingpath\working_data\VariantModels\Units" as below
UnitParts / Skins
Now for custom skins/unit parts. If you have created your own custom skins before, then you need no explanation of the UnitsParts folder as it is structured the same in the modding folder as it would be when placed in packfile manager. You only need to know where to save your mesh/skins in the modding folder to get them into the editor.
For those who are unsure of how they work, you only need to know that the custom skin you are trying to use will be in a folder structuie somewhat like this one -
Example of custom torso skin - "UnitParts/Japan/Torsos/custom_torso_name/tex".
The "...\custom_torso_name\..." folder comprises of a "mesh.variant_part_mesh" (the model), and a "tex" folder - which contains the skins itself. The model you are using might not be saved in the folder structure above - regardless you will have to create the folders yourself as...
The "C:\*moddingpath*\Working_Data\Variantmodels" folder doesn't have a "UnitParts" folder by default. so you will have to create it yourself using the below folder structure then paste in your custom skins folders.
Syntax- "C:\*modpath*\working_data\VariantModels\UnitParts\Japan\*Category*\*Skin_Name*\tex"
Example file - "C:\modding\working_data\VariantModels\UnitParts\Japan\campaign\tokuhero\tex"
Ensure to put your skin/mesh in the correct *Category* - a head skin thats been put in the torso's folder is hardly going to work correctly is it?
Likewise if your skin is a campaign piece based model (Metsuke, Geisha, Ninja etc), these models use a single mesh and therefore only use one skin for the entire body - ensure that the category is "Campaign" for models like these.
After you have ensured the .dds files are in the Tex folder, and that your.mesh file is in the "custom_texture_name" folder - you will be able to load the mesh and texture in the editor onto any unit.
Thats all there is to it really - fire up TWeak, load the unit editor, then look for your variant model file in the list (or click "load from file" button in the bottom left to load manually), or even edit an existing uniform. *Note* - for your units to show in the database list of the unit editor, you will need to add custom entries to the "DB/Uniforms" table in tweak for the new unit first - otherwise you will have to click the "load from file" button and manually load your variant file.
You can apply your custom textures to the variantmodel on the right side from the correct category- i.e if it was a custom torso you will find it under torso's.
you can add skins to your variant model on the right by double clicking, and remove them from the model by clicking on the name on the left. Remember to click save for your changes to apply.
You then have two choices -
a) Add the variant file and unitparts folders directly to your packfile using Packfile Manager - effective for quicker editing of existing mods
b) Export to binary and have BOB create the packfile with your new variantmodel in it. - best for new mods which do not yet have a packfile.
I have tried to make this as clear as possible - any questions can be posted below and answered in due course.
Thanks.








Reply With Quote






