I’m writing this because a lot of people must have tried the tutorial about how to create custom units by The Phenom (link) or in the thread compiling the information of various post created by Wiz (including the one from the phenom) link.
This tutorial is basically the next step and I will explain what we mod in the intention that people can understand what they do.
That way if something goes wrong, they can track the mistakes they’ve done by their own, so please read everything before posting for problems.
At the end of the precedent tutorial you should have an elite Cemaat janissaries unit fully functional but using the same texture that the existing one on the battlefield.
This is where this tutorial starts: how to add your own personal texture to your newly created unit.
(I will not go into texture editing in this thread, so I will assume that you already have some of them waiting to be used).
All the file structures I’ll provide there are based on the official CA statements about mod making; you can find a tutorial and some information there and there
So I’ll assume you’ve edited your work on a proper way to make it a functional mod.
I will not support other files structures based conflict or bugs because like it has been stated they could create conflict with other mods and game structures like coming patch, but the methods of editing should stay the same, just do it knowing this.
I’ve created a new Azzars unit that I’ve called Azzar_retextured for the meaning of the tutorial (assume it’s your new unit).
As you can see, I’ve changed the entry in the model part of the editor with a new custom one.
That’s because I want my new unit to use a different model than the vanilla (read: default) without overwriting the one of the default Azzars so my new unit can be unique.
(Note: I’ve let the default Azzars entry for comparison purposes only, that’s not something I want to keep in this mod)
By model in the db files in general, you should read: name that’s used as a reference for associating 3D mesh and textures.
Now, I need to tell the game what are the corresponding 3D meshes associated with my new model (that I’ve called east_azzars_retextured).
This information is located in the warscape_animated_lod_tables.
This file looks like this:
So, even if that seems a little hard to understand, that’s not.
-The first column is the line ID.
It’s basically used so if you want to overwrite a line you could do it calling this ID.
They seem totally random and in fact most of them are, that’s because there is no limit in the number of custom units/buildings/ … we can add to the game.
You don’t have to put the next ID to add a line (let’s say the last model was 109847, I don’t need to add the 109848), but just a random number too.
Why does it works like that is because that way, mods adding models to the game should never conflict with each others because of the very low probability they use the same ID (by very low I mean more or less 0,000000000000000001 % for each entry to be the same than an existing one).
-The second Column is the path to the 3D mesh (it use the same folder structure path than all the other packed files).
Each 3D model comes with four meshes (perhaps not all of them, should be confirmed) that, in my understanding, are relatives to details and graphical options (the weight differences).
This is where we’ll be able to add custom 3D meshes when we’ll be able to work with them.
-The third Column must be affecting graphical settings, but I’m not quite sure. It’s associated with the different meshes. (for now just copying the actual settings of similar models is the safest way to go).
-the last Column is the model name found in the other db files (in this example the unit_stat_land_table).
So, knowing this, adding my entries is not hard at all (use the filters function to looks through default files to copy what you need):
Note: I’ve just copied the path to the meshes from the default file.
Now, I need to link the texture I want to use with my model, this information is located in the warscape_animated_tables.
That’s actually speaking for itself.
east_azzarsretextured is the name of my texture here (east_azzarsretextured_diffuse.dds, east_azzarsretextured _gloss_map.dds and east_azzarsretextured _normal.dds)
Just leave the category stuff alone.
Now you just have to add your textures to the pack:
And that’s done, just save your work and enjoys it!!!
All the credits for this come from all the people of this thread: http://www.twcenter.net/forums/showthread.php?t=240587