Knights of The Chalice 2 - Module Editor
Knights of The Chalice 2 - Module Editor
Knights of The Chalice 2 - Module Editor
KotC2 has one of the easiest and most accessible editors since Neverwinter Nights 1,
almost 20 years ago. This document is a guide on how to make your own module.
Getting started
First, here’s a very quick guide for a first, basic map:
Doing that you should already have a basic map, with creatures that attack you on sight.
Give it a try now. Exit the editor, click Launch Module’, select your module and enjoy.
I STRONGLY recommend doing this first to get a feel for the editor, then continue with the
rest of this guide. Once you done that, let’s take an indepth look at each part of the editor.
How maps work
KotC2 maps use a grid of squares, each 64x64 pixels. Your maps can have sizes from 1x1
squares to over 100x100 (don’t do this, it’s VERY heavy and unstable), but their height and
width must always be a multiple of 64. E.g., a 16x16 square grid would be 1024x1024 pixels.
If you want some examples and templates, there’s a few inside the game’s folder, at ‘Knights
of the Chalice 2/Graphics/MapBackgrounds’:
You don’t need to make the grid visible in your map, but remember that the entire game
works in a square grid - all walls, doors, enemies, etc can only be place following the grid.
Things like circular or diagonal walls will be tricky to line up properly.
This is especially useful for map backgrounds - and the editor will ask you if you want to use
an image as background art, automatically adjusting the width and height of the new map.
Two approaches to using custom map art:
A - You can import a map you already have, like the one below from Zat Battlemaps, making
sure that it lines up with the KotC2 square grid (each square must be 64x64 pixels).
B - You can plan your map on the KotC2 editor, setting all the walls, doors, pits, encounters,
etc, then use the ‘Extract Tilemaps to JPEG’ function to export that plan. You can then use
software like Photoshop to draw on top of the floor plan:
Map Making Tools & Resources
● Templates are saved in the file ‘Templates.cml’, inside your module’s folder.
● Individual creatures are saved in the file ‘Creatures.cml’, inside your module’s folder.
A new module has no saved creature or templates, so you can import the ‘Templates.cml’
file from the ‘Augury of Chaos’ module to get you started, since it has almost 300
templates you can use, like Goblins, Trolls, Gelatinous Cubes, Elementals, etc.
If you want to make your own templates, it’s very easy to set up new creatures by simply
copying their stats from D&D 3.5 books or online resources such as the d20 monster list.
Editing a creature
This guide considers that you are familiar with basic D&D 3.5 rules, so we won’t explain what
things like Strength, Fortitude or Vision Type means. If you have doubts about those, we
recommend checking an online guide to D&D 3.5, such as Hypertext d20.
Properties
Here you can set most of the creature’s basic properties, such as name, background, race,
class, stats, spell slots and known spells. If you are familiar with D&D, this should be simple.
Note that the game uses the stats to automatically calculate all the bonuses. For example, if
you give 14 Str and 16 Dex to a creature, you don’t need to add the attack & AC bonus
anywhere, it will calculate them automatically. Keep this in mind when copying bestiary info.
The option to pay attention here is ‘Show creature’, which defines if the creature is active on
the map. You can use scripts to enable or disable this. For example, making an ambush by
placing a hidden creature in a room and a script that will close the door and reveal the
creature once the player enters the room.
TIP: To change a creature’s position on the map, just use the ‘Pick’ option at the lower left.
Weapons
This tab is for Natural Weapons, not equipment. For example, the ‘Claw’ attack of a bear, or
the ‘Wing’ attack of a dragon. They can have many extra effects, such as draining levels or
breaking items. For the difference between Primary & Secondary weapons, check here.
Remember, the ‘Enchantment bonus’ above is to define if the attack counts as a magical
weapon. A “+9 Claw” attack from an Owlbear has no enchantment bonus, that “+9” is
coming from its BAB, stats and feats and will be automatically calculated by the game.
If you need to add a fixed damage bonus like 1d6+3, you have to add it as 1d6+3d1.
Also, all humanoid creatures should still have one natural weapon such as ‘Fist’, in case they
get disarmed.
Feats are restricted to the class the creature belongs to, but you can change its class, give it
a class Feat and then revert back to the original class. So it’s possible to give Improved
Barbarian Rage to your Goblin Wizard.
Every creature will have the ‘[HP Rolls]’ feat, a pre-generated table of HP rolls for when that
creature levels up. So 1/4/5/3/2… means it will get 1 HP on Level 1, 4 HP on Level 2, etc.
Equipment
Self-explanatory, this is where you equip the creature. Only items that are ticked will drop.
In the image below the creature would only drop 177 gold.
You can use ‘Settings for Random Treasure’ to add random loot based on the creature’s
level - just set the rate of coins, items and valuables you wish to give and click ‘Distribute’.
Intelligence
This tab is extremely important, as it defines how the creature will behave in the game
(during combat and outside it) and allows you to set several different scripts to it.
Attitude:
This option is vital, as it will define if the creature is hostile, initiates dialog on sight or just
stands around. You can use this to make a creature initiate the dialog script on sight before
an encounter, just remember to then include a script line to change its attitude to hostile.
Scripts:
● Dialogue Script will execute when dialogue with this creature starts (either by the
player or automatically due to its Attitude). You can script anything, not just dialog;
● End of Fight Script executes when a fight with this creature ends (including if he's
an ally);
● Tactics Script is what the NPC will try to do when combat starts (still respecting
rules like initiative, spell slots and actions per turn. To break those, use other scripts);
● Scene Scripts will play continuously DURING COMBAT, even if the NPC is dead.
Things like every character taking damage per turn, or reinforcements appearing
after X number of rounds;
● Non-Combat Scripts will play continuously OUTSIDE COMBAT. Things like the
creature patrolling an area, or shouting ‘barks’ with speech bubbles.
Note that you cannot set scripts for a creature template, only individual creatures.
Group:
Think of groups as ‘encounters’. Once combat starts with a member of a group, all its
members will join combat (even if they are far away, so beware). The leader is used for
scripting, such as making the group flee once the leader dies.
● Percentage rules: These have a ‘%’ sign at the end, and define the chance of the
creature using a certain tactic. So ‘Attempt grapple% 40’ means there’s a 40%
chance each turn that this creature will use grapple.
● Binary rules: All options without ‘%’ are either 1 (yes) or 0 (no). So ‘Willing to harm
all allies 1’ means this creature will use an AoE attack even if it harms its own allies.
You can use these to make things like a creature that will always try to grapple the player, or
a cleric that will focus on healing instead of attacking. Remember that these are general
rules, if you want a specific set of actions you should use the Tactics Script.
Immunities and DR
This tab should be called ‘Defenses’, as it controls the creature’s natural armor, immunities,
defenses, damage reduction and spell resistance.
You can also set vulnerabilities here, such as ‘Acid Vulnerability: +50% Damage’.
Effects
This tab is confusing, as it overlaps with other tabs: it’s a list of all special effects, abilities,
defenses and attacks that the creatures possess. However, most can’t be edited here.
For example, if you gave +5 Natural Armor in the ‘Immunities and DR’ tab, it will appear
here, but won’t be editable; you have to return to the ‘Immunities and DR’ tab for that.
Similarly, here you’ll see bonuses from equipped items, but won’t be able to edit them.
Some effects are also hardcoded and can’t be edited anywhere, such as the -1 AC penalty
of Large sized creatures. You can’t edit or remove those.
In short, here is where you see all the effects affecting this creature, and set up additional
ones that aren’t part of its stats, feats, defenses or items. For example, making a creature
unconscious, permanently Hasted, or with a penalty/bonus in the first rounds of combat.
TIP: If a creature you just created has ‘Condition: Dead’, you forgot to give it at least one HD
in the ‘Properties’ tab.
Vanilla file structure, relevant stuff for both modding and module-making (pay attention to
color/bit depth of images in different folders - if it differs from vanilla stuff, then it's very likely
not going to show up in-game):
● KotC2\Graphics\MapBackgrounds - Don't use this folder, use the one inside your
module’s folder instead. It does contain a few .PSD map examples if you want to take
a look at them.
Scripting Tips
Use script #61 - set variable to name of party member with *highest* *strength* (can be
changed to other abilities)
Use script #54 - Set variable to *current hit points* (can be changed to strength and other
abilities, before or after effects)
Example:
● created variables "highest ability check (character)", "highest ability check (value)",
"some index" (not sure what it is for).
● add label here if the ability value can change mid-dialog (I wanted to have an option
to quickly increase strength with a dialogue option for testing but haven't figured out
how to add a value to existing value in a variable)
● #61 - set variable "highest ability check (character)" to party member with *highest*
*strength*
● #54 - set variable "highest ability check (value)" to *strength after effects* of the
character "highest ability check (character)", then set in variable "some index" the
index of the associated modifier list, if any <- haven't tested if it's necessary to set the
index variable too
● show dialog
● add dialog answer "[strength 18] yes I can lift this stone" non-selectable if requires
skill not available or gold insufficient, requiring "specified variable above or equal to
specified number" (...) or variable "highest ability check (value)" equal/above/below
*18*
● display dialog and wait for answer
Okay, say that the regional map consists of a village (your home base) and a deep cave
filled with monsters. Whenever you want to go to the cave, you have to go through a forest
that has already claimed the lives of many adventurers.
So we'll say that there's a 60% chance of a random encounter in the forest. The first thing
that your script will need to do is to roll a d100 and set the result in a variable that we will call
'Roll to determine if there is an encounter'.
Next we need to create the actual encounters. Say we want to have six possible encounters
in the forest: a group of five orcs and a troll, a group of seven human cutthroats, a single hill
giant, a group of three ghouls, a pack of five wolves, and if you're really unlucky, two hill
giants and a bear.
So you start with the forest map background and you place the monsters of the first
encounter in it. You set them to act as a group. Then you tell the editor to hide that group.
Now you place the monsters of the second encounter. And so on, until you've placed all six
encounters.
There are six possible encounters, so the second thing that your script will need is to roll a
d6 and record the result in a variable that we will call 'Number of the selected encounter'.
After creating these two variables, your script will look if the 'Roll to determine if there is an
encounter' is below 60. If yes, there's an encounter. If not, the script ends and the party can
keep moving through the forest.
If there's an encounter, then you have a series of six checks, one for each possible value of
the 'Number of the selected encounter' variable.
If the variable is one, you teleport the party to the forest map, you set the monster group of
five orcs and a troll as visible, and you display a dialogue 'The party is facing a group of
savage orcs led by a Troll!'. That's it for this check.
If the variable is two, you teleport the party to the forest map, you set the monster group of
human cutthroats as visible, and you display a dialogue 'The party is under attack by a group
of human cutthroats!'. And so on.
You also have to decide whether these encounters respawn or if they are a one-time affair
only. If they respawn, you have to tell the script to heal the monster group before unveiling it.
If they don't respawn, then the script needs one more variable called 'Have all the random
encounters been defeated'. The script ends if this variable has been set to 1 (true). If not, the
script needs to check if the selected monster group has been defeated before. If that's the
case you increment the 'Number of the selected encounter' and check again, until the script
finds a monster group that has not yet been defeated.
Use script #75 - start combat with all the NPCs you want
Use script #51 - set a variable NAME (empty for now) where the new party will be added
Use script #78 - “give” to “all party members” the condition “dead” until end of combat
Use script #125 - to add the new NPCs & monsters as party members
(This will automatically open the formation window)
Use script #92 - add all non-dead party members to the variable NAME you just created
Use script #128 - create new split party from the variable NAME
Once the battle ends (set a End of Fight script in one of the enemies):
Use script #130 - rejoin the party
Use script #125 - remove the new NPCs & monsters as party members
Use script #126 - display the formation screen (do this or the player won’t have a avatar)
You could also slightly edit the script to force the player to control a different party for a while,
even outside combat:
Use script #51 - set a variable NAME (empty for now) where the new party will be added
Use script #78 - “give” to “all party members” the condition “dead”
Use script #125 - to add the new NPCs & monsters as party members
(This will automatically open the formation window)
Use script #92 - add all non-dead party members to the variable NAME you just created
Use script #128 - create new split party from the variable NAME
Activatable objects can be used to display a second layer of art over the map background,
that can be hidden or shown by scripts. This means could make a bridge fall down by adding
a broken bridge art as a hidden Activatable Object. Then make a script (#11) that shows the
Activatable Object and changes the terrain from normal to "low obstacle" (#85 or #86).
You can also use the Activatable Object to show the roof of a house, then make it hidden
once the party walks into the house using a trigger with script #11:
IMPORTANT: the activable zone does not need to be the same size of the image prop. If
you make a huge activatable zone, it will display a giant selection circle over it and you won't
be able to walk into it. You have to do the opposite: make it as small as possible.