How to create/modify spells?

Discussion in 'General Modification' started by seraglio, Apr 15, 2016.

Remove all ads!
  1. seraglio

    seraglio Member

    Joined:
    Oct 1, 2003
    Messages:
    45
    Likes Received:
    0
    Hi All. I've done a ton of searching and haven't found any clues on the structure of spells in ToEE. There are a lot of threads on new spells being released and fixes to them, but no posts on how its done that I can find. I see bits and pieces, but not the full picture of how to modify core parts of an existing spell (beyond the rules\spells dir python files), or create a new one from scratch. Hopefully the code is not in the .exe....

    Im a pretty experienced modder, in other games at least(but not a .dll hacker, not that dedicated)...I'm just looking for a general outline of the files involved and their relationship to each other. I'm sure I can fill in the blanks when I know how it works.
     
  2. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    If you're talking about spell effects, i.e. the things added with condition_add_with_args, those are indeed hardcoded and can only be modified/created via DLL hacks or through Temple+ (/shameless plug). See example here:
    https://github.com/GrognardsFromHell/TemplePlus/blob/master/TemplePlus/condition.cpp#L1584

    Otherwise I take it you've already seen the files in data\rules, data\mes and data\scr that are related to spells, and it's fairly straightforward to copy existing examples. I think the only thing you should be aware of is that you shouldn't use the spell enums beyond 802, and also that spells enums 600-699 are reserved for spell-like abilities (e.g. demon guardian summons) and spells enums at 700 or above are loosely reserved for item spells.
     
  3. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,654
    Likes Received:
    352
    What spells did you have in mind Seraglio?
     
Our Host!