Page 1 of 1

new vault

PostPosted: Sunday, 5th August 2012, 15:08
by Lasty
I've been playing Crawl for a few years now off and on, but haven't been particularly involved in the community until now. I just got my first 3 rune win recently, followed by a 7 rune DEWz who died of overconfidence while clearing Zot:5(if Tomb wasn't too hard, how could Zot be hard? he said before doing stupid things and dying). Anyway, it seemed like a good time to try my hand at contributing some vaults, and then maybe contributing some code. The code block below has my first attempt. The idea is for a vault which might contain a lot of pieces of armor that the player is looking for in the form of the equipment of a deceased adventurer. However, the adventurer died fighting jellies, meaning that a) the equipment is damaged, and b) there are some jellies (and oozes) in the room. I've placed it relatively early in the dungeon so that the jellies are formidable and the loot might well be worth it.

The one problem I've been having is that the corpse doesn't seem to load correctly. Any advice on that would be appreciated. Also, please let me know any feedback you might have.

  Code:
NAME:    lasty_cornered_adventurer
TAGS:    no_monster_gen
DEPTH:   D:2-5
MONS:    jelly, jelly, ooze
: dgn.delayed_decay(_G, 'A', 'human corpse')
KMONS:   A = toadstool
KITEM:   A = damaged shield / nothing, damaged helmet / nothing, % / nothing, \
      % / nothing, % / nothing, any damaged armour, \
      any damaged weapon good_item
KFEAT:   B = altar_jiyva
NSUBST:  C = 2:2 / *:.
NSUBST:  D = 5:1 / *:W
SUBST:   1 = 13
MAP
xxxxxxxxxxxxxx
xx.xx.xxAxx.xx
xx..D..CC...xx
xx...D..D...xx
@.....D....DBx
xx.D..D..D..xx
xx.....D...Dxx
xx.xx.xx.xx.xx
xxxxxxxxxxxxxx
ENDMAP

Re: new vault

PostPosted: Sunday, 5th August 2012, 15:47
by nicolae
It's a super pain placing delayed-decay corpses on item stacks -- the delayed-decay call uses a KITEM call internally, which gets overwritten by the later KITEM call which places the armor. You'll probably need to duplicate some part of the actual delayed_decay code, though I never got around to figuring out the best way to do that.

I like the basic idea, though. I love vaults that suggest that the player has just missed some sort of recent horrific event.

Re: new vault

PostPosted: Sunday, 5th August 2012, 15:59
by dpeg
Lasty: I like the concept of the vault a lot, both threat and loot (especially with the damage). Unfortunately, I cannot help with the question (my vault making days are over). If you get stuck (nicolae knows a lot about these issues), I suggest to come to ##crawl-dev on freenode. Don't be shy, just keep asking if someone's around who can help with corpses & vaults.

Re: new vault

PostPosted: Sunday, 5th August 2012, 16:26
by sgrunt
This is easy to fix - just merge the two KITEM calls (the implicit and the explicit).

  Code:
NAME:    lasty_cornered_adventurer
TAGS:    no_monster_gen
DEPTH:   D:2-5
MONS:    jelly, jelly, ooze
{{
dgn.delayed_decay(_G, 'A', 'human corpse, damaged shield / nothing, '
                        .. 'damaged helmet / nothing, % / nothing, '
                        .. '% / nothing, % / nothing, any damaged armour, '
                        .. 'any damaged weapon good_item')
}}
KMONS:   A = toadstool
KFEAT:   B = altar_jiyva
NSUBST:  C = 2:2 / *:.
NSUBST:  D = 5:1 / *:W
SUBST:   1 = 13
MAP
xxxxxxxxxxxxxx
xx.xx.xxAxx.xx
xx..D..CC...xx
xx...D..D...xx
@.....D....DBx
xx.D..D..D..xx
xx.....D...Dxx
xx.xx.xx.xx.xx
xxxxxxxxxxxxxx
ENDMAP

Re: new vault

PostPosted: Sunday, 5th August 2012, 17:17
by Lasty
sgrunt's solution worked perfectly. Thanks, sgrunt!

Re: new vault

PostPosted: Sunday, 5th August 2012, 17:55
by nicolae
sgrunt wrote:This is easy to fix - just merge the two KITEM calls (the implicit and the explicit).

  Code:
NAME:    lasty_cornered_adventurer
TAGS:    no_monster_gen
DEPTH:   D:2-5
MONS:    jelly, jelly, ooze
{{
dgn.delayed_decay(_G, 'A', 'human corpse, damaged shield / nothing, '
                        .. 'damaged helmet / nothing, % / nothing, '
                        .. '% / nothing, % / nothing, any damaged armour, '
                        .. 'any damaged weapon good_item')
}}
KMONS:   A = toadstool
KFEAT:   B = altar_jiyva
NSUBST:  C = 2:2 / *:.
NSUBST:  D = 5:1 / *:W
SUBST:   1 = 13
MAP
xxxxxxxxxxxxxx
xx.xx.xxAxx.xx
xx..D..CC...xx
xx...D..D...xx
@.....D....DBx
xx.D..D..D..xx
xx.....D...Dxx
xx.xx.xx.xx.xx
xxxxxxxxxxxxxx
ENDMAP


Damn, I didn't even know you could do that. Perhaps that should be mentioned in the syntax.txt file?

Re: new vault

PostPosted: Monday, 6th August 2012, 17:33
by Stormfox
Do toadstools still wither away on their own? If that happened and something woke the jellies, the whole loot stack could get munched before it was even seen.

In which case it's still a Jiyva altar vault with appropriate monsters.

Re: new vault

PostPosted: Monday, 6th August 2012, 17:54
by Lasty
Stormfox wrote:Do toadstools still wither away on their own? If that happened and something woke the jellies, the whole loot stack could get munched before it was even seen.

In which case it's still a Jiyva altar vault with appropriate monsters.


Fair question. According to LearnDB, they do wither. I don't know what the countdown is, so I'm not sure of the odds that it will wither before the player fully explores the level. I could use a toadstool instead, but the flavor on that is worse and they're a pain to chop down. I suppose there's probably some LUA magic that could be used to keep the tile impassible until a player shows up . . .

As you say, it's at least a Jivya altar with themed monsters, so the worst-case scenario isn't that bad.