Sorcerer King: Feeding the Dungeon Master

Published on Saturday, October 4, 2014 By Brad Wardell In Sorcerer King Dev Journals

One of the major new features of Sorcerer King is the Dungeon Master.

Essentially, the Dungeon Master is the AI behind the game making sure that things stay interesting and different from game to game.

In coding terms, the Dungeon Master is a big fat state machine that you feed with your actions.  Here’s how it works:


First, I create a narrative resource.  In this case, I’m making one called Indifference.


I am putting a _ in front of the name (_Indifference) because if we later decide to have some place where we show these DM resources I’ll filter based on the first character being a _ in the resource type. If it becomes really popular, we’ll just add a new XML key but we’ll see.

Next, I create a quest that might include an option that results in some indifference.


If I pick the answer that has indifference, I can have it give the player a “reward”


Thus if the player chooses this, 1 indifference is added to their hidden “resources”.

Now, when I create DM events, I can have options that look for indifference.


So in this case, if the player has done a lot of “indifferent” things you can trigger on that.

Similarly, you can even create events that are triggered specifically on that with a % chance attached.

Mind you, everything I’m doing here is something you’ll be able to do (we’re not going to hand out the editor until the game’s released, however as we are constantly updating it).

Connect this to the Steamworks and suddenly players can start building a richer and richer game experience.

In the meantime, we will continued to have writers doing the hard work of writing the quests (seriously).