##### Crawl Init file ###############################################
# For descriptions of all options, as well as some more in-depth information
# on setting them, consult the file
# options_guide.txt
# in your /docs directory. If you can't find it, the file is also available
# online at:
# https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt
#
# Crawl uses the first file of the following list as its option file:
# * init.txt in the -rcdir directory (if specified)
# * .crawlrc in the -rcdir directory (if specified)
# * init.txt (in the Crawl directory)
# * ~/.crawl/init.txt (Unix only)
# * ~/.crawlrc (Unix only)
# * ~/init.txt (Unix only)
# * settings/init.txt (in the Crawl directory)
##### Some basic explanation of option syntax #######################
# Lines beginning with '#' are comments. The basic syntax is:
#
# field = value or field.subfield = value
#
# Only one specification is allowed per line.
#
# The terms are typically case-insensitive except in the fairly obvious
# cases (the character's name and specifying files or directories when
# on a system that has case-sensitive filenames).
#
# White space is stripped from the beginning and end of the line, as
# well as immediately before and after the '='. If the option allows
# multiple comma/semicolon-separated terms (such as
# autopickup_exceptions), all whitespace around the separator is also
# trimmed. All other whitespace is left intact.
#
# There are three broad types of Crawl options: true/false values (booleans),
# arbitrary values, and lists of values. The first two types use only the
# simple =, with later options - which includes your options that are different
# from the defaults - overriding earlier ones. List options allow using +=, ^=,
# -=, and = to append, prepend, remove, and reset, respectively. Usually you will
# want to use += to add to a list option. Lastly, there is := which you can use
# to create an alias, like so:
# ae := autopickup_exceptions
# From there on, 'ae' will be treated as if it you typed autopickup_exceptions,
# so you can save time typing it.
#
##### Other files ###################################################
# You can include other files from your options file using the 'include'
# option. Crawl will treat it as if you copied the whole text of that file
# into your options file in that spot. You can uncomment some of the following
# lines by removing the beginning '#' to include some of the other files in
# this folder.
# Some useful, more advanced options, implemented in LUA.
# include = advanced_optioneering.txt
# Alternative vi bindings for Dvorak users.
# include = dvorak_command_keys.txt
# Alternative vi bindings for Colemak users.
# include = colemak_command_keys.txt
# Alternative vi bindings for Neo users.
# include = neo_command_keys.txt
# Override the vi movement keys with a non-command.
# include = no_vi_command_keys.txt
# Turn the shift-vi keys into safe move, instead of run.
# include = safe_move_shift.txt
always_show_zot_true
default_manual_training = true
autofight_stop = 69
#show_more = true
tile_web_mouse_control = true
runrest_ignore_message += wither
############################
### Careful Play Items ###
############################
travel_delay = -1
explore_delay = 5
travel_open_doors = true
#force_more_message = curse toe, enormous slime creature, titanic slime creature, Erolcha, Meliai, hell sentinel, Jorgrun, Moth of Wrath, Floating Eye, Flayed Ghosts, Tzitzim, tormentor
bold_brightens_foreground=true
explore_auto_rest=true
flash_screen_message += Ashenzari invites you to partake
flash_screen_message += Ru believes you are ready to make a new sacrifice
force_more_message += You can now merge with and destroy a victim.
runrest_stop_message = transformation is almost over
more += distortion
flash_screen_message += distortion
flash_screen_message += primal bloodlust
--more += holy wrath
more += suddenly seem different
more += A sentinel's mark
more +- alarm
show_more = false
more += have finished your manual
--more += curare
more += is.*carrying a wand of
explore_stop += greedy_pickup,stairs,shops,altars,portals,branches,runed_doors
bindkey = [s] CMD_NO_CMD_DEFAULT
note_chat_messages = true
stop += Your transformation is almost over
easy_floor_use = true
more += you are ready to recite again
tile_viewport_scale = 1.1
###########################
###BEGIN LUA BLACK MAGIC###
###########################
<
function ready()
AnnounceDamage()
--SpoilerAlert()
OpenSkills()
char_defaults()
end
>
{
-----------------------------
---- Begin char_defaults ----
-----------------------------
-- See README.md for documentation.
weapon_skills = {"Unarmed Combat", "Short Blades", "Long Blades", "Axes",
"Maces & Flails", "Polearms", "Staves"}
ranged_skills = {"Throwing", "Bows", "Crossbows", "Slings"}
other_skills = {"Fighting", "Armour", "Dodging",
"Shields", "Spellcasting", "Conjurations", "Hexes", "Charms",
"Summonings", "Necromancy", "Translocations", "Transmutations",
"Fire Magic", "Ice Magic", "Air Magic", "Earth Magic",
"Poison Magic", "Invocations", "Evocations","Stealth"}
skill_glyphs = { [1] = "+", [2] = "*" }
chdat = nil
char_combo = you.race() .. you.class()
loaded_attempted = false
-- Wrapper of crawl.mpr() that prints text in white by default.
if not mpr then
mpr = function (msg, color)
if not color then
color = "white"
end
crawl.mpr("<" .. color .. ">" .. msg .. "" .. color .. ">")
end
end
function skill_message(prefix, skill, skill_type, value)
local msg = ""
if prefix then
msg = prefix .. ";"
end
if skill_type then
msg = msg .. skill_type .. "(" .. skill .. "):" .. value
else
msg = msg .. skill .. ":" .. value
end
return msg
end
function save_char_defaults(quiet)
if you.class() == "Wanderer" then
return
end
if not c_persist.char_defaults then
c_persist.char_defaults = { }
end
c_persist.char_defaults[char_combo] = { }
chdat = c_persist.char_defaults[char_combo]
local msg = nil
local have_weapon = false
for _,sk in ipairs(weapon_skills) do
if you.train_skill(sk) > 0 then
chdat["Weapon"] = you.train_skill(sk)
msg = skill_message(nil, sk, "Weapon",
skill_glyphs[chdat["Weapon"]])
have_weapon = true
break
end
end
if not have_weapon then
chdat["Weapon"] = nil
end
local have_ranged = false
for _,sk in ipairs(ranged_skills) do
if you.train_skill(sk) > 0 then
chdat["Ranged"] = you.train_skill(sk)
msg = skill_message(msg, sk, "Ranged",
skill_glyphs[chdat["Ranged"]])
have_ranged = true
break
end
end
if not have_ranged then
chdat["Ranged"] = nil
end
for _,sk in ipairs(other_skills) do
if you.train_skill(sk) > 0 then
chdat[sk] = you.train_skill(sk)
msg = skill_message(msg, sk, nil, skill_glyphs[chdat[sk]])
else
chdat[sk] = nil
end
end
if not quiet then
mpr("Saved default for " .. char_combo .. ": " .. msg)
end
end
function have_defaults()
return you.class() ~= "Wanderer"
and c_persist.char_defaults ~= nil
and c_persist.char_defaults[char_combo] ~= nil
end
function load_char_defaults(quiet)
if not have_defaults() then
return
end
local msg = nil
local found_weapon = false
chdat = c_persist.char_defaults[char_combo]
for _,sk in ipairs(weapon_skills) do
if you.base_skill(sk) > 0 and chdat["Weapon"] then
you.train_skill(sk, chdat["Weapon"])
msg = skill_message(msg, sk, "Weapon",
skill_glyphs[chdat["Weapon"]])
found_weapon = true
else
you.train_skill(sk, 0)
end
end
if chdat["Weapon"] and not found_weapon then
you.train_skill("Unarmed Combat", chdat["Weapon"])
msg = skill_message(msg, "Unarmed Combat", "Weapon",
skill_glyphs[chdat["Weapon"]])
end
local found_ranged = false
for _,sk in ipairs(ranged_skills) do
if you.base_skill(sk) > 0 and chdat["Ranged"] then
you.train_skill(sk, chdat["Ranged"])
msg = skill_message(msg, sk, "Ranged",
skill_glyphs[chdat["Ranged"]])
found_ranged = true
else
you.train_skill(sk, 0)
end
end
if chdat["Ranged"] and not found_ranged then
you.train_skill("Throwing", chdat["Ranged"])
msg = skill_message(msg, "Throwing", "Ranged",
skill_glyphs[chdat["Ranged"]])
end
for _,sk in ipairs(other_skills) do
if chdat[sk] then
you.train_skill(sk, chdat[sk])
msg = skill_message(msg, sk, nil, skill_glyphs[chdat[sk]])
else
you.train_skill(sk, 0)
end
end
if not quiet and msg ~= "" then
mpr("Loaded default for " .. char_combo .. ": " .. msg)
end
end
function char_defaults(quiet)
if you.turns() ~= 0 then
return
end
if not load_attempted then
load_char_defaults(quiet)
load_attempted = true
-- Open the skill menu if we don't have settings to load.
if not have_defaults() then
crawl.sendkeys("m")
end
end
end
---------------------------
---- End char_defaults ----
---------------------------
}
###############
# Damage Calc #
###############
<
local previous_hp = 0
local previous_mp = 0
local previous_form = ""
local was_berserk_last_turn = false
function AnnounceDamage()
local current_hp, max_hp = you.hp()
local current_mp, max_mp = you.mp()
--Things that increase hp/mp temporarily really mess with this
local current_form = you.transform()
local you_are_berserk = you.berserk()
local max_hp_increased = false
local max_hp_decreased = false
if (current_form ~= previous_form) then
if (previous_form:find("dragon") or
previous_form:find("statue") or
previous_form:find("tree") or
previous_form:find("ice")) or
previous_form:find("hydra")then
max_hp_decreased = true
elseif (current_form:find("dragon") or
current_form:find("statue") or
current_form:find("tree") or
previous_form:find("ice")) or
previous_form:find("hydra")then
max_hp_increased = true
end
end
if (was_berserk_last_turn and not you_are_berserk) then
max_hp_decreased = true
elseif (you_are_berserk and not was_berserk_last_turn) then
max_hp_increased = true
end
--crawl.mpr(string.format("previous_form is: %s", previous_form))
--crawl.mpr(string.format("current_form is: %s", current_form))
--crawl.mpr(string.format("max_hp_increased is: %s", max_hp_increased and "True" or "False"))
--crawl.mpr(string.format("max_hp_decreased is: %s", max_hp_decreased and "True" or "False"))
--crawl.mpr(string:format("you_are_berserk is: %s", you_are_berserk and "True" or "False"))
--crawl.mpr(string:format("was_berserk_last_turn is: %s", was_berserk_last_turn and "True" or "False"))
--Skips message on initializing game
if previous_hp > 0 then
local hp_difference = previous_hp - current_hp
local mp_difference = previous_mp - current_mp
if max_hp_increased or max_hp_decreased then
if max_hp_increased then
crawl.mpr("You now have " .. current_hp .. "/" .. max_hp .. " hp.")
else
crawl.mpr("You now have " .. current_hp .. "/" .. max_hp .. " hp.")
end
else
--On losing health
if (current_hp < previous_hp) then
if current_hp <= (max_hp * 0.30) then
crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.")
elseif current_hp <= (max_hp * 0.50) then
crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.")
elseif current_hp <= (max_hp * 0.70) then
crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.")
elseif current_hp <= (max_hp * 0.90) then
crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.")
else
crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.")
end
if hp_difference > (max_hp * 0.20) then
crawl.mpr("MASSIVE DAMAGE!!")
end
end
--On gaining more than 1 health
if (current_hp > previous_hp) then
--Removes the negative sign
local health_inturn = (0 - hp_difference)
if (health_inturn > 1) and not (current_hp == max_hp) then
if current_hp <= (max_hp * 0.30) then
crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.")
elseif current_hp <= (max_hp * 0.50) then
crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.")
elseif current_hp <= (max_hp * 0.70) then
crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.")
elseif current_hp <= (max_hp * 0.90) then
crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.")
else
crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.")
end
end
if (current_hp == max_hp) then
crawl.mpr("Health restored: " .. current_hp .. "")
end
end
--On gaining more than 1 magic
if (current_mp > previous_mp) then
--Removes the negative sign
local mp_inturn = (0 - mp_difference)
if (mp_inturn > 1) and not (current_mp == max_mp) then
if current_mp < (max_mp * 0.25) then
crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.")
elseif current_mp < (max_mp * 0.50) then
crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.")
else
crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.")
end
end
if (current_mp == max_mp) then
crawl.mpr("MP restored: " .. current_mp .. "")
end
end
--On losing magic
if current_mp < previous_mp then
if current_mp <= (max_mp / 5) then
crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.")
elseif current_mp <= (max_mp / 2) then
crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.")
else
crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.")
end
end
end
end
--Set previous hp/mp and form at end of turn
previous_hp = current_hp
previous_mp = current_mp
previous_form = current_form
was_berserk_last_turn = you_are_berserk
end
>
####################
# Opens skill menu #
####################
<
local need_skills_opened = true
function OpenSkills()
if you.turns() == 0 and need_skills_opened then
need_skills_opened = false
crawl.sendkeys("m")
end
end
>
###############
# Spell slots #
###############
force_targeter=true
# Set Alias for Spell Slots
slot := spell_slot
# Try to keep in alphabetic order (by keybind)
slot += Freeze:a
slot += Shroud:a
slot += Frozen Ramparts:b
slot += Blink:b
slot += Call Canine Familiar:c
slot += Confuse:c
slot += Conjure Flame:c
slot += Control Undead:c
slot += Freezing Aura:c
slot += Petrify:c
slot += Spider Form:b
slot += Summon Ice Beast:c
slot += Summon Lightning Spire:c
slot += Fireball:f
slot += Apportation:g
slot += Sublimation of Blood:m
slot += Slow:s
slot += Sticky Flame:s
slot += Swiftness:s
slot += Passwall:w
slot += Corona:v
slot += Blade Hands:z
slot += Iskenderun's Mystic Blast:x
slot += Lightning Bolt:x
slot += Mephitic Cloud:x
slot += Stone Arrow:x
slot += Vampiric Draining:x
slot += Iskenderun's Battlesphere:z
slot += Lee's Rapid Deconstruction:z
slot += Animate Dead:A
slot += Animate Skeleton:A
slot += Ozocubu's Armour:A
slot += Death's Door:D
slot += Borgnjor's Revivification:R
# bindkey = [s] CMD_WEAPON_SWAP
# bindkey = ['] CMD_PREV_CMD_AGAIN
item_slot ^= potions? of curing:q
item_slot ^= potions? of heal wounds:l
item_slot ^= potions? of haste:h
item_slot ^= potions? of might:d
item_slot ^= potions? of agility:s
item_slot ^= potions? of resistance:n
item_slot ^= ring of poison resistance:P
item_slot ^= ring of positive energy:N
item_slot ^= ring of protection from cold:I
item_slot ^= ring of protection from fire:F
item_slot ^= ring of protection from magic:mM
item_slot ^= ring of resist corrosion:C
item_slot ^= ring of see invisible:S
item_slot ^= ring of wizardry:W
item_slot ^= scrolls? of blinking:B
item_slot ^= scrolls? of fear:g
item_slot ^= scrolls? of identify:i
item_slot ^= scrolls? of teleportation:t
item_slot ^= scrolls? of remove curse:w
item_slot ^= wand of digging:D
#################
### Interface ###
#################
easy_confirm = all
default_manual_training = true
equip_unequip = true
sort_menus = true:equipped,identified,>qty,basename,art,ego,glowing,qualname
autofight_caught = true
autofight_wait = false
autofight_stop = 69
{
local need_skills_opened = true
local oldready = ready
function ready()
if you.turns() == 0 and need_skills_opened then
need_skills_opened = false
crawl.sendkeys("m")
end
oldready()
end
}
#: if you.race() == "Troll" or you.race() == "Hill Orc" then
# autofight_stop = 50
#: end
#: if you.race() == "Ghoul" then
# autofight_stop = 50
#: end
#: if you.race() == "Minotaur" or you.race() == "Gargoyle" then
# autofight_stop = 40
#: end
#: if you.race() == "Deep Dwarf" then
# autofight_stop = 40
#: end
#: if you.race() == "Gargoyle" then
# autofight_stop = 69
#: end
############################
### Travel & Exploration ###
############################
show_more = false
rest_wait_both = true
rest_delay = -1
show_travel_trail = true
explore_stop = artefacts,greedy_pickup_smart
explore_stop += stairs,shops
explore_stop += altars,portals,branches,runed_doors
view_delay = 200
##################
### Autopickup ###
##################
# Add staves, misc; note you can't use += with this option.
autopickup = $?!:"/}|
ae := autopickup_exceptions
ae += scrolls? of silence
ae += >Xom's Chess Piece
# Don't ever need a second stave
ae += staff of .*
ae += >ring of stealth
ae += >ring of protection from cold
ae += >ring of protection from fire
ae += >ring of protection from magic
ae += >ring of positive energy
ae += >ring of fire
ae += >ring of flight
ae += >ring of ice
ae += >ring of magical power
ae += >ring of strength
ae += >ring of intelligence
ae += >ring of dexterity
ae += >ring of wizardry
ae += >ring of poison resistance
ae += >ring of resist corrosion
ae += >ring of see invisible
#ae += >identified jewellery
ae += >amulet of faith
ae += >amulet of reflection
ae += >amulet of the acrobat
ae += >amulet of regeneration
ae += >amulet of magic regeneration
ae += >amulet of guardian spirit
ae += >amulet of nothing
ae += >amulet of inaccuracy
###########
### Lua ###
###########
{
-- Equipment autopickup (by Medar and various others)
local function pickup_equipment(it, name)
if it.is_useless then return end
local class = it.class(true)
if class == "armour" then
local good_slots = {cloak="Cloak", helmet="Helmet",
gloves="Gloves", boots="Boots"}
st, _ = it.subtype()
-- Autopickup found aux armour if 1) we don't have any or 2) it's artefact,
-- or 3) if we don't have artefact or ego armour, and the found armour is
-- ego.
if good_slots[st] ~= nil then
if good_slots[st] == "Gloves" and you.has_claws() > 0 then return end
if it.artefact then return true end
local cur = items.equipped_at(good_slots[st])
if cur == nil then return true end
if cur.branded or cur.artefact then return end
if it.branded then return true end
-- Autopickup found body armour of the same kind we're wearing, according
-- to conditions (2) and (3) above used for aux slots.
elseif st == "body" then
local cur = items.equipped_at("armour")
if cur == nil then return end
if cur.name("qual") ~= it.name("qual") then return end
if it.artefact then return true end
if cur.branded or cur.artefact then return end
if it.branded then return true end
end
end
return
end
add_autopickup_func(pickup_equipment)
-- Spellcasting spam reduction by monqy
local function generic_cast_spell(cmd)
crawl.mpr('Cast which spell?')
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
}
# Note: My final RC file has code from lua files found at:
# https://github.com/gammafunk/dcss-rc/blob/master/README.md
# starting from the line below.
{
----------------------------
---- Begin load_message ----
----------------------------
-- See README.md for documentation.
message_color = "white"
-- Wrapper of crawl.mpr() that prints text in white by default.
if not mpr then
mpr = function (msg, color)
if not color then
color = "white"
end
crawl.mpr("<" .. color .. ">" .. msg .. "" .. color .. ">")
end
end
function save_with_message()
if you.turns() == 0 then
crawl.sendkeys("S")
return
end
crawl.formatted_mpr("Save game and exit?", "prompt")
local res = crawl.getch()
if not (string.char(res) == "y" or string.char(res) == "Y") then
crawl.formatted_mpr("Okay, then.", "prompt")
return
end
crawl.formatted_mpr("Leave a message: ", "prompt")
local res = crawl.c_input_line()
c_persist.message = res
crawl.sendkeys(control("s"))
end
function load_message()
if c_persist.message and c_persist.message ~= "nil"
and c_persist.message ~= "" then
mpr("MESSAGE: " .. c_persist.message, message_color)
c_persist.message = nil
end
end
-----------------------------------
---- End leave message on save ----
-----------------------------------
}
flash_screen_message += Vehumet offers you knowledge
note_messages += Saving game
note_messages += Your magical essence is drained by the effort!
# travel_key_stop = false
###This should be for safe walking###
{
safe = you.feel_safe()
function update_safe()
local old_safe = safe
safe = you.feel_safe()
if not safe and old_safe then
crawl.mpr("Danger!", "warning")
crawl.more()
end
end
function ready()
update_safe()
end
}
#######################
### Mini Map Colors ###
#######################
tile_upstairs_col = green
tile_branchstairs_col = red
tile_downstairs_col = red
tile_door_col = #c27149
tile_wall_col = #4c4141
tile_explore_horizon_col = #919191
tile_floor_col = #0f0d0d
tile_item_col = #0f0d0d
tile_feature_col = #d4be21
tile_plant_col = #3e5a2f
tile_water_col = #0b5d79
tile_deep_water_col = #1212b3
tile_trap_col = #f447ff
tile_transporter_col = #ff5656
tile_transporter_landing_col = #59ff89
tile_lava_col = #5f0a00
rest_wait_both = false
############################
### Irrad Contam Warning ###
############################
{
function check_contam()
if you.contaminated() > 1 then
crawl.setopt("confirm_action += Irradiate")
else
crawl.setopt("confirm_action -= Irradiate")
end
end
function ready()
check_contam()
end
}