Skip to content
kahlen-tech edited this page Nov 4, 2026 · 1 revision

Description

Casts one spell for you, from the command line, working out the preparation and cambrinth charges. You give the spell, and optionally the total mana and a target. You can save your favourite settings for a spell, or under an alias, so that later a plain ;cast <spell> uses them.

It finds the spell by its abbreviation in base-spells.yaml, or else by the start of its name: ;cast bs and ;cast blood both cast Blood Staunching, but ;cast bl casts Blessing of the Fae. If nothing matches: "CAST: ERROR: can't find any spell matching spell!"
When it's done, it shows the spell and the mana, and "Succeeded!" or "Failed!".

Settings

YAML Settings

Mana and cambrinth

cambrinth_num_charges: 4
prep_scaling_factor: 0.85
cambrinth_distribute_charges: false
cambrinth_items:
- name: armband
  cap: 32
  stored: false
Setting Default Purpose
cambrinth_num_charges 4 How many cambrinth charges to split the mana into, when you don't pass -c.
prep_scaling_factor 0.85 With discern as the mana: the share of the discerned maximum to use.
cambrinth_distribute_charges false Let each cambrinth item take as much as its cap allows, in the order you list them, the same way the waggle scripts charge. Without it, charges are all the same size and each item is filled before the next; a charge too big for an item skips it.
cambrinth_items Your cambrinth: each with its name, its cap and whether it's stored (held) rather than worn.
cambrinth, cambrinth_cap, stored_cambrinth armband, 32, false The older single-item form, used when cambrinth_items has no name.
  • Without a mana amount, it casts at the spell's minimum preparation, unless you've saved an amount.
  • The preparation is the total mana divided evenly over the preparation and the charges, but never below the spell's minimum. Mana that won't fit in your cambrinth goes into the preparation.
  • Cyclic and ritual spells never use cambrinth: all the mana goes into the preparation.

Checks before casting

cast_attunement_threshold: 50
cast_concentration_threshold: 50
cast_fatigue_threshold: 30
cast_threshold_delay: 15
ritual_focus: focus
Setting Default Purpose
cast_attunement_threshold Don't cast with less mana (attunement) than this.
cast_concentration_threshold Don't cast with less concentration than this.
cast_fatigue_threshold Don't cast with less fatigue (stamina) than this.
cast_threshold_delay 15 With -wait: seconds between checks.
ritual_focus The focus to use for ritual spells. Without one, it won't cast a ritual: "CAST: ERROR: will not cast a ritual spell without a ritual focus!", unless you pass -force.

Below a threshold, it says "CAST: Cast failed." with your numbers, and doesn't cast. With -wait, it waits until you're back above them. -force skips these checks.

Argument Settings

;cast <spell> [mana] [target] [options]

Argument Purpose
spell The spell's abbreviation, the start of its name, or one of your saved aliases. Always first.
mana The total mana, preparation and charges together. Or discern, to DISCERN the spell and use prep_scaling_factor of the maximum.
target What to cast at, e.g. a creature, a player, engaged, or a body part for a healing spell. For a Targeted Magic spell, it FACEs the target before preparing.
-c_N_ or -charge=N Split the mana into this many cambrinth charges. -c0 means no cambrinth.
-c_N_s or -charge=_N_s Use as many small charges as fit in N seconds of charging.
-p_N_ or -prep_time=N Cast after this many seconds, instead of waiting until the spell is fully prepared.
-r=item or -runestone=item Invoke this runestone instead of preparing. No spaces: write selenite.runestone. Runestones always prepare at 20 mana.
-s or -symbiosis Use your researched symbiosis.
-f or -force Cast whatever the checks say.
-w or -wait Wait until you're back above your thresholds, instead of failing.
-save Don't cast: save these settings as this spell's defaults.
-save=alias Don't cast: save them as an alias, e.g. a snap-cast version. An alias can't be the same as a spell's abbreviation.
-clear Don't cast: delete the saved settings for this spell or alias.
-test Don't cast: show how it would cast.
-yaml Don't cast: show this spell's settings as YAML you can put in a waggle set.
-d or -debug Show debug messages.
  • Settings you give on the command line beat saved ones, and saved ones beat the defaults.
  • To stop using a saved -s, -f or -w, use -clear and save again. Despite the script's own notes, -!s doesn't override a saved -s, and -!f and -!w aren't accepted at all.
  • Saved settings and aliases are kept in your UserVars, not your YAML.

Usage

;cast bs casts Blood Staunching at its minimum preparation.

;cast ags 50 casts Aggressive Stance with 50 mana.

;cast gz 30 troll casts Gar Zeng at a troll with 30 mana.

;cast hw 15 head casts Heal Wounds on your head with 15 mana.

;cast ts 67 -c4 prepares Tenebrous Sense at 14 mana and charges 14, 13, 13 and 13.

;cast nb 42 -c2 engaged -save saves those settings, so later ;cast nb casts Nissa's Binding the same way, and ;cast nb 30 changes only the mana.

;cast inno 5 -c0 -p0 -save=innos saves a snap cast of Innocence as ;cast innos.

;cast heal discern -test shows how it would cast Heal, without casting.

Clone this wiki locally