Page 1 of 18 1234567891011 ... LastLast
Results 1 to 20 of 359

Thread: Sebidee's Complete Guide to Unit Creation

  1. #1
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Sebidee's Complete Guide to Unit Creation

    Hello future modders,

    I love modding and I love Rome 2. Most of all I love that Rome 2 was released in an unfinished state, otherwise I and hundreds of other modders would not have taken the leap to learn a fantastic skill. Modding lets your creative side out and through the steam workshop you can share your creativity with thousands. Now I will do something that I probably shouldn't, I am going to tell you the secret of modding, the one thing that so many people don't want you to know. I will probably be banned for this and hunted down but I feel like I have to do it for the community. The secret of modding is ....

    Spoiler Alert, click show to read: 
    IT'S EASY


    Yes, that's right, its the truth but people just can't seem to wrap their minds around that one fact. Initially modding can be difficult to learn but once you have the basics you are pretty much at an equal level to anyone else on the workshop. You see modding is not about skill, its about creativity and imagination, a good idea will always trump technical skill. So, with this tutorial I want to teach you the basics of unit creation and tell you how to create your own roster expansions in only a few days. Unit mods are among the most popular on the workshop, people will like them even if you are a no talent hack like I am, did I say no talent hack? Uh I meant modding genius, I swear. Anyway, you'll more than likely be far better than I am by the time you finish reading this so read on!!

    _______________________________________________________________________________________________________

    http://steamcommunity.com/sharedfile.../?id=272182428

    First of all I would like you to download this. Its a template for making basic roster expansions which contains most of the tables you will need. It is a good starting point but you should check out some other tutorials just to get the extreme basics of packfiles and learn how to actually get the tables into the mod but I will be breezing past it to get to the meat and bones of unit creation.

    The first thing you must do change the name of the mod, then are you are free to edit it.

    Now, primarily I do all of my modding in the Pack File Manager but I like to begin with the variant editor in the assembly kit so I can create basic unit appearances and get my mind focused on what kind of unit I want to create, in the course of this tutorial I will be doing things my way, they are not necessarily the best way but it is what I am most comfortable with. When you are more experienced feel free to call my process flawed and come up with your own! For this tutorial I will be making a single unit but I will show you the techniques I use for creating units in bulk, creating 20 units is not all that much more time consuming than creating one. I will make an Armoured Falxman for the Getae which will be available to use in the campaign and in custom battles. So, shall we crack on?

    If you want to look at the Getae mod in more detail then you can download it here, it will soon be part of my Getae roster expansion:

    https://www.sendspace.com/file/swssy1

    Here are the links to the programs you'll need:

    Pack file manager:
    http://www.twcenter.net/forums/showthread.php?680538-PFM-3-5-0-Attila-support

    GIMP 2.8:
    http://gimp.soft32.com/free-download...OSNkUWZRPD_BwE

    Assembly Kit:
    You can download it from the "Tools" section of Steam. Go to the "Library" section, then click "All Games" and choose "Tools" from the drop-down menu, then find "Total War: Rome 2 - Assembly kit"

    Here are some other tutorials you might want to look at:

    Alecwermuth's Modding Guide for Novices

    Assembly Kit Guide
    Tools, Tutorials and rescources
    VariandMeshDefinition Guides
    Two very good guides on custom textures, here and here.



    CREATING A VARIANT MESH

    This is easy, open up TWeak.AssemlyKit and the variant editor. Then click on "file". You have the choice of either clicking "Load Uniform" which will let you edit an existing variant, or clicking "New Definition" which will allow you to start from scratch. The best unit mods are normally the ones that fit in with the vanilla units as seamlessly as possible, for this reason it is normally best to load an existing uniform and then only change it slightly. This means it will be distinctly new but similar to other units at the same time. I then chose to load the unarmoured falxman to whom I will give armour. Here is the handsome fellow himself:



    I won't be spending much time on how to actually apply the various items to him because it's simple. You just point and click and see what kinds of items work and what don't its all trial and error so take your time and do it slowly and one item at a time. There are a few things though that are worth remembering:


    • As much as possible try to use items that are spelled with italics these are variantmeshes rather than models and using these will save you time later.
    • Be aware of clipping. Most armours are not designed to be worn with others, especially if they cross cultures. Make sure you zoom in and rotate the soldier all the way around to be sure that there is no clipping.
    • If an item does not work then make sure you delete it right away, if you don't then you may forget and it will slip into the mesh, creating more work for you later.


    Earlier I said that you should only change the mesh slightly, well I broke that rule and changed almost everything. Oh well! this was the end result:



    Now comes a part that is a little tricky, adding them mesh to your packfile. I have already written an in depth tutorial which you can find here:

    How to transfer variant mesh definitions from Assembly Kit to PFM

    To sum that tutorial up in a few words all you need to do is save your new variantmesh with a unique name, I saved mine as Get_arm_falx.VariantMeshDefinition. Then you create a new folder on your desktop where you will store your variants and open it. Next, in the variant editor, you click file and load definition. Find the variantmesh you just made and copy to your new folder. It will exist there for all of eternity and future journalists and biographers will one day beg to see the first file you ever created so that they can document your rise to modding godhood.

    Now, to add it to your packfile. Open up my mod template, the text on the left will look like this:



    Open up variantmeshes, then variantmesh definitions and right click on the template that is there. Click "add" then "files" and add your variantmesh. You can then delete the template mesh. Then save your mod with a new name, I named mine Armoured_Falxmen.pack.

    Here is what it should look like:

    Last edited by Sebidee; May 14, 2015 at 06:18 PM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  2. #2
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation


    GETTING YOUR UNIT INTO THE GAME

    In this section you will learn how to get your unit into the game where they will be available to use in custom battles. This is the single most important part of the mod. Any errors here will cause your game to crash or fail to launch. For this reason I like to do it all in one go to make sure I don't make any silly mistakes

    Don't be intimidated though, this is easy. The only special skill you will need here is the ability to copy and paste. I once copy pasted 800 words into a university economics essay and got an A for my troubles, that is why I'm such a talentless hack. Damn, I did it again didn't I? I meant modding genius.

    To get your unit into the game you will be editing all of the tables in the template that are in db with the exception of building_units_allowed which we will do later. Here is what they look like in the template:



    You'll notice that each of the tables has a prefix of "template". No, that is not what they look like in the game. I added that prefix and you will have to replace it with your own. This is the method by which mods are made compatible with each other. You see tables with the exact same name will overwrite each other whereas tables with different names will run alongside each other. Consider unit mods, they all use the same tables yet people can and do run dozens of them at the same time. Regardless of compatibility though if you don't add a prefix then the game will fail to launch as you will be removing hundreds of units from the game.

    But, you can't be lazy. You can't add a prefix like "unit" or "mod" because it is very likely that bad modders will have the same prefix. It must be unique to you and your mod. That is why my prefix for this mod was "Seb_falx" (it goes without saying that you use an underscore and not a space).



    main_units_tables
    Because of an update to PFM the first table you will have to edit is main_units_tables.

    This is a very very very very very important table which I will do in much more detail later. It basically contains all of the campaign stats of your units.

    Now to get your unit into the game you need to change only 3 columns. "unit" and "land_unit" are replaced with your unit's name. "unique_index" is more important. This number needs to be utterly unique, not only in the mod or in the game but unique to any other mod that might have been made. I have a system, I put in my birthday 130793 and the number of the unit. Since this is the 79th unit I will create the unique number will be 13079379. (Please, please don't copy this number, it could affect my mods).

    ......



    variants_tables

    The next thing I do is change the variants tables. It is probably the smallest table in the database and contains nothing more than the names of the variants which the units use. For your mod it will also be the name that you use for almost everything in unit creation and for this reason variants is much more important that its size would suggest. I like to make sure that it absolutely matches the variantmesh by copy pasting in the variant meshe's name. This seems silly for only one unit but when you are making 20 or more all in one mod then the chance of a typo is likely. It is also worth saying that although this is the "name" of your unit is is not the name that will appear in-game, that comes later.



    Now you will use this name and copy paste it into the remainder of the db tables. For speed and for doing units in bulk I like to use a 3 window system. On the right is one version of this mod showing the variants table. On the top left is the mod itself which you will use to edit the remaining tables. On the bottom is a packfile that is in the main game called "data_rome2.pack" which has all of the same tables and the vanilla units.

    You copy and paste from the right and on the bottom you have a constant reference to glance at to make sure you are doing the right thing. Here is what it looks like:



    ^ I RECOMMEND YOU RE-READ THAT LAST SECTION AT LEAST 3 TIMES BECAUSE IT IS IMPORTANT^

    Now you will have to change the table. I will go through what each of them are step by step. I like to work up from the bottom.



    units_to_groupings_military_permissions

    The is the table that decides to which faction group your unit will belong, without it they will not be recruitable in the campaign. In the column called "unit" you paste your unit name from variants. In "military_group" you put your faction group, you will find those in the same table in data_rome2.pack. For this mod i entered "dacian".




    units_custom_battle_permissions
    This is the table that allows your units to be used in custom battles. Replace the column "faction" with the faction you want to have the unit, in this case it's "rom_getae". The column called "general_unit" decides whether your unit appears in the generals section of the custom battle menu or in their unit group. If you want the unit to be in both then you must have two lines one ticked one not ticked. "unit" is where you put your unit's name. "siege_unit_attacker" and "siege_unit_defender" decide whether or not your unit may be used in siege battles.




    unit_variants_tables

    This table corresponds with other things that we will do later, like the units name and unit card as well as their appearance in-game. Where it says "template" you should replace it with your unit name. The numbers in the middle are the variations of height between the men in the unit and their average height. You can come back and play with these at your leisure (yes by the way, it is possible to make soldiers that are 100 foot tall).




    unit_set_to_unit_junctions_table
    This is a tricky table and one that you might find confusing. It basically dictates what type of unit your guys are. Ignore "unit_caste" "unit_category" and "unit_class". Replace "unit_record with your unit's name and "unit_set" with what corresponds with it in the vanilla table. I chose "melee_units_swords".



    unit_description_short_texts_tables
    This table assigns a short description to your unit, the one that appears when you hover your mouse over them in-game. We will write that later, for now replace the Template part but make sure you keep "_Tooltip"



    Land_units_tables
    This is an important table, I would go as far as to say it is the single most important table in all of unit creation. It dictates unit's stats and their behavior on the battlefield.


    There are a lot of things that we will need to change but to simply get the unit into the game you only need to change 4. First the "key" this is replaced with your unit's name. Second is "unkown11" normally this has the unit name and "_Long" but in mods you just need "Placeholder" Third is "officers" having a cavalry officer for an infantry unit or vice versa can cause your came to crash. It doesn't have to be perfect but for now just make sure you've got infantry for infantry and cavalry for cavalry, find the right officer in vanilla tables. Next is "short_description_text" replace that with your unit's name and "_Tooltip"

    .........


    cdir_military_generator_unit_qualities_tables
    This is the last table needed to get the unit in-game. It has to do with the AI and the value they place on created units. It consists of the "group_key" which tells the AI what kind of unit the unit is, "unit_key" which is the units name and "quality" hwich is a numerical representation of the unit's value. You can get the proper group_key from the vanilla tables, I chose to give the Falxmen "Default_land_infantry_melee" and a value of 15000 (at least I should have, I forgot to do it when I took the picture. Think of this as an example of how small your mistakes can be. This mistake would probably mean that the AI would never recruit this unit since their value is far too low).





    And now we can run the game and see our unit! It has no name, no description, no unit card, wrong stats and its appearance is all wrong but it exists! You are their creator, THEIR GOD!

    Last edited by Sebidee; June 26, 2014 at 11:24 AM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  3. #3
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    LAND UNITS TABLES

    In this section I will be looking at land_units_tables in more detail. As I said before it is the most important table you will use in unit creation. It gives units their stats, audio, animations and behavior on the battlefield. Normally I like to do this table last since I find it easier to decide how strong a unit should be after I know everything else about them. When editing this table it is best not to do things freehand but to copy and paste from another entry. A typo here will cause the game to crash and looking through this large table to find a tiny tiny error is a major headache. My basic rule is this, never use your keyboard for letters, only for numbers.

    To edit this table I use a two window system with my mod on top and "data_rome2.pack" on the bottom. To open data_rome2 just open another PFM window click "file" and "open CA pack" here you can find all of CA's vanilla tables as well as all the mods you currently have installed. Land units will be in the db section of data_rome2. When you open it it can be very intimidating, there are loads and loads and loads of tables but they are all in alphabetical order so don't sweat it.

    When you have the windows open you should expand the width of the table by dragging the left border further to the left so that you can see more columns. This is what it look like:



    So you will be copying entries from the vanilla tables and pasting them into your mod. Now I will go through each of the columns and give a quick explanation of what they do.

    Key - This is your unit name. In my mod it's Get_arm_falx

    Accuracy - This is their missile accuracy, if your unit is not missile then ignore it. You don't have to change it though, I have a sneaking suspicion that it does nothing.

    Ammo - The number of missiles your unit will carry. I set this to zero since the Falxmen do not have missiles.

    Armour* - This assigns armour stats to you unit and does nothing to change their appearance. The armour value differs between the different armours and you can find the actual numbers in "unit_armour_types_tables"

    Category - This column corresponds with "unit_category_tables" all it does is make so that when you hover your mouse over the unit it will tell you what kind of unit it is. I set the Falxmen to inf_melee.

    Charge_bonus - a numerical value that gives charge bonus, simple.

    Class* - This column corresponds with "unit_class_tables" it contains minor stuff like what icon will be on the unit description display. I set the Falxmen to inf_mel.

    Dismounted stats - These 3 columns give the units their stats when they are dismounted. However these ONLY APPLY TO HORSEMEN. If your unit is a foot soldier then you can ignore them.

    unknown11 - Normally this will contain [unit name]_Long and has to do with the encyclopedia. unfortunately modded units cannot appear in the encyclopedia so ignore this or add "Placeholder"

    man_animations* - This is an important column, it gives the unit their animations and corresponds with the notoriously tricky animations tables. I gave the Falxmen "rome_man_falx".

    man_entity* - This column corresponds with "battle_entities_tables" it has a lot of important stuff in it like unit speed and mass. Warning: this can significantly change a unit's performance in battle. I set the Falxmen to "rome_infantry_heavy".

    Fighting stats - these columns are "melee_attack" "melee_defence" "morale" and "bonus_hitpoints". Now, you would think that these are the most important columns but that's not the case. Weapons, armour and shields have a massive effect on fighting ability too. You should really only modify the fighting stats slightly or risk making a unit under or over-powered.

    Mount* - This decides what kind of horse the unit has. and corresponds with "mounts_tables". Each horse has its own animation like lance, spear, sword and it must be the same as the animation of the rider, otherwise you will get the floating body glitch.

    num_animals - The number of dogs your unit will have.

    animal - The type of dog.

    num_mounts - Number of horses, equal to number of men.

    primary_melee_weapon* - This decides the weapon damage of the unit and not the weapon that they will visibly be holding. It corresponds with "melee_weapons_tables". This is an important column as it will decide the unit's bonuses against elephants, horses, infantry and armour. I gave the Falxmen "rome_falx".

    primary_missile_weapon* - This corresponds with "missile_weapons_tables" and is similar in stats to the table before it. Our Falxmen don't use missiles so we'll leave it blank.

    rank_depth - This is the number of ranks the unit will use as default a.k.a. when they are first deployed. It's not really important.

    short_description_text - This gives the unit their description. The entry here consists of the unit name and _Tooltip. I already put in "Get_arm_falx_Tooltip" earlier. We will write the actual description later.

    spacing* - this, surprise, surprise, decides the spacing of the unit. Our Falxmen will be fairly disciplined so we'll give them "melee_inf_roman".

    strengeths_weaknesses_text - I'm not quite sure what this does but I think it may be related to the encyclopedia. I always edit it properly though just in case. I give the Falxmen "melee_good"

    supports_first_person - I don't think first person works in Rome 2 so ignore this

    training_level - I'm not really sure what this does as I can't find the corresponding table. I think it might have to do with morale and the way the unit reacts to orders. I give the Falxmen "trained".

    num_guns - This decides how many engines an artillery unit will have.

    officers* - this decides what officer the unit will have. It corresponds with "land_units_officers_tables".

    articulated record - Does nothing, ignore.

    Engine - Decides what artillery piece artillery units have.

    is_male - All Rome 2 units are male so might as well tick this.

    visibility_spotting columns - These supposedly affects a unit's hiding ability but I think it does nothing so ignore it.

    ability_global_recharge - Does nothing, ignore.

    attribute_group* - This gives the unit passive abilities such as berserk, scare and encourage and corresponds with "unit_attribute_groups_table".

    Spot_dist columns - another hiding one, though in my opinion it doesn't do anything so you can ignore it.

    chariots columns - same general idea as the mounts columns.

    reload - This doesn't do anything. In order to change the reload skill of a unit you need to edit the missile weapons itself.

    loose_spacing - This decides whether or not a unit has the loose spacing ability.

    spotting_and_hiding* - This is the column that actually affects a unit's ability to hide. It corresponds with the "spotting_and_hiding_values" tables.

    selection_vo columns - These three columns decides the voice audio of the unit and what they say when you select them. Play around with these to find out which ones work for your unit.

    hiding_scalar - I'm pretty sure this doesn't do anything.



    * All columns marked with an asterisks can have custom entries which you can easily make. All you need to do is create additional lines in the corresponding table. However some of these can cause the game to crash if done incorrectly so its best to wait until you're a little more experienced before attempting this.

    To finish off this section I'll leave you with a little note on unit balancing. Balancing is incredibly important and the success of your mod will depend on how well your units fit in with your chosen role for the them in the campaign. You will need to do A LOT of testing to make sure the unit is not over or under-powered. If you can get a friend to help test the mod then that is even better.
    Last edited by Sebidee; June 21, 2014 at 05:28 PM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  4. #4
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    MAIN UNITS TABLES

    main_units_tables, thankfully, is shorter than land units but is just as important. Basically it handles all of the campaign stats of the unit. Their price, caps, ships and some other stuff. You will do it in the way and land units with two windows open though there are more numbers in this which you can do freehand. Main units is normally much quicker to do than land units. I'll now explain all of the columns.

    unit - Your unit's name, Get_arm_falx for our mod.

    unknown - This does nothing.

    campaign_cap - Ignore this, there is an easoer way to cap units in this table.

    caste* - This is connected to "unit_castes_tables" all it does really is decide the order that units are shown in armies.

    create_time - The turns it takes to make a unit.

    is_naval - Check this if you are making naval units.

    land_unit - This corresponds with land units tables, basically it lets main units know what unit you are talking about.

    num_men - This is the number of men in the unit. However, it still scales for the graphics settings small, medium, large and ultra.

    multiplayer_cap - This caps the number of this unit that you can use in multiplayer and in custom battles.

    multiplayer_cost - Cost of the unit in multiplayer and in custom battles.

    naval_unit - This decides what kind of ship your unit will use while it is being transported.

    num_ships - I'm pretty sure this can't be changed.

    min_men_per_ship - If the unit goes under this number in transports then it will be disbanded.

    max_men_per_ship - This would be useful if you increase unit sizes but find that that number doesn't actually fit on the ship.

    prestige - Does nothing, ignore.

    recruitment_cost - How much the unit will cost in the campaign.

    unknown16 & 17 - Do nothing, ignore.

    upkeep_cost - This adds fire breathing dragons to the unit. lol, jk, it's upkeep cost.

    weight - This corresponds with units_weighs tables which corresponds then to something else.

    campaign_total_cap - This is how you cap units in the campaign. If the is no cap then you put "-1".

    unknown22, 23 & 24 - You can ignore these.

    special_edition_mask - Ignore this.

    unique_index - The number that we did earlier.

    prestige27 - Ignore this.

    in_encyclopedia - Modded units don't appear in the encyclopedia so don't bother with this.

    region_unit_resource_requirement - This is how you define where the unit can be recruited, this is also how the game deals with auxilia.

    audio_language - Basically this column changes the way that the units speak, their tone, accents, all that good stuff.


    NOW. FINALLY. We're done with db editing for a little while, lets do something more fun.
    Last edited by Sebidee; June 19, 2014 at 03:21 PM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  5. #5
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    UNIT CARDS

    Making unit cards is a lot more fun than database entry, mainly because it is done almost entirely out of PFM. You will need the newest version of GIMP which you can download for free after a quick google search. Making unit cards from scratch would be ridiculously difficult to do, therefore like everything else in this tutorial we will be using unit cards that are already in the game and editing them. The unit cards can be found in two pack files, the majority of them are in data.pack while the remainder is in data_rome2.pack. Here is how you find them.



    We will first be looking at the unarmoured falxman and will then copy it's style. Look for it in the packfile and then extract it by right clicking then clicking "extract" then "extract selected". Extract it to where you wish, I have a specific folder where I keep all the unit cards. We can now open it up in GIMP, shall we take a look?



    Here we have a nice handsome falxman. A lot of people don't like the unit cards but I actually like them, they are minimalist and the style is very authentic, best of all their simplicity is a god send to unit modders as they are very easy to edit. We now need to consider how we will change the card, so we will look at the unit we're adding.



    So we want to add:


    • A helmet.
    • body armour.
    • A cloak.



    For this tutorial I will show you the two techniques I use for editing. They are freehand drawing and the other is.... wait lets make a game of this, see if you can guess what it is:

    Spoiler Alert, click show to read: 
    Copy and Pasting!!!



    We are going to get the helmet from another unit, I think this Celtic helmet from Naked Warriors will do.



    So we will open up the two cards in GIMP. Then we use this tool, the free select tool, to select the Naked Warrior's head and helmet

    ...

    Then in GIMP you click on "Edit" then "Cut" the head you select will then become a brush, here:



    You can then use the paint tool to paint the head onto our falxmen. Undo it and redo it as you will probably need to edit the size to get it right.

    ......

    Too small, too big, Just right! Now I am going to draw the armour and cloak freehand. This is not difficult, when I was a little kid I used to play with microsoft paint, you probably did the same and that's all the skill you need for this.

    ......

    It really couldn't be any easier. You'll notice that the unit card is colourless. That is because the faction colour is not included in the icon but in the mask which is another file. It is possible to paint colours on unit cards and forget masks all together but this will cause problems if the units are shared between factions and if there is a civil war.

    This is what a mask looks like:



    I can hear you saying "what the hell is that?!" It is the unit's pants and the shaft of the falx painted in a special colour. This lies over the unit card and the colour changes to the faction colour. It must be perfectly in line with the unit card and essentially look like the same picture. Sounds hard right? how are you going to draw the pants in the exact same place? Easily, I'll show you how.

    All you have to do is bring up your unit card and use the dropper tool to select the special colour. Then you select a new layer here:



    Now you get your paint brush and in the new layer you paint over all of the places you want the mask. For our Armoured Falxman we will paint his pants, sleeves, cloak and the shaft of his falx.

    ......

    As you can see the coverage doesn't need to be perfect. Next what you do is delete the old layer, it should be the name of your unit.



    Then you use the filler tool to make the mask more solid.



    And there you have it, your mask. Export both the mask and the card. Adding it to your mod is easy, in the template the unit cards and masks are here:



    Just right click on the templates, click "add" then "files" and find your unit cards. Make sure you rename them in the same way the templates are named. The unit card is
    named with your unit's name and ".png" so ours will be Get_arm_falx.png. The unit mask is saved with your unit's name and "_mask_1.png" so ours will be Get_arm_falx_mask_1.png.

    Now we are ready to see what it looks like in game. Remember, a unit card is the icon + mask. Put them together and what have you got?



    Bipity, bopity, boo.







    TEXT

    This section will deal with text, you will learn how to give your unit's names and descriptions. This will be a short section as its
    fairly simple. The text tables can be found in the template here:



    Make sure you rename the tables with your own prefix in the same way you did with the db tables. We will start with land_units.loc. This is the table that gives a unit it's name. Here is what it looks like when it's opened and expanded.



    When you are making only one unit then it is fine to just edit the line that I provided. But if you want to make more lines then you cannot click on "add new row" then it will not work, the game won't crash but the name will remain blank. Instead you highlight the template row and click "clone current row". Now to edit the table you simply replace the entry on the left with the unit name from db and the one on the right with how you want it to appear in-game. Here is how our Falxmen look.



    The next table is unit_description_short_texts.loc. It is very similar to the the first except this one gives the unit a description, the one that will be visible when you hover your mouse over the unit on the battlefield or on the campaign map. Filling in the description is easy, there is absolutely no technical skill needed. However, this is one of the things that a lot of mods do wrong. I know that I say that a lot of things are easy but this is hard. The unit description is literally the your units first impression and as we all know, first impressions are very important. Like everything else in this tutorial it is very important that the description fits with the other in the game, they must sound good, give historical information, tell you how the unit should be used and be a little poetic. As always it is best to look at a similar unit. Here is the description of the unarmoured Falxmen.



    Hmm, that isn't very helpful. We should look at the Noble Swords unit to see what that says.



    That's a little better but isn't really relevant to a Falx unit. Maybe we can combine the two? How is this?

    These noble warriors, clad in the finest armour, wield the mighty falx to cut an enemy in two with a single blow.
    That's pretty good. I will put that in the right entry and the unit name in the left instead of Template. Here is what the name and description looks like in the game.





    So, you are no longer only a modding genius, you're a poet too!
    Last edited by Sebidee; June 21, 2014 at 05:38 PM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  6. #6
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    This section will cover some of the other database entry stuff that you will need that I did not cover earlier. These tables are not included in the template because I normally do these nearer to the end of a mod after unit cards and text. Having them in the template from the start would mean that you would not be able to run your mod to check your unit cards and text without changing these first. Don't worry I'll tell you how to add them.



    SPECIAL ABILITIES

    Special abilities are governed by the land_units_to_unit_abilities_junctions_tables. You can add the table by right clicking on your db section, clicking add from pack, then following this path way to finding the mods:





    When you click on data_rome2.pack you get this pop-up, it is the entire data_rome2 packfile.



    You simply open up the section you want, db, and then click on the table you want to add. In our case its land_units_to_unit_abilities_junctions.

    Remember to change the prefix again. For our Falxmen the prefix is Seb_falx. Now the table itself is really simple. On the right is the unit name and on the left is the name of the ability. I think we'll give the Falxmen frenzy and head hunt. Here is what it looks like:






    MAKING YOUR UNIT A GENERAL


    To make your unit a general you will need the commander_unit_permissions_tables. Its a small enough table and is simple. Add it in the same way that we added the special abilities tables and be sure to add your prefix. In faction_key we will put "rom_getae". We will leave the subculture key empty since it is only for a few factions and in unit key we'll put "Get_arm_falx". The Armoured Falxmen will then be available to use as a general. Here is what it looks like:





    CREATING A CUSTOM OFFICER

    This section should not be considered to be just about officers. The same basic principles here can be used to make other custom things such as horses, weapons, armour, shields and passive abilities. These are all linked to Land unit tables and entries in it. You can create your own custom entries in the corresponding tables then to customise these things fully.

    To make a custom officer you will need two tables and a new variant mesh. I created one which is basically just our unit but with a shield and sword and a fancier helmet and armour:



    And I will add it to the variantmesh list:



    You will also need to add two tables to your mod "battle_personalities_tables" and "land_units_officers_tables" both from data_rome2. Make sure add the prefix as always. First, we'll do battle_personalities. This creates the officers model and gives him his looks and animation.

    In "key" we will put the officer's name, keep "soldier_model" as target_marker. Give him his animations in "man_animations_table". "Type" differentiates between an officer and a standard bearer. You can ignore "unknown". In "variant" you put the name of the officer's variant. Here is how the Falxmen look:



    Next is "land_units_officers_tables" this is basically a set of officers all compined into one key. You assign different kind of officers and standard beares and assign where they will stand in the unit. Here are what our Falxmen look like:



    Now you simply assign the key to the officers column in land_units tables and you are ready to see him in game.




    Last edited by Sebidee; June 21, 2014 at 06:00 PM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  7. #7
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    CAMPAIGN RECRUITMENT

    In order to make your unit recruitable on the campaign map you will need to add one table to the template, "building_units_allowed" add it in the same way you added the other tables and remember to give it a prefix. Here is what it looks like:



    Only the first 4 columns are important, you can ignore the last 4.

    key - This is a unique key, it must be completely unique in every line. I have a system for this too, I start with 70859 which is my mother's birthday. I then add the number of the entry. The first entry will be the 312th unique building key I will have made so I'll add 312. The number will start in this table at 70859312. (Again, please don't copy this number, it could affect my mods).

    building - This is the key of the particular building that will recruit the unit and its level. Remember that you have to include all of the levels in seperate lines. If you only include level 1 and not any level past it then the unit will no longer be available once you upgrade your building past level 1 in the campaign. Also I'll repeat that you need a unique key for EVERY line.

    unit - This is your unit name.

    XP - This is bonus experience levels for units at increased building levels.

    The rest - Ignore them, they do nothing.

    Now for our falxman unit. I am going to make him recruitable from the level 2 bronze workshop and up. It can be hard to find the right building keys, for reference you should open the "building_levels_tables" in another window. Here is how it looks in our mod:



    Now save and your unit will be recruitable in game:

    Last edited by Sebidee; June 20, 2014 at 05:32 PM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  8. #8
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    ADVANCED VARIANT MESH DEFINITIONS

    Now we have finally gotten to the final section I will cover. In this section you will learn how to change variantmeshes in PFM manually and without the aid of PFM. Now I actually find this easier to fine tune than assembly kit since I find it less complicated. You won't be able to see the unit but as you become used to reading the meshes you will be able to imagine it the unit in your head easily. I said that this was simple but at first glance. Here is what a variant mesh looks like. [Warning, your brain may implode from perceived complicatedness].




    That looks compicated but it really is not. Each of the different line corresponds with a model of a item of clothing and together they make up the soldier's skin, clothes, hair, armour and weapons. Deleting that line will remove the item. You can also add new items her by copy and pasting them from another variantmesh, all of the variantmeshes can be found in "Models_rome2.pack" here:



    You can open a variant mesh in PFM by right clicking on it and clicking open as text. Now lets take a closer look at the variant mesh for our armoured Falxmen:



    As you can see I've written on the picture with all the grace of a toddler writing on a wall with a crayon. I've marked out each of the sections with what they do. I want you to look closely at each of the entries and you will see that what they are are almost as clearly marked in the variantmesh as it is in my red pen. Now all you have to do to add entries in this is to copy and paste them from other variant meshes. Easy!

    I like to use the PFM variantmesh for a number of reasons. First of all it is easier to open than the assembly kit and it does not have to load up. Also I find that the assembly kit can be quite complicated and has a lot of menus and sub menus and things that are hidden, with PFM anything and everything that could affect your mesh is right there in front of you, there is nowhere for any errors to hide. Best of all I can make quick changes, save, launch the game, exit game, make a change, save, launch game and do it very quickly over and over and over again.

    I like to use the the Assembly kit to quickly get all of the of variant meshes done. It's quick but imprecise. I then use PFM to fix any mistakes that I might have made. It definitely works. Take, for example, our falxmen. I made an error while making them in the assembly kit that some of you may have spotted, take a look at their picture again:



    You will see that there are three "kinds" of men in the picture. One that I made that's wearing armour, one that has a shirt and one that is shirtless. Now, these 3 tyoes are impossible to get all together in one variantmesh because they require items that cannot be used together like cut and uncut tunics, upper torse skins and ones that are just headhands. For this reason the vanilla Falxman variantmesh that I used actually contained 3 variantmeshes in it, all one after the other. I couldn't see these in the assembly kit because they were hidden away in all it's clutter and that's why I made the error. However, that is easily fixed and all I have to do is delete to other variants and I get this instead, perfect!



    Now there are a couple of little things you will need to know. First though I want you to take a close look at the variant mesh again so that you will notice the things I highlight.



    VARIANT MESH TAGS
    These are the tags that look like this: <VARIANT_MESH> and </VARIANT_MESH>. Anything in between these tags is a variant mesh and will represent the looks of a soldier. in this way you can have several individual soldiers in one file.

    SLOT TAGS
    These are the ones that look like this: <SLOT name="skin" > and </SLOT>. You will notice that each of the slots have their own names like skin, helmets, clothing, cloaks. These are usefull for easily recognising the slots but they are actually meaningless. You can change the names to anything without affecting the unit's appearence. In this way you can have a virtually unlimited number of slots.

    PROBABILITES
    In the beard slot of the Falxman variant mesh you will notice this: probability ="0.7". This addition means that only 70% of the men in the unit will have the item in that slot. You can of course change the number to have different percentages. This is useful for more variation.

    ATTACH POINTS
    If you look at weapon 1 you will notice this: attach_point="weapon_01". This is an attach point and it is used to attach different things to different places. It makes sure that animations are correct by attaching weapons to the proper places. Spears, lances, pikes and two-handed weapons go to point 1. Swords, daggers, axes and clubs go to point 2. Shields go to point 3. Bows go to point 4 and projectiles go to point 5. Of course you can put things in the incorrect places. That is how I gave units two handed clubs and axes, by putting them in point 1 with falx animations than in point 2 with sword definitions. It is also how I gave some units two axes by putting on of the axes in 3 so that it acts as a shield.

    MULTIPLE ITEMS IN ONE SLOT
    By adding multiple items in one slot you increase variation. With each additional item you also decrease the probabilites of those items appearing. With two items in a slot each item will appear on 50% of the soldiers. With four items in the slot then each item will appear in 25% of the troops and so on.

    THE DIFFERENCES BETWEEN MODELS AND DEFINITIONS
    This is an important one. Do you remember how I told you to use mainly definitions because it would save you work? That is because models and definitions are different. Definitions are usually made up of several models and most importantly the have imposter models. These are models that are seen from a distance, if one of your items does not have an imposter model then it will be invisible when you zoom away from it. You can add imposter models to models that do not have them like this:



    - Sebidee
    Last edited by Sebidee; October 15, 2015 at 09:10 AM.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  9. #9

    Default Re: Sebidee's Complete Guide to Unit Creation

    Thanks a lot for the tutorial - it's very useful - I'm really appreciated for this and looking forward to its finalizing

  10. #10

    Default Re: Sebidee's Complete Guide to Unit Creation

    Excellent work Sebidee!!! Someone needed to do this since I could not find the time to upgrade and expand mine .

    Edit: +Rep of course.

  11. #11
    seawolf77's Avatar Libertus
    Join Date
    Mar 2009
    Location
    Netherlands
    Posts
    83

    Default Re: Sebidee's Complete Guide to Unit Creation

    u luv u very mucho and REP+

    Me Sexy,

  12. #12

    Default Re: Sebidee's Complete Guide to Unit Creation

    I seem to have a problem. At the part where I'm supposed to add the mesh from the desktop file to PFM, it seems to add the mesh under variantmeshes instead of variantmeshdefinitions. Any reason why it does this?

  13. #13
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    Quote Originally Posted by DanishCookie View Post
    I seem to have a problem. At the part where I'm supposed to add the mesh from the desktop file to PFM, it seems to add the mesh under variantmeshes instead of variantmeshdefinitions. Any reason why it does this?
    Probably because you are right clicking on the wrong place. When you want to add something you right click where you want to add it then click add and files.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  14. #14

    Default Re: Sebidee's Complete Guide to Unit Creation

    This is great and really helpful, but there is one thing I just wanted to ask someone: how can I put a custom mount in the game? I'm trying to edit an existing unit with a custom armored african elephant I made using Assembly Kit, but I can't...

  15. #15
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    Quote Originally Posted by Picchioviola View Post
    This is great and really helpful, but there is one thing I just wanted to ask someone: how can I put a custom mount in the game? I'm trying to edit an existing unit with a custom armored african elephant I made using Assembly Kit, but I can't...
    You have to add entries to two other tables. mounts_tables and mounts_variants_tables and you need to import your elephant mesh. Its basically the same process as the officers. When you have the tables done you will have a new mount and can apply it to units.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  16. #16

    Default Re: Sebidee's Complete Guide to Unit Creation

    Hey Sebi
    Thanks for this Awesome Mod / Thread from germany.
    I was waiting for it a looooong time

    My english ist not the best, but i think, i get the core informations ^_^

    I have one problem. I can't find my Mesh/Unit in the PFM tool.
    Below a Screenshot what i mean.
    Attached Thumbnails Attached Thumbnails PFM_Prob.jpg  

  17. #17

    Default Re: Sebidee's Complete Guide to Unit Creation

    Quote Originally Posted by Sebidee View Post
    Probably because you are right clicking on the wrong place. When you want to add something you right click where you want to add it then click add and files.
    No, I'm pretty sure I'm right-clicking on the right place. On Template.variantmeshdefinitions, yes? I've tried it on every single place available, and it always goes under variantmeshes. I can post a screenshot, if you wish.

  18. #18

    Default Re: Sebidee's Complete Guide to Unit Creation

    Quote Originally Posted by Cartmanez View Post
    Hey Sebi
    Thanks for this Awesome Mod / Thread from germany.
    I was waiting for it a looooong time

    My english ist not the best, but i think, i get the core informations ^_^

    I have one problem. I can't find my Mesh/Unit in the PFM tool.
    Below a Screenshot what i mean.
    The Meshname has no matching value in column :'unit' of 'main_units_table' tables found.
    So why is my mesh not listed :/ ? or how can in put them in ?

  19. #19
    Sebidee's Avatar Artifex
    Join Date
    Mar 2014
    Location
    Ireland
    Posts
    2,262

    Default Re: Sebidee's Complete Guide to Unit Creation

    Quote Originally Posted by Cartmanez View Post
    Hey Sebi
    Thanks for this Awesome Mod / Thread from germany.
    I was waiting for it a looooong time

    My english ist not the best, but i think, i get the core informations ^_^

    I have one problem. I can't find my Mesh/Unit in the PFM tool.
    Below a Screenshot what i mean.
    You will have to type your unit's name in there yourself.

    Quote Originally Posted by DanishCookie View Post
    No, I'm pretty sure I'm right-clicking on the right place. On Template.variantmeshdefinitions, yes? I've tried it on every single place available, and it always goes under variantmeshes. I can post a screenshot, if you wish.
    Yes, please post a screenshot.
    Hey! Check out my mods!
    Over 60 mods on the workshop, and a mod group in steam. Click the icons to see them for yourself!



  20. #20

    Default Re: Sebidee's Complete Guide to Unit Creation

    Thanks for the fast reply Sebi i found my problem... after i de-activated "use-comboboxes" in PFM , i was able to write it for myself. It tooks me ours to see this ... OMG

Page 1 of 18 1234567891011 ... 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
  •