Learning how to get a new spell in game

Discussion in 'General Modification' started by vampiricpuppy, Jun 7, 2009.

Remove all ads!
  1. wizgeorge

    wizgeorge Prophet of Wizardy

    Joined:
    Feb 19, 2005
    Messages:
    1,715
    Likes Received:
    2
    I got my EnhancedFireball working. Does 1d10 damage/level, radius is 30 and goes to 20th level. In my tests it did in excess of 70/80hp at 12thlevel. Oh the bugbears are in big trouble now. Bad thing is you have be 11th level to get it as it's a 6th level spell. It's right up there with chainlightning and disintergrate. But, I'm a fire mage and I like fireball.
     
  2. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Nicely done WizGeorge. :clap:
     
  3. wizgeorge

    wizgeorge Prophet of Wizardy

    Joined:
    Feb 19, 2005
    Messages:
    1,715
    Likes Received:
    2
    Thanks a lot. I know it's not RAW and game elgible, but I got tired of 7-12HP fireballs that the bugs always save against. Of course, they will probably save anyway, but if they don't then they are in trouble. Good spell for a higher level wizard for "crowd control" in the big fights. Doesn't do much against the higher level monsters with spell resistance, like a Balor or Z or the the node demons. It's not all-powerful but it's much better than a normal fireball. Works good. I'm surprised. Wasn't sure the engine would accept it.
     
  4. Emirkol the Chaotic

    Emirkol the Chaotic Proud Polytheist

    Joined:
    Aug 20, 2008
    Messages:
    1,436
    Likes Received:
    1
    OK, here's one, and before I get "jumped" on here, I don't have access to the 3.5 rules, so...
    :poke:

    Back in the BG games, lightning bolts could bounce and reflect until their maximum length was reached, causing great wailing and gnashing of teeth for some unfortunate parties.

    They don't seem to do that in ToEE.

    Did the rules change? Was it not implemented in ToEE?

    If the latter, could that be added to the game or is it one of those "source code" issues?
     
  5. wizgeorge

    wizgeorge Prophet of Wizardy

    Joined:
    Feb 19, 2005
    Messages:
    1,715
    Likes Received:
    2
    There is a lightning bolt spell but iirc it goes in a straight line and there can't be any obstuctions in the way, Only chain lightning bounces around to the selected targets I wasn't impressed with it, so I seldom have used it. I think everything directly in line with the bolt takes damage, but it doesn't bounce around. Chain lightning works good for up to 12 targets, but it's hard to get 12. Plus, it's kinda bugged and needs some scripting work. I think i'll take a look at it sometime.
    I looked at the scripts and lightning bolt is a one-time, narrow radius straight line shot. Chain lightning allows you to select numerous targets and bounces from target to target. I don't think there's much room for change in there. There is a Wand of Chain Lightning in the game, but it might get removed in future mods. Hope this helps.
     
    Last edited: Aug 22, 2009
  6. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Hmmm... I've always thought of lightenig bolt as something that should bounce off walls, but never tried it in ToEE. I just never use it.

    Strange that: it was always a staple in Pool of Radiance.
     
  7. wizgeorge

    wizgeorge Prophet of Wizardy

    Joined:
    Feb 19, 2005
    Messages:
    1,715
    Likes Received:
    2
    I'm trying to make a wand off of my enhanced fireball spell. I got the wand made and added to the wand section of craft wand, but the prereq's, cost, value and icon are for cure minor wounds? It says enhanced fireball but you get cure minor wounds. Going thru the files I don't remember seeing anything to edit/set that menu. I'm thinking this a game-engine, Temple.dll thing, if even possible. I can console it up but it doesn't appear on the radial menu and use item doesn't work either. It appears the engine wont allow scrolls/wands 6th level or higher. Thought I'd give it a try. At least I learned a lot about the different files. Lot of neat info in there.
     
  8. Emirkol the Chaotic

    Emirkol the Chaotic Proud Polytheist

    Joined:
    Aug 20, 2008
    Messages:
    1,436
    Likes Received:
    1
    Yeah, I'm aware of chain lightning and the effects, I just couldn't remember if the 3rd level Lightning Bolt spell bounced off walls and such like in BG. I was burned so bad by those rebounds that I subconciously played it safe with lightning in ToEE. :twitch:
     
  9. Mad Mardigan

    Mad Mardigan Member

    Joined:
    Nov 5, 2009
    Messages:
    6
    Likes Received:
    0
    UPDATED 11/12
    I uploaded a new py file that fix 2 typos and changed the spell_enum.mes below.
    ----
    I managed to get Lesser Vigor working. When I went to implement the rest of the Vigor line, I ran into an interesting issue. There appears to be some caching mechanism, other than the pyc files, that is keeping track of old spell numbers. I moved the numbers from this spell down to 745 and now I see the references for the previous 805 number.

    Now, the spell memorization screen says there is a missing mes\spell.mes line 805 and below a missing mes\spell.mes 5805.

    Any ideas on where this older information is being stored?
    I fairly certain that I cleaned up all my references and searched all files in the toee directory for the target strings.

    Thanks,
    Mad Mardigan

    BTW, you guys are doing a fantastic job with the Co8 mod, keep it up!


    Here are the rest of my notes for working on inserting a new spell.

    ==========
    Testing
    Open Console with Shift-~
    from Co8 import *
    partyhpset(100)
    give 4220, holy mace
    create 14081, skeleton gnoll
    ==========

    NOTE: Please start a new game for the new spell to appear in the Memorization dialog.

    data\mes\spell.mes
    {805}{Lesser Vigor}
    {5805}{Lesser Vigor}

    NOTE: The key for the second entry below is a "5" preceeding the spell_key_value=745
    data\rules\spell_enum.mes
    {805}{spell_lesser_vigor}
    {5805}{Lesser Vigor}
    {20805}{TAG_SPELLS_LESSER_VIGOR}//spell_lesser_vigor
    IMPORTANT: Leave blank line at end of file.

    NOTE: The first digits of the SpellList.mes value is the same as the first digits of the spell.mes above.
    In this case "805"

    data\rules\SpellList.mes
    // Lesser Vigor
    {805000}{School: Conjuration (Healing)}
    {805001}{Level: Clr (1), Drd (1)}
    {805002}{CastComponents: V, S}
    {805010}{}
    {805011}{}
    {805015}{[Begin], Type: NoOp}
    IMPORTANT: Leave blank line at end of file.


    NOTE: Do not include the "FILE_BEGIN" and "FILE_END" lines in the file.
    data\rules\spells
    Created file "805 - Lesser Vigor.txt"
    FILE_BEGIN
    School: Conjuration
    Subschool: Healing
    Level: Clr 1
    Level: Drd 1
    Component: V
    Component: S
    Casting Time: 1 action
    Range: Touch
    Saving Throw: None
    Spell Resistance: Yes
    Projectile: No
    flags_Target: Range
    inc_flags_Target: Self
    inc_flags_Target: Other
    exc_flags_Target: Dead
    exc_flags_Target: Non-critter
    mode_Target: Single
    min_Target: 1
    max_Target: 1
    radius_Target: 0
    ai_type: ai_action_heal_light
    FILE_END

    data\scr
    Created File "Spell805 - Lesser Vigor.py
    FILE_BEGIN
    from toee import *

    def OnBeginSpellCast( spell ):
    print "Lesser Vigor OnBeginSpellCast"
    print "spell.target_list=", spell.target_list
    print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
    game.particles( "sp-conjuration-conjure", spell.caster )

    def OnSpellEffect( spell ):
    print "Lesser Vigor OnSpellEffect"

    spell.duration = 10 + min( 5, spell.caster.stat_level_get( spell.caster_class ) )

    target = spell.target_list[0]

    # Use any spell effect with a duration that you will not be using while under
    # the effects of lesser vigor
    target.obj.condition_add_with_args( 'sp-Barkskin', spell.id, spell.duration, 0 )
    target.partsys_id = game.particles( 'sp-Cure Minor Wounds', target.obj )
    dice = dice_new("1d1")
    target.obj.heal( OBJ_HANDLE_NULL, dice )
    target.obj.healsubdual( OBJ_HANDLE_NULL, dice )

    heal_count = 0
    while(heal_count < spell.duration - 1):
    game.timeevent_add( heal_later, ( target, spell, dice ), ((heal_count + 1) * 6000) )
    heal_count = heal_count + 1
    # end while

    def OnBeginRound( spell ):
    print "Lesser Vigor OnBeginRound"

    def OnEndSpellCast( spell ):
    print "Lesser Vigor OnEndSpellCast"

    def heal_later( target, spell, dice ):
    target.obj.heal( OBJ_HANDLE_NULL, dice )
    target.obj.healsubdual( OBJ_HANDLE_NULL, dice )

    FILE_END


    I DID NOT ENTER THE help.tab ENTRY for the 805 renumbering.
    data\mes\help.tab
    FILE_INSERT_LINE_BEGIN
    TAG_SPELLS_LESSER_VIGOR TAG_SPELLS TAG_CLERIC_1 TAG_DRUID_1 Lesser Vigor ~Conjuration~[TAG_MAGIC_SCHOOLS_CONJURATION] (Healing)
    Level: ~Clr~[TAG_CLERICS] 1, ~Drd~[TAG_DRUIDS] 1

    This spells give the target Rapid Healing 1 for 10 + caster level rounds, maximum 15 rounds.
    FILE_INSERT_LINE_END
     

    Attached Files:

    Last edited: Nov 13, 2009
  10. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    See this is the other reason Willow was so damn good (besides the fact they used real hobbits). Thanks dude! Should certainly be in 5.6.2 :thumbsup: Any preferences on sound effects?
     
  11. Mad Mardigan

    Mad Mardigan Member

    Joined:
    Nov 5, 2009
    Messages:
    6
    Likes Received:
    0
    I was using the Cure Minor/Light Wounds effects, any heal-ish sound would be great.

    Also curiously, if you use a heal value of -1, you take non-lethal and if you take enough of it, you will pass out.
     
  12. Mad Mardigan

    Mad Mardigan Member

    Joined:
    Nov 5, 2009
    Messages:
    6
    Likes Received:
    0
    I updated the Lesser Vigor spell, fixed typos/syntax errors in the py file. I am working, slowly, on the getting Lesser Vigor, Vigor, Greater Vigor working as actual memorizable spells in the game. I have been trying different methods of registering the game events needed for the ticks. I have confirmed that a least 90+ game events work at the same time, that would be 4 Vigors running concurrently. After that I want to get Mass Lesser Vigor and Healing Circle working.

    1) What range of spell numbers are available or what numbers would you prefer? I would expect a range like 810-819 or something similar.

    2) Why do wands have 20 charges instead of 50 charges?

    3) Is there a way to turn on logging for the python engine?

    4) I'd also like to add pearls of power. How would I access a character's spell list and add the spells that had already be cast to the radial menu so that spell could be re-memorized? Any leads would be greatly appreciated.

    5) Do you have any tips on how do multiple targets like bless or sleep?

    Thanks,
    Mad Mardigan
     
    Last edited: Nov 13, 2009
  13. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Ooo, ok. I have been trying to get those going too from your original file but got sidetracked by something. Use 810-819 by all means.

    I doubt these 'pearls of power' could be done but to see something similar, check out the spell 'Resonance': it rememorises the whole spell list. I don't know you can find individual spells though, Liv had a long look to check what NPC spellcasters had left to use and couldn't do it.
     
  14. Mad Mardigan

    Mad Mardigan Member

    Joined:
    Nov 5, 2009
    Messages:
    6
    Likes Received:
    0
    Here are the spells: Lesser Vigor, Vigor, and Greater Vigor setup at spell id 770, 771, and 772 respectively. For some reason, when I make these modifications, the spells do not appear in a new game. Any ideas for things that I can try to get the spells to appear would be much appreciated. I tried them at 810, 811, and 812. They also did not appear there. I figured that I would archive the files and upload so others could try if they are interested. I'll keep trying other settings. I have gotten a spell to appear at 745 previously.

    If you guys can think of anything to try give a shout.

    Thanks,
    Mad Mardigan
     

    Attached Files:

  15. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    Having some issues myself going back to VP's spells - I'll see what I can do.
     
Our Host!