Scenarios

Base information

const scenario: Scenario = {
  campaign: "Frosthaven",
  index: "2",
  name: "Algox Scouting",
  location: Location.Copperneck("K8"),
  complexity: 1,
  scenarioBook: {
    page: 5,
  },
  sectionBook: {
    sections: ["27.1", "6.1", "77.3"],
  },
};

campaign

The name of the campaign this scenario belongs to. This is important for the mod to know as it uses this name to check certain things, like the rules for the campaign, which scenario/section book to use by default, etc.

index

The identifier by which this scenario will be identified by the mod. Typically, the number of the scenario (but still as a string).

name

The name of the scenario.

location

Where the scenario takes places. Can have an optional name for a named location this scenario takes place at. The coordinate describes the location on the world map for this scenario.

complexity

The complexity rating for the scenario.

scenarioBook

Contains information about the scenario book for this scenario. Mainly, which page of the book should be opened when the scenario is loaded.

sectionBook

Contains information about the section book for this scenario. Lists all the sections that are relevant for this scenario.

Currently, all sections have to be listed. However, in a future version this will probably be reworked as the information about sections is also present in other parts of the scenario definition (e.g. on doors).

Available loot

The loot table for a scenario is defined by the loot attribute. It defines how many cards of each type should be added to the loot deck. Each entry for a resource is lower case and follows the name of the resource/herb. If a random item can also be looted in the scenario, the attribute randomItem can be added with the value true.

loot: {
  coins: 4,
  lumber: 4,
  metal: 4,
  hide: 4,
  arrowvine: 2,
  rockroot: 1,
  randomItem: true,
},

Scenario goal

The goal of the scenario can be defined using the goal attribute. Depending on the type of goal, different attributes are available.

If the goal is to defeat all enemies in the scenario, the type attribute needs to be set to defeat-all. The section attribute defines the section that should be read once the goal is achieved.

goal: {
  type: "defeat-all",
  section: "9.1",
}

If the goal is to defeat a specific enemy in the scenario, the type attribute needs to be set to defeat. The name attribute defines the name of the enemy that must be defeated.

example pending

If the goal is to escape the scenario, the type attribute needs to be set to escape. The section attribute defines the section that should be read once the goal is achieved.

goal: {
  type: "escape",
  section: "8.3",
}

If the goal is to destroy one or more objectives in the scenario, the type attribute needs to be set to destroy. The marker attribute defines (pending).

example pending

If no specific type matches the goal, use the other type.

goal: {
  type: "other",
}
This currently has no effect at all and also not complete. It’s already included for possible later features, like showing and tracking the current scenario goal or to add the correct sections to the section book.

Scenario effects

Scenario effects can be defined using the scenarioEffect attribute. Depending on the type of effect, different attributes are available.

If the effect is to add -1 modifiers to the characters' attack modifier deck, the type attribute needs to be set to attack-modifier. The card attribute defines the type of modifier added, which would only be -1,curse, or bless (note: curse and bless are not yet supported). The amount attribute defines how many of that card type should be added.

example pending

If the effect is for the characters to suffer damage, the type attribute needs to be set to damage. The amount attribute defines how damage should be suffered.

example pending

If the effect is to add one or more conditions to the characters, the type attribute needs to be set to condition. The conditions string defines a list of each condition that should be added.

example pending
This currently has no effect at all and also not complete. It’s already included for possible later features, like automatically applying scenario effects unless the character has a perk to ignore them.

Monsters

Each monster that shows up in the scenario needs to be defined through the monsters attribute. This is a table from their name extra information for the monster. This information can be empty if there’s nothing special about the monster.

The name doesn’t have to match the actual name of the monster and can possibly be anything. When monsters are placed in Rooms the names used there must match one of the monster names defined in this section. Whenever a named version of a monster exists, it must have the monster attribute to define the original type of that monster, and the name attribute to define the name that should be used on the figure.

monsters: {
  "Algox Archer": {},
  "Algox Guard": {},
  "Algox Priest": {
    team: "Ally",
  },
  "Algox Scout": {},
},

More details about how to define monsters can be found here.

Overlays

Each overlays that shows up in the scenario needs to be defined through the overlays attribute. This is a table from their name to their extra information. Each overlay at least needs to define their type which determines the outline color that will be used for the overlay.

The name doesn’t have to match the actual name of the overlay object and can possibly be anything. When overlays are placed in Rooms the names used there must match one of the overlay names defined in this section. A specific overlay can include the unless attribute, which allows you to definte criteria in which the overlay will not be spawned when true.

overlays: {
  "Ice Sheet": {
    type: "objective",
    object: "Large Ice Corridor",
    stats: {
      health: "C * (L + 2)",
    },
  },
  "Snow Rock": {
    type: "obstacle",
  },
},

More details about how to define overlays can be found here.

Doors

Doors need to be defined with the doors attribute. This is a list of door objects that will be placed once their corresponding rooms have been opened.

doors: [
  {
    name: "Snow Door",
    rooms: ["2", "3"],
    section: "27.1",
    position: [3, 2],
  },
  {
    name: "Snow Door",
    rooms: ["1", "2"],
    section: "6.1",
    position: [0, 8],
  },
],

name

The name of the overlay object to use for the door. It can be any object and isn’t limited to an actual door. This doesn’t use any information from the Overlays section.

rooms

The list of rooms that this door opens. The rooms are listed with their index attribute.

section

The name of the section that should be read when this door is opened.

position

The position of the object on the Grid.

Rooms

A scenario consists of multiple rooms. Each room can spawn new maps, monster, overlays, loot etc. The rooms attribute is a list of those rooms and each room has the same attributes.

Each room needs to have an index attribute which identifies the room. This can be any name. Doors open rooms by their index.

rooms: [
  {
    index: "1",
  },
],

Only the very first room in the list will be loaded first when the scenario is loaded.

If the room contains map tiles, those can be defined with the map attribute. This is a list of map tiles and their position.

map: [
  {
    name: "11-A",
    position: [-4, 9],
    rotation: 0,
  },
],

Each map tile has the following properties:

name

The name of the map tile object.

position

The position of the map tile on the Grid.

rotation

The rotation of the map tile.

A room without map tiles isn’t really a "room" but can be useful for scripting the scenario. E.g. scenario 4 has a "dummy" room as its starting room which only contains two overlays with buttons. Those buttons are used to represent the choice of introduction to read for this scenario.

If there are start tiles inside the rooms, those can be defined with the startArea attribute. This is a list of coordinates on the Grid.

startArea: [
  [-6, 5],
  [-5, 6],
  [-6, 6],
  [-7, 7],
  [-7, 6],
],

If there are monsters for this room, those can be defined with the monsters attribute. This is a list of monsters which will be spawned when this room is opened.

monsters: [
  {
    name: "Algox Archer",
    position: [0, 11],
    playerCount: {
      "2": "normal",
      "3": "normal",
      "4": "elite",
    },
  },
],

Each monster has the following properties:

name

The name of the monster. This must match one of the defined monsters in the Monsters section.

position

The position of the monster on the Grid.

playerCount

Defines for which players the monster shows up and which difficulty it has. If a mapping for a player count is missing, the monster won’t show up. Otherwise, the mapping needs to define either "normal" or "elite" for the difficulty of the monster.

If there are overlays for this room, those can be defined with the overlays attribute. This is a list of overlays which will be spawned when this room is opened.

Loot tokens are not overlays and are defined in their own section.
overlays: [
  {
    name: "Snow Rock",
    position: [-3, 10],
    rotation: 180,
  },
],

Each overlay has the following properties:

name

The name of the overlay. This must match one of the defined overlays in the Overlays section.

position

The position of the overlay on the Grid.

rotation

The rotation of the overlay. This is optional and will default to the rotation of the defined overlay or 0 if there’s also nothing defined.

Loot tokens defined with the loot attribute by simply defining their position on the grid.

loot: [
  [-2, 0],
  [6, -1],
],