Wands and Selections

Discussion in 'General Modification' started by Rudy, Mar 18, 2013.

Remove all ads!
  1. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    On a related note there are several spells/scrolls that suffer from the same problem. Any spell that requires a selection upon casting will not work correctly for a wand/scroll.

    Modders at some point patched it a bit by, for example, having Summon Monster, Lesser Restoration Spells, and the like, make a random selection when cast from an item. While this is workable for Summon Monster, and thus the wand still useful, it makes wands of Lesser Restoration almost useless, since they restore a random ability each time they are used.

    I'm going to look into the possibility of creating a different item for each selection. Like, have a Wand of Lesser Restoration (Constitution), and a Wand of Resist Elements (fire), as opposed to having one that is random.

    If this isn't possible, though, my recommendation would be to remove the items.
     
  2. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
    Re: Creating a Spell Spreadsheet

    It might be better to leave them in than draw all the "why aren't there..." questions. Some modder down the road might try to put them back in and learn the hard way why they were taken out.
     
  3. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    Anyone have an idea of which file I should be looking into for the base code for such methods as condition_add_with_args(), for example?
     
  4. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    Seems it's likely in temple.dll. Did anyone decompile that thing already, before I have a go at it? I'd rather minimize my pain =D
     
  5. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    One possible but very clanky solution I've come up with, modeled after the custom spells on the Orb of Crystal Death, is to create additional spells for each choice. Like, create a "Resist Elements (fire)" and a "Resist Elements (acid)", etc. The wand of resist elements, then, could then trigger any of these "spells".

    This would be a fair amount of effort, though, just to get one wand working, and each spell would need its own set of custom spells.

    Continuing to look for other options.
     
    Last edited: Mar 18, 2013
  6. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    I think I have a solution for Lesser Restoration wands/scrolls. Since I have the ability to query the ability scores of the target, I can just cycle through healing the ability scores until it actually heals something (or cycles through all of them without healing anything). This would make the function of the wand/scroll version of Lesser Restoration to heal the first drained ability score that the target has, starting from Strength and going down. While this isn't exactly the same as being able to pick which ability score is targeted, it's a hell of a lot better than picking one randomly. Something similar should work for scrolls of restoration, but I'm not sure if the fact that restoration also restores level may make that track infeasible. Obviously I'll be testing this idea out before asking you to change anything :)

    As for resist elements, I think that one spell, at least, might actually be worth creating separate versions of, since it is such a commonly used/desired spell in this game. I'll have to create what is in effect 5 new spells. However, it will be of limited difficulty due to the fact that I can just copy the base spell and tweak it very slightly. So, creating the .py files will be easy. Where else would these new spells need to be added? Is Shiningted the right one to ask about that? (I noticed that he's been working on new spells).

    Currently, by the way, the wand of restoration (12400) is priced as a 2nd level spell (as it should be), but cast as a 1st level ranger spell. It should be cast as a 2nd level spell by default, if that's something you care to change in protos.tab.
     
  7. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    Good to know. And any informational input or suggestions are welcome.
     
  8. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Re: Creating a Spell Spreadsheet

    I kind of like the idea of function-specific spells in those cases, if they can be done in a way that doesn't appear cludgy or like an obvious workaround, but I tend to agree with Daryk that if we/you don't do that, we should just leave the others in. They're a bit different than say scrolls for spells that don't exist in the game, or not making a wand that wouldn't function properly.

    Just put on your scavenging outfit and start sifting through all the spell-related scripts in data/scr, and the text files in data/rules/spells. ;)

    Spells are largely script-controlled, so I think you'll find most of your answers outside temple.dll. You don't want to go there anyway unless you are a secret guru of the highest order. Some have gone mad trying. :twitch:

    Ted would be better to consult than me, yeah, but I can point you to a primer thread where new spells were made in the past: http://www.co8.org/forum/showthread.php?t=1929 Or try: http://www.co8.org/forum/showthread.php?t=3826

    There you can have a look at some of the attachments and see what exactly darmagon and jesse modded. There are quite a few files/aread of concern, from memory, but it's certainly doable.

    Confused ... 12401 is Wand of Restoration, cast as class_cleric 4 (like the scroll), unless I'm missing your meaning. 12400 is Wand of Resist Energy, class_ranger 1.
     
  9. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    Yeah, but they use several functions in common, which lead back to temple.dll. I'm not a secret guru, though. At least not of the highest order. So, I'll try to avoid that for the time being.

    Sorry, I was referring to the Wand of Resist Energy, which should be cast as a 2nd level spell since the wand is priced as a 2nd level spell.


    Thanks for all the other info. :)
     
  10. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Re: Creating a Spell Spreadsheet

    Ah okay, will change. Should it just be class_sorcerer 2 like the scroll?
     
  11. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    Yeah, that would work fine.
     
  12. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    So, I created the 5 different resist energy variants: they all work fine, no problem. However, incorporating them into wands is going to prove difficult for the following reason:

    You can only use wands (without UMD) if the spell is on your caster list, as I'm sure you're aware. So, I'm stuck between the choice of putting the five variants on the caster list of classes (and thus cluttering up their spell lists), and removing the requirement to have the spell on your spell list for the resist elements wand, thus allowing anyone to use the wand. I'm leaning toward the latter, but wondering if you have an opinion on that.


    ALSO: If anyone reading this can think of items other than Keoghtom's Ointment and the Orb of the Golden Skull that allow you to pick between multiple radial options when using them, please let me know.
     
  13. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    Solved the spelllist issue by giving the variants to classes as 10th level spells: they will never show up on the spelllists, but the classes will still count as having the spells for the purpose of using wands.

    It occurs to me that these Resist Energy variants can also be used to implement some domain spells properly: for example the Fire Domain grants Resist Energy, but only used to resist cold or fire.

    So, now I'm at the point where I can create wands/scrolls of, say, Resist Fire which do what they should do. Which isn't bad if I can't get farther than that.

    However, I'm now trying to figure out the radial thing for items (so that I can say have a wand of Resist Energy that lets you active the 5 different sub-spells. Wands resist radial options it seems. I can put the five variants on a "staff" (that looks like a wand), but that makes them cast at caster level 13, and the properties of staffs in game don't allow non-casters to use them. So, I repeat the request for examples of other items that use radial menus so I can try to figure out how they work.

    Keoghtom's Ointment has its own special property it seems; if I apply that to a wand it only allows me to choose 3 spells.
     
    Last edited: Mar 19, 2013
  14. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Re: Creating a Spell Spreadsheet

    You may find that much of that sort of thing is core engine stuff, unfortunately. I know the function of the radial menu largely is, though it sounds like you may be trying less to alter it than manipulate it. However your example of Keoghtom's Ointment is topical because there are indeed certain seemingly mundane or script-controlled functions that get routed into the .dll for various reasons. I've seen that many times - examples being the Tolub fight, paladin falling, and the operation of some items like the necklace that's supposed to make you immune from stinking cloud and cloudkill but doesn't.

    Anyway, Lareth's Club of Striking uses the radial menu to set charges, I think. You could probably look up any item that uses charges in that fashion in protos.tab, as it will generally be listed in weapon parameters.

    Otherwise you'll probably have to wait for the return of Ted to get much better info on it all, sorry. :(
     
  15. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Re: Creating a Spell Spreadsheet

    So, it appears that each item that has a radial menu has its own custom, hardcoded property. (This is horrific programing form, by the way; though I'm sure I don't need to tell you that.) Elemental Gems, staffs of striking, Keoghtom's Ointment, Orbs of Golden Death, each of which has a hardcoded number of radial options. One can make a radial wand using the Keoghtom's Ointment property, but ONLY for 3 options, since that is what Keoghtom's Ointment has. The other ones mentioned won't work for wands at all for various reasons.

    The only radial property for which you can set the number of radial options is UseableMagicStaff, but using that makes the item act like a staff, which won't work for these purposes.

    I'm going to fool around with the staff possibility more, see if there is anything to tweak. Otherwise, I'll be waiting for Shiningted's return. For now, wands are single spell only, unless you happen to want exactly three options (in which case you can borrow the Keoghtom's Ointment property).

    Anyway, worst case scenario is that I can make wands and scrolls for each of the five variants (though they would still have the base Resist Energy spell as the prerequisite to craft). Better to have a Scroll of Resist Fire than have a Scroll of Resist Energy that picks a random element.

    Finally, do you know what language temple.dll is compiled from? C? C++? Doesn't appear to be python, despite the presence of python elsewhere. Which is probably for the best; I never mastered python, but C I'm alright with.
     
Our Host!