Player Resource Consortium

Neverwinter Nights => Help => Topic started by: Sorathul on July 16, 2010, 02:26:12 PM

Title: Crafting help
Post by: Sorathul on July 16, 2010, 02:26:12 PM
I'm trying to make a custom crafting system, but i would like to use some nice stuff that the PRC made available.
Mainly adding item property "Use: Cast spell" using the actual Caster level, instead of Bio standards.
I found the "ItemPropertyCastSpellCasterLevel" , but i just don't understand it, because it only requires these: int nSpell, int nLevel, and only adds an unuseable item property.
I tried to find the answer in prc_craft.nss but i don't understand it very well.
How can I get it to work?
Title: Crafting help
Post by: xwarren on July 16, 2010, 02:55:07 PM
Quote from: Sorathul

I'm trying to make a custom crafting system, but i would like to use some nice stuff that the PRC made available.
Mainly adding item property "Use: Cast spell" using the actual Caster level, instead of Bio standards.
I found the "ItemPropertyCastSpellCasterLevel" , but i just don't understand it, because it only requires these: int nSpell, int nLevel, and only adds an unuseable item property.
I tried to find the answer in prc_craft.nss but i don't understand it very well.
How can I get it to work?


I'm afraid it's not that easy.

This item property is used by our custom PRCGetCasterLevel() function. And if you want this to work, you need to replace GetCasterLevel() calls with PRCGetCasterLevel() in virtually every spell script.
Title: Crafting help
Post by: KenquinnTheInsaneOne on July 16, 2010, 05:01:12 PM
Not really that hard to do. Just use something like NWNExplorer to extract every script file, then use Emacs to open up the directory where you extracted it and mass replace the function. After that you just import the edited scripts.
Title: Crafting help
Post by: Sorathul on July 17, 2010, 02:49:22 AM
Now wait a bit.
Even though I added the PRC pack to the module, and I use PRCGetCasterLevel() to get the nLevel required, i still need to change all spell scripts?
Why's that? The PRC-s built-in craftsystem works that much differently?
Title: Crafting help
Post by: xwarren on July 17, 2010, 10:01:49 AM
Quote from: Sorathul

Now wait a bit.
Even though I added the PRC pack to the module, and I use PRCGetCasterLevel() to get the nLevel required, i still need to change all spell scripts?
Why's that? The PRC-s built-in craftsystem works that much differently?


I thought you want to add those item properties in a module without PRC, sorry, misunderstood you.

If you want to use it in PRC module you just need to make sure your crafting system adds all 3 properties: Cast Spell (your spell here), Cast Spell: Casting Class (your class here) and Cast Spell: Caster Level (level). Spells should work correctly when those three are present.
Title: Crafting help
Post by: Sorathul on July 17, 2010, 12:07:30 PM
Thanks for the help! :D
Title: Crafting help
Post by: Sorathul on July 18, 2010, 02:21:03 AM
One more thing, just to be sure:

You mean these?
ItemPropertyCastSpell()
ItemPropertyCastSpellCasterLevel()
ItemPropertyCastSpellDC()
and i can forget about
ItemPropertyCastSpellMetamagic()?

I couldn't find anything similar to the "Cast Spell: Casting Class (your class here)" you mentioned.
Title: Crafting help
Post by: xwarren on July 20, 2010, 01:13:02 PM
Quote from: Sorathul

One more thing, just to be sure:

You mean these?
ItemPropertyCastSpell()
ItemPropertyCastSpellCasterLevel()
ItemPropertyCastSpellDC()
and i can forget about
ItemPropertyCastSpellMetamagic()?

I couldn't find anything similar to the "Cast Spell: Casting Class (your class here)" you mentioned.


Yep, those are the properties I was thinking about. Sorry, I've recently modified PRCGetLastSpellCastingClass() function and this confused me a bit ;)