Changing spell damage by editing .py

Discussion in 'General Modification' started by Lemonade, Oct 4, 2003.

Remove all ads!
  1. Lemonade

    Lemonade Member

    Joined:
    Oct 4, 2003
    Messages:
    2
    Likes Received:
    0
    Hi. I tried to change the damage of magic missile but I don't have any good result (seems to stick to 1d4+1).

    Here is the change :

    > damage_dice = dice_new( '10d10' )


    I also tried this :
    target.obj.spell_damage( spell.caster, D20DT_UNSPECIFIED, damage_dice, D20DAP_UNSPECIFIED, D20A_CAST_SPELL, spell.id )

    but again no change.


    Any people with experience on damage editing ? (mini Howto will be helpfull)
     
  2. Sol Invictus

    Sol Invictus Beholder Watcher Veteran

    Joined:
    Aug 25, 2003
    Messages:
    325
    Likes Received:
    0
    Magic Missile is hard-coded into the game. Changing the damage integer in the .py file does nothing. However, doing that works with other spells (such as flame strike and cure light wounds)
     
  3. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    1
    I worked around this by changing the damage type From target.obj.condition_add_with_args to target.obj.spell_damage, just look in other spells for that types format. It not perfect(I'm sure it loses some resist checks or such) but it is a workaround. :)

    maybe it didn't work for you because of the way you put damage_dice I changed it to the normal dice.

    dice = dice_new( "1d1" )
    dice.bonus = 30

    # always hits
    target.obj.spell_damage( spell.caster, D20DT_FORCE, dice, D20DAP_UNSPECIFIED, D20A_CAST_SPELL, spell.id )

    Gave me always 31 damage..duh forgot to change it back at owrk hehe..
     
    Last edited: Oct 4, 2003
  4. Lemonade

    Lemonade Member

    Joined:
    Oct 4, 2003
    Messages:
    2
    Likes Received:
    0
    Your method 1d1+31 worked well. Thanks
     
Our Host!