Author Topic: Give Feat  (Read 641 times)

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Give Feat
« Reply #15 on: June 18, 2011, 06:43:53 am »


               No problem. If you need any help, simply pm or email me, and although I could never replace Funky(who could anyway?), I'll be glad to help you with the basics.

Kato
(kato2200@gmail.com)
               
               

               
            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
Give Feat
« Reply #16 on: June 18, 2011, 05:20:26 pm »


               Use nwnx_funcs. Unlike letoscript, its just a bunch of new functions in an include script and you can do pretty much everything with it that leto can, and more. Letoscript is hard to get into, no matter what anyone says. Also to my understanding leto requires player booting to change the .bic's while nwnx_funcs does not.
               
               

               


                     Modifié par Xardex, 18 juin 2011 - 04:21 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Give Feat
« Reply #17 on: June 18, 2011, 05:51:41 pm »


               

Xardex wrote...

Use nwnx_funcs. Unlike letoscript, its just a bunch of new functions in an include script and you can do pretty much everything with it that leto can, and more. Letoscript is hard to get into, no matter what anyone says. Also to my understanding leto requires player booting to change the .bic's while nwnx_funcs does not.

That's all correct. The thing that motivates most people to use leto instead is unrelated to any of this, and something I make a point of posting when I mention it: nwnx_funcs requires linux.

Funky
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Give Feat
« Reply #18 on: June 18, 2011, 06:02:46 pm »


               There is a version of nwnx_funcs for windows.  Stat changes, feat adding and removing, and the other basics are there.

 That said, since most of the scripts are developed in the linux version then ported over, the linux version of nwnx has far more options.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Give Feat
« Reply #19 on: June 18, 2011, 06:25:45 pm »


               Fair enough. I tend not to count it, but it looks like it's seen quite a bit of work since I last took a peek.  '<img'>

Funky
               
               

               
            

Legacy_acomputerdood

  • Sr. Member
  • ****
  • Posts: 378
  • Karma: +0/-0
Give Feat
« Reply #20 on: September 11, 2012, 10:51:32 pm »


               i don't know if i'm missing something here, but i installed the nwnx_functions plugin, but don't see how one would implement this with the following functions available:


int GetArmorAC(object oObject);
void SetArmorAC(object oObject, int iAC);
void SetGoldPieceValue(object oObject, int iValue);
void SetTag(object oObject, string sValue);
void SetRacialType(object oObject, int nRacialType);
int GetDescriptionLength(object oObject);
string GetDescription(object oObject);
string SetDescription(object oObject, string sNewDescription);
string GetConversation(object oObject);
int GetUndroppableFlag(object oItem);
void SetUndroppableFlag(object oItem, int bUndroppable);
int GetItemWeight(object oObject);
void SetItemWeight(object oObject, int nWeight);
string GetEventHandler(object oObject, int nEventId);
void SetEventHandler(object oObject, int nEventId, string sScript);
int GetFactionID(object oObject);
void SetFactionID(object oObject, int nFaction);
float GetGroundHeight(location lLocation);
int GetIsWalkable(location lLocation);
object GetFirstArea();
object GetNextArea();
void Set2DAString(string s2DA, string sColumn, int nRow, string sValue);
void SetMovementRate(object oCreature, int nMovementRate);
void ActionUseItemOnObject(object oItem, object oTarget, int nPropertyNum = 0);
void ActionUseItemAtLocation(object oItem, location lLocation, int nPropertyNum = 0);
int GetPCPort(object oPlayer);
void BootPCWithMessage(object oPC, int nStrRef);
int JumpToLimbo(object oObject);
int GetIsVariableValid(struct scriptvar svVariable);
struct scriptvar GetFirstLocalVariable(object oObject);
struct scriptvar GetNextLocalVariable(object oObject);
int GetItemCount(object oTarget);
object GetItemByPosition(object oTarget, int nPosition);
object IntToObject(int nObjectID);

this was the "complete function list" from the readme of 1.9.0.  is there more complete documentation somewhere else?
               
               

               


                     Modifié par acomputerdood, 11 septembre 2012 - 09:52 .
                     
                  


            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Give Feat
« Reply #21 on: September 12, 2012, 01:14:00 am »


               No, you want nwnx_funcs, not nwnx_functions.
               
               

               


                     Modifié par Squatting Monk, 12 septembre 2012 - 12:17 .
                     
                  


            

Legacy_acomputerdood

  • Sr. Member
  • ****
  • Posts: 378
  • Karma: +0/-0
Give Feat
« Reply #22 on: September 13, 2012, 12:31:22 am »


               i'm going to go ahead and guess you have to turn off Enforce Legal Characters on the server if you use the AddKnownFeat() func, yes?

or is there another way around it?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Give Feat
« Reply #23 on: September 13, 2012, 01:01:34 am »


               

acomputerdood wrote...

i'm going to go ahead and guess you have to turn off Enforce Legal Characters on the server if you use the AddKnownFeat() func, yes?

or is there another way around it?


Having never used nwnx,  I am going to guess yes,

A Way Around it,  Hmm,  If the AddFeat function lets you remove feats also,  Or if there is a function that allows you to remove feats.    I guess that you could add a  few extra Dummy feats to the Character class, and remove them when you add a new feat.   I dont know I would have to think about and work that out.

Main Question: Can you also remove feats?
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Give Feat
« Reply #24 on: September 13, 2012, 02:15:00 am »


               You will need to turn off ELC (or replace it with a scripted system), yes. If you're going to be consistently giving the same feats out, you may see if there are any 2da edits that would make your feat changes legal. Ravine mentions having done this here.
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Give Feat
« Reply #25 on: September 13, 2012, 02:25:41 am »


               From nwnx_funcs(main include file, Windows version by MaxRock):

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

// Removes a feat from a creature
// If bRemoveFromLevel is FALSE, the feat will only be removed from the general feat list (the feat lists for each character level are ignored;
// If bRemoveFromLevel is TRUE, the feat will be removed from the general feat list and from the feat list for the appropriate level
// If found, the feat will be removed from the general feat list whether it exists in a level feat list or not, and vice versa
int  NWNXFuncs_RemoveFeat(object oCreature, int iFeat, int bRemoveFromLevel=TRUE);


Kato
               
               

               


                     Modifié par Kato_Yang, 13 septembre 2012 - 01:38 .
                     
                  


            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Give Feat
« Reply #26 on: September 13, 2012, 02:46:25 am »


               NWNx_funcs pretty much enabled me to move my skin-based subrace system to making the changes purely to the stat sheet.  This was especially helpful in granting HP bonuses for subraces.  Additionally, this also allows PCs to increase their overall bonuses, as adding stat bonuses to skins is counted towards the max bonus (+12?) allowed.  I don't believe that the bonuses from a modified stat sheet count towards that max.

You do have to turn off ELC, so you need some other way to check that PCs don't have exploited chars.

And, I think I've discovered that although you can grant feats, if your PC doesn't have the prereqs, you still can't use the feat (it doesn't show up in the radial menu).