Modding replace faction

From Wildermyth Wiki
Revision as of 10:52, 2 July 2020 by Davea (talk | contribs)

This page walks through the process of replacing all the monsters in a faction. The focus is on getting something simple which you can see in the game, and adding more details later. The description and screenshots are current as of July 2020, early access version 0.23+148 Triss Thornfire.

Main concept

Today, modders cannot add factions. The game is hard-coded with five factions. But, you can replace all the monsters in a faction and change the name. Why would you do this, instead of just adding new monsters without factions? Because of calamities. In other games, you can make a large "family" of monsters with stronger and stronger abilities, and use an "encounter table" that maps the party's power level against the monster types. So, low level parties will encounter easy monsters and high level parties will encounter hard monsters. In Wildermyth, for the most part, low and high level parties encounter the same monsters; but calamities make the monsters stronger or add special effects. Hopefully, this makes encounters interesting for parties of all levels automatically.

If you want to add one monster for one event, you can do that, but you can't really tune it to be an interesting encounter for both a low level party and high level party. It's better to redefine a faction, and use the calamity system to make the monsters stronger as the party grows stronger.

Here are the steps to replacing a faction.

  1. Add monsters. The basics of adding monsters are described in this tutorial: Adding a monster. Most factions have 5-9 different monsters.
  2. Change the faction name. This has some limitations; As of today, your name won't show up everywhere, and there are some images you can't change.
  3. Update the calamities.
  4. Add the "tracks" for generating monsters.

Change the faction name

The file assets/text/dynamic/dynamic.properties contains the faction name. Change this to override the name in most places. For example, to rename Drauven as Bandits:

drauven.singular=Bandit
drauven.plural=Bandits
drauven.name=Bandits

Currently there are at least two places this change won't affect. When you create a campaign using your modified faction, you will often "lock" the campaign to one enemy; for example, the builtin campaign "Enduring War" locks the main enemy to Morthagi. In the "new story" dialog field for "main enemy", the old name like Drauven will still appear. Also, in the page which displays calamities, there is currently no way to change the small image that appears at the top of the column, circled in red below. All the bandit calamities will still appear under the header which is an image of a drauven.

MonsterReplaceCalamity.png

Update the calamities

All of the calamities are listed in the file assets/data/calamity/calamities.json. Today, there is no way to "merge" calamities between different mods. So, if it happens that two mods change this file, the file from the mod with higher priority will take effect, and the other files with this name will be ignored. The file contains all the calamities, one after the other. Each one looks like this:


Add tracks

NYI

{
	"weight": 0.35,
	"card": {
		"id": "buff_yab_dagger_GAINS_armor",
		"category": "buffMonster",
		"flavor": "drauven",
		"monsterIds": [ "yab_dagger" ],
		"aspects": [ "calamityBuffMonster_armor" ]
	}
}


Seeing the effect in game

  1. If you haven't already done so, enable developer mode. (Save and exit before doing this.) In file explorer, create an empty file under steam\steamapps\common\Wildermyth called devmode.txt.
  2. Choose tools from the game main menu, then select combat lab. This will give you a chessboard-like battle map with a few characters and monsters already spawned.
  3. In the "Generate a unit" dropdown at the left, choose "Davea's monster" and then click Side A. Your monster should appear: