Skip to content
Dude McDude edited this page Aug 10, 2019 · 20 revisions

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 data\mes\spell.mes
  4. Particle effects data\rules\partsys0.tab data\rules\partsys1.tab
  5. Spell event sound effects data\sound\snd_spells.mes

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 (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:

Conditions List

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.

Particle Systems

Tutorials for particle system making are available at the Co8:

http://www.co8.org/community/index.php?threads/particle-system-tutorial-2016-edition.11973/ http://www.co8.org/community/index.php?threads/particle-system-tutorial.7317/

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.

[Download particle editor.]https://ci.appveyor.com/api/buildjobs/ir38w9u4c2cyppau/artifacts/TemplePlusTools-0.1.0-pre%2B1186.zip

See here:

https://rpgcodex.net/forums/index.php?threads/making-new-spells-for-toee.111837/

Clone this wiki locally