Player Resource Consortium

 

Author Topic: Warlock damage resistance issue  (Read 4719 times)

0 Members and 1 Guest are viewing this topic.

June 19, 2012, 05:35:26 PM
  • Adept
  • *
  • Posts: 27
  • Karma: +2/-0
  • New Member
    • View Profile

Having some weird behavior from Warlock; I choose fire and acid resistance at level 10 and instead of having 5 resistance, I actually get 25 resistance immediately (tested fire, not acid). Any idea where I can start hunting down where this is misbehaving? My module is merged with CEP 2.4a by hand, but I don't know enough about how the resistance is applied to know where to look; I'm assuming the issue is with my modifications. Any suggestions would be appreciated!
« Last Edit: June 19, 2012, 07:05:33 PM by Chaszmyr »


June 20, 2012, 02:01:24 AM
Reply #1
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

There was a bug in warlocks scripts after I added Eldritch Theurge class. It should be fixed in PRC 3.5. I'll check this.


June 20, 2012, 09:46:11 AM
Reply #2
  • Adept
  • *
  • Posts: 27
  • Karma: +2/-0
  • New Member
    • View Profile

Cool, thanks. I just recently updated the module to 3.5, but I put this under 'help' instead of 'bugs' since I assume it is probably something wonky with my modifications, but, you never know :D


June 20, 2012, 11:34:04 AM
Reply #3
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Fire resistance is applied from inv_warlock.nss (prc_newspellbooks.hak). My script looks OK. I'll add some debug messaged and test it in game.


June 20, 2012, 10:55:55 PM
Reply #4
  • Adept
  • *
  • Posts: 27
  • Karma: +2/-0
  • New Member
    • View Profile

Okie dokie. It could very well be something I did, so if it works perfectly fine for you, give me some guesses as to where it might have went wrong (does it depend on any nwnx plugins or anything? etc) so I can poke around.


June 21, 2012, 01:19:04 PM
Reply #5
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

It's not your fault - there's a bug in that script. One that was quite difficult to spot ;). ItemPropertyDamageResistance() function used in that script requires two constants as parameters. The script was passing raw integers.
ie. if value of damage resistance calculated by script was 5 - it was passed to that function as 5, but it should be IP_CONST_DAMAGERESIST_5 (=1; 5=IP_CONST_DAMAGERESIST_25).


June 21, 2012, 10:36:33 PM
Reply #6
  • Adept
  • *
  • Posts: 27
  • Karma: +2/-0
  • New Member
    • View Profile

I understand what you are saying, but not well enough to repair it myself, I'm completely self-taught with scripting. Any chance I could nab a copy of the fixed version for my top hak? Sorry in advance if it isn't standard procedure to ask just like that.


June 22, 2012, 12:09:08 PM
Reply #7
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

I've attached the fixed script ;)


June 22, 2012, 08:44:04 PM
Reply #8
  • Adept
  • *
  • Posts: 27
  • Karma: +2/-0
  • New Member
    • View Profile

Aha, thank you much, sir. Into the top hak it goes.