Player Resource Consortium

 

Author Topic: Morons Guide to the Idiots Guide to the PRC  (Read 13865 times)

0 Members and 2 Guests are viewing this topic.

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.


July 26, 2009, 09:05:43 AM
Reply #1

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.
That is not dead which can eternal lie.
And with strange aeons even death may die.


July 28, 2009, 10:14:56 PM
Reply #2

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.


July 28, 2009, 11:27:11 PM
Reply #3

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.
That is not dead which can eternal lie.
And with strange aeons even death may die.


August 02, 2009, 02:38:28 PM
Reply #4

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
« Last Edit: August 02, 2009, 02:48:48 PM by DrDetroit »


August 11, 2009, 09:52:48 PM
Reply #5

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.


August 11, 2009, 09:56:57 PM
Reply #6

You need to compile the calling scripts. Namely, everything that goes in the module events like prc_onmodload, etc.
That is not dead which can eternal lie.
And with strange aeons even death may die.


August 11, 2009, 10:17:56 PM
Reply #7

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.


August 12, 2009, 07:38:55 AM
Reply #8

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?
That is not dead which can eternal lie.
And with strange aeons even death may die.


August 12, 2009, 11:30:07 AM
Reply #9
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

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.
« Last Edit: August 12, 2009, 11:30:29 AM by xwarren »


August 12, 2009, 04:58:37 PM
Reply #10

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.?


August 12, 2009, 05:04:22 PM
Reply #11

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?


August 12, 2009, 05:05:03 PM
Reply #12

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.
That is not dead which can eternal lie.
And with strange aeons even death may die.


August 18, 2009, 09:43:15 PM
Reply #13

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.


August 19, 2009, 05:52:31 PM
Reply #14

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?