Player Resource Consortium

Neverwinter Nights => Help => Topic started by: Chaszmyr on June 19, 2012, 05:35:26 PM

Title: Warlock damage resistance issue
Post by: Chaszmyr on June 19, 2012, 05:35:26 PM
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!
Title: Re: Warlock damage resistance issue
Post by: xwarren on June 20, 2012, 02:01:24 AM
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.
Title: Re: Warlock damage resistance issue
Post by: Chaszmyr on June 20, 2012, 09:46:11 AM
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
Title: Re: Warlock damage resistance issue
Post by: xwarren on June 20, 2012, 11:34:04 AM
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.
Title: Re: Warlock damage resistance issue
Post by: Chaszmyr on June 20, 2012, 10:55:55 PM
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.
Title: Re: Warlock damage resistance issue
Post by: xwarren on June 21, 2012, 01:19:04 PM
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).
Title: Re: Warlock damage resistance issue
Post by: Chaszmyr on June 21, 2012, 10:36:33 PM
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.
Title: Re: Warlock damage resistance issue
Post by: xwarren on June 22, 2012, 12:09:08 PM
I've attached the fixed script ;)
Title: Re: Warlock damage resistance issue
Post by: Chaszmyr on June 22, 2012, 08:44:04 PM
Aha, thank you much, sir. Into the top hak it goes.