TOTAL WAR WIKI

Unit Part folder structure documentation

Unit parts structure

Models & parts

working_data/
           VariantModels/
                       Units/
                            Saved units ready to use in the game
                       UnitParts/
                            Schemas

Schemas

UnitParts/
         Asian/
               Slots
         Euro/
               Slots
         Ottoman/
               Slots
              ...
               

Slots

Euro/        (any schema folder)
    Hats/
        Parts
    Heads/
        Parts
    Legs/
        Parts
    ...

  On this level of hierarchy you can use any number and level of informal subdirectories by prefixing with '_'. It's useful for artists to keep parts well organised in order to find one easier. And also for using shared textures (see later).

Example:

Asian/        (any schema folder)
      _Heads/
            _Indian/
                   Heads/
                        Parts - in the editor these are not distinguished from parts in Asian/Heads/
            _Chinese/
                   Heads/
                        Parts - in the editor these are not distinguished from parts in Asian/Heads/
      _ChineseArmours/
            Torsos/
                   Parts - in the editor these are not distinguished from parts in Asian/Torsos/
            Legs/
                   Parts - in the editor these are not distinguished from parts in Asian/Legs/
      Heads/
            Parts
      Hats/
            Parts
      ...

Parts

Hats/        (any slot folder)
    AustrianBearSkin/
           Meshes and textures
    BelgicShako/
           Meshes and textures
       ...

Meshes and textures

Basic situation

There is one mesh and one texture set.

AustrianBearSkin/
               mesh.variant_part_mesh
               texture_diffuse.dds
               texture_normal.dds
               texture_gloss_map.dds

 

Optionally you can group these files into subdirectories like this (using any name you want):

AustrianBearSkin/
               WhateverMeshFolder/
                           mesh.variant_part_mesh
               WhateverTextureFolder/
                           texture_*.dds

  or:

AustrianBearSkin/
               mesh.variant_part_mesh
               WhateverTextureFolder/
                           texture_*.dds

  or:

AustrianBearSkin/
               WhateverMeshFolder/
                           mesh.variant_part_mesh
               texture_*.dds

 

The only thing you mustn't change is the name pattern of the files.

In the editor, the part name will be the name of the root folder. AustrianBearSkin in these cases.

Random textures

Instead of adding one texture set, you can add more. These will be randomly chosen for the part.

Normal random textures

texture[01]_*.dds
texture[02]_*.dds
texture[03]_*.dds

...   In this case, the engine doesn't mix textures with different indices, texture[01]_diffuse.dds is always used together with texture[01]_normal.dds and texture[01]_gloss_map.dds.

The same applies in terms of placing them in the main folder or an optional subdirectory:

AustrianBearSkin/
                texture[*]_*.dds

  or:

AustrianBearSkin/
               WhateverTextureFolder/
                           texture[*]_*.dds

  Interchangeable random textures

WhateverTextureFolder_i/
               texture[01]_*.dds
               texture[02]_*.dds
               texture[03]_*.dds
               ...

  In this case, the engine will mix diffuse, normal and gloss map textures in any combination randomly.

Interchangeable textures always must be stored in a subdirectory as the directory name contains the information of being interchangeable.

Sharing meshes and textures

You can add more than one texure and mesh directory under a part folder. Then every combination of the mesh and texture folders will be added as a separate part in the editor.

Example:

Heads/
    Fat/
        A/
         Texture set #1
        B/
         Texture set #2
        C/
         Texture set #3
        X/
         Mesh #1
        Y/
         Mesh #2

In this case, the following parts will be available in the editor:

Fat_X_A
Fat_X_B
Fat_X_C
Fat_Y_A
Fat_Y_B
Fat_Y_C

The subdirectories can be named whatever you want to be displayed in the Unit Editor in the name of the part.

Texture sets may contain more than one textures (texture[*]_*.dds) for using randomly chosen textures and the same directory naming applies for interchangeable texture sets as described before.

If you only use one mesh or one texture set then you don't have to store the files in a subdirectory but you can just place them into Fat/ if you like (except interchangeable textures, of course) the part names in editor will be Fat_A, Fat_B, Fat_C or Fat_X, Fat_Y

Sharing textures between slots

If you want to use the same texture for parts of different types then you should follow this structure:

Euro/        (any schema folder)
   _NakedParts/
            texture*.dds
                   Heads/
                        Fat/
                           Mesh
                        Angry/
                           Mesh
                   Hands/
                        Fat/
                           Mesh
                         Slim/
                            Mesh
                   Heads/
                        ...
                   Hands/
                        ...

What you need to know about this:

See chapter Slots for more information on directory names starting with '_'.
Part meshes under _NakedParts/ will all share the textures at the top, assuming that there are no textures in the slot folders under _NakedParts/.
If you add textures to one of the parts then that particular part won't share textures but will use the ones you added there.
For the texture files the same applies as before: you can place them into a subdirectory and also you can have more than one directory of textures and you can use '_i' for the interchangeable ones.
There's an option to force the engine to choose the same random texture for one slot as for another by adding '_s' postfix to the name of the texture directory. This comes very handy in this particular example because we want the same skintone for the chosen head and hands.

Example:

_NakedParts/
         XYZ_s/
              Textures
         Heads/
              ...
         Hands/
              ...