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

Thread: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

  1. #1

    Default HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    For Window 7 users:

    What you need:

    • Pack File Manager (PFM)
    • Patience
    • Commitment & passion for Napoleonic
    • ‘Never-say-die’ attitude


    1-4 Setting-up

    Spoiler Alert, click show to read: 


    • [1]Create new folder in Libraries\Documents, name it “MOD”
      [2]Navigate to C:\Program Files (x86)\Steam\SteamApps\common\napoleon total war\data
      [3]Find and open data.pack with Pack File Manager (PFM)
      [4]Navigate to data.pack\db\building_units_allowed_tables\building_units_allowed

    5-9 Extraction
    Spoiler Alert, click show to read: 


    • [5]Right-click on it, then left-click on “Extract Selected…”
      [6]In “Browse For Folder” window navigate to MOD folder (created in step 1). Click on OK
      [7]Navigate to the following tables and repeat steps 5, 6:



      • uniform_to_faction_colours_tables
      • uniforms_table
      • unit_stats_land_tables
      • unit_to_unit_abilities_junctions_table
      • unit_tables
      • unit_to_exclusive_faction_permissions_tables



    • [8]Close Pack File Manager (PFM)
      [9]Navigate to C:\Program Files (x86)\Steam\SteamApps\common\napoleon total war\data

    10-13 Extracting uniforms & unit models
    Spoiler Alert, click show to read: 


    • [10]Find and open variantmodels.pack (ignore variantmodels2) with PFM
      [11]Navigate to variantmodels\units\atlas
      [12]Navigate to the following and repeat steps 5, 6

    · spain_colour_mask.atlas
    · spain_diffuse.atlas
    · spain_diffuse.dds
    · spain_gloss.atlas
    · spain_gloss.dds
    · spain_normal.atlas
    · spain_normal.dds

    • [13]Scroll up to the top, left click on atlas, navigate to the following and repeat steps 5, 6

    · spain_inf_line_spanish_line_infantry.musician.unit_variant
    · spain_inf_line_spanish_line_infantry.officer.unit_variant
    · spain_inf_line_spanish_line_infantry.soldier.unit_variant
    · spain_inf_line_spanish_line_infantry.standard_bearer.unit_variant


    14-25 Creating new mod
    Spoiler Alert, click show to read: 


    • [14]Left-click on File\New
      [15]In “Browse For Folder” window navigate to MOD folder (created in step 1). Click on OK
      [16]Right-click on Untitled.pack, left-click on “Add Directory…”
      [17]In “Browse For Folder” window navigate to MOD folder (created in step 1). Click on OK
      [18]Right-click on Untitled.pack, go to “Change Pack Type”, left-click on Mod
      [19]Left-click on File\Save
      [20]In “Save As” window navigate to Documents
      [21]Save as SPAIN_MOD
      [22]Navigate to SPAIN_MOD\db\building_units_allowed_tables\building_units_allowed.
      [23]Change its name by double left-clicking on building_units_allowed. Add a “spainmod_” prefix to the name. Now we have spainmod_building_units_allowed
      [24]Navigate to the following and add “spainmod_” prefix to all.

    · uniform_to_faction_colours
    · uniforms
    · unit_stats_land
    · unit_to_unit_abilities_junctions
    · units
    · units_to_exclusive_faction_permissions

    • [25]Save

    26-29 Creating new infantry unit (phase 1- isolating desired unit)
    Spoiler Alert, click show to read: 


    • [26]Navigate to SPAIN_MOD\db\building_units_allowed_tables\spainmod_building_units_allowed
      [27]Delete all entries except rows containing Inf_Line_Spanish_Line_Infantry in column “Effect IDRef”.
      [28]Inf_Line_Spanish_Line_Infantry is also in columns “Unit ID” or “Unit IDRef”. Navigate to the following and repeat step 27

    · spainmod_uniform_to_faction_colours
    · spainmod_uniforms
    · spainmmod_unit_stats_land
    · spainmod_unit_to_unit_abilities_junctions
    · spainmod_units
    · spainmod_units_to_exclusive_faction_permission

    • [29]Save

    30-33 Creating new infantry unit (phase 2 – clone & set up new unit ID)
    Spoiler Alert, click show to read: 


    • [30]Navigate to spainmod_units
      [31]Select row and click on button “Clone Row”.
      [32]Under column “Unit ID” change new cloned entry to spainmod_Inf_Line_Spanish_Line_Saragossafusilier
      [33]Save

    Note on PFM defect
    Spoiler Alert, click show to read: 


    • [34]When saving notice some table entries will be missing – this is probably a bug in PFM. So make sure entries are saved correctly when you make new entries every time (Try correct, copy & save multiple time)

    35-41 Creating new infantry unit (phase 3 – clone & separate new unit)
    Spoiler Alert, click show to read: 


    • [35]Navigate to spainmod_units. Scroll horizontally across table and double-check both rows of entries. Match and correct cloned but missing entries to the first (original) row.
      [36]Under column “Unit ID” copy new cloned entry spainmod_Inf_Line_Spanish_Line_Saragossafusilier
      [37]Navigate to spainmod_units_to_exclusive_faction_permissions.
      [38]Select and clone all rows of entries by repeating step 31
      [39]Under column “Unit IDRef” select cloned entries. Paste in spainmod_Inf_Line_Spanish_Line_Saragossafusilier.
      [40]Save
      [41]Navigate to the following and repeat steps 38, 39, 40

    · spainmod_unit_to_unit_abilities_junctions
    · spainmod_unit_stats_land
    · spainmod_uniform_to_faction_colour
    · spainmod_building_units_allowed

    42-53 Creating new infantry unit (phase 4 – connect new unit to an uniform)
    Spoiler Alert, click show to read: 


    • [42]Navigate to spainmod_uniforms
      [43]Clone all rows of entries. Under last column “Unit ID” select cloned entries (one at a time) and paste in spainmod_Inf_Line_Spanish_Line_Saragossafusilier
      [44]Under first column “Uniform ID Ref” select cloned entries and paste in spainmod_Inf_Line_Spanish_Line_Saragossafusilier. Add suffixes “_uniform” and “_uniform_spa_spain” so they match the second column “Faction”
      [45]Under third column “Uniform Variant” select cloned entries and change names into “spain_inf_line_spanish_line_saragossafusilier”
      [46]Save
      [47]Navigate to SPAIN_MOD\db\uniforms_tables\spainmod_uniforms
      [48]Under column “Uniform Variant” select and copy “spain_inf_line_saragossafusilier”
      [49]Navigate to SPAIN_MOD\variantmodels\units
      [50]Double-click on “spain_inf_line_spanish_line_infantry.musician.unit_variant”
      [51]This time to change titles, select only the part “spain_inf_line_spanish_line_infantry” and paste in our new entry. We should get “spain_inf_line_spanish_line_saragossafusilier.musician.unit_variant”
      [52]Double-click on the following and repeat step 51.

    · spain_inf_line_spanish_line_infantry.officer.unit_variant
    · spain_inf_line_spanish_line_infantry.soldier.unit_variant
    · spain_inf_line_spanish_line_infantry.standard_bearer.unit_variant

    • [53]Save


    Now we have a working unit the program recognises. It’s ready to be customised


    54-63 Activation
    Spoiler Alert, click show to read: 


    • [54]Navigate to Libraries\Documents
      [55]Select and copy MOD_SPAIN.pack
      [56]Navigate to C:\Program Files (x86)\Steam\SteamApps\common\napoleon total war\data
      [57]Paste
      [58]Navigate to C:\Users\your name here\AppData\Roaming\The Creative Assembly\Napoleon\scripts
      [59]Select and copy “preferences.script”
      [60]Paste and rename “preferences.script - copy” to “user.script”
      [61]Open “user.script” and delete all entries
      [62]Enter the following command:

    · mod "MOD_SPAIN.pack";

    • [63]Save



    Please refer to other tutorials for further customisation. I'd like to thank everyone out there for writing out advices. Believe me, I was just a novice like everyone else three months ago.

    I'll try to answer questions if I can, but please understand that it's a lot busier in real life. Cheers ~
    Last edited by Sacrebleu!; April 17, 2011 at 09:37 PM.

  2. #2

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Very good.

    Note that the PFM won't save the data in the current box you are in. You will need to click on an unchanged box or leave that folder entirely to make sure it saves it.

  3. #3

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    can i use this just to edit a unit to?

  4. #4
    LordKainES's Avatar Ducenarius
    Join Date
    Oct 2009
    Location
    Spain
    Posts
    932

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    What the hell is "browse for folder" window??? xD I didn´t find it!

    I need help with steps from 6 to 8!
    Last edited by LordKainES; June 03, 2011 at 04:42 AM.

  5. #5

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Quote Originally Posted by LordKainES View Post
    What the hell is "browse for folder" window??? xD I didn´t find it!

    I need help with steps from 6 to 8!


    0. Right click on the list
    1. Life click on "Extract Selected..."
    2. "Browse for Folder" window will pop up.

    Don't give up - modding is a rewarding, bitter-sweet experience that requires a 'can-do' and 'never-say-die' attitude!
    Last edited by Sacrebleu!; June 03, 2011 at 11:27 PM.

  6. #6
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Since PFM has a few bug, I use it to extract my files, then import in my mod.
    After this, I don't work in PFM

    I export to TSV, open the TSV file with Excel, edit there, then save the tsv file, go back to PFM and import.

    I've never lost any row this way.

  7. #7
    LordKainES's Avatar Ducenarius
    Join Date
    Oct 2009
    Location
    Spain
    Posts
    932

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Quote Originally Posted by Sacrebleu! View Post


    0. Right click on the list
    1. Life click on "Extract Selected..."
    2. "Browse for Folder" window will pop up.

    Don't give up - modding is a rewarding, bitter-sweet experience that requires a 'can-do' and 'never-say-die' attitude!
    haha I´m stupid xD

    Thanks for your help dude!!!

  8. #8

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Quote Originally Posted by Steph View Post
    Since PFM has a few bug, I use it to extract my files, then import in my mod.
    After this, I don't work in PFM

    I export to TSV, open the TSV file with Excel, edit there, then save the tsv file, go back to PFM and import.

    I've never lost any row this way.
    I agree. PFM has a few nasty bugs that'll crash half-way in the middle of your work. That's why we have to save periodically

  9. #9

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Hello, I tried to create a unit and I can choose is when I want to play a battle. but each time I start the battle my ntw crashes:s does anyone know what might cause this?
    ps. my unitcard is white:s is this normal?

  10. #10

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Hello, I tried to create a unit and I can choose is when I want to play a battle. but each time I start the battle my ntw crashes:s does anyone know what might cause this?
    ps. my unitcard is white:s is this normal?
    Yes, this happens often when modding. Double check all spelling, I find this is a very common cause of crashes. Carefully go through all the tables and ensure everything is done correctly. Then try, and try again until it works! I always compared my input with one that already works. Any other mod will do.

    The white unit card is one of several things to include; no unit card, incorrect name for unit card, no mask.

  11. #11

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    First off you f'n rock for making this tutorial!
    Question: I get to steps 26-29 and find that spainmod_uniform_to_faction_colours and spainmod_uniforms did not extract due to this... ever seen this?

  12. #12

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    It tells me that this db isn't supported on the right, but only within those two, the others extracted fine. My game runs fine, never had ctd or anything. I am running LME 2.0 and I've seen those additional units during the other steps. Is this a PFM bug?

  13. #13

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Hi Wolves in the Throne Room

    I've never encountered something like this before uniform_to_faction_colours should be PFM supportable. My only logical guess is that the PFM been used is an older version. Anyone with logical explanation / solution is welcomed.

  14. #14

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Quote Originally Posted by Steph View Post
    Since PFM has a few bug, I use it to extract my files, then import in my mod.
    After this, I don't work in PFM

    I export to TSV, open the TSV file with Excel, edit there, then save the tsv file, go back to PFM and import.

    I've never lost any row this way.
    So when I import the edited tsv back in, does it overwrite auto or do I need to do something?
    Last edited by Wolves In The Throne Room; June 26, 2011 at 03:19 PM. Reason: typo

  15. #15

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Quote Originally Posted by Sacrebleu! View Post
    Hi Wolves in the Throne Room

    I've never encountered something like this before uniform_to_faction_colours should be PFM supportable. My only logical guess is that the PFM been used is an older version. Anyone with logical explanation / solution is welcomed.
    I got the newer PFM and am having no issues now...trial and error ha

  16. #16

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Hi Sacrebleu!, could you post part 2 of this tutorial, please ?
    Or how to make unique units uniform, please ?

  17. #17
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    There are several ways, more or less complicated, depending on what you want to do. It's hard to give a general answer.
    You can
    - Just change a bit the colour of an existing unit : easy (if using vanilla texture)
    - Exchange some items (switch hats or coats) between units from the same faction: easy.
    - Use an item from a faction for another faction : moderate if the unit using only things from the other faction (ex: you want to take the British units to make a Belgian units just changing the colour to blue)
    - Use some item from a faction and some others from another faction for the same unit (ex: take the French cuirrasier helmet, but the Russian cuirassier cuirass): a lot more difficult
    - Create a new texture which is not available in any faction: harder
    - Create a new mesh to change the form of an item : harder again

  18. #18
    Idstaaner's Avatar Foederatus
    Join Date
    Feb 2012
    Location
    Hesse, Germany
    Posts
    29

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    hi,
    nice tut but i've a question for steps 12+13:
    You choose Spain. Do i've to choose the state whose units I want to edit?
    I don't know 100%, so i ask.

  19. #19
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Yes, it's very important.
    Each faction has atlases, big images with all the small textures for uniforms in it.
    If you want to use the big hat of the Spanish grenadiers, the textures for that is only in the Spanish atlas.
    So you need to extrat from it.
    For instance, if you want to create for whatever reason a Prussian units that looks like a Spanish unit, since the images for the Spanish units are in the Spain_atlas, you must extract the Spain_ files, and not the Prussian_ files

  20. #20

    Default Re: HOW TO CREATE CUSTOM UNIT step by step (Part 1)

    Quote Originally Posted by Steph View Post
    - Use some item from a faction and some others from another faction for the same unit (ex: take the French cuirrasier helmet, but the Russian cuirassier cuirass): a lot more difficult
    - Create a new texture which is not available in any faction: harder
    Thanks for reply Steph.
    I think I should start learning photoshop and gimp for several months.

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
  •