Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Making new spells for ToEE

Sitra Achara

Sep 1, 2003
Codex 2012 Codex 2013 Codex 2014 PC RPG Website of the Year, 2015
Owing to interest in making new spells for ToEE, I'm opening this new thread :)
I'll be concentrating spell-making knowledge here, and also requests so I don't forget them. Please use the discussion thread for discussion.

Relevant files
  1. The python script file
    located in data\scr\
    Of the form spellxxx - abcd.py
  2. Spell rules entry file
    Located in data\rules\spells\
    Of the form xxx - abcd.txt
  3. Spell strings

  4. Particle effects

  5. Spell event sound effects

Note about irrelevant files:
You may notice there's also a file data\rules\SpellList.mes. It does nothing and is not used by the game. Might be an Arcanum leftover or something from early development.

There's also data\rules\spell_enum.mes. This one is irrelevant for Temple+

Starting Out

To start you off, take a look at existing files for spells that are similar to those you want to create. They are for the most part self explanatory, though there are some gotchas.

If there's nothing even remotely similar, odds are it's complicated to do and/or requires a high level of know-how and effort. As in months of learning and work, depending on how faithful you want to be to the spell. I believe all the low-hanging fruit have been picked by previous generations of modders, but who knows.

Spell Enums

Spell enums (or spell numbers) are unique identifiers for spell entries. They must match across the python script and rules\spells entry. They are also used to obtain the sound IDs from snd_spells.mes, and various other things.

Vanilla ToEE allows spell enums up to 801. In Temple+ this has been expanded up to 3999.

Reserved ranges
  • 600-699 are reserved for creature spell-like abilities.
  • 802-813 are reserved for internal Engine usage (these represent the empty spell slots for each level)
  • 850-900 reserved for Etharil
  • 901-950 reserved for Kosiciel
  • 951-999 reserved for Endarire
  • 1605-1614 are reserved for internal Engine usage (these represent the spell level labels).
  • 3000-3999 are reserved for spell-like class abilities (for example: the new Bard songs).
Besides that, most of the enums in the range of 1-800 are already taken by either pre-existing D20 spells or other people's mods (notably Rudy's mod). Hence you should take advantage of the expanded range in Temple+ if you wish to add new spells - please reserve enums for your personal use.

Cleric Domain Spells

There are 22 domains in ToEE (23 including "Domain Special" which is used by monsters).
There's a decent summary of available domain spells in Co8 8.1.0 here. You can also use the ingame wiki.

Additional Spells
Co8 has released a tragically obscure addon for 8.1.0 with expanded domain spells and several other new spells here. Noting this here to prevent duplicate work and also to maintain compatibility with that addon.

Python Scripts

Besides looking at other spell scripts, you can refer to the Scripting API page for information on available python methods (commands). It's also possible to request new ones for Temple+ :)

Other than that you can refer to general ToEE modding tutorials:
Ted's ToEE Modding Tutorials (available as PDF)
Co8 technical reference

It's also recommended to use a good IDE for editing scripts - you'll catch silly errors early this way and save yourself a bit of hair pulling. I personally recommend PyCharm (get the free Community edition).

Advanced - Making New Spell Effects

You will have probably noticed by now that a lot of spell effects are generated by a command of the form:
target_item.obj.condition_add_with_args( 'sp-XXX', spell.id, ... )

The 'sp-XXX' effects are all hardcoded. You can find a list of them here:

You can sometimes mix and match different effects to create new spells, and some things can be emulated with clever workarounds. But sometimes you won't find anything suitable, and workarounds can be be bug-prone or clunky.

It is fortunately possible to create completely new spell effects using Temple+'s Python Modifiers.

This is quite a bit more complex than normal ToEE scripting, but it's the only way you can have new AoE effects for example, or otherwise create spell effects that don't have 'baggage' from other spells.

Making Particle Systems

Tutorials for particle system making are available at the Co8:


There's also a particle system editor that Pugmeister made. It's a bit clunky and not quite full featured, but it has one huge advantage over the V2brute - you can see the result of modifications instantly.


Link: TemplePlusTools build 1186

To get it going you need to do the following:
  1. Use the non-co8 GoG DLL. I think patch2 version should work too but I'm not 100% sure.
    You can also use the Co8 dll but it will break the character model in the viewer.

  2. Extract the files from TemplePlusTools to your ToEE folder

  3. Copy the files from the Temple+ installation folder to your ToEE folder

    e.g. copy the contents of C:\Users\<YOUR USERNAME>\AppData\Local\TemplePlus\app-1.0.21 to your ToEE folder

  4. Open the particleeditor.exe file, and click Set Data Path.
    Choose the location with the toee folder with the GoG DLL.

  5. Open File → select a partsys.tab file

  6. After making edits to existing systems, you can copy them to clipboard and paste them into partsys.tab in a text editor

  7. Nag Pugmeister for more features ;)

Item Spells & Crafting

To define a scroll, wand or potion bearing the new spell, you need to add an entry to protos.tab. It's recommended to use the Co8 World Builder tool.

Take a look at a similar item and make a duplicate. You then change the relevant properties (click Cnfg and select Potion/Scroll to filter it down to relevant fields).


In particular, you need to change the content of the first Spell field.

The format is as shown above:

<SPELL NAME> is the spell name. It needs a matching entry in in rules\spell_enums.mes (in the 5000 range).
<SPELL LEVEL> is the spell level. The caster level is automatically set by the game to be spell level * 2 - 1
class_<X> is the class enum - currently it only supports the vanilla classes.

Publishing Your Files

So you've got your new spell in place, probably by editing the files from the Co8 folder. How do you ensure they don't clash with other people's contributions?

With Temple+, you can now create "extender files" for several things, including partsys.tab files, spell.mes and snd_spells.mes.

Packing files to .DAT

You can pack files to .dat files. See this for more information:

Other Relevant links

Last edited:

Sitra Achara

Sep 1, 2003
Codex 2012 Codex 2013 Codex 2014 PC RPG Website of the Year, 2015
Gah, I can't get the particle editor's preview to work. Guess I'll have to check the visuals in game.
What aspect of it didn't work?
Making cool looking spell effects is huge pain in the ass if you have to restart the game / viewer every time.
I'm unable to see the doll and the particles that I'd like to take a look at. Used a Co8-less ToEE install to check it.
Have you set the data path to the non-Co8 installation?
Yes, yes I did.

By the way should I treat Elemental Schools as domains, seeing how Sirocco uses both Air and Fire school, while having a Storms subdomain?

Odd. Is that a GoG installation or patch2 installation? Either way I'll nudge Pug to check out why it doesn't show the doll with the Co8 DLL.

Edit: Oh heck, now it works with my Co8 installation. So I guess the issue may be unrelated, now I have to find out why it didn't work in the first place :P

Domains are unrelated to spell schools. Other than that it's up to you since that spell is foreign to D20 anyway, so it's effectively user content.
Last edited:


Mar 29, 2016
I'm trying to get this running, I made a clone of my installation folder, added the files for temple+ and this to the same folder, directed the particle editor to that folder and clicked the particleeditor.exe, I got 2 "not responding" dialogue boxes, and nothing else.


May 1, 2015
I'm trying to get this running, I made a clone of my installation folder, added the files for temple+ and this to the same folder, directed the particle editor to that folder and clicked the particleeditor.exe, I got 2 "not responding" dialogue boxes, and nothing else.

Hey Allyx, did you get a crash dialog (stopped working) or one that says "not responding"?

This might be hard to track down, but I might give it a shot.


Mar 29, 2016
I'll try again tomorrow to get it working, I don't have time today unfortunately.

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Top Bottom