Author Topic: How to give a feat to PC?  (Read 559 times)

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to give a feat to PC?
« on: July 21, 2014, 10:34:16 pm »


               

Hello everybody,


 


I would like to give a feat to PC throught the module event on level up, but I'm not finding the function GiveFeatToPC().


 


There is a way to do it?



               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
How to give a feat to PC?
« Reply #1 on: July 21, 2014, 11:17:57 pm »


               

You'd need NWNX or Leto or something to actually integrate it into the PC or use 2das and haks.


 


You could also use the bonus feat on item property and just attach it to the player skin, though.  The catch is that usable feats always have infinite uses if added via skin.  But if you just want a passive feat or a feat with infinite (or scripted uses) that works out fine.



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
How to give a feat to PC?
« Reply #2 on: July 21, 2014, 11:25:47 pm »


               One way is to add the feat to the player's skin.


EDIT: +1
               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to give a feat to PC?
« Reply #3 on: July 21, 2014, 11:36:20 pm »


               

Oh, yes, I have NWNX. (magical master) What is the procedure?


 


Proleric, how about to give Summon Mount to player? I got your idea, but In this case I think won't be possible because Isn't available to special properties to itens?



               
               

               


                     Modifié par WhiteTiger, 21 juillet 2014 - 10:44 .
                     
                  


            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
How to give a feat to PC?
« Reply #4 on: July 21, 2014, 11:53:31 pm »


               

I have no idea, WhiteTiger, all I know is you can't do it via scripting and you'd need something like that.


 


Regarding Summon Mount, you'd have two "problems."  One, it would be infinite uses per day (maybe that's not a problem, just be aware of it).  Two, you'd just have to add it to the 2da defining bonus feats and then you could add it via script.


 


Might even be able to do that server side with an override without needing a hak file but not sure.  Will try to check later.



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to give a feat to PC?
« Reply #5 on: July 22, 2014, 12:01:03 am »


               

Oh =/... So discarting nwnx, is possible by 2da? do you know something about?

 



One, it would be infinite uses per day



the same feat that paladin uses?



               
               

               


                     Modifié par WhiteTiger, 22 juillet 2014 - 05:08 .
                     
                  


            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to give a feat to PC?
« Reply #6 on: July 22, 2014, 12:08:54 am »


               


Might even be able to do that server side with an override without needing a hak file but not sure.  Will try to check later.



That would be a perfect solution to my module - once that it doesn't use hak paks


 


'<img'> 



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to give a feat to PC?
« Reply #7 on: July 22, 2014, 06:27:28 am »


               

Damn you are an impatient. I told you this will be possible in next CPP beta '<img'> .


 


Im going to include (almost) all feats a bonus feats which you can put on PC skin. The problem with unlimited uses can be solved by either tracking use in dabatase/item and restore this OnRest or by removing that feat completely and adding again after OnRest


 


and yes this solution doesnt need client to have this 2da nor CPP - it works as serverside (the only issue is that if you add this on item a player can wear then he will see Bonus feat: badd streff instead of "lasting inspiration" or whatever you use)



               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
How to give a feat to PC?
« Reply #8 on: July 22, 2014, 06:35:11 am »


               


Oh =/... So discarting nwnx, is possible by 2da? do you know something about?

 


the same feat that paladin uses?





Haks would make it extremely simple to add properly with limited uses.


 


2da edits with bonus feats will let you add an unlimited use per day version of the feat except you'll need to track uses.


 


NWNX or Leto may let you simply add the feat.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to give a feat to PC?
« Reply #9 on: July 22, 2014, 06:42:29 am »


               


NWNX or Leto may let you simply add the feat.




Leto is deprecated and require booting character to do that (and that process still sometimes fails so no can't recommend this one.


 


NWNX_Funcs: last several versions broken and crashing (does anyone have a link for the one that doesn't ?).


 


Anyway NWN method will make character illegal ! which is a matter if you check legallity with ELC.


               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to give a feat to PC?
« Reply #10 on: July 22, 2014, 06:50:54 am »


               

I'm not impatient, but I loved to know that patch 1.72 will bring this function. I use patch 1.71 and I provide it for download on my website which you can access through the link of my signature.


 


Anxiously waiting to update the download info to 1.72!  '<img'>


 


http://www.amnesia-nwn.info/#downloads



               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
How to give a feat to PC?
« Reply #11 on: July 23, 2014, 05:31:48 pm »


               

Another possible issue one might want to keep in mind: Adding feats to the PC's skin item may work poorly with polymorphed characters. That may not be so much of a problem if one is talking only about feats that affect a mounted PC, since one cannot mount while polymorphed anyway. But, a druid, shifter, user of any of the standard polymorph spells (Polymorph Self, Shapechange, Tenser's Transformation), or PC polymorphed by item or other script will likely lose access to any feat added to the PCs skin during level-up, assuming the polymorphed form has its own skin.


 


Of course, it should be straightforward to alter the polymorph script so that PC skin feats "merge" onto the polymorph skin item.



               
               

               
            

Legacy_The Mad Poet

  • Hero Member
  • *****
  • Posts: 715
  • Karma: +0/-0
How to give a feat to PC?
« Reply #12 on: July 24, 2014, 07:44:43 am »


               

If you have NWNX_Funcs installed properly all you have to do is script it with the proper function after the nwnx include file. This is a little snippet of what I use in Avernostra on my Module OnEnter script. Basically it checks to see if a player has Ambidexterity. If they don't it adds it to them. I use it to be more compliant with Pathfinder, which is my d20 system of choice.



#include "nwnx_funcs"

void main() {

object oPC = GetEnteringObject();

if (GetIsDM(oPC))
   { return; }

if ((GetHasFeat(FEAT_AMBIDEXTERITY, oPC) == FALSE))
   { NWNXFuncs_AddFeat(oPC, FEAT_AMBIDEXTERITY); }

}

// Adds a feat to oObject's general featlist

// If iLevel is greater than 0 the feat is also added to the featlist for that level

void NWNXFuncs_AddFeat(object oCreature, int iFeat, int iLevel=0)

 

Once you get the include file added you can view all the NWNX functions in a list by typing 'NWNX' in the filter on the right side of the script screen. It's a great way to implement subraces because you can mod the ability scores directly and such.


               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0
How to give a feat to PC?
« Reply #13 on: July 24, 2014, 09:11:54 am »


               


 


If you have NWNX_Funcs installed properly all you have to do is script it with the proper function after the nwnx include file. This is a little snippet of what I use in Avernostra on my Module OnEnter script. Basically it checks to see if a player has Ambidexterity. If they don't it adds it to them. I use it to be more compliant with Pathfinder, which is my d20 system of choice.



#include "nwnx_funcs"

void main() {

object oPC = GetEnteringObject();

if (GetIsDM(oPC))
   { return; }

if ((GetHasFeat(FEAT_AMBIDEXTERITY, oPC) == FALSE))
   { NWNXFuncs_AddFeat(oPC, FEAT_AMBIDEXTERITY); }

}

// Adds a feat to oObject's general featlist

// If iLevel is greater than 0 the feat is also added to the featlist for that level

void NWNXFuncs_AddFeat(object oCreature, int iFeat, int iLevel=0)

 

Once you get the include file added you can view all the NWNX functions in a list by typing 'NWNX' in the filter on the right side of the script screen. It's a great way to implement subraces because you can mod the ability scores directly and such.

 




 


This seems so intuitive. Where can I download nwnx_funcs?


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
How to give a feat to PC?
« Reply #14 on: July 24, 2014, 09:36:56 am »


               


This seems so intuitive. Where can I download nwnx_funcs?




You still havent clarified whether you are running ELC or not...