Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 48

Thread: How to create a custom unit in NTW

  1. #21

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Megasalexandros View Post
    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?
    Maybe this will help: http://www.twcenter.net/forums/showt...85#post6917385. IIUC, the unit_variant file is the key component. It "points" to the specific mesh and texture that you want to use for each part of the unit.

    This should be helpful too: http://www.twcenter.net/forums/showthread.php?t=339983
    Last edited by erasmus777; March 11, 2010 at 07:47 PM.

  2. #22
    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

    thank you very much for your help, what i did was
    i was trying to make the 18th french regiment playable ,so i tried to find in the uniform to faction colours the line for the 18th regiment, paradoxically i didnt find it, but i found ALL the othes, the 7th lancers regiment and the 6th legere, so what i did was copy for every single file that i knew from etw was a file that had to do with a unit, and i made a new entry i just changed the original ID to be more precise i changed the NAME of the file for eg, i copied the line for of the french line infantry so i had 2 same lines and then to the copied one i changed the name from french line to "Elite" my name of choise, then i choose the 6th legere lines so that i could have a unit with those textures, and changed again the original name from 6th legere to elite
    i tried to play the game and it crashed, so iam i doing something wrong or those units are somehow protected like the 2nd hussars models were in etw, cause i tried to use those models for a custom unit that i wanted to make in empire but the game crashed (i cannot buy the unit i dont have a credit card)

  3. #23

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Megasalexandros View Post
    thank you very much for your help, what i did was
    i was trying to make the 18th french regiment playable ,so i tried to find in the uniform to faction colours the line for the 18th regiment, paradoxically i didnt find it, but i found ALL the othes, the 7th lancers regiment and the 6th legere, so what i did was copy for every single file that i knew from etw was a file that had to do with a unit, and i made a new entry i just changed the original ID to be more precise i changed the NAME of the file for eg, i copied the line for of the french line infantry so i had 2 same lines and then to the copied one i changed the name from french line to "Elite" my name of choise, then i choose the 6th legere lines so that i could have a unit with those textures, and changed again the original name from 6th legere to elite
    i tried to play the game and it crashed, so iam i doing something wrong or those units are somehow protected like the 2nd hussars models were in etw, cause i tried to use those models for a custom unit that i wanted to make in empire but the game crashed (i cannot buy the unit i dont have a credit card)
    I'd suggest you start with a simple test procedure. See if you can take a vanilla unit and give it your desired model and texture via the unit_variants file (copying the file and renaming it to replace the old one might work fine). If you make the process as simple as possible and you're still getting CTDs, then something else is going on.

    Edit: I just swapped a British unit_variant file for Napoleon's officers in the demo (france_gen_late_napoleon.soldiers.unit_variant). The model swapped without problem, though the textures were scrambled. That should be enough to tell you if your idea will work, though.

    Spoiler Alert, click show to read: 
    Last edited by erasmus777; March 11, 2010 at 09:20 PM.

  4. #24
    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

    thank you very much but to be honest iam really confused
    for example i used the original name of the 18th line regiment and the game didnt crashed(of course it didnt appear in my campaing or my custom battle)
    but when i used the 6th_legere then the game crashed, it doesnt make sense really
    I hope they will MAKE this uniform editor they said they would

  5. #25

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Marcus Aemilius Lepidus View Post
    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?
    If you want to give a new unit a name you have to add an entry in your patch_en.pack (or patch_ge etc.), this should work like in ETW. Your second question ist easy to answer: the icons no longer have color masks as they had in ETW , the colors are directly painted on the icon. To change the icons color you have to edit the .tga directly.

    If you want to keep the units origin colors ingame just search for origin unit and change the RGB values of your new unit to that of the original unit (you have to do this in uniform_to_faction_colours).

    Greetings
    Thalion

  6. #26

    Default Re: How to create a custom unit in NTW

    awesome job man.


  7. #27

    Default Re: How to create a custom unit in NTW

    Though I haven't got the time to try, I thing this tutorial is especially for.. me! Thanks pascal, +rep!




  8. #28
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default Re: How to create a custom unit in NTW

    EDIT: Now I understand. It was because I started with modding since NTW and had not the basics from ETW. I looked at Lazy knight resources and now I understand it! Thx to both of you.
    Last edited by fingon; March 12, 2010 at 04:03 PM.

  9. #29
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Marcus Aemilius Lepidus View Post
    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?
    Look here and you will quickly understand!! ;-)
    Last edited by fingon; March 12, 2010 at 04:04 PM.

  10. #30
    Geronimo2006's Avatar TAR Local Moderator
    Join Date
    Oct 2007
    Location
    Ireland
    Posts
    7,405

    Default Re: How to create a custom unit in NTW

    Sorry I meant to post this question in the ETW forum.
    Colonialism 1600AD - 2016 Modding Awards for "Compilations and Overhauls".



    Core i7 2600 @ 3.4ghz - NVIDIA GTX950 2GB

    Colonialism 1600 AD blog

  11. #31
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default Re: How to create a custom unit in NTW

    I have sucessfully created custom infantry units. No problem, but I get CTDs while I want to play custom battles with my custom cavalry units. Maybe some other file should be edited?

    Aha, its bug in PFM, I´ll report it..
    Last edited by fingon; March 12, 2010 at 06:00 PM.

  12. #32

    Default Re: How to create a custom unit in NTW

    i get an error when i try to open a pack file with PFM
    http://img16.imageshack.us/i/78577872.jpg/
    Am i doing something wrong?

  13. #33
    maxsim666's Avatar Miles
    Join Date
    May 2008
    Location
    Ancona Italy
    Posts
    329

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Megasalexandros View Post
    thank you very much for your help, what i did was
    i was trying to make the 18th french regiment playable ,so i tried to find in the uniform to faction colours the line for the 18th regiment, paradoxically i didnt find it, but i found ALL the othes, the 7th lancers regiment and the 6th legere, so what i did was copy for every single file that i knew from etw was a file that had to do with a unit, and i made a new entry i just changed the original ID to be more precise i changed the NAME of the file for eg, i copied the line for of the french line infantry so i had 2 same lines and then to the copied one i changed the name from french line to "Elite" my name of choise, then i choose the 6th legere lines so that i could have a unit with those textures, and changed again the original name from 6th legere to elite
    i tried to play the game and it crashed, so iam i doing something wrong or those units are somehow protected like the 2nd hussars models were in etw, cause i tried to use those models for a custom unit that i wanted to make in empire but the game crashed (i cannot buy the unit i dont have a credit card)
    if you did all well game should not CTD, so tables are the same in ETW plus uniform and uniform_to_faction_colours
    then there is the big issue about the image posted by Erasmus: in NTW, unit texture and model files are colled variant and if you open them with a hex editor you can see there is only a recall to some mesh and texture, now comes the problem, the recall points to some files recalled and regrouped in some atlas and dds files in atlas section of variantmodels.pack and variantmodels2.pack. At the moment nobody succeded in modding them.
    "In hostem celerrime volant"


    - Voloire -

  14. #34

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Ahiga View Post
    Thank you Swiss, I like that you explained how to do it for three different choices on uniform colors.
    Quote Originally Posted by husserlTW View Post
    Though I haven't got the time to try, I thing this tutorial is especially for.. me! Thanks pascal, +rep!
    Quote Originally Posted by Lazy Knight View Post
    awesome job man.
    Quote Originally Posted by Salvo View Post
    Great job, REP++(I have to spread some reputation around)
    Thanks a lot for your nice words and I will update this thread after we discovered some more infos.

    Quote Originally Posted by Megasalexandros View Post
    thank you very much but to be honest iam really confused
    for example i used the original name of the 18th line regiment and the game didnt crashed(of course it didnt appear in my campaing or my custom battle)
    but when i used the 6th_legere then the game crashed, it doesnt make sense really
    I hope they will MAKE this uniform editor they said they would
    Hello Megasalexandros, yes at the moment it's quite confusing, but I'm sure we can share here our experiences for the benefit of all.

    At the moment we have a basic uniform editor with the uniform_to_faction_colours table and probably this will be used in the official "Uniform Editor" as reference
    too.

    Did CA announce that the official "Uniform Editor" will be able to create custom units or is it only for re-textures of vanilla units?

    Quote Originally Posted by Marcus Aemilius Lepidus View Post
    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?
    The used icon and info cards are automatically assigned with the value in the 3rd column of the uniforms table. I didn't found where we can re-colour the icons and info cards. So we have to integrate our own custom icons. Unfortunately the used regions for the NAP units are very few regarding to ETW. I will post the regions here soon.

    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.

    Cheers
    Swiss Halberdier

  15. #35

    Default Re: How to create a custom unit in NTW

    Brilliant, this will be useful +rep

  16. #36

    Default Re: How to create a custom unit in NTW

    Okay. Let's imagine the following desire;

    Create a (fictional) line infantry unit for the Kingdom of Italy.
    What would be the step-by-step process needed to do this?

    Telling me "make an entry in xyz" is...not as helpful as it might seem.
    I'm not a modder; I can use the PFM, but these instructions are too technical for me to make much sense of them.

  17. #37

    Default Re: How to create a custom unit in NTW

    I heard it's possible to import ETW units into NTW. How would one go about doing that?

  18. #38

    Default Re: How to create a custom unit in NTW

    Quote Originally Posted by Priscilla View Post
    I heard it's possible to import ETW units into NTW. How would one go about doing that?
    http://www.twcenter.net/forums/showthread.php?t=344105

  19. #39

    Default Re: How to create a custom unit in NTW

    Is it possible to customize the color of a hull ship inside a specific faction
    like 1 ship black& blue inside the french navy ??

  20. #40
    Zaitochisan's Avatar Civis
    Join Date
    Nov 2009
    Location
    London, UK
    Posts
    155

    Default Re: How to create a custom unit in NTW

    > 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.
    [/SPOILER]

    Technically this is incorrect in that the values are not specific to any area of a unit but soley to the area defined by the colours RGB and black.
    You can place any of these colours in any manner in your custom colour map and they will be displayed as you define in the uniforms to faction db

    for example:
    You define the RGB values in the uniform_to_faction_colours db.
    So for a Standard British foot Infantry colour map

    RGB1:191,34,13 = Colour map RED


    RGB2:255,233,123= Colour map GREEN


    RGB3:255,255,255= colour map BLUE


    Black
    on colour map is base texture colour
    Last edited by Zaitochisan; April 11, 2010 at 08:22 AM.

Page 2 of 3 FirstFirst 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
  •