Tomb Titivator
Posts: 799
Joined: Saturday, 23rd February 2013, 22:25
Custom vault causes ctd.
I know it's the vault, because when I remove the file, the game works fine.
Anyone know what's wrong?
- Code:
{{
function koboldcave_portal(e)
local timeout_turns_long = crawl.random_range(2700, 3300)
local timeout_turns_short = timeout_turns_long/10
local messager =
timed_msg {
visible = true,
-- $F{xxx} will be substituted with the 'entity' property of the timed
-- marker, or with the desc property (if entity is not set).
messages = time_messages(timeout_turns_short,
"The $F{the} trembles.",
"Cracks appear in the walls of the $F{the}.",
"The cracks in the $F{the} grow larger.",
"Bits of rock fall from cracks in the $F{the}, almost completely blocking access.")
}
e.lua_marker('O',
timed_marker {
disappear = "The hole has fallen in on itself.",
desc = "colapsed hole",
entity = 'hole',
dst = "Kobold cave",
overview = "hole in the rock",
turns = timeout_turns_long,
turns_short = timeout_turns_short,
floor = "expired_portal",
feat_tile = "dngn_portal_koboldcave_gone",
msg = messager })
e.kfeat("O = enter_portal_vault")
e.colour("O = brown")
e.tile("O = dngn_portal_koboldcave")
end
-- Use the following line in destination maps after all SUBSTs
-- : koboldcave_setup_features(_G)
-- Note that the function also defines < to be the exit portal.
function koboldcave_setup_features(e)
e.kfeat("< = exit_portal_vault")
e.colour("< = brown")
end
}}
default-depth: D:3-8
NAME: enter_koboldcave
TAGS: uniq_koboldcave no_monster_gen chance_koboldcave
CHANCE: 40%
: koboldcave_portal(_G)
MAP
.......
..O....
.......
ENDMAP
#### The portal vaults ####################################
# Reset default depth to prevent random generation of portal vaults.
# Sort destination maps by WEIGHT.
default-depth: koboldcave
NAME: koboldcave_1
WEIGHT: 40
ORIENT: encompass
TAGS: no_item_gen no_monster_gen no_rotate
ITEM: potion of curing / potion of heal wounds / any scroll w:7 / any armour w:2 / any weapon w:2
MONS: kobold
: koboldcave_setup_features(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxx<A..xxxxxxxxxx
xxxxxx...x..xx....xxxx
xxx....d..x....xx...xx
xx..1....x...1....x..x
xxx..x..x.......xx...x
xxxx.xx..x..xx.xxx.1.x
x...xxx..x..xx.xxx..xx
x.x.xx..xxx..x.xxxx.xx
x.x..xx....x.....xx..x
x.x...x......d....x..x
xx.1.x...............x
xx.......x......1...xx
x.xx..dx......x....xxx
x.x.x.....1.......x.xx
xxdxxx....dd.....x.x.x
xxx.xxx........xxx.x1x
xxxx..x.....1.....xx.x
xxxxxx.xxxxxxxxxxx..xx
xxxxxx.xxxxxxxxxx.xxxx
xxxx..xxxxxxdddxx.xxxx
xxx.xxxxxxx.1ddxxx1xxx
xxxx.xx.xx.x2.1x.x.xxx
xxxxx..x..xxxxx.x.xxxx
xxxxxxxxxxxxxxxxxxxxxx
ENDMAP
NAME: koboldcave_2
WEIGHT: 40
ORIENT: encompass
TAGS: no_item_gen no_monster_gen no_rotate
ITEM: potion of curing / potion of heal wounds / any scroll w:7 / any armour w:2 / any weapon w:2
MONS: kobold
MONS: big kobold
: koboldcave_setup_features(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxx
xxxxx..x<A..xxxxx...xx
xxx.1xx.xxxx..x..xxx.x
xxxxx.xxxxx.xx.xxdx.xx
xxxx.xxxxxxx.xxx.xx.xx
xx..x.1xxxxx.xxx1x.xxx
x.xxxxx.xxx.xxxxx.xxxx
xx.xxx.x.1.x.xxx.xdxxx
xx.xx.xx..xxx.x.xxx.xx
xx.x.xx.x..xxx1xxx.xxx
x.x.xx.xxxxxxxxxx.xxxx
xdxxx.x.xxxxxxx.xx.xxx
xx.xx.xx.ddd...x.1x.xx
xxx..xxxxd2dx.xxxx.xxx
xxxxxxxxxxxxxxxxxxxxxx
ENDMAP
NAME: koboldcave_3
WEIGHT: 20
ORIENT: encompass
TAGS: no_item_gen no_monster_gen no_rotate
ITEM: potion of curing / potion of heal wounds / any scroll w:7 / any armour w:2 / any weapon w:2
MONS: kobold
MONS: kobold name:Kiblib_II
MONS: big kobold name:Kiblib
: koboldcave_setup_features(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxdxxxxxxxxxxxxxxxxxxxd1xxxxx
xx.xxxxxxxxxx.xxxxxxxdddxxxxx
xx1x.xxx.xx..x..x.xxxx.xxxxxx
xxx.x.x.x..xx.xx.x.xxx.xxxxxx
xxxx.xx.xxx.xxxxxxd.x.xxxxxxx
xxx.x..xx.x1xxxxxxx..x.xxxxxx
xx.x..x..x.xxxxxxxxxxx.xxxxxx
xxx.xx.xxxx.xxxxxxxx.x.xxxxxx
xxxxxxx.x1.xAxxxxx..x.x<xxxxx
xxxxxxxx.xx.xxxxx.xxxx.x.xxxx
xxxxxx.x.x.xxxxxxx1xxxxxx.xxx
xxxxx.x.x.x.xxx..x.xxxxx.xxxx
xxxx.xxx.1xx..x.x.xxxxx.xxxxx
xxddxxxxxxxxxx.xxx..x..xxxxxx
xxd3....2xxxxxxxxxxx.xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP