Creating a new Thrall type

About this guide

In this guide, we will go through how to assemble a thrall that can be used for crafting recipes. Do note that it's currently not possible to add completely new professions, as this is a hardcoded enum. However, you can still use the existing professions as a template and change them around in order to create your crafter.

Step 1 - Create your new profession template

For our first step, we need to set up the Profession template for the crafter. This will be what controls what recipes the crafter has access to as well as what crafting stations the crafter can be placed at, and so forth.

Thrall Type - This determines the base archetype of your thrall. For crafters, leave this at 0. Dancers 1, Archers 2, Fighters 3. This is not used extensively right now and nothing much will happen if you don't assign this value correctly.

Thrall Tier - As with Thrall type, this does not do much right now, but it reflects the tier of the Thrall (1-4)

Thrall Profession - As mentioned before - creating a new thrall type isn't really possible without code, so you are limited to using the ones from this dropdown as a boot-strapping move.

Bonus Recipes - This is the interesting part and where you add the TemplateIDs for the specific recipes you want your thrall to be able to craft.

Crafting Groups - The ID/s present in this list determine what crafting stations your thrall can be placed in. For a comprehensive list of what stations are available, please check the "CraftingStationNameTable" table, which will inform you about this.

Stat Template - This should match one of the entries in the StatTemplateDataTable - it determines, amongst other things, the base health for your thralls when placed in the world. For crafters, just leave this as "Artisan Base".

Stat Modifier Template - This takes the base values from the Stat Template and multiplies them. The entry here should match one of the entries in the "StatModifierTemplateDataTable" - typically for crafters, this contains entries that increase Crafting speeds and other crafting specific modifiers.

Thrall Stat Modifier Template - When thrallified, this template determines yet again a modifier. Mostly, it's the health of the thrall when enslaved forcefully recruited.

Icon - The icon of the thrall

Buff class - Not used

Step 2 - Creating the NPC

This guide will not go into detail all the different aspects of creating an NPC. Suffice to say that you will want to add an NPC to this list and assign the Profession Template with the same name as the one you implemented in the previous step, as so:

Step 3 - Putting the thrall into the world

If you want to place new spawn points and assign your NPC to those, please refer to the "Creating a Camp" guide included in this .zip file for a more comprehensive look on how camps are set up.

However, there is an easier way of putting your crafter into the game, which is to piggy-back on the already existing spawns. For this, we will need the "WeightedSpawnTableRow" table. In this table, find the entries you want to replace, or add to, and add new rows to this table (really, you should append them using the mod-controller of course).

Example: We want to make a new alchemist that has a chance to appear on any Black Hand Alchemist spawn point. In the WeightedSpawnTableRow table, you will want to add a line that looks something like this:

Now - whenever the spawn "BlackHandAlchemist_Low" is called, there is a chance that your entry will spawn intead (in this example, MyAwesomeNewAlchemist).

The table is weighted, which means that the higher you put the weight, the higher chance of spawning your specific alchemist.

Optional - Setting up crafting bonuses

If your new thrall type is a crafter and you want the crafter to have bonuses to crafting items, you will also need to set up these bonuses in the DT_ThrallItemCraftBonuses table. This table allows you to set up different crafting bonuses based on the profession type as well as the tier of thrall belonging to that profession type.