Total War: WARHAMMER

Total War: WARHAMMER

82 ratings
Unit Creation Template
   
Award
Favorite
Favorited
Unfavorite
Tags: mod, Units
File Size
Posted
Updated
6.573 KB
Jun 10, 2016 @ 1:49am
Jun 10, 2016 @ 3:12am
2 Change Notes ( view )

Subscribe to download
Unit Creation Template

Description
Inspired by what Sebidee did for Rome 2, this is a hollowed out and renamed version of our Night Gobbos Expansion. I made this to help other people learn how to add units to the game, it's surprisingly easy once you get the hang of it!

Now, a short guide on using this template:

Open 2 PFM windows, one for reference, one for working. Then, rename every single table in the "db" categories, such as the table in "buildings_units_allowed" to something of your own design, but do keep the "__core" part, (I think :P). Example could be "Orc_axes__core" if you're doing a single unit of orc axeboys. The tables can easily be named exactly the same, it shouldn't conflict. Adding a prefix like this means the files you're making will load alongside the vanilla ones, not on top of, so to speak.

Now, every entry in the tables that says "Template" should be replaced with your unit's name. This is NOT what they'll be called in-game, it's a handle, so to speak. All I did to this mod was delete all units but one, and rename everything to "template". So, to keep going with the same example, you could switch "Template" in each table with "Orc_Axeboys".

Now, you should have no more entries called "Template". For example, the entry "wh_main_unit_long_text_Template" in the column "historical_description_text" should now say "wh_main_unit_long_text_Orc_Axes", and so forth. Eradicate those "Template"s!

Combat stats are found in land_units_tables, while most campaign stats are in main_units_tables. Main_units_tables has a column called "land_unit", and it is important that that column says the EXACT same thing as the "key" column of "land_units_tables". This is what links your campaign stats to your battle stats, so to speak.

UPDATE: Forgot to mention something, the unique indexes. Two numbers in this template need to be changed to a number that's totally unique to your unit, and NOT the same between the two numbers. Right now, both of those indexes say "9000", which means the unit won't work until you change them to two seperate, and unique, numbers. The first one is located in "buildings_units_allowed", and is called "unknown3". The second one is simply called "unique_index", and is located in "main_units_tables".

Now, you need a variant. This is the "skin" of your unit, it decides how they will look. You see the Template_base.variantmeshdefinition and Template.variantmeshdefinition, located in "variantmeshes" -> "variantmeshdefinitions"? Those two files, added together, give a guy who looks like an Empire Spear & Shieldman.

You can open and edit variantmeshdefinitions as texts in the PFM. Left-click the variant you want to change, then right-click it, and choose "open as text". Now, open up "variants.pack" with the secondary PFM you opened earlier. Here, in "variantmeshes" -> "variantmeshdefinitions", is every single variant of the vanilla game. You can copy and paste lines of text from a vanilla variant to yours, by using ctrl + c and ctrl + v, and through that, edit your unit's looks.

An explanation of bases: A base is a variantmesh that makes massproduction of units easier. Alone, a base i just a guy with a helmet, pants, and a shirt, most of the time, anyways. You make another variant, and point it's <SLOT name="body" > to the base you made, and then just add weapons. Bases don't normally have weapons, or anything much really, it's just the basic guy with no snizz. The snizz is added through the actual variant, not the base it uses.

I really hope I'm making sense, and good luck! :)

Will update this in the future with step-by-step instructions, but for now, I hope this can help some of you get started!

Happy modding!
90 Comments
Amulet of Kings May 29, 2017 @ 12:19am 
Thanks, I'll give it a look
Avila  [author] May 28, 2017 @ 2:03pm 
This hasn't been updated in a while, but Sebidee has made one and is a lot more active than I am currently.

Here's a link if you want to look at his: http://steamcommunity.com/sharedfiles/filedetails/?id=879515657
Amulet of Kings May 28, 2017 @ 1:06pm 
I have tried to load your template unchanged and it also crushes, isn't it up to date? If so is there any chance to add some table to make it work?
Amulet of Kings May 28, 2017 @ 12:55pm 
Hello, this is my first time modding and I have a pair of questions. I have changed the "template" word for another one in every table. I have then changed Template.variantmeshdefinition copying it from an already existing unit. What do I need to write in Template_base.variantmeshdefinition?

Also, when I launch the game it gets freezed in the loading screen. Do I need to upload the mod to steam to work? If so, how do I test the mod works everytime I change the mod?
Darrullo Feb 26, 2017 @ 3:05pm 
its not a definate thing i still need to look around and see what i can do
Avila  [author] Feb 26, 2017 @ 9:10am 
Well, to be honest, I haven't really looked into how the RoR's work. I mostly do stuff for private use in Rome Total War 2, and the RoR's are something new to Warhammer. As far as I understand, they are a variation of the Mercenary function of the earlier games, but they are not exactly the same.

I am not very often online on Steam for the time being (playing For Honor a lot), but I do log in to stay tuned every now and then. Feel free to add me to your friends list or send me a private message, and I'll help you out as far as my time and skills allow me to. I can't promise I can help you do the RoR's in the next couple of days, but I'm gonna put some more time into Total War, both modding (mostly or exclusively for private use) and gaming in the coming days because of the Bretonnia release among other things, so I will be available to answer questions or help figure stuff out if you need it :)
Darrullo Feb 25, 2017 @ 7:06pm 
would it be possible to use you as a consultant as i wanna make a unit mod but ive never modded a total war game som im gonna be a bit of a noob? i wanted to make RoR for the dlc factions in the same style of the dlc so a fe new units each then a few unique ones.
Avila  [author] Feb 3, 2017 @ 4:16am 
Sorry for wall of text, but I hope this helps! Let me know if I can be of any further assistance, and I'll see if I can help :)
Avila  [author] Feb 3, 2017 @ 4:16am 
If you want a single faction to have them, and not everybody and their grandma, you can use the "units_to_exclusive_faction_permissions" table that is NOT in the template yet. It allows a single faction, but not all their cousins, to use your unit. The table itself is very simple, and can be swiped from data.pack, the file containing most of the vanilla tables. Just right-click your "db" folder in the PFM, and choose "add" -> "from pack" and then just scissor your new tables from whichever mod or .pack file has what you need.
Avila  [author] Feb 3, 2017 @ 4:16am 
Lastly, in order for a faction to actually recruit the guys you told them to have access to in "buildings_units_allowed", they also need to have the units added to one of two tables: "units_to_groupings_military_permissions", which will allow entire "cultural groups" or races or whatever you want to call them, to recruit and use your unit. For example, if you add your unit to "wh_main_group_vampire_counts" in this table, ALL vampire factions will have them, not just one of them.