Page 1 of 3 123 LastLast
Results 1 to 20 of 48

Thread: How to create a custom unit in NTW

  1. #1

    Default How to create a custom unit in NTW

    How to create a custom unit in NTW

    This is just a basic beginning and it will be updated soon.

    The basic steps of the unit creation process are the same like in ETW. The difference is the assignment of the models/textures to each unit.

    Please refer first to this guide from Thalion where he described the basic steps: [Tutorial] How to add a unit to another faction


    If you want to start modding and create your own units, then I suggest that you first learn how to modify and customize a released unit mod.

    Here is my released mod example: AUM-NAP

    Here is my "How to customize AUM" tutorial: (most of these hints can be used for NTW too)
    http://www.twcenter.net/forums/showt...69#post5556469

    TWC WIKI - How to customize Unit Pack Mods (vanilla example)
    http://www.twcenter.net/wiki/How_to_customize_Unit_Pack_Mods


    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:
    Spoiler Alert, click show to read: 

    Here is an easy to use RGB palette viewer which displays the values of the selected colour:
    http://www.visibone.com/colorlab/big.html

    > Izanagi11
    Spoiler Alert, click show to read: 
    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

  2. #2

  3. #3

    Default Re: How to create a custom unit in NTW

    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 ?

  4. #4

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by AK47 View Post
    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

  5. #5

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Swiss Halberdier View Post
    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
    Thank you very much

  6. #6

    Default Re: How to create a custom unit in NTW

    Great work!

  7. #7
    l33tl4m3r's Avatar A Frakkin' Toaster
    Join Date
    Mar 2009
    Location
    Soldier of Fortune
    Posts
    6,330

    Default Re: How to create a custom unit in NTW

    Nice job, Swiss -- you so sexy.

    I will watch the progress!

    +rep
    [House of Caesars|Under the Patronage of Carl von Döbeln]

  8. #8

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by erasmus777 View Post
    Great work!
    Quote Originally Posted by l33tl4m3r View Post
    Nice job, Swiss -- you so sexy.
    I will watch the progress!
    +rep
    Thanks a lot my friends and I appreciate that.

    Quote Originally Posted by La♔De♔Da♔Brigadier Graham View Post
    Swisss can I add this to the scriptorium for approval? Its a great guide!
    Hello Brigadier, yes for sure you can add it.

  9. #9

    Default Re: How to create a custom unit in NTW

    Thanks for the invitation
    ((I will join as soon as I will finish my Scenario battle))
    Last edited by kungfuserge; March 11, 2010 at 04:36 AM.

  10. #10

    Default Re: How to create a custom unit in NTW

    Nice one mate, great work +rep


  11. #11

    Default Re: How to create a custom unit in NTW

    Somehow I cannot edit the Unit ID in the Pack File Manager, do I need to do something to make it editable?

  12. #12

    Default Re: How to create a custom unit in NTW

    In the PFM you have to uncheck the option "use first column as row header" then you should be able to edit the entry.

  13. #13

    Default Re: How to create a custom unit in NTW

    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.

  14. #14

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Lord Mongsworth View Post
    Nice one mate, great work +rep
    Quote Originally Posted by kungfuserge View Post
    Thanks for the invitation Pascal
    ((I will join as soon as I will finish my Scenario battle))
    Thanks a lot!

    Quote Originally Posted by Thalion View Post
    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.

  15. #15
    Salvo's Avatar Maréchal de l'Empire
    Join Date
    Mar 2008
    Location
    Poland
    Posts
    2,160

    Default Re: How to create a custom unit in NTW

    Great job, REP++(I have to spread some reputation around)
    Last edited by Salvo; March 11, 2010 at 08:18 AM.

  16. #16
    Megasalexandros's Avatar Campidoctor
    Join Date
    Sep 2006
    Location
    Northern Greece(Macedonia)
    Posts
    1,828

    Default Re: How to create a custom unit in NTW

    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

  17. #17

    Default Re: How to create a custom unit in NTW

    Thank you Swiss, I like that you explained how to do it for three different choices on uniform colors.

  18. #18

    Default Re: How to create a custom unit in NTW

    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.

    Proud to be a real Prussian.

  19. #19

    Default Re: How to create a custom unit in NTW

    delete please. double post

    Proud to be a real Prussian.

  20. #20
    Megasalexandros's Avatar Campidoctor
    Join Date
    Sep 2006
    Location
    Northern Greece(Macedonia)
    Posts
    1,828

    Default Re: How to create a custom unit in NTW

    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?

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •