The sorcery tools allow you to have multiple grimoires in your codex. Some grimoires, like games and z-rejected, contain spells that aren't found in the standard test and stable grimoires. However, if you have both test and stable in your codex, or some other spell exists in two grimoires in your codex, how does sorcery decide which grimoire to cast from?

The grimoires you have installed are indexed, or numbered. When you cast a spell, sorcery searches the grimoires in their indexed order and uses the spell from the first grimoire it is found in. scribe index will list the grimoires in your codex in the order sorcery will search them:

In this case, the only spells that will ever cast from test, are those that do not exist in any of the other grimoires. This could be useful if you want to try spells out that haven't been pulled into the stable grimoire yet. When they do get pulled into stable, sorcery will use the spell in the stable grimoire for all future updates.

If you wanted to cast a spell from test, that also exists in stable, you can do this using a personal grimoire and the scribbler tool. First create a directory somewhere for your personal grimoire: mkdir /home/casey/spells. Edit /etc/sorcery/local/grimoire and add a line with the location of your personal grimoire:

Now you need to make sure that your personal grimoire is searched first. This can be done using scribe swap <grimoire1> <grimoire2>. You can swap the grimoires around until you have the order you want. Otherwise, you can just edit /etc/sorcery/local/grimoire and change the numbers to the order you want. After moving grimoires around, you can use  scribe index  to check your ordering:

Now, my personal grimoire spells will be searched first. Then stable, games, z-rejected and finally test. In order to cast a spell from the test grimoire, I can use scribbler to add that spell from test to my personal grimoire. scribbler will create a symlink in the personal grimoire to the spell directory in the test grimoire. This ensures that sorcery will always cast that spell from the test grimoire. For example,  scribbler add gaim test spells  will add a link in my personal grimoire, to gaim in the test grimoire. You can use  gaze versions gaim  to test this. It will list all versions of gaim available in all grimoires:

  Grimoire    Section  Spell  Grimoire Version  Installed Version  
  --------    -------  -----  ----------------  -----------------  
  spells      chat-im  gaim   0.77              0.77               
  stable      chat-im  gaim   0.76              -                  
  games       -        -      -                 -                  
  z-rejected  -        -      -                 -                  
  test        chat-im  gaim   0.77              -                  

This was thrown together rather quickly, so feel free to make corrections or clarifications!

last edited 2005-12-21 00:20:09 by Richard Johns