Player Resource Consortium
Neverwinter Nights => Help => Topic started by: DrDetroit on July 26, 2009, 08:52:28 AM
-
I was attempting to create a PRC but I would lke more information after reading the PRC making guide.
First, you edit the classes.2da file to creat the class. Then the cls_pres_****.2da, cls_skill_****.2da, cls_feat_****.2da and cls_bfeat_****.2da. These are all simple text files so this part is easy enough.
Then modify the feat.2da file to include any new feats for the class. The guide links to dladventures which appears to no longer be a working website. The same for spells.2da.
Is there any other place for information about these two files?
feat.2da and spells.2da do not include any of the script for the feat or as far as I can tell a call to a script file. So, where does the script go and what is it called?
I would like to create an active feat and passive feat. The active feat would be to cast cure light wounds once per day per 5 levels and the passive feat would be to improve hide and move silently. Can someone recommend feats that I should copy/use for reference?
For passive feats, the prc_inc_function.nss calls files such as the prc_duelist.nss. There is also another file, prc_duelist.nsc, where does this file come from? Is it created using the NWN Toolset?
Thank you.
-
http://ccg.animecafe.net/index.php/Main_Page is the new URL for the website.
spells.2da is where all the scripts go, in the impact script column. Feat.2da then just calls the spells.2da row number.
.nss is the uncompiled code. .nsc is simply the compiled code file that the game actually reads.
-
Thank you, that helped a lot.
I was attempting to follow how the Track feat works. It adds +1 to Spot, Search and Listen.
The feat does not reference anything in the spells.2da file. The only reference I can see is to the constant FEAT_TRACK.
Is the script for the feat referenced by the constant? Where else should I be looking for the script for the feats that do not reference spells.2da?
Thank you.
-
That feat uses a whole PRC system running out of prc_inc_function. It's not all that easy, but if you want to see where it works, do a "find in files" using textpad or something on the whole PRC repository for the feat constant.
-
So far, the only things I would add is that classes.2da only allows 255 class types. So, do not attempt to add anything beyond the index number 254.
And anyone wanting to add a class should download a copy of the NWN Lexicon. This combined with the example of the Duelist is all I needed to learn to write any code for my class. So, thank you Aaron Graywolf.
Update: The PRC Installation guide does not include the prc_include.hak when adding the PRC files to a module.
Double Edit: Is there a link for the script compiler?
Triple Edit: It is on the NWN Vault.
http://nwvault.ign.com/View.php?view=Other.Detail&id=708
-
I finished my class and created an active feat and a passive feat.
The active feat works correctly.
However, I can not get the passive feat to work. To try to debug the passive feat, I added the function to display text over the PC to indicate that the script started to execute. That has not appeared in the game.
I added the call to the prc_inc_function.nss. And added the prc_include.hak to the module I was trying to play.
Is there an additional location I need to place the call for my passive feat? Do I need to compile the prc_inc_function.nss? And all of the other nss files in the prc_include.hak?
Thank you.
-
You need to compile the calling scripts. Namely, everything that goes in the module events like prc_onmodload, etc.
-
That and everything else in the prc_scripts.hak is compiled.
Is it possible the order of the hak packs in the module is wrong?
I had to edit the module to add the prc_include.hak and I put it at the top of the list. Is that ok? Or where should it go?
Thank you for your help Stratovarius.
-
The module does not need prc_include.hak, never does. It's why we don't add it.
Where did you put your modified script?
-
you need to place those new compiled scripts in hak on the top of all PRC haks. If you don't, the game will use original scripts.
-
I put all of my scripts into the prc_scripts.hak. The active feats work correctly.
The guide says to add a line to the prc_inc_function.nss for passive feats. I did that, but then I put the updated prc_inc_function.nss back into the prc_include.hak, which evidently is not used.
Do I need to compile the prc_inc_function.nss and add it to one of the other haks?
Is there a different place I need to put the call for my passive scripts? Do I need to modify all of the calls for prc_equip, prc_unequip, prc_levelup, prc_on* etc.?
-
I think I get it now.
prc_equip calls the prc_inc_function, or at least portions of it.
So, when you compile prc_equip, it places all of the necessary information from prc_inc_function into prc_equip.ncs.
So, for my script to be called, I have to recompile every script that uses prc_inc_function.
Is that correct?
-
The easiest way to make sure its working is to recompile the entire PRC. It's the best thing to do when you modify an include like prc_inc_function, anyway.
Also, you can't compile includes.
-
I compiled the prc_scripts.hak with my updated files.
I am trying to add an AC bonus and attack bonus to my characters skin using SetCompositeBonus.
I copied what was done for the prc_duelist.nss. so the syntax is correct.
Is there something I need to do to ensure that the class uses skin? Do I need to have the DeleteLocalInts added to the prc_inc_function?
Thanks.
-
Ok, I was mostly wrong. Everything in my PRC works, except for adding attacking bonuses. This is the syntax I used.
SetCompositeBonus(oSkin, "PRAttackBonus", iPRCAttackBonus, ITEM_PROPERTY_ATTACK_BONUS);
Any suggestions?
-
Well... if you could add attack bonus to creature's hide it would be OK. But you can't :P
You should try to add it to a weapon, or apply it as a supernatural effect.
-
That explains a lot.
Is there a list somewhere of what I can add an attack bonus to?
If I add the bonus to the weaopn, the weapon would be a +X weapon. I just want to increase the players to hit bonus.
-
Than apply it as a supernatural effect. I think Intuitive Attack works this way.
(To check which properties you can add to given item, just open toolset, find item of the same category and try to add that properties to it. If it's not on the list, you can't add it.)
BTW what class are you working on?
-
I am working on a Kai class. Altaris made two modules using the Kai class.
Is there a way to reset the PC's skin or delete all of the bonuses added to it?
-
Yes... if you want to break the PRC. Don't do it.