Author: daniu
Original Thread: How to use the Official Modding Tools

How to use the Official Modding Tools How to use the Official Modding Tools

First write-up of how to create a mod with the modding tools. I'll limit it to db editing for now until we have a better understanding.

1. Installation In Steam, go to "Library"; in the drop-down box underneath, select "Tools".
Find "Total War: Shogun 2 - Assembly Kit".
Right-click, choose "Install Game".
When the download is finished and you select "Play game", a directory is opened, containing a file "".
Unzip the file to C:\Official_Mod_Tools. If you unzip it anywhere else, you'll probably run into problems with too long filenames; also, don't use spaces in the folder name; the tools will have a problem with it.

2. Tools Directory Overview The tools themselves are located in the folder called "binaries". The ones meaningful to you are "TWeak.Release.exe" and "BOB.Release.exe". TWeak consists of DaVE (the DB editor) and the Unit Editor.

There is a folder "raw_data" which contains the xml files being worked on. In raw_data/db, you find the ones representing the database. If you use the database editor and open the corresponding files, you'll see the changes you made applied.

The subfolder raw_data/BattleTerrain contains battle map template data used by in the campaign. I don't know the exact structure of how the tgas for each template work together yet.
raw_data/art contains several files with, well, art-related stuff.
raw_data/Localization has support for different languages.

max_exporter contains scripts for 3Dmax to export it into the format needed by the game.

working_data is where the stuff you created and exported to binary (i.e., the format used by the game; basically what we've been working on with pre-official modding).

The folder "retail" will not exist immediately after installation; it's where the final mod packs will be put.

3. Toolchain TWeak
First off, you want to start TWeak, then from the Tools menu, "DAVE - Database Visual Editor".
It asks you whether to connect to raw_data/db, you say "yes".
From the menu "View", select "Table Launcher". It will open the list of available db tables.
Doubleclick one from the list and an editor for it will open.
Do the changes you want to apply; when finished, select the "Apply" button in the editor window.

Now that your changes are done, you want to put them into a pack file.
From the binaries folder, run BOB.Release.exe.
In the list on the left, expand the "database" tree item and select the table you edited.
In the list in the middle, find the table again (under "db") and select it. Select both the Provider and Consumer action; the Provider will convert the xml to binary, and the Consumer will put the binary into the pack.
In the list on the right under data, select "mod.pack".

Now, in the bottom right, press "Start". A result window will open, and you'll get messages about what has happened. Note that even if everything went right, there will be warning messages for the Create Pack action; that's because you only edited a subset of the available file so it tells you the others aren't in... don't worry about it.

Go check in the retail folder now; it should contain a folder "data" now with your "mod.pack".
Copy it to your shogun2/data directory and the mod is available next time you start Shogun 2.

4. ModManager: Select Active Mods and Upload to Workshop When you start Shogun 2 from Steam, it will first open the ModManager with a list of mods you put into the data folder. Select the one you want to start the game with.
If you doubleclick the entry for your mod, an additional window will pop up, allowing you to enter a name and description for your mod. Once you've done that, you can "Upload to Workshop", and your mod is released. You'll need to set it to Visible from the Workshop if you want others to be able to access it.

Helpful links to documentation in the Wiki:

That's it for now, hope it helped
I'll keep this updated when we find out more stuff.