How to make a vault

Making vaults is one of the easiest ways to contribute to ToME 4. Vaults are found in various dungeons and help add flavor to each level.

First Steps

First one needs to see what a vault looks like. So grab your favorite text editor and go look for examples at game\modules\tome\data\maps\vaults
This is all the current vaults in that beta. If you need some specific examples this is were to look. This also gives you an idea of what already has been done.

The Bare Bones

here is what the most basic vault looks like


defineTile('.', "FLOOR")

return {
..,
..,
}

This in game would show up as a 2 x 2 grid in the game.
Adding Space

A 2 x 2 is not a huge amount of space to work with, so adding more seems reasonable. So to add a column just add a tile to the end. And to add rows you would just add another line. so a 3 x 3 room would look like this

defineTile('.', "FLOOR")

return {
...,
...,
...,
}

  • IMPORTANT*

vaults MUST be in a rectangular format.

Different Tiles

So just floor tiles are that amazing and don't leave a huge amount of room for creativity. So one might imagine that there are ways to add tile that are not floor tiles, and there is.

This is how we defined a floor tile:
defineTile('.', "FLOOR")
As on can probably see that the second parameter is "FLOOR" and probably dictates what the tile type is.
so a wall would be defined as:
defineTile('%', "WALL")

there are more parameters that one can use to define tiles. These include the following
name effect
HARDWALL A wall that can not be destroyed
DOOR A door that can be opened
DOOR_VAULT A door that gives a warning before opening
DEEP_WATER Water. One can drown in water
LOOT

one of the defining characteristics of vaults is the loot inside. So this is how one would define a tile with level appropriate loot:
defineTile('$', "FLOOR", {}})

This could be anything so you might want to add a filter to change the loot type. So lets say I want some gold coins on the tile. The Tile definition would look like this:
defineTile('$', "FLOOR", {random_filter={type="money"}})
there are various other types that one can add to the random filter like Armour and gems.

Now lets say you want to make a really nice pile of coins, one that is bigger than normal. You would define the tile like:
defineTile('$', "FLOOR", {random_filter={add_levels=25, type="money"}})

Guardians

What is the point of making a vault with a pile of loot there for the taking. There is none. One should have a "guardian" for the loot. So if I wanted to add a monster to a tile I would define the tile like this:
defineTile('m', "FLOOR", nil, {})

However one might want to have a theme to a vault and want only dragons in the vault. That would look like this:
defineTile('d', "FLOOR", nil, {random_filter={name = "fire drake"}})

Now Lets say I want the monster to be real nasty and such. I would define the tile like this:
defineTile('D', "FLOOR", nil, {random_filter={add_levels=15, name = "fire drake"}})

Traps

Traps are a way to add a bit of flavor to a vault. Like seasonings there is such a thing as to much. This is how one would define a tile for a trap:
defineTile('^', "FLOOR", nil, nil, {})
and a nastier trap would look like this:
defineTile('^', "FLOOR", nil, nil, {random_filter={add_levels=20}})