I figured out some useful informations about the assignment of models/textures to custom units.
You have to update the definition file DBFileTypes_0.txt manually, that the PFM reads the table uniform_to_faction_colours. Here is the solution from erasmus777 in this thread: Napoleon PFM Released
Custom unit for one specific faction with the normal uniform colour of this faction
Spoiler Alert, click show to read:
> uniforms
only one entry is required
1. custom_unit_ID_uniform
You can call this whatever you want, but it has to be the same unique string like in the uniform_to_faction_colours table if used.
2. faction_ID
3. texture, icon and info card picture reference
Here you can assign a texture/variant file to your custom unit. The unit icons and info card pictures are automatically assigned too.
I didn't found out where to specify the used RGB colour scheme of the unit icons and info cards. They don't change the colours if you assign a new colour scheme in the uniform_to_faction_colours table for your custom unit. But it's possible to create own custom icons/info cards and assign them in the units table.
4. custom_unit_ID
> uniform_to_faction_colours
not required but if used then it's possible to define the uniform colours of this unit.
Custom unit for more than one faction with the uniform colours of the assigned factions
Spoiler Alert, click show to read:
> uniforms
required
You need to create an own entry for each faction that your unit is assigned to:
faction1_custom_unit_ID_uniform ... ... ...
faction2_custom_unit_ID_uniform ... ... ...
faction3_custom_unit_ID_uniform ... ... ...
faction4_custom_unit_ID_uniform ... ... ...
> uniform_to_faction_colours
not required because of the faction_ID definition in the uniforms table. The unit will have the faction colours of the related factions.
Custom unit for more than one faction with the same uniform colours for all factions
Spoiler Alert, click show to read:
> uniforms
required
You need to create an own entry for each faction that your unit is assigned to:
faction1_custom_unit_ID_uniform ... ... ...
faction2_custom_unit_ID_uniform ... ... ...
faction3_custom_unit_ID_uniform ... ... ...
faction4_custom_unit_ID_uniform ... ... ...
> uniform_to_faction_colours
required
You have to add one entry for each faction that this unit is assigned to. Important is that the reference is the related faction1_custom_unit_ID_uniform from the uniforms table.
Here you can assign the same RGB values for each entry of this unit. Then all units use the same uniform colours.
Custom unit for more than one faction with different uniform colours for all factions
Spoiler Alert, click show to read:
> uniforms
required
You need to create an own entry for each faction that your unit is assigned to:
faction1_custom_unit_ID_uniform ... ... ...
faction2_custom_unit_ID_uniform ... ... ...
faction3_custom_unit_ID_uniform ... ... ...
faction4_custom_unit_ID_uniform ... ... ...
> uniform_to_faction_colours
required
You have to add one entry for each faction that this unit is assigned to. Important is that the reference is the related faction1_custom_unit_ID_uniform from the uniforms table.
Here you can assign your specific RGB values for each entry of this unit. Then all units use a different set of colours.
Here is some detailed information from Izanagi11 and Smirk about the three RGB value sets and the variant files:
There are three sets of RGB (the actually colour) and three numbers for each RGB set for a total of nine numbers. Each RGB set defines a certain area of the uniform (torso, secondary parts, legs/pants).
In ETW, under unit_stats_land, model name column defines which model to use for that unit, warscape_animated_lod defines the which mesh to use, and warscape_animated_tables defines which texture to use.
In NTW, under unit_stats_land, all units point to "euroline".
In variantmodels.pack, /variantmodels/unitparts, we find all different body parts(hats, legs, body, and etc) defined for euro and ottomans.
In /variantmodels/units/atlas (also in variantmodels2.pack), we find all the textures for all the nations .dds is the actually texture file. The atlas defines specific areas of the corresponding .dds file.
In /variantmodels/units, we find all the different variant files for each unit define as officer, musician or soldier. These variant files define which body parts meshes/textures to use for that type of man.
Finally here is where the uniforms and uniforms_to_faction_colours table comes in to play. Linking the unit_stats_land and unit to the actually model/texture to use while adding in the colour scheme to use.
> smirk
Spoiler Alert, click show to read:
To colour your units in game you can add your unit to 'uniforms_to _faction_colours'.
The three sets of RGB values are for torso, collar/cuffs/second trouser colour, and legs respectively.
1. The first field modifies anything RED on the colour mask file for the unit's TORSO
2. The second modifies anything GREEN on the colour mask file for the unit's TORSO & LEGS
3. The third modifies anything RED on the colour mask file for the unit's LEGS.
The first set of RGBs seem to be what colour to assign to the RED coloured areas on the diffuse atlas' corresponding COLOUR MASK file in regard to the torso. This means that if we changed the red masked areas to included the collars and cuffs then these areas would be coloured with the first RGB settings.
The second set seem to colour all the GREEN areas of the COLOUR Mask on both the torso and the legs. Once again it doesn't HAVE to be the collars and cuffs but that is the way CA has done it on most body parts in the COLOUR MASK file. Change the green areas and you change where the colour is applied.
The third set of RGBs seem to be whatever is coloured RED in the COLOUR MASK file for legs. If the corresponding colour mask has only the trouser turn-ups in red then that is all that would be coloured by the third RGB setting.
You may have already known this but I thought I would clarify it as some of the colour masks for some of the units may not be set up in the torso/collar,cuffs/legs way.
Credits
Spoiler Alert, click show to read:
The Vicar, erasmus777 and husserlTW for releasing the first workable NAP-PFM
LtChambers and alpaca for their masterpiece tools DBEditor, Pack File Manager and Mod Manager.
Thanks to maxsim666, Izanagi11 and Smirk for their valuable informations about the uniforms and uniform_to_faction_colours tables.
The Phenom, MrThib, Power Wizard, erasmus777 and husserlTW for their great tutorials and guides
Please give me some feedback if you agree with this or if you experienced some other things. Any suggestions or corrections are welcome.
Cheers
Swiss Halberdier
Last edited by Swiss Halberdier; March 24, 2010 at 07:34 PM.
One problem. I have the latest version of the NTW PFM and it cant read Uniform to faction colors, but it can read uniform tables. How did you get it to read Uniform to faction colors ?
One problem. I have the latest version of the NTW PFM and it cant read Uniform to faction colors, but it can read uniform tables. How did you get it to read Uniform to faction colors ?
Hello AK47, I had to update the definition file DBFileTypes_0.txt manually. Here is the solution from erasmus777 in this thread: Napoleon PFM Released
Although creating an entry in the unit_to_faction_colors is not necessary it is usefull because otherwise the hole unit will only have one color (the faction color). It seems that NTW uses all color areas for the faction colors as default and this default gets overwritten by the entry in the unit_to_faction_colors.
For example the uniform of my Brunswick Line was totally blue the first time
By the way great summary of creating a new unit!
Greetings
Thalion
Last edited by Thalion; March 11, 2010 at 02:26 AM.
Thanks for the invitation Pascal
((I will join as soon as I will finish my Scenario battle))
Thanks a lot!
Originally Posted by Thalion
Although creating an entry in the unit_to_faction_colors is not necessary it is usefull because otherwise the hole unit will only have one color (the faction color). It seems that NTW uses all color areas for the faction colors as default and this default gets overwritten by the entry in the unit_to_faction_colors.
For example the uniform of my Brunswick Line was totally blue the first time
By the way great summary of creating a new unit!
Greetings
Thalion
Hello Thalion, thanks for your nice words and yes that's right. The entry in the unit_to_faction_colors table is useful if you want to see other colours than the faction colour default from the uniforms table assigns to the unit.
Last edited by Swiss Halberdier; March 11, 2010 at 02:39 AM.
Nice work but i dont quite get it,
my problem is that i cannot understand 1rstly how do i define the model that a SPECIFIC unit will use and the texture .
If there is one file that has the skins for a whole faction how can we use a specific texture for one unit and one model, is there a way we can do it OR we will have to make something similar with a multitude of skins in one file?
And the model also , every model in Ntw is name euroline in the unit stats land...
so Iam quite puzzled
Nice i have test it and have add the saxony Garde du Corps successful, but there are two things i would like to now. The first and most importance is how to rename a unit and the second how i change the colour of the Unit-Icon. Ingame they have the right Prussian Colour, but in the icon the uniform is still yellow.
Edit: And another Question. What is to do when i want that the original colours of the unit should stay? For example, i want to rename the Hannoverian Lineinfanterie in to "Braunschweiger Infanterieregiment" and make them avaible in Hannover, with AoR Recruitment. Then i get the next problem. I thing there are Region ID's for Silesia and Hungaria, but where i find the correct ID for Hannover?
Last edited by Marcus Aemilius Lepidus; March 11, 2010 at 07:26 PM.
Sorry for my questions i dont understand some things yet. so as far as i got i believe that firstly the models and textures are NOT defined anymore by the model category in Units_table but in the uniforms , what i dont understand is the TEXTURE for eg for france there is one texture file that contains ALL the textures that are used for that factions infantry , how can we specify witch part of the texture is used for a specific unit ?
And . custom_unit_ID_uniform
You can call this whatever you want, but it has to be the same unique string like in the uniform_to_faction_colours table if used.
2. faction_ID
3. model/texture
4. custom_unit_ID
to witch file are those categories to be found? In data?