Total War: WARHAMMER

Total War: WARHAMMER

Faction Unlocker Submod - Mixed Factions
 This topic has been pinned, so it's probably important
Crynsos  [developer] Mar 11, 2017 @ 5:27pm
Guide: How to unlock Factions in Total War: Warhammer
As the only other working guide for Warhammer on how to unlock factions is a bit outdated by now, it's probably best that I write my own guide for any future modders wanting to do this.

This guide assumes that you have no prior modding experience and thus will be very basic.


Assembly Kit Data Paths
Steam/steamapps/common/Total Warhammer/assembly_kit/raw_data/db - Raw AK Files
***/Total Warhammer/assembly_kit/working_data/ - Exported TWeak / DAVE Data
***/Total Warhammer/assembly_kit/retail/data - Exported BOB mod.packs
***/Total Warhammer/assembly_kit/data - Game & Mod Data


First off, you need to get the Assembly Kit which can be found under Library >> Tools and once you have it, the majority of this guide will be talking about TWeak / DAVE - the database editor.

TWeak / DAVE - The Database Editor
Once you opened it up, go to View >> Table Launcher, which you will be using for the majority of finding the tables that you need. Another useful but often overlooked tool is the Global Search found within the Extra Tasks menu, very useful for finding where something obscure is hidden.


Decide what existing faction you want to unlock and move to the political_parties table.
As example within this guide, I will be using the Wissenland faction.

Add two new records via the button at the top right and look at an existing entry of the same race, so in this the Empire is a good candidate. Create a new filter and search for "Empire".
⚫ Copy the lines with the keys "wh_main_political_party_empire_council" and "wh_main_political_party_empire_ruler" into your new green lines by CTRL-clicking the IDs on the left side and pasting them.

You will get a warning, select no and your existing lines will get filled with all the non-unique data of the lines. If you pressed yes, it would create new lines with the same data. If you copy identical data to multiple cells, you would also choose Yes, if your data varies then No.

ID / Key - Unique identifiers that can't exist twice or one will overwrite the other

⚫ The two key fields are still empty, so you would fill them with "wh_main_political_party_wissenland_council" and "wh_main_political_party_wissenland_ruler".
What names you choose for most data entries is up to you, I just prefer sticking to established standards within the database.

⚫ Make sure that the rest of the fields are filled out identical to the Empire ones, then click Apply in the top right and if it works then you did everything right. Now close this window.


faction_political_parties_junctions
⚫ Add Record x2
⚫ Type the first letters of "Wissenland" into both the left and right boxes to find the faction in the left side cells and your new entries in the right ones.
⚫ Apply and Close


frontend_faction_leaders
⚫ Open political_parties_frontend_leaders_junctions alongside this table

⚫ Add Record
⚫ Copy the data from the line with the key "wh_main_political_party_empire_ruler" into your new one.
⚫ Add a new key "wh_main_political_party_wissenland_ruler"
⚫ Remove the prelude_battle and loading_screen_intro_video entries
⚫ (Optional) Edit other fields such as the faction leader description and loading screen text
⚫ Apply and Close this table


political_parties_frontend_leaders_junctions
⚫ Add Record
⚫ Select "wh_main_political_party_wissenland_ruler" in the left cell
Because you edited a dependency of this table previously, your new entries will not immediately show up, so press the blue arrow symbol at the top to refresh the table.
⚫ Select "wh_main_political_party_wissenland_ruler" in the right cell
⚫ Apply and Close


start_pos_factions
⚫ Find Wissenland in the list and set Playable to True by checking the box
⚫ (Optional) Add a faction description and change the faction difficulty
⚫ Apply and Close


effect_bundles
⚫ Open start_pos_characters to find that the faction leader for Wissenland is Eben von Liebwitz

⚫ Add Record
⚫ Name your Key "wh_main_lord_trait_emp_eben_von_liebwitz"
⚫ Fill out the rest of the line with placeholders, enter character.png for ui_icon
⚫ Apply and Close


start_pos_starting_general_options
⚫ Add Record
⚫ Look up what your faction leader is called via start_pos_characters and enter it into the general and replaces_general fields.
⚫ Set turns_locked to 10, precedence to 0
⚫ Choose your newly created entries for the next two frields, keep the last one a placeholder
⚫ Apply and Close


frontend_faction_groups_to_factions
⚫ Add Record
⚫ Fill in the fields similar to how the existing ones are done
⚫ Pick a placement order number for the Single Player selection screen
⚫ Apply and Close


These are the basic necessities to get a faction working. Now I recommend to do a test build of your new startpos and do all of the optional tables later on.

Go to Export >> Export Changes to Binary and DAVE will export only the tables you modified. Close TWEAK and open BOB, another part of the Assembly Kit.


BOB - The StartPos Builder / Compiler
BOB is pretty simple, it takes the data provided by DAVE and builds either a simple mod.pack out of it or also creates a startpos. To build the startpos, the game engine is directly used - so make sure to open the game launcher and disable all your mods before starting the startpos compiling, otherwise parts of them may be embedded in the startpos unintentionally or cause crashes.

⚫ Click the central column's (Working Data) campaigns folder checkbox and you will be presented with a new window.
⚫ Select Campaign / Process start pos (main_warhammer) and Pack / Create pack file
⚫ Press start and it should finish after about a minute and show green text if everything worked.
⚫ Your new mod.pack file will be located in Steam/steamapps/common/Total Warhammer/assembly_kit/retail/data - move it to Total Warhammer/data to test it now.
⚫ Start the game launcher, enable outdated mods and you can find your mod at the end of the list, ignore the warning about it being oudated - that disappears once you upload the mod.
⚫ You should now see a white box in Single Player, which is your newly unlocked faction.
⚫ Test the faction and close the game once you started it up successfully.


Refining your Unlocker
There are plenty of other tables that you might want to edit to refine your newly unlocked faction, here are the most important ones and what you will want to edit.

battle_siege_vehicle_permissions - Enable access rights to siege equipment for your faction
campaign_mp_coop_groups_to_factions - Enable your faction for multiplayer campaigns
faction_to_mercenary_set_junctions - Enable a mercenary pool for your faction, and add the level lock with units_to_exclusive_faction_permissions
frontend_factions - Various faction selection information
factions - Change mp_available to True to enable a faction for Custom Battle and add units to it via units_custom_battle_permissions
start_pos_land_units - Modify the starting units of your lord
start_pos_starting_general_option_additional_units - "Additional" units shown on the lord selection screen and added alongside start_pos_land_units, uses general ID from start_pos_starting_general_options for assigning units


PFM - The Pack File Manager (Community-Made Modding Tool)
While the Assembly Kit (AK) is useful for learning the basics of how tables are interlinked and structured, PFM is the most commonly modding tool and you can make entire tables with just it without ever touching the AK. While you can always create mods via the Assembly Kit, it requires re-entering of all data after every update, its raw output is horrible for compatibility and you can't edit its files once edited - which is where PFM comes in.

--- Get the newest version of PFM and the newest Schema here ---[www.twcenter.net]

You will still need to use the AK for most startpos edits, while PFM is best for doing smaller edits, but it can really do almost everything that you might need aside from startpos stuff.

Even advanced modders that mainly work with PFM still use the AK, as it has usefulness as search engine for finding how tables are linked, which columns are for what (many columns in PFM are unlabeled or mislabeled) or which tables they need to import and edit.


⚫ Once you exported a new and working startpos with all of your refinement tables included, open that file with PFM.
⚫ Delete all files (not folders) that show up as blue, so everything that is called data__*** other than data__core
⚫ Now rename all of the data__cores to either something that reflects your mod name or a descriptive name of what changes the table actually contains. This is both useful for compatibility and for organisation.
⚫ Clean out all of the table entries that you did not actually modify from all of your tables.
⚫ Right click anywhere in the list on the left side and click Add >> From Pack and select data.pack, the main collection of non-DLC exclusive data. For DLCs, for example the Blood DLC is found as data_bl.pack and the Chaos DLC as data_ch.pack or also in data.pack.
⚫ Navigate to ui/flags/wh_main_emp_empire and double click on the faction_button.png file to import it into your own mod.
⚫ Save your mod and then rename the folder name to wh_main_emp_wissenland and now you have a working faction selection button, although showing the wrong faction. You will need to edit this button outside of PFM by exporting it and then importing it again later.
A useful and free tool for this is Paint .net
⚫ If you want, you can just use the Faction Selections buttons from my mods or other data from my mods, just make sure to credit me for what you copy.
⚫ Make sure to name your mod to something that reflects what it is doing before uploading.


Priority
In PFM, there is the general rule that identical file names, Keys or IDs will overwrite each other, related ones will add to the total data set used ingame. So with two identical tables, the one with higher priority will replace the lesser one entirely, regardless of the contents.

Tables with different names but identical Keys or IDs will again overwrite the lesser priority table's lines, while leaving differing entries untouched.


Priority is defined by alphabetic or numeric order or by special symbols such as @.
This applies to table and text files in a mod as well as to actual .pack file naming, as all of these are identified by keys and IDs - so by their content rather than their actual file names.

Script files are identified by their file names and so you cannot rename them, you will have to rename the actual .pack file if you need to overwrite scripts and it does not work otherwise.

The tables with the lowest priority (for example, a table starting with zzz_ will basically always be lowest priority) are loaded first and then overwritten by tables with higher priority.
So for example, this would be the priority for several files writing to the same table data.

  1. -Table
  2. @Table
  3. 7Table
  4. hTable
  5. zTable

Assuming that all contain the same data, "zTable" would always get overwritten and its content ignored by "7Table" which in turn gets overwritten by both @Table and -Table in that order. However if they contain different content, all of it will get added to the game, as within the same mod you can't overwrite the same file as -Table is not the same name as @Table.


Updates & Backups
I highely recommend that you make backups of the raw_data/db folder now and then, especially before updates. The Assembly Kit will auto-update with new updates, but not as long as you have it running.

Before updates, backup the whole assembly_kit folder so you can open it as a completely separate instance once an update hits, as you will need to recreate most of the above tables with each update and this way you can just copy-paste most of the data directly.


It is also a good idea to keep around a copy of each update's vanilla raw_data/db XML files in case you edit a table that you later realize you don't actually need and want to reset.

To do so, delete the XML file in raw_data, replace it with the vanilla one, open it in AK, Apply and Close and then make sure you also delete the exported data for it from working_data/db.


PFM will auto-update but not within open instances, so you will have to open a new instance to get updated schema versions that for example make tables with changed structure data (yellow or red in PFM) usable again.
Last edited by Crynsos; Mar 31, 2017 @ 3:20pm
< >
Showing 1-15 of 19 comments
HI, Question - the pack file manager only shows ATW? how do I add Warhammer. I am trying to update the Kraka Drak unlocker for personal use. Thank you
Allesandro Apr 23, 2017 @ 8:10am 
What is templehof named in the DAVE EDITOR? can't seem to find it. only seperatist master necromancer. But I don't dare touching that. Thx
Crynsos  [developer] Apr 23, 2017 @ 8:25am 
Rival Sylvanian Vamps
This is an amazing tutorial, thank you! But I'd actually like to remove carcasonne as a playable faction and put the Fey enchantress with Bretonnia. How do I simply move a legendary lord? Thanks
LUCKY777 May 1, 2017 @ 2:06pm 
Thank you for this guide! Just made myself a nice fat Mousillon! <3
Crynsos  [developer] May 1, 2017 @ 3:41pm 
@Doc B
Sorry for the late answer, totally forgot to reply to you.

First off you will have to create a new Legendary Lord for Carcassonne as per this guide and make him a faction leader.
Then you can select the Fay in start_pos_characters, move her to Bretonnia, remove the faction leader position, set is_in_generals_pool to true and move her x/y position to be close to Louen.

Then in start_pos_starting_general_options change the replaces_general of the Fay to Louen, set her precedence to 1 (order of appearance in the selection screen) and make sure that the new general has identical general and replaces_general entries.

In faction_political_parties_junctions reassign the Fay's entries to Bretonnia.

Finally in start_pos_land_units assign the Fay's units to the new general (as she will receive Louen's base units + her unique starting units) and you should have a fully working moved general.
Thank you so much! I'll have to work on this!
So I tried what you said, and besides a few numerical problems, it worked out fine. WITH exception to the fact that the Fey Enchantress was transformed into Grombrindol. He even floats haha! How did I do that???
Crynsos  [developer] May 3, 2017 @ 4:24pm 
That is probably related to faction_agent_permitted_subtypes, where you have to add the Fay to Bretonnia as Grombrindal is a placeholder for missing character art.
Ki Adi Hoontang Aug 13, 2017 @ 5:48pm 
@Crynsos

Hey, I was wondering if you knew how to add in victory conditions?
Crynsos  [developer] Aug 13, 2017 @ 7:03pm 
Yes, but it's a very tedious process that has to be done via editing the startpos in PFM and has to be repeated every time you update the startpos.
Maxwell House Mar 25, 2018 @ 7:41am 
Hi Crynsos. I’ve been trying to create a minor dark elf faction in the old world but I’ve been running into problems. Are there more steps than his to creating a completely new faction?
Allesandro Apr 26, 2018 @ 9:40am 
I don't get this... A couple of months ago I modded a minor elven faction in ME. And now I'm suddenly not able to. The elven faction no longer have "ruler, council" So it doesn't seem to work when typing that in?
Allesandro Apr 26, 2018 @ 10:05am 
Hahaa, I worked it out. Please, if anyone needs assistance give me a shoutout and I will give you my guide personally.
Crynsos  [developer] Apr 26, 2018 @ 12:15pm 
@themax267
Yes of course as this is purely about unlocking existing factions, but if you want to know more about creating new ones then I suggest you ask me about it on my Discord.


@Ugandan Bo
Well of course not, as they removed the council political parties, which were useless all along.
< >
Showing 1-15 of 19 comments
Per page: 1530 50