2 init file questions


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

Spider Stomper

Posts: 231

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

Post Thursday, 21st August 2014, 13:13

2 init file questions

Is there a way to make skills auto-stop wasting skill exp at specific levels? Like if I play a toon with a Great Mace I want him to automatically stop training maces at 20 (for min delay).
The ”note_skill_levels = false” command only notifies skill levels, it dosent prevent spending exp on it when a new level is reached.

Also, when I play a DD specifically I´d want the auto_fight feature to stop at 20 (instead of the usual 60 I have)?
I tried something like this:

: if you.race() ~= "Deep Dwarf" then
autofight_stop 20
: end


But apparently it does nothing.
Any ideas?

Ziggurat Zagger

Posts: 11111

Joined: Friday, 8th February 2013, 12:00

Post Thursday, 21st August 2014, 15:28

Re: 2 init file questions

try
autofight_stop = 60

I think stopping skill is possible too. But you need to check available lua functions for that (or just analyze some bots)

Spider Stomper

Posts: 231

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

Post Monday, 25th August 2014, 13:11

Re: 2 init file questions

I know how to adjust the autofight stop, just not on how to adjust it for a specific race. I´ll try to be more specific:

I´ve tried for some time now to play around with the options guide and my interface. I use a slimmed version of Marvin PA´s init. file but there´s still lot of things that I either miss or can’t seem to figure out on my.
I had some help recently (thx BlackSheep) to adjust the init file to my preference and it made me think about if and how I could tweak the file a little further.
This is how my current init file looks at the moment
  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 += 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 #
##############

pickup_thrown = true
pickup_mode = single

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


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


ae += useless_item
ae += (amulet|ring|rod|tome) of
ae += scrolls? of (amnesia|curse|noise|torment)
ae += potions? of (brilliance|magic|mutation|.*blood)
ae += ring? of (strength|slaying|protection|dexterity|intelligence)
(mutation|paralysis|.*poison|slowing|decay|degeneration|magic)
ae += wand of (confusion|enslavement|fireball|flame|frost)
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
ignore += Some of the.*
ignore += Something in your.*
ignore += You are feeling.*
ignore += Eating.*
ignore += This raw.*
ignore += You are no.*
ignore += You start resting.*


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 = true
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
ignore += there is something really disgusting in your inventory.
ignore += some of the chunks of flesh in your inventory has rotted away.


I was wondering how to
a) prevent the game from spending overflow exp in a skill at a specific (or any) skill-level and
b) how to make my Deep Dwarf characters stop auto_fighting at 20% hit points (instead of the 60% I am currently using as default)?

The variable i tried for DD´s is the one listed in the above post (I figured i could copy the same as for autopickup expceptions but it´s not that simple).
I did what i could on my own to prevent any form of babysitting, but i´m at a loss here. :oops:

Sorry for any misunderstandings.
User avatar

Dungeon Master

Posts: 431

Joined: Tuesday, 13th September 2011, 17:34

Post Monday, 25th August 2014, 13:28

Re: 2 init file questions

graffen69 wrote:a) prevent the game from spending overflow exp in a skill at a specific (or any) skill-level

There's no way to do this with the precision you seem to want. The closest you can get is something like
  Code:
force_more_message += Flails skill increases.*20

which will give you a --more-- line when you get to skill level 20. You can change what you're training with LUA but it's not gonna change the game mechanics to divert your EXP in ways you couldn't do yourself (and in fact I believe it only changes stuff when you save/reload).

b) how to make my Deep Dwarf characters stop auto_fighting at 20% hit points (instead of the 60% I am currently using as default)?

  Code:
: if you.race() ~= "Deep Dwarf"
autofight_stop = 20
: else
autofight_stop = 60
: end

For this message the author ontoclasm has received thanks:
graffen69

Dungeon Master

Posts: 634

Joined: Sunday, 22nd September 2013, 14:46

Post Wednesday, 27th August 2014, 23:02

Re: 2 init file questions

i'm no lua expert, but i believe that ~= actually means not equal to, so the numbers should be reversed there, or the ~= should be turned into ==

For this message the author wheals has received thanks:
graffen69
User avatar

Blades Runner

Posts: 538

Joined: Saturday, 15th February 2014, 03:22

Location: NYC

Post Thursday, 28th August 2014, 01:35

Re: 2 init file questions

wheals wrote:i'm no lua expert, but i believe that ~= actually means not equal to, so the numbers should be reversed there, or the ~= should be turned into ==

http://www.lua.org/pil/3.2.html according to this you are exactly right.

Spider Stomper

Posts: 231

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

Post Monday, 8th September 2014, 02:21

Re: 2 init file questions

wheals wrote:i'm no lua expert, but i believe that ~= actually means not equal to, so the numbers should be reversed there, or the ~= should be turned into ==

That did the trick.
  Code:
: if you.race() == "Deep Dwarf"
autofight_stop = 20
: else
autofight_stop = 60
: end

But for some reason that now prevents all my toons from auto eating.
Hmm..
User avatar

Blades Runner

Posts: 538

Joined: Saturday, 15th February 2014, 03:22

Location: NYC

Post Thursday, 11th September 2014, 19:58

Re: 2 init file questions

graffen69 wrote:
wheals wrote:i'm no lua expert, but i believe that ~= actually means not equal to, so the numbers should be reversed there, or the ~= should be turned into ==

That did the trick.
  Code:
: if you.race() == "Deep Dwarf"
autofight_stop = 20
: else
autofight_stop = 60
: end

But for some reason that now prevents all my toons from auto eating.
Hmm..

Did you forget to close an if statement or break one above this? That is what it sounds like.

Spider Stomper

Posts: 231

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

Post Friday, 26th September 2014, 12:33

Re: 2 init file questions

I swapped the command line around
  Code:
: if you.race() == "Deep Dwarf"
autofight_stop = 20
: else
autofight_stop = 60
: end

and it seems theres a command or two i miss for it to not mess with other commands.

For ex. here i put it on top of my init list like so
  Code:
      Init file

: if you.race() == "Deep Dwarf"
autofight_stop = 20
: else
autofight_stop = 60
: end

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


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 += fiend.*come
force_more_message += skill increases to level
force_more_message += Flails skill increases.*20


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

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

pickup_thrown = true
pickup_mode = single

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

autopickup_exceptions +=<manuals


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


ae += useless_item
ae += (amulet|ring|rod|tome) of
ae += scrolls? of (amnesia|curse|noise|torment)
ae += potions? of (brilliance|magic|mutation|.*blood)
ae += ring? of (strength|slaying|protection|dexterity|intelligence)
(mutation|paralysis|.*poison|slowing|decay|degeneration|magic)
ae += wand of (confusion|enslavement|fireball|flame|frost)
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|lignification|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
ae += <manuals
: 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
ignore += Some of the.*
ignore += Something in your.*
ignore += You are feeling.*
ignore += Eating.*
ignore += This raw.*
ignore += You are no.*
ignore += You start.*
ignore += One of your.*
ignore += You continue.*



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 = true
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)
}




and it works but then all kinds of other commands like travel delay and auto eat gets overridden.
I tried moving around that command line to other places but it has no effect.

Maybe i´m putting it in the wrong place on top of not closing or breaking other commands?

Ziggurat Zagger

Posts: 11111

Joined: Friday, 8th February 2013, 12:00

Post Friday, 26th September 2014, 14:56

Re: 2 init file questions

  Code:
force_more_message = Space bends around you
...
Eae += <wand of (heal wounds|hasting|teleportation)


I think it is not what you want
User avatar

Vestibule Violator

Posts: 1509

Joined: Wednesday, 21st September 2011, 01:10

Location: St. John's, NL, Canada

Post Friday, 26th September 2014, 15:09

Re: 2 init file questions

does "greedy_sacrificeable" with no value cause a problem?

stupid question: isn't "then" mandatory in lua ifs?
Won all race/bg, unwon (online): Nem* Hep Uka
Favourites: 15-rune Trog, OgNe/OgIE/OgSu (usually Ash), Ds, Ru, SpEn, Ce of Chei, Qaz

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 15 guests

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