Spells Not Working

Discussion in 'Negative Energy Plane' started by Sol Invictus, Sep 25, 2003.

Remove all ads!
  1. Sol Invictus

    Sol Invictus Beholder Watcher Veteran

    Joined:
    Aug 25, 2003
    Messages:
    325
    Likes Received:
    0
    ARG. I just edited the .py files and placed them in the proper directory and as a test, I made it so that Magic Missile did 2d10 damage.

    Guess what? It didn't work!

    Within the directory, little .pyc files appeared for every spell I cast, including ones I didn't bother to edit.

    What's the deal with that? Hmm. It might have something to do with the .txt files in rules/spells as well so I'll check that out.
     
  2. Nomad_Wanderer

    Nomad_Wanderer Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    305
    Likes Received:
    0
    Someone mentioned that the python files may have to be compiled..

    What were in the PYC files.. were they openable in a text editor?
     
  3. Sol Invictus

    Sol Invictus Beholder Watcher Veteran

    Joined:
    Aug 25, 2003
    Messages:
    325
    Likes Received:
    0
    Whoever it was (I think it's Chrisbeddoes), he's right. And no, they weren't readable in notepad. How do you compile them?
     
  4. Vaevictis666

    Vaevictis666 Established Member

    Joined:
    Sep 25, 2003
    Messages:
    114
    Likes Received:
    0
    .py = python
    .pyc = python compiled?

    Just a thought.
     
  5. Sol Invictus

    Sol Invictus Beholder Watcher Veteran

    Joined:
    Aug 25, 2003
    Messages:
    325
    Likes Received:
    0
    Makes sense. Need a compiler, though - or I'm going nowhere with the spells.
     
  6. Dhoom

    Dhoom BIG Troll Berserker

    Joined:
    Sep 25, 2003
    Messages:
    139
    Likes Received:
    2
    I was the one hacking away on python. ;)

    I also posted about dumping raw .py files into the dirs, and having the game dump .pyc files into it.

    A .pyc file is a compiled .py file.

    I'm going to have to compule the .py code bits, hope I use the same compiler (I think they're just using the default 2.2 compiler), and hope it works :D

    One of the things on my list.

    I use Active Python 2.2.2... ToEE used Python 2.2.1... so, I should be able to compile these.

    Sadly, Python isn't my forte... PERL is. I've been teaching myself Python, because it's interesting... <g> I need to learn faster.

    Running a quick test: Changing the OF_OFF variable in the kids_off.py file to OF_ON, gonna compile it, and drop the .pyc in the dir.

    biab.
     
  7. Dhoom

    Dhoom BIG Troll Berserker

    Joined:
    Sep 25, 2003
    Messages:
    139
    Likes Received:
    2
    Yeah.. all the spells, and spell like effects, are in python... they do reference the .mes files, though...
     
  8. Sol Invictus

    Sol Invictus Beholder Watcher Veteran

    Joined:
    Aug 25, 2003
    Messages:
    325
    Likes Received:
    0
    Tell me if you get any spells working, and how the heck you did it. I'm rattling my brain here.
     
  9. Dhoom

    Dhoom BIG Troll Berserker

    Joined:
    Sep 25, 2003
    Messages:
    139
    Likes Received:
    2
    S C O R E !!!!!!!

    I just turned Cure Light Wounds into a 0d0 heal spell :)

    Opened up the .py file for Cure Light Wounds, changed the dice from 1d8 to 0d0, saved the file into data\scr\ (still as a .py file), ran the game, and used a Potion of Cure Light Wounds... Animation, Sound... and no damage healed on my wounded fighter. Had the cleric cast cure light wounds, no heal... cast cure moderate, healed :)

    We have a winner! :D

    Get crackin', Ex :)
     
  10. Dhoom

    Dhoom BIG Troll Berserker

    Joined:
    Sep 25, 2003
    Messages:
    139
    Likes Received:
    2
    BAM!

    Found the broken Magic Weapon code...

    if target_item.obj.type == obj_t_weapon:

    target_item.obj.d20_status_init()
    target_item.obj.condition_add_with_args( 'sp-Magic Weapon', spell.id, spell.duration, 0 )
    target_item.partsys_id = game.particles( 'sp-Detect Magic 2 Med', spell.caster )

    That 0 shouldn't be there... the "spell_duration" variable is set a few lines above, with:

    spell.duration = 10 * spell.caster_level

    the 0 after the variable is resetting the variable to 0... which in ToEE, is permanent.

    hmmmmmmm....

    Good idea here...

    Create a custom NPC, a high-level mage... modify some spells to be permanent, and then charge the PCs and arm and a leg for the NPC Mage to cast "Permanency" on items/PCs... heh.

    Maybe even a quest reward...

    hmmm hmmm hmmmmmm
     
  11. Sol Invictus

    Sol Invictus Beholder Watcher Veteran

    Joined:
    Aug 25, 2003
    Messages:
    325
    Likes Received:
    0
    Just wondering:

    What are you using to edit the files? (I'm using Notepad and changing the spell to 0d0 didn't seem to work :( )

    Also, what settings do you put on the files? Read-only?
     
  12. Dhoom

    Dhoom BIG Troll Berserker

    Joined:
    Sep 25, 2003
    Messages:
    139
    Likes Received:
    2
    I use ActivePython's PythonWin editor... just modified the value, saved it into .\data\scr\
     
  13. Sol Invictus

    Sol Invictus Beholder Watcher Veteran

    Joined:
    Aug 25, 2003
    Messages:
    325
    Likes Received:
    0
    Drat. Chrisbeddoes was right. It does need a specialized editor. I'll go get that ASAP. Where can I get it? :D :D :D

    I can't wait to get my hax0r on!
     
  14. Dhoom

    Dhoom BIG Troll Berserker

    Joined:
    Sep 25, 2003
    Messages:
    139
    Likes Received:
    2
  15. Mr. Underhill

    Mr. Underhill The Keeper of the Arcane Toiletries

    Joined:
    Sep 25, 2003
    Messages:
    81
    Likes Received:
    0
    Heh Exitium... Ultraedit works as well, I just confirmed it with cure light wounds.
     
Our Host!