Player Resource Consortium

 

Author Topic: Crafting help  (Read 10196 times)

0 Members and 1 Guest are viewing this topic.

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?
We are the result of your laws.
We are the result of your democracy.
We are the result of your corruption.


July 16, 2010, 02:55:07 PM
Reply #1
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

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.


July 16, 2010, 05:01:12 PM
Reply #2

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.


July 17, 2010, 02:49:22 AM
Reply #3

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?
We are the result of your laws.
We are the result of your democracy.
We are the result of your corruption.


July 17, 2010, 10:01:49 AM
Reply #4
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

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.


July 17, 2010, 12:07:30 PM
Reply #5

Thanks for the help! :D
We are the result of your laws.
We are the result of your democracy.
We are the result of your corruption.


July 18, 2010, 02:21:03 AM
Reply #6

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.
We are the result of your laws.
We are the result of your democracy.
We are the result of your corruption.


July 20, 2010, 01:13:02 PM
Reply #7
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

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 ;)