Results 1 to 1 of 1

Thread: - [Modding] ETW: How to create your own unit

  1. #1
    Kátz's Avatar Senator
    Join Date
    Aug 2008
    Location
    Jakarta, Indonesia
    Posts
    1,249

    Default - [Modding] ETW: How to create your own unit



    Author: The Phenom
    Original Thread: [Tutorial] How to create your own unit.

    How to create your own unit.Today, I will be teaching you on how to create your own unit in Empire. For this tutorial, I would show you a simple example of creating a new unit by cloning an existing one. The specific unit that we are going to clone is - Cemaat Janissaries.

    Tools you will need - Pack File Manager v1.9 by the amazing LtChambers:
    http://www.twcenter.net/forums/showthread.php?t=234546

    The files that we are going to edit in this tutorial is:
    building_units_allowed
    unit_stats_land
    unit_to_unit_abilities_junctions
    units
    units_to_exclusive_faction_permissions
    units_to_groupings_military_permissions
    units_to_gov_type_permissions

    (Note: units_to_gov_type_permissions is not needed to edit unless you want your unit to only be available to a certain type of government eg. a unit that can only be recruited if a faction is an Absolute Monarchy.)

    First, start up the Pack File Manager and open the patch.pack which is located at your data directory.

    We would need to export the files in the list above.

    Click on the "+" sign beside the "patch.pack" and then select the "db" directory.



    The first file we are going to export is "building_units_allowed". In order to do this, select and expand the "building_levels_tables" under the "db" directory. After this select "building_units_allowed" and then click on "Export TSV" on the top left hand corner above the table shown on the right.



    Repeat these steps for the remaining files:

    unit_stats_land
    unit_to_unit_abilities_junctions
    units
    units_to_exclusive_faction_permissions
    units_to_groupings_military_permissions
    units_to_gov_type_permissions

    (Note: As you can see, units_to_gov_type_permissions is UNDERLINED because it is located at the main.pack under the "db" directory. I will be showing you how to edit the "units_to_gov_type_permissions" later on the one of the last part of the tutorial.)

    After you have successfully exported the file. Go to the folder that you have exported it to and open it up with Notepad. The first file I am going to open is once again, ''building_units_allowed''

    The unit we are going to clone is Cemaat Janissaries, so in order to find the unit, press CTRL+F and type in "janissaries_cemaat"



    Copy the line "army_barracks janissaries_cemaat 0 00" as highlighted in the above screenshot and paste it at the bottom.



    But first, you need to rename the ID of the unit. I am going to rename my unit from "janissaries_cemaat" to "janissaries_cemaat_elite".



    Now, you will need to make them recruitable in advanced military buildings so that you can recruit them as you upgrade your Army Barracks in the Grand Campaign. In order to do this, copy the line "army_barracks janissaries_cemaat 0 00" and paste it below THREE TIMES.

    Then rename the other three lines into what is shown on the screenshot below.



    Save the file and then import the TSV into the patch.pack using the Pack File Manager (Note that you must backup your patch.pack, just in case if something wrong happens.)



    Now the next file we are going to edit is "units.tsv". Open up the file with Notepad. The search for "janissaries_cemaat" by using the CTRL+F function. Highlight the selected area shown in the screenshot below and paste it right at the bottom.



    Once you have pasted it at the bottom, rename the unit from "janissaries_cemaat" to "janissaries_cemaat_elite" and rename the name of the unit from "Cemaat Janissaries" to "Elite Cemaat Janissaries". (Note that you can also rename it to anything you like for the name of the unit.)



    After this, import the TSV in the "units" file in "units_table" under the "db" directory at the patch.pack by using Pack File Manager. By now, I think you would have known how to import the TSV.

    Now, the file that we are going to edit is "unit_stats_land.tsv". Open it up with Notepad and then, search for "cemaat_janissaries" and copy the whole chunk in the screenshow shown below.



    Paste it at the bottom and rename "janissaries_cemaat" to "janissaries_cemaat_elite".



    Save the file and then import the TSV in the "unit_stats_land" file in "unit_stats_land_table" under the "db" directory at the patch.pack by using Pack File Manager.

    Replicate this process of finding, copying and pasting the "janissaries_cemaat" lines and renaming them into "janissaries_cemaat_elite" in the other files. (Note: For "units_to_groupings_military_permissions", you need to create your own line.) This line would be:
    "janissaries_cemaat_elite ottoman_group"

    Paste this line at the bottom of "units_to_groupings_military_permissions" and save it.

    For "units_to_gov_type_permissions", it is a little bit complicated as it is located in the main.pack. Firstly, open up the main.pack using Pack File Manager. Expand the "db" directory under the "main.pack". Then select "units_to_gov_type_permissions_table". After that, right click on it and select "Extract Selected..." The steps will be shown in the screenshot below.


    After this, you will need to export the TSV of the file.



    After you have done this, open the "units_to_gov_type_permissions.tsv" with Notepad and then copy one of the units with three lines for eg.:

    voltigeur gov_absolute_monarchy 58 destroyed
    voltigeur gov_constitutional_monarchy 59 destroyed
    voltigeur gov_republic 30 enabled

    and then rename it the "voltiguer" to "janissaries_cemaat_elite".

    Save the file. Now you will need to create a new pack file for the ""units_to_gov_type_permissions". Then open up the Pack File Manager again and click on "File" at the top left hand corner and then select "New"

    After that, right click on the "Untitled.pack" and select "Add Directory...". Then, select on the "db" folder which contains the "units_to_gov_type_permissions". The steps will be shown in the screenshots below.





    After this, save it as "newunit.pack" or anything you like and make sure it is in the data directory of Empire Total War. Close the Pack File Manager and then open up "newunit.pack", then import the TSV as shown in the screenshot below.



    After you are done with all of this, you will need to give your unit a screen name. Follow this tutorial of mine in order to give your unit a screen name: http://www.twcenter.net/forums/showthread.php?t=239103

    Now, time for the results -



    Note that you can also clone other units by using this method and also edit the stats of your new unit by editing the "unit_stats_land" in the Pack File Manager.

    I hope that this guide is useful to all of you. If there are any flaws or problems with my tutorial, please inform me. Thanks.

Posting Permissions

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