Tome Settings - elanthia-online/dr-scripts GitHub Wiki

Description

Studies a scholarship tome (the books sold in shops like Tomes of Lore) to train Scholarship. It works in one of two ways:

  • Passive. It stays running in the background. It only studies while one of your passive_scripts is running and it's safe to, getting the tome out and putting it away as needed.
  • Active. It sits down and studies over and over until Scholarship reaches your goal, then stands up and exits.
Your tome must be listed in your gear:, or the script won't run. This keeps the tome from being lost out of your hands.
It isn't stopped by ;kill all; use ;kill tome. When it stops, it puts the tome away if it's in your hands, and stands you up (unless ;safe-room is running).

Settings

YAML Settings

All of these go under tome_settings: unless noted.

Set every key you care about. base.yaml comes with a tome_settings block, but as soon as you add your own tome_settings (and you must, to set tome_name), yours replaces it completely. Anything you leave out gets the script's own default, shown in the tables below, not the base.yaml value. In particular, leaving out passive means active mode, and leaving out quit_early means it's off. The Full example below is the base.yaml block, ready to copy.

Your tome

tome_settings:
  tome_name: spiritwood tome
gear:
- :adjective: spiritwood
  :name: tome
Setting Default Purpose
tome_name Required. Your tome's adjective and noun, as used in study my <tome_name>. It must match an entry in your gear: (adjective and name, any case), or the script stops with a message telling you to add it. With quit_early, spell it exactly as in the table under When to stop.

When to stop

tome_settings:
  scholarship_limit: 30
  quit_early: true
  second_to_last_page:
Setting Default Purpose
scholarship_limit 34 The Scholarship mindstate to study up to. Once it's reached, active mode exits, and passive mode waits until Scholarship drains below it.
quit_early false Put the tome away just before the last page. Finishing the last page costs 50% of your concentration for not much Scholarship at higher ranks.
second_to_last_page For quit_early: the opening words of your tome's second-to-last page. Only needed for a tome not in the table below, but if set it's used for any tome. It's read as a regular expression, so leave out punctuation like ?, ( or *, or put a \ before it.

Without quit_early, it reads to the end ("Having finished your studies,"). With it, it watches for the start of the second-to-last page, and these tomes are built in:

Tome
tel'athi treatise
mikkhalbamar manuscript
spiritwood tome
field guide
brinewood book
kuwinite codex
smokewood codex
togball manual
weathered book
worn book
Dwarven codex
radiant treatise
ox-hide memoir
songsilk memoir
modest-sized biography
research journal
demonbone grimoire
darkspine grimoire
The names must match exactly, capitals included: Dwarven codex has a capital D, and all the others are lowercase.

With quit_early: true, a tome_name that isn't in this table, and no second_to_last_page, the script errors as soon as it starts.

Passive or active

tome_settings:
  passive: true
  passive_scripts:
    - appraisal
    - attunement
    - first-aid
    - outdoorsmanship
    - crossing-repair
    - task-forage
Setting Default Purpose
passive false true: run in the background and study only when it's safe to (see below). false or left out: active mode. The active argument always means active mode.
passive_scripts Scripts it's safe to study alongside. Only list scripts that leave you at least one hand free. Required with passive: true. Without it, passive mode never studies, and doesn't say why.

In passive mode, it studies only when all of these are true:

  • Scholarship is below scholarship_limit.
  • You aren't hidden or invisible.
  • You have a hand free, or the tome is already in one.
  • You aren't in a room on your sanowret_no_use_rooms list.
  • One of your passive_scripts is running.
  • Your concentration is full.

If any of these stops being true while you're reading (for example, the passive script finishes), it puts the tome away and waits again. Your other scripts are paused for a moment each time it gets the tome out, starts studying or puts it away, so they don't trip over each other. Passive mode never exits by itself.

In active mode, it sits down (unless ;safe-room is running) and waits only for full concentration before each study. It doesn't check your hands, the room or other scripts, so start it with a hand free, somewhere it's safe to study. Once Scholarship reaches scholarship_limit it stands up and exits. If it's already there when you start, it exits right away.

Where not to study

sanowret_no_use_rooms:
  - Carousel Chamber
  - Carousel Booth
  - 1900
  - Knife Clan, Triage

Top level, and shared with sanowret-crystal. In passive mode, it won't study in these rooms. Each entry is part of a room title, or a room id. The list above is the base.yaml default; if you set your own, it replaces this one, so copy any entries you want to keep.

What each study does

There are no settings for these; this is what to expect.

  1. Waits until it should study and your concentration is full.
  2. Gets your tome out and STUDYs it.
  3. If the game says you can't study right now (you're unable to focus, in combat, in the middle of magical research, short of concentration, or somewhere that isn't allowed), it puts the tome away, waits 10 seconds and tries again.
  4. Reads for at least 10 seconds. Then it keeps reading until the tome is finished (or the second-to-last page, with quit_early), until your concentration is full again, or until it should stop.
  5. Puts the tome away and starts over.

If it can't get your tome out, it tries again straight away, over and over. Make sure get my <tome_name> works, and keep a hand free in active mode.

Full example

tome_settings:
  tome_name: spiritwood tome
  quit_early: true
  scholarship_limit: 30
  passive: true
  passive_scripts:
    - appraisal
    - attunement
    - first-aid
    - outdoorsmanship
    - crossing-repair
    - task-forage
# add this to your existing gear list
gear:
- :adjective: spiritwood
  :name: tome

Old settings

tome_settings: debug, which is in base.yaml, isn't read. Use the debug argument instead.

Argument Settings

Argument Purpose
active Study actively until scholarship_limit, then exit, whatever passive says.
debug Show your tome settings, and which passive script it's studying alongside.

Usage

;tome

;tome active

;tome debug

Running it in the background

With passive: true, start ;tome once and leave it running. It studies whenever one of your passive_scripts is running, and puts the tome away when none are.

Safe Room

Study while you wait to be healed:

tome_while_healing: true

While ;safe-room waits for healing, it runs ;tome active, and stops it afterwards if safe-room started it.

T2

- skill: Scholarship
  start: 10
  scripts:
  - tome active
⚠️ **GitHub.com Fallback** ⚠️