Skip to content
Permalink
Browse files

Deprecate acquire item specs for regular dungeon generation

Conditioning level generation on the player is generally now deprecated
(I think there's consensus that this is bad for various reasons, but the
reason I care about is that it interferes with seeding). This is the
latest case of this that I have run across. These item specs directly
call the acquirement code, which has a bunch of conditioning on the
player to try to make the generated item more usable or appropriate. For
non-pregenerated games this can affect randomization afterwards, and for
pregenerated games it simply doesn't make much sense given that the
player is mostly a blank slate when the acquirement is run. If you
really want the player to have an item generated by this code, just drop
a scroll of acquirement. In very special cases, it is possible in
principle to generate an item on the fly with this item spec (several
sprint maps do this).

I've done somewhat arbitrary choices of replacements depending on my
mood and what the vault appeared to intend, trying to get equivalently
good and appropriate items, but these might need further refinement.
Vault designers can consider `superb_item`, `any good_item`, and
`star_item` when their intent is, place something potentially great but
fairly random.

There are some rarely used special cases of this syntax that are still
in the code, e.g. the god syntax: there was all of one non-trove
instance of this syntax left, and it was using a god (TSO) that has
barely any acquirement special casing; I changed this one to something a
bit more specific. Possibly this syntax should just be removed.

This commit leaves only a few instances of this item spec, mainly in
troves (where it is not deprecated). There are a couple calls in abyss
that seemed ok, but possibly should be changed, as well as some uses in
sprints as mentioned above.
  • Loading branch information...
rawlins committed Feb 11, 2019
1 parent 88f18ea commit 60e86920ebe896c6624afd8cdee16d7d05824b6f
@@ -506,11 +506,14 @@ ITEM: (list of items, separated by comma)
bonus to depth for the item generation. The "|" item glyph uses
this quality level (but with a different distribution of item
classes, see above).
* "acquire" requests the use of the acquirement code itself,
ensuring that the player gets wearable armour, etc. You can
* "acquire" requests the use of the acquirement code
itself, ensuring that the player gets wearable armour, etc. You can
also use acquire:<god> to request that the acquired item be
treated as a god gift. Examples: "acquire any", "acquire armour",
"acquire:sif_muna book", "acquire:trog weapon".
"acquire:sif_muna book", "acquire:trog weapon". Use of this outside
of specialized portals as part of the builder is *deprecated*,
because conditioning level generation on player properties
interferes with seeding.
* "level:N" sets the object's item level (can't be used with
"good_item"). If set to -2 then the object's item level will
be the same as a "*" symbol item (five plus twice the
@@ -167,8 +167,8 @@ TriggerableFunctions.
C. Examples of usage
====================

These vaults have been taken in whole from the current crawl code repository,
and may have been updated since their original inclusion. Please see the
These vaults were taken in whole from the crawl code repository, and several
have been updated or removed since their original inclusion. Please see the
referenced files for the current version.

Annotations are marked as "** <text of annotation>".
@@ -369,8 +369,8 @@ KMONS: 4 = col:gold skeletal warrior name:ancient_champion name_replace \
triple sword ego:vorpal | executioner's axe ego:vorpal
SHUFFLE: 123
KPROP: ]v.1234+ABCDEFG!n$wr|" = no_rtele_into
KITEM: w = acquire weapon
KITEM: r = acquire armour
KITEM: w = weapon good_item
KITEM: r = armour good_item
NSUBST: $ = 1:w / 1:r / 4:| / *:$
COLOUR: " = yellow
KFEAT: " = .
@@ -590,7 +590,7 @@ KMONS: K = storm dragon
KMONS: L = shadow dragon
KMONS: M = quicksilver dragon
KMONS: N = golden dragon
KITEM: KLMN> = acquire any
KITEM: KLMN> = any good_item
KITEM: 12 = any
MAP
cc+cc
@@ -835,7 +835,7 @@ COLOUR: G = cyan
KMONS: 8 = iron golem
KMONS: 9 = war gargoyle
ITEM: plate armour good_item / crystal plate armour good_item w:3
ITEM: acquire weapon
ITEM: any weapon good_item
KMONS: K = Hell Sentinel
KITEM: K = |
KMONS: J = Hell Sentinel
@@ -2567,7 +2567,7 @@ KMONS: P = plant
# The one big reward and the several smaller stacks of items
# are randomly split between the mostly-dog and mostly-bear sections.
KITEM: % = any, any w:1 / nothing w:5, ration q:1
KITEM: *| = gold, gold, gold, acquire any
KITEM: *| = gold, gold, gold, any good_item
NSUBST: 2 = 2:22334 / *:3
SHUFFLE: %'*" / %'"|
SUBST: X = xx., z = xx`, ' = ., " = x, p = PP.
@@ -2761,7 +2761,7 @@ MONS: plant, elephant
KMONS: S = anaconda
KFEAT: S = deep_water
KITEM: U = superb_item
KITEM: Q = acquire any
KITEM: Q = superb_item
KFEAT: o = granite_statue
KFEAT: i = granite_statue
SUBST: X = xxx.., P = 1........., T = tttxxc
@@ -2821,10 +2821,9 @@ MONS: red devil / ice devil w:15 / orange demon w:15
MONS: hellwing / smoke demon, sun demon / sixfirhy / hell beast w:4
KMONS: hH = hell hound
KMONS: F = fungus
# XXX: no_pickup is incompatible with acquire any.
# Should be used here, loot is easily missed.
KITEM: A = acquire any, any good_item / no_pickup gold good_item w:15, \
% no_pickup / nothing, % no_pickup / nothing
KITEM: A = superb_item no_pickup, any good_item no_pickup \
/ no_pickup gold good_item w:15, % no_pickup \
/ nothing, % no_pickup / nothing
KFEAT: A = enter_hell
KFEAT: _ = altar_makhleb
KFEAT: L = endless_lava
@@ -2975,7 +2974,7 @@ NAME: evilmike_catoblepas_cave
TAGS: no_monster_gen no_rotate no_item_gen
PLACE: Lair:$
ORIENT: northwest
ITEM: acquire any
ITEM: any good_item
MONS: yak, death yak, manticore
KMONS: 4C = patrolling catoblepas
# These are still living plants for all intents and purposes...
@@ -2530,7 +2530,7 @@ MONS: pandemonium lord, eye of draining
MONS: black sun, lorocyproca, any demon
KMONS: 6O = ghost moth
: if demonic_rune_vault_is_decoy() then
KITEM: O = acquire any / demonic rune of zot mimic
KITEM: O = superb_item / demonic rune of zot mimic
: else
KITEM: O = demonic rune of zot
: end
@@ -2619,7 +2619,7 @@ ORIENT: float
MONS: fire bat, hellion, hellephant
KMONS: O = pandemonium lord
: if demonic_rune_vault_is_decoy() then
KITEM: O = acquire any / demonic rune of zot mimic
KITEM: O = superb_item / demonic rune of zot mimic
: else
KITEM: O = demonic rune of zot
: end
@@ -2692,7 +2692,7 @@ ORIENT: float
MONS: pandemonium lord, brimstone fiend
MONS: tormentor, smoke demon, any demon
: if demonic_rune_vault_is_decoy() then
KITEM: O = acquire any / demonic rune of zot mimic
KITEM: O = superb_item / demonic rune of zot mimic
: else
KITEM: O = demonic rune of zot
: end
@@ -2758,7 +2758,7 @@ MONS: juggernaut simulacrum, ice devil
KMONS: 56 = ice statue
KMONS: P = pandemonium lord
: if demonic_rune_vault_is_decoy() then
KITEM: O = acquire any / demonic rune of zot mimic
KITEM: O = superb_item / demonic rune of zot mimic
: else
KITEM: O = demonic rune of zot
: end
@@ -2847,7 +2847,7 @@ KMONS: p = demonic plant
KMONS: P = pandemonium lord
ITEM: any potion
: if demonic_rune_vault_is_decoy() then
KITEM: O = acquire any / demonic rune of zot mimic
KITEM: O = superb_item / demonic rune of zot mimic
: else
KITEM: O = demonic rune of zot
: end
@@ -3933,7 +3933,7 @@ KITEM: O = demonic rune of Zot
: end
ITEM: w:5 any / potion of curing
ITEM: any / potion of heal wounds
ITEM: acquire any
ITEM: any good_item
ITEM: potion of cancellation
ITEM: potion of might / potion of brilliance / potion of agility
ITEM: any
@@ -1300,7 +1300,7 @@ MONS: nagaraja w:20 / naga warrior w:5 / naga mage w:5 / \
naga ritualist w:5 / naga sharpshooter w:5
NSUBST: O = 1:A / 1:B
KITEM: A = serpentine rune of Zot
KITEM: B = serpentine rune of Zot mimic / w:90 acquire any
KITEM: B = serpentine rune of Zot mimic / w:90 any good_item
MAP
cccccccc c.@..c cccccccc
cccc..1...ccc c....c cccc..2...ccc
@@ -439,7 +439,7 @@ KMONS: 1 = tarantella
: if you.in_branch("Zot") then
KMONS: 2* = jumping spider / orb spider w:5
KMONS: 3| = ghost moth / moth of wrath
KITEM: | = acquire any w:5 / any good_item
KITEM: | = any good_item
KFEAT: ` = known zot trap
KFEAT: ^ = web w:7 / known web trap w:1 / any trap w:1 / . w:7
: if you.depth() == dgn.br_depth("Zot") - 1 then
@@ -1731,7 +1731,7 @@ KMONS: O = acid blob / nonbase yellow draconian w:6
KMONS: Z = golden dragon / killer klown / Tiamat, golden dragon / killer klown
KITEM: BEHKN = $ w:15 / % w:25 / *
KITEM: z = any good_item
KITEM: Z = acquire any
KITEM: Z = superb_item
# Rotates out loot, upstairs, downstairs,
# both (in an enclosed bubble), or nothing, at either end.
SHUFFLE: defg{>Z' / defg{<'' / fgde>{'Z / fgde<{'' / defg'|Z' / fgde|''Z / \
@@ -1408,7 +1408,7 @@ KMONS: 1 = slime creature w:20 / swamp worm w:50 / \
KMONS: 23 = alligator / swamp dragon / hydra
KMONS: 45 = tentacled monstrosity / thorn hunter
KITEM: 3 = any good_item / any potion / gold
KITEM: 5 = acquire any / gold good_item / any potion q:4 w:20
KITEM: 5 = superb_item / gold good_item / any potion q:4 w:20
KMONS: P = plant
KFEAT: 1324P = W
NSUBST: @ = 1:@ / *:X
@@ -1684,7 +1684,7 @@ WEIGHT: 4
DEPTH: Depths
MONS: generate_awake angel / generate_awake daeva / w:1 angel / w:1 daeva
KFEAT: A = altar_the_shining_one
KITEM: A = w:1 acquire:the_shining_one any / nothing
KITEM: A = w:1 any weapon ego:holy_wrath / nothing
: if crawl.one_chance_in(3) then
SUBST: | = .
SUBST: % = |
@@ -1729,7 +1729,7 @@ WEIGHT: 4
DEPTH: Depths
MONS: generate_awake angel / generate_awake daeva / w:1 angel / w:1 daeva
KFEAT: A = altar_the_shining_one
KITEM: A = w:1 acquire:the_shining_one any / nothing
KITEM: A = w:1 any weapon ego:holy_wrath / nothing
: if crawl.one_chance_in(3) then
SUBST: | = .
SUBST: % = |
@@ -2777,7 +2777,7 @@ NAME: ragdoll_tomb_raider
TAGS: no_item_gen no_monster_gen patrolling
DEPTH: D:14-, Depths, Crypt, !Crypt:$
ORIENT: float
KITEM: $ = amulet_of_vitality / acquire any
KITEM: $ = amulet_of_vitality / any good_item
KITEM: 12345d = gold / any / nothing
KITEM: 67M = superb_item / any
KFEAT: ~ = known zot trap
@@ -7946,7 +7946,7 @@ SUBST: def = c, ghi = v, jk = b
KMONS: 8 = 8 band
KMONS: 9 = 9 band
KMONS: 0 = 0 band
KITEM: J = acquire any
KITEM: J = any good_item
NSUBST: | = 1:J / 2:* / *:|
SUBST: % = %., O = %
MAP
@@ -8113,7 +8113,7 @@ KMONS: F = 0 patrolling
KMONS: H = 9 band patrolling
KMONS: 8 = 8 patrolling
#loot
KITEM: 8 = acquire any
KITEM: 8 = any good_item
KITEM: 7 = *
MAP
ccc
@@ -749,7 +749,7 @@ ENDMAP
NAME: gammafunk_ghost_hydra_chop
DEPTH: D:8-, Lair, Swamp
ORIENT: float
: setup_hydra_weapon(_G)
#: setup_hydra_weapon(_G)
KMONS: O = player ghost
{{
-- Set up hydra monster entry with a range of possible extra heads based on
@@ -1026,7 +1026,7 @@ NSUBST: 4 = 2:4 / 1:5
: end
MONS: human att:neutral
KMONS: 7 = patrolling hell knight
ITEM: acquire any
ITEM: superb_item
SUBST: '" = ., b = v
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -1159,8 +1159,8 @@ MONS: deep elf blademaster, patrolling draconian knight
: end
KFEAT: _ = altar_okawaru
# Lots of loot in this one. In true Okawaru fashion, most of it is junk!
ITEM: any armour, any armour good_item / acquire armour
ITEM: any weapon, any weapon good_item / acquire weapon
ITEM: any armour, any armour good_item
ITEM: any weapon, any weapon good_item
ITEM: arrow, bolt, sling bullet, gold
SHUFFLE: df, hi, jk, eg
NSUBST: d = 1:e / *:d, f = 1:g / *:f
@@ -3358,7 +3358,7 @@ KITEM: 098 = superb_item
: else
SUBST: 9 = 98, 0 = 98
KITEM: 09 = superb_item
KITEM: 8 = any acquire
KITEM: 8 = any good_item
: end
MAP
.......
@@ -3510,7 +3510,7 @@ KMONS: o = unseen horror
KMONS: p = hornet
KMONS: q = insubstantial wisp
KMONS: r = wolf spider
KITEM: e = acquire armour / acquire weapon
KITEM: e = any armour good_item / any weapon good_item / scroll of acquirement
SHUFFLE: bcdfghjklnopqr
MAP
.............

0 comments on commit 60e8692

Please sign in to comment.
You can’t perform that action at this time.