Player Resource Consortium

 

Author Topic: Need help with ArcaneSpellFailure - please!  (Read 3712 times)

0 Members and 1 Guest are viewing this topic.

December 15, 2012, 04:04:18 AM
  • Adept
  • *
  • Posts: 7
  • Karma: +0/-0
  • New Member
    • View Profile

Okay, so.. I typed up a big ol' message and I THOUGHT I had it, but turns out I don't quite.

Here's the short version, I am playing for the umpteenth time and tried to make a character who gets sneak attack + magic (arcane trickster) but also armored mage (warmage.) The problem is that I forgot NWN only allows 3 classes, not four, so I got stuck as wiz/rog/warm kinda dead in the water.

So I figure okay, no problem, I'll just slap the warmage feats onto Rogue. Let me say here I have done no real NWN modding of any kind - I don't fully understand how it all ties together or works at all, so I was totally fudging my way throguh things by means of awkward intuition alone. I managed to pull out the rogue's class feats 2da, grab the lines from the warmage, bring 'em over, make sure the columns were renumbered right, and loaded in and, lo and behold, the feats were there. However, I quickly realized it didn't work.

Next step I poked around some more, noticed the 2das had no actual code/instruction, so poked at the prc_scripts, pulled the .hak for that open and grabbed the warmage script. I tried changing the GetLevelByClass to _ROGUE instead of _WARMAGE but that didn't work. I played with it a bit and, ultimately, I just can't get anything that works.

I DID manage to get a temporary solution by having the server (who is my friend) turn DebuMode on so I can run dm_runscript prc_warmage, which will actually remove the ASF, but when I rest it comes right back.

I did try using the skin method via the script:
#include "x2_inc_itemprop"
void main()
{
 object oPC   = OBJECT_SELF;

 object oSkin = GetItemInSlot (INVENTORY_SLOT_CARMOUR, oPC);

 itemproperty ipSkin = ItemPropertyBonusFeat (IP_CONST_FEAT_KNOCKDOWN);

 IPSafeAddItemProperty(oSkin, ipSkin, 0.0f, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
}

Which I found by googling. however, I obviously had to change it as ASF is not a feat, so I swapped it around to replace the itemproperty line above with the two following, I found via the lexicon for NwScript:

 int nModLevel = IP_CONST_ARCANE_SPELL_FAILURE_MINUS_45_PERCENT;

 itemproperty ipSkin = ItemPropertyArcaneSpellFailure(nModLevel);

I named it asf and then used the tlkedit to put it into prc_scripts.hak, not knowing how else to get it available within the game. Lo and behold this also worked but, much the same, disappeared after resting!

I ALSO attempted, as a last ditch effort, a totally different angle. I figured, okay, maybe it'd be easier to just quickly strip the spell failure from any light armor I get, and I used the example from http://www.nwnlexicon.com/index.php/ItemPropertyArcaneSpellFailure to attempt that. However, when I run the script is simply does nothing, the ASF remains the same.

I would LOVE a much more elegant, permanent and un-awkward solution than where I ended up, so if anyone can help with a simple solution I'd appreciate it a lot!


December 15, 2012, 08:45:19 AM
Reply #1
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Transfering some reduced arcane spell failure feats may be difficult. In some cases (warmage, dread necro) reduced asf works only on spells cast by the class (so if you have wizard/warmage build, reduced asf will only work on warmage spells - that's how it works in PnP).

I've modified sneak attack script. I hope it does what you wanted (Arcane trickster class will grant reduced asf)


December 15, 2012, 04:26:33 PM
Reply #2
  • Adept
  • *
  • Posts: 7
  • Karma: +0/-0
  • New Member
    • View Profile

Thanks for the reply!

As far as I can tell the script for the armored mage for Warmage *should* just reduce ASF pretty much universally, as it adjusts the spell failure downwards by checking the type of armor and shield, rather than using another system altogether, I just can't, for the life of me, figure out why it doesn't automatically work and, when I run the script manually, why it'd stop working after I rested!

Never the less, I'll grab the file you attached here and will see where that leaves me! I see in the code you just added it straight to the oskin thing via the property const itself.. I'll load those scrips into the prc_scripts.hak (I assume!) and hopefully that will do it. :)

Again, thank you very much!


December 16, 2012, 03:07:49 AM
Reply #3
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

As far as I can tell the script for the armored mage for Warmage *should* just reduce ASF pretty much universally, as it adjusts the spell failure downwards by checking the type of armor and shield, rather than using another system altogether, I just can't, for the life of me, figure out why it doesn't automatically work and, when I run the script manually, why it'd stop working after I rested!

Nope. It has been changed some time ago. Now it works like in PnP. I guess you have older version of PRC installed - the latest version can be downloaded from http://nwvault.ign.com/View.php?view=Hakpaks.Detail&id=7870