autopickup question


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Sunday, 9th February 2014, 20:50

autopickup question

What should I do with the default init.txt so that my characters would automatically pick up runes, nets and needles? I tried looking at the manual, but couldn't make use of it. I'm playing 0.14 if that matters. I would appreciate the exact lines that should be added.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Monday, 10th February 2014, 14:31

Re: autopickup question

for runes, update to the latest version (they are default now). Or add this:

autopickup_exceptions += <rune of Zot

For throwing nets:
autopickup_exceptions += throwing net

For needle, this doesn't seem to work, but I'm not sure why (I also tried to prefix it with .*)
autopickup_exceptions += needle
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Monday, 10th February 2014, 15:22

Re: autopickup question

Thanks, I'll try this. Last time I tried some of this options, they just messed up my list of autopickup for some reason...

I see that you put < before runes but not before nets, is that correct?

Dungeon Master

Posts: 1613

Joined: Thursday, 16th December 2010, 21:54

Post Monday, 10th February 2014, 15:35

Re: autopickup question

The < should be there if you want to pick them up, it marks them as an inclusion rather than an exclusion.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Monday, 10th February 2014, 15:47

Re: autopickup question

yeah, I just forgot it which is why it didn't work :)

  Code:
autopickup_exceptions +=<needle
autopickup_exceptions +=<throwing net


This works.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
Amnesiac

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Monday, 10th February 2014, 20:02

Re: autopickup question

thanks, it worked, but for runes it was just <runes.

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Sunday, 16th February 2014, 12:14

Re: autopickup question

How do I include unknown magical staves?

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Thursday, 20th February 2014, 03:06

Re: autopickup question

should I just add \ and exclude every staff manually, so that they are not picked up after I identify them or is there an easier option?

Blades Runner

Posts: 546

Joined: Saturday, 7th May 2011, 02:43

Post Thursday, 20th February 2014, 09:31

Re: autopickup question

You should be able to exclude every IDed non-artifact staff using a single entry with the pattern 'staff of', IIRC. crate's rcfile has this line:

  Code:
ae += (amulet|ring|staff|rod) of

(ae has been previously defined as an alias using the line 'ae := autopickup_exceptions')

For this message the author savageorange has received thanks:
Amnesiac

Dis Charger

Posts: 2064

Joined: Wednesday, 9th January 2013, 19:44

Post Thursday, 20th February 2014, 13:37

Re: autopickup question

hmm, so it's just:
"autopickup_exceptions +=>staff of" ?
Interesting, I'll try that

Spider Stomper

Posts: 233

Joined: Saturday, 18th February 2012, 04:40

Post Thursday, 14th August 2014, 22:53

Re: autopickup question

galehar wrote:yeah, I just forgot it which is why it didn't work :)

  Code:
autopickup_exceptions +=<needle
autopickup_exceptions +=<throwing net


This works.

For some reason this dosent seem to do anything in my init file. Restarted a couple new toons but those ranged thrown gear are still not automatically picked up.
I´m using a shortened version of Marvin PA´s dito and currently it looks like this
  Code:
      Init file


greedy_sacrificeable
auto_sacrifice = true
travel_delay = -99
explore_delay = -99
autofight_stop = 60
tile_full_screen = true
note_all_skill_levels = true
runrest_ignore_monster ^= fish:3

force_more_message += You have finished your manual of
force_more_message = Space bends around you
force_more_message += sticky flame hits you(.|!)
force_more_message += scroll.*catch
force_more_message += potion.*shatter
force_more_message += distant slurping
force_more_message += fiend.*come
force_more_message += skill increases to level



##############
# Meatsprint #
##############
# channel.god = mute
# channel.intrinsic_gain = mute
# heap_brand = none
# default_autopickup = false
# {
# function choose_stat_gain()
#   crawl.sendkeys('d')
# end
# }

##############
# Autopickup #
##############

autopickup_exceptions +=<javelin
autopickup_exceptions +=<needle
autopickup_exceptions +=<sling bullet
autopickup_exceptions +=<throwing net
autopickup_exceptions +=<tomahawk



autopickup = $?!:"/%|\
ae := autopickup_exceptions

ae =

ae += useless_item
ae += (amulet|ring|rod|tome) of
ae += scrolls? of (torment|curse)
ae += potions? of (.*blood)
ae += ring? of (dexterity|intelligence)
(mutation|paralysis|.*poison|slowing|decay|degeneration|magic)
ae += wand of (confusion|enslavement|fireball|flame|frost|invisibility)
ae += wand of (lightning|magic darts|random effects|slowing)
ae += staff
ae += book
 


: local branch = you.branch()
: if branch == "Pan" or branch:find("Zig") then
autopickup = $



Eae += <wand of (heal wounds|hasting|teleportation)
ae += <scrolls? of (acquirement|fog|holy|identify|recharging|remove)
ae += <scrolls? of (blinking|enchant|magic|brand)
ae += <potions? of (beneficial|cure mutation|experience|porridge)
ae += <potions? of (curing|restore abilities)
ae += <legendary deck
: end

: if you.race() ~= "Vampire" then
ae += potions? of.*blood
: end

: if you.god() == "Nemelex Xobeh" then
ae += <deck
: end

{
local function autopickup(it, name)
    if it.artefact then
        return false
    end
    local class  = it.class(true)
    if class == "armour" then
        local good_slots = {cloak="Cloak", helmet="Helmet",
                            gloves="Gloves", boots="Boots"}
        st, _ = it.subtype()
        if good_slots[st] ~= nil and
           items.equipped_at(good_slots[st]) == nil then
            return true
        end
    end
    if class == "weapon" then
        if name:find("demon") or
           name:find("quick") or
           name:find("double") or
           name:find("triple") or
           name:find("eveningstar") or
           name:find("distortion") then
            return false
        end
    end
    if class == "missile" then
        if name:find("curare") then
            return false
        end
    end
    return false
end

add_autopickup_func(autopickup)
}

##########
# Travel #
##########

level_map_title = true
show_travel_trail = false
ignore := runrest_ignore_message
ignore =

# Annoyances
ignore += Jiyva gurgles merrily
ignore += Jiyva appreciates your sacrifice
ignore += Jiyva says: Divide and consume
ignore += You hear.*splatter
ignore += You feel.*sick
ignore += disappears in a puff of smoke
ignore += engulfed in a cloud of smoke
ignore += standing in the rain
ignore += engulfed in white fluffiness
ignore += safely over a trap
ignore += A.*toadstool withers and dies
ignore += toadstools? grow
ignore += You walk carefully through the
ignore += grinding sound
ignore += contamination has completely
ignore += chunks of flesh in your inventory.*rotted away
ignore += lightning rod has recharged
ignore += your breath back
ignore += Your transformation is almost over
ignore += You smell.*
ignore += Magic Restored
ignore += Your transformation is almost over


runrest_ignore_poison  = 2:10
runrest_ignore_monster += butterfly:1


# Expiring effects

ignore += pray:
ignore += talk:
ignore += talk_visual:
ignore += friend_spell:
ignore += friend_enchant:
ignore += friend_action:
ignore += sound:


#############
# Interface #
#############
equip_unequip = true
allow_self_target = no
easy_confirm = all
confirm_butcher = never
auto_eat_chunks = true
auto_drop_chunks = yes
autofight_throw_nomove = false
show_inventory_weights = true
show_gold_turns = true
show_game_turns = true
default_manual_training = true
skill_focus = toggle
small_more = false


# Spellcasting spam reduction by monqy
{
local function generic_cast_spell(cmd)
  crawl.mpr('<cyan>Cast which spell?</cyan>')
  crawl.flush_prev_message()
  crawl.process_keys(cmd)
end

function cast_spell()
  generic_cast_spell('z')
end

function force_cast_spell()
  generic_cast_spell('Z')
end
}


###############
# Keybindings #
###############

# Useless commands
bindkey = [R] CMD_NO_CMD_DEFAULT
bindkey = [T] CMD_NO_CMD_DEFAULT
bindkey = [O] CMD_NO_CMD_DEFAULT
bindkey = [|] CMD_NO_CMD_DEFAULT
bindkey = [D] CMD_NO_CMD_DEFAULT

# Macro keys
bindkey = [`] CMD_NO_CMD_DEFAULT
bindkey = [1] CMD_NO_CMD_DEFAULT
bindkey = [2] CMD_NO_CMD_DEFAULT
bindkey = [3] CMD_NO_CMD_DEFAULT
bindkey = [4] CMD_NO_CMD_DEFAULT
bindkey = [6] CMD_NO_CMD_DEFAULT
bindkey = [7] CMD_NO_CMD_DEFAULT
bindkey = [8] CMD_NO_CMD_DEFAULT
bindkey = [9] CMD_NO_CMD_DEFAULT
bindkey = [0] CMD_NO_CMD_DEFAULT

# Wizmode
# bindkey = [&] CMD_NO_CMD_DEFAULT

# Targeting
bindkey = [\] CMD_TARGET_OBJ_CYCLE_FORWARD
bindkey = [^I] CMD_TARGET_CYCLE_FORWARD

# Saving
bindkey = [S] CMD_SAVE_GAME_NOW

#########
# Notes #
#########
dump_message_count = 30
dump_order  = header,hiscore,stats,misc,mutations,skills,spells,inventory
dump_order += screenshot,monlist,messages,action_counts,vaults,notes,kills
note_hp_percent = 10

###############
# Spell slots #
###############

#################
# Miscellaneous #
#################
char_set = unicode
show_player_species = true
note_all_skill_levels = true


# Features
cset_unicode = item_gold:£
cset_unicode = cloud:#
feature = explore horizon {.,,green}
feature = (closed|runed|sealed) door {+,,}

# Glyph todo:
# Steal st_'s 'p'eople?
# Classed draconians on q?
# All ghosts on W, corporeal undead on z?
# Bugs on B, flying bugs on y.

# Quadruped hybrids
mon_glyph = hippogriff:Q
mon_glyph = manticore:Q
mon_glyph = griffon:Q
mon_glyph = sphinx:Q
mon_glyph = chimera:lightred Q

# Dwarves
mon_glyph = Wiglaf:lightcyan g
mon_glyph = Jorgrun:lightmagenta g
mon_glyph = dwarf:lightgreen g
mon_glyph = deep dwarf:lightblue g

# Mimics
mon_glyph = inept item mimic:lightmagenta x
mon_glyph = item mimic:lightmagenta x
mon_glyph = ravenous item mimic:lightmagenta x
mon_glyph = inept feature mimic:lightmagenta x
mon_glyph = feature mimic:lightmagenta x
mon_glyph = ravenous feature mimic:lightmagenta x

# Derived undead
mon_glyph = small zombie:brown Z
mon_glyph = small skeleton:lightgrey Z
mon_glyph = small simulacrum:ice Z

# Others
mon_glyph = ice beast:ice Y
mon_glyph = sky beast:mutagenic Y
mon_glyph = boggart:magenta i
mon_glyph = dancing weapon:7
mon_glyph = greater mummy:lightmagenta M
mon_glyph = ancient lich:lightmagenta L
mon_glyph = hellion:lightred 2

# Sensed monsters
mon_glyph = tough sensed monster:lightred
mon_glyph = nasty sensed monster:red


# Lua autopickup (currently disabled)
{
local function autopickup(it, name)
    local class  = it.class(true)
    local branch = you.branch()

    -- For multi-Zig runs.
    local zigscumming = false

    if it.is_useless then
        return false
    end

    -- For Pan runs.
    if branch == "Pandemonium" or branch:find("Zig") then
        if class == "wand" and not zigscumming then
            if name:find("heal wounds") or
               name:find("hasting") or
               name:find("teleportation") then
                return true
            end
        end
        if class == "scroll" then
            if name:find("acquirement") or
               name:find("identify") or
               name:find("magic mapping") then
                return true
            end
            if not zigscumming and
              (name:find("amnesia") or
               name:find("blinking") or
               name:find("enchant armour") or
               name:find("enchant weapon") or
               name:find("fog") or
               name:find("holy word") or
               name:find("recharging") or
               name:find("remove curse") or
               name:find("teleportation")) then
                return true
            end
        end
        if class == "jewellery" and not it.identified then
            return true
        end
        if class == "potion" then
            if name:find("cure mutation") or
               name:find("experience") or
               name:find("gain") or
               name:find("magic") or
               name:find("restore abilities") then
                return true
            end
            if not zigscumming and
              (name:find("curing") or
               name:find("heal wounds") or
               name:find("porridge")) then
                return true
            end
        end
        if class == "food" then
            if name:find("ambrosia") or
               name:find("royal jelly") then
                return true
            end
        end
    -- For normal gameplay.
    elseif not zigscumming then
        -- Armour autopickup by rwbarton.
        if class == "armour" then
            local good_slots = {cloak="Cloak", helmet="Helmet",
                                gloves="Gloves", boots="Boots"}
            st, _ = it.subtype()
            if good_slots[st] ~= nil and
               items.equipped_at(good_slots[st]) == nil then
                return true
            end
        end
        if class == "wand" then
            if name:find("confusion") or
               name:find("enslavement") or
               name:find("flame") or
               name:find("frost") or
               name:find("magic dart") or
               name:find("random effects") or
               name:find("slowing") then
                return false
            else
                return true
            end
        end
        if class == "scroll" then
            if name:find("detect curse") or
               name:find("fear") or
               name:find("torment") or
               name:find("unholy creation") or
               name:find("vorpalise weapon") or
               name:find("vulnerability") then
                return false
            else
                return true
            end
        end
        if class == "jewellery" and not it.identified then
            return true
        end
        if class == "potion" then
            if name:find("blood") and you.race() ~= "Vampire" or
               name:find("levitation") or
               name:find("water") then
                return false
            else
                return true
            end
        end
        if class == "book" then
            if name:find("tome of Destruction") then
                return false
            else
                return true
            end
        end
        if class == "staff" and not it.identified then
            return true
        end
        if class == "food" then
            if name:find("ambrosia") or
               name:find("honeycomb") or
               name:find("ration") or
               name:find("royal jelly") then
                return true
            end
        end
    end

    if you.god() == "Nemelex Xobeh" and
       class == "miscellaneous" and
       name:find("deck") then
        return true
    end

    return false
end

-- add_autopickup_func(autopickup)
}



ignore := runrest_ignore_message
ignore =

# Annoyances
ignore += Jiyva gurgles merrily
ignore += Jiyva appreciates your sacrifice
ignore += Jiyva says: Divide and consume
ignore += You hear.*splatter
ignore += You feel.*sick
ignore += disappears in a puff of smoke
ignore += engulfed in a cloud of smoke
ignore += standing in the rain
ignore += engulfed in white fluffiness
ignore += safely over a trap
ignore += A.*toadstool withers and dies
ignore += toadstools? grow
ignore += You walk carefully through the
ignore += grinding sound
ignore += contamination has completely
ignore += chunks of flesh in your inventory.*rotted away
ignore += lightning rod has recharged
ignore += your breath back




       







I´ve read the options guide couple times but I seem to make more of a mess when trying to adjust the file than fixing it the way i like it & I never cud find a way to auto-pickup those specific items . Currently playing an early v0.16 but tried it on all versions 0.9+.
anyone care to enlighten moi? please :?:

(Sorry for hijacking this thread, it is almost 6 months since last post, hoping its ok)
Last edited by graffen69 on Thursday, 21st August 2014, 13:08, edited 1 time in total.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Friday, 15th August 2014, 03:34

Re: autopickup question

These lines clear your autopickup_exceptions:
  Code:
ae := autopickup_exceptions

ae =


Move your additions to the end or delete the "ae =" line.

For this message the author BlackSheep has received thanks:
graffen69

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 8 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.