# DCSS trunk rc — CDI webtiles # Built section by section from docs/upstream/options_guide.txt ############################################################################## # Lua hook dispatcher ############################################################################## # Crawl only calls one global ready(); sections register into this list # instead of redefining it. { ready_hooks = {} function ready() for _, hook in ipairs(ready_hooks) do hook() end end } ############################################################################## # 1 - Starting screen ############################################################################## # No species/background/weapon/combo pre-selection: pick in the menu. default_manual_training = true autopickup_starting_ammo = true suppress_startup_errors = false # Open the skill menu once on a fresh character (turn 0), including after # reconnecting before the first turn has passed. { local skills_menu_shown = false table.insert(ready_hooks, function() if skills_menu_shown or you.turns() ~= 0 then return end skills_menu_shown = true crawl.do_commands({"CMD_DISPLAY_SKILLS"}) end) } ############################################################################## # 3-a - Picking up and dropping ############################################################################## # autopickup always replaces the whole set (no +=), so restate the defaults. # Trunk default is $?!+"/♦ ; added % (talismans). # autopickup_exceptions: trunk defaults kept — only ever use += / ^= on it. autopickup = $?!+"/%♦ ############################################################################## # 3-e - Viewport: defaults ############################################################################## ############################################################################## # 3-f - Travel and exploration ############################################################################## rest_wait_both = true # Cap shift+dir runs at line-of-sight radius (default 15). longwalk_range = los # travel_avoid_terrain: off — it makes terrain impassable for explore/travel. ############################################################################## # 3-g - Command enhancements ############################################################################## # Melee auto-swaps between weapons kept in slots a and b. auto_switch = true warn_hatches = true menu_arrow_control = false # ^F results tag items autopickup would take with {autopickup}. autopickup_search = true autofight_caught = true # Tab also uses the quivered action on targets out of melee range. autofight_fires = true ############################################################################## # 3-h - Message and display ############################################################################## hp_warning = 33 # hp/mp: last matching threshold wins (list highest first). hp_colour = 66:yellow, 33:red mp_colour = 66:yellow, 33:red # stats: first matching threshold wins (list lowest first); 0 is always lightred. stat_colour = 3:red, 5:yellow msg_webtiles_height = 12 # Show player turns (the scoring count) instead of game time. show_game_time = false always_show_zot = true always_show_doom_contam = true # Flavour-only messages when walking on fountains / food caches. food_snacking_frequency = 0 fountain_line_frequency = 0 # --more-- the first time these come into view. monster_alert += uniques, unusual, nasty # Extra --more-- prompts, on top of trunk's ~90 defaults. # Every pattern below was checked against trunk's message text. more := force_more_message # Your status got worse more += You feel yourself slow down more += Your limbs are stiffening more += You are mesmerised more += You become entangled in the net more += You are caught in a web more += You feel your attacks grow feeble more += mark forms upon you more += You feel you are being watched by something more += You are encased in ice more += You feel haunted more += song draws you forwards more += Terrible wounds more += you terribly more += surroundings become eerily quiet more += strangely unstable more += Ouch! That really hurt! more += You miscast more += You fail to use your ability more += Your surroundings flicker more += enter a teleport trap # Your buffs are running out more += Your transformation is almost over more += You are starting to lose your buoyancy more += You start to feel a little slower more += Your icy armour starts to melt more += You start to feel less resistant more += You flicker back into view more += Your time is quickly running out more += life is in your own # Monsters more += zaps a wand more += is no longer charmed more += goes berserk # Gods more += wrath finds you more += You feel a surge of divine spite # Progress more += raining target .* reached more += You have finished your manual more += Your pack is full # HP/MP change announcer: one line per turn when HP or MP changes, e.g. # HP -12 (44/80) MP -3 (5/20) # Big hits are highlighted and force a --more--. Heals and MP gains are only # shown for single-turn changes, so resting and travel stay quiet. # Note: crawl ends a { } Lua block at any line whose trimmed text is "}", # so never put a lone closing brace inside one. { local announce = { massive_pct = 20, -- one turn's damage >= this % of max HP heal_min_pct = 10, -- smaller heals are not shown (natural regeneration) mp_min_pct = 20, -- smaller MP-only changes are not shown } -- end announce local last = nil local function delta(label, d, cur, max, colour) return string.format("<%s>%s %+d (%d/%d)", colour, label, d, colour, cur, max) end local function rescaled(label, prev_cur, prev_max, cur, max) return string.format("%s %d/%d -> %d/%d", label, prev_cur, prev_max, cur, max) end table.insert(ready_hooks, function() local hp, mhp = you.hp() local mp, mmp = you.mp() local turn = you.turns() local prev = last last = { hp = hp, mhp = mhp, mp = mp, mmp = mmp, turn = turn } if prev == nil then return end local single_turn = turn - prev.turn <= 1 local parts = {} local massive = false if mhp ~= prev.mhp then table.insert(parts, rescaled("HP", prev.hp, prev.mhp, hp, mhp)) elseif hp < prev.hp then local d = hp - prev.hp massive = -d * 100 >= mhp * announce.massive_pct table.insert(parts, delta("HP", d, hp, mhp, massive and "lightred" or "red")) elseif hp > prev.hp and single_turn and (hp - prev.hp) * 100 >= mhp * announce.heal_min_pct then table.insert(parts, delta("HP", hp - prev.hp, hp, mhp, "lightgreen")) end if mmp ~= prev.mmp then table.insert(parts, rescaled("MP", prev.mp, prev.mmp, mp, mmp)) elseif mp ~= prev.mp then local d = mp - prev.mp local big = math.abs(d) * 100 >= mmp * announce.mp_min_pct if (#parts > 0 or big) and (d < 0 or single_turn) then table.insert(parts, delta("MP", d, mp, mmp, d < 0 and "cyan" or "lightcyan")) end end if #parts == 0 then return end if massive then table.insert(parts, "MASSIVE DAMAGE") end crawl.formatted_mpr(table.concat(parts, " ")) if massive then crawl.more() end end) } ############################################################################## # 3-i - Menu and message colours: trunk defaults (revisit after play) ############################################################################## ############################################################################## # 3-j - Quiver and firing: trunk defaults ############################################################################## ############################################################################## # 3-k - Message channels: trunk defaults # 3-l - Inscriptions: trunk defaults ############################################################################## ############################################################################## # 3-m - Macros and keybinds ############################################################################## # Numpad: trunk defaults (1-9 move, 5 rest, shift+numpad runs). # x = level map, X = everything in view, opened in examine mode # (Ctrl-X then '!'; plain Ctrl-X still opens it in travel mode). # Look around (default x) is left unbound. # Numpad 0 = autoexplore (o still works). # Numpad + = wait a turn (. and numpad . still work). # Numpad - = swap weapons a/b (' still works). bindkey = [x] CMD_DISPLAY_MAP macros += M X ===full_view_examine bindkey = [NP0] CMD_EXPLORE bindkey = [NP+] CMD_WAIT bindkey = [NP-] CMD_WEAPON_SWAP # Queue the menu's cycle-mode command rather than a literal '!'. If nothing is # in view the menu never opens; flush_input then drops the queued command # (process_keys' '!' sat in a buffer flush_input can't reach, and fell through # to annotate level). Even unflushed, a menu command is rejected at the main # prompt instead of running anything. { function full_view_examine() crawl.do_commands({"CMD_FULL_VIEW", "CMD_MENU_CYCLE_MODE"}) crawl.flush_input() end } ############################################################################## # 3-n - Tiles (webtiles) ############################################################################## tile_show_demon_tier = true tile_viewport_scale = 1.5 tile_map_scale = 1.3 tile_level_map_hide_messages = true tile_web_mouse_control = false ############################################################################## # 4 - Character dump and notes ############################################################################## dump_message_count = 50 dump_order += kills_by_place note_hp_percent = 33 note_all_skill_levels = true user_note_prefix = >> ############################################################################## # 5-a - Miscellaneous ############################################################################## # '*' and '/' are not Ctrl/Shift prefixes. use_modifier_prefix_keys = false