Curs0r Posted May 1, 2005 Share Posted May 1, 2005 Hi folks, I've been digging around your fine forum for a while and I can't seem to find a reference for adding a feat to the PC via a script. I'm sure it's here somewhere but I'm a bit tired of digging. Can anyone help with this? Link to comment Share on other sites More sharing options...
Jeff Posted May 1, 2005 Share Posted May 1, 2005 First of all, welcome to the forums! I don't know how to do it with a script, but you can edit featgain.2da to change how many feats you get each level up, or you can use TK102's savegame editor to give yourself the feat you want. Hopw that helps! Link to comment Share on other sites More sharing options...
lord_yig Posted May 1, 2005 Share Posted May 1, 2005 Welcome. You can use the method pointed out by DarthMoeller or a script (which is what you want to do i i'm not wrong). Here is a copy of the ingame script a_givefeat.nss, its use seems quiet simple. // a_givefeat // Parameter Count: 1 // Param1 - The Feat Id from Feat.2DA for the desired feat. // This script grants the requested feat to the player's character // without regard to prerequisites. void main() { int nFeatId = GetScriptParameter( 1 ); GrantFeat( nFeatId, GetFirstPC() ); } You can edit this to make you own script or use directly the basic script include in the game. Hope this helps. Link to comment Share on other sites More sharing options...
Curs0r Posted May 1, 2005 Author Share Posted May 1, 2005 Thanks for the cheery welcome. The thing is, I'm kind of making a little mini mod that requires I add just 1 little feat. If I want people to use it I don't think they'll like using a save editor to make it work. //Edit// Whoops you must have posted that script info right as I was posting my reply hehehe. Thanks. Link to comment Share on other sites More sharing options...
Prime Posted May 1, 2005 Share Posted May 1, 2005 It may be easier to just use the feat name directly from nwscript.nss. For example: GrantFeat(FEAT_DOUBLE_WEAPON_FIGHTING, GetFirstPC() ); Link to comment Share on other sites More sharing options...
Curs0r Posted May 1, 2005 Author Share Posted May 1, 2005 Ok, I must be doing something wrong, here's the output: C:\>nwnnsscomp.exe -c giveprof.nss Lookup path root set to: C:\Program Files\LucasArts\SWKotOR\ Loaded nwscript.nss via key file lookup Compiling: giveprof.nss giveprof.nss(8): Error: Undeclared identifier "GetScriptParameter" giveprof.nss(9): Error: Undeclared identifier "GrantFeat" Compilation aborted with errors Total Execution time = 31 ms Link to comment Share on other sites More sharing options...
lord_yig Posted May 1, 2005 Share Posted May 1, 2005 You certaily need to put nwscript.nss in the same folder as the script compiler. Or you can use Prime's idea too... Link to comment Share on other sites More sharing options...
Curs0r Posted May 1, 2005 Author Share Posted May 1, 2005 Ok I put the nwnscript file where it belongs but it still gives me this: C:\>nwnnsscomp.exe -c giveprof.nss Lookup path root set to: C:\Program Files\LucasArts\SWKotOR\ Compiling: giveprof.nss giveprof.nss(3): Error: Undeclared identifier "GrantFeat" Compilation aborted with errors Total Execution time = 16 ms Should I be including something? Link to comment Share on other sites More sharing options...
lord_yig Posted May 1, 2005 Share Posted May 1, 2005 You need another script where the function "GrantFeat" is declared, maybe one of the k_inc_***, but i don't know which one it is... Link to comment Share on other sites More sharing options...
Darth333 Posted May 1, 2005 Share Posted May 1, 2005 Originally posted by Curs0r Ok I put the nwnscript file where it belongs but it still gives me this: C:\>nwnnsscomp.exe -c giveprof.nss Lookup path root set to: C:\Program Files\LucasArts\SWKotOR\ Compiling: giveprof.nss giveprof.nss(3): Error: Undeclared identifier "GrantFeat" Compilation aborted with errors Total Execution time = 16 ms Should I be including something? err...are you doing this for Kotor 1 or kotor 2? The script that Prime gave you is correct but it will only work with Kotor 2. There is no included file. You cannot give a feat with a script in Kotor 1: this function has been added only in Kotor 2. I see from the output that you are compiling using nwscript.nss from Kotor 1. Make sure you set the path correctly. Check the tutorial on how to compile if you need. Link to comment Share on other sites More sharing options...
Curs0r Posted May 1, 2005 Author Share Posted May 1, 2005 Well that explains everything... I'm making this for KoTOR 1. I'm very very poor and I can't afford KoTOR 2. Link to comment Share on other sites More sharing options...
tk102 Posted May 1, 2005 Share Posted May 1, 2005 Unfortunately there is no equivalent in KotOR1 for the GrantFeat script function. You'll have to use separate .utc files or something instead. Link to comment Share on other sites More sharing options...
Prime Posted May 1, 2005 Share Posted May 1, 2005 Whoops, sorry about the confusion... Link to comment Share on other sites More sharing options...
Curs0r Posted May 2, 2005 Author Share Posted May 2, 2005 Ok then. I was trying to make it add the basic saber proficiency without having to multiclass and become a jedi outright. But I've slept since then and I figure why not? So I just made my own not quite padawan mod. It turned out pretty well actually. I just adjusted a few things so that one can still play the Endar Spire levels and get all the items and XP. The door on the bridge doesn't force a level up so one doesn't have to waste a level on a non-jedi char class. Once the pc arrives on Tarris the twilek female that begs you not to kill her pops up with a bit of drama about how the pc used to be a jedi. the whole mod comes out to be only 24kb in size. Since this is my first run at modding I think that's pretty good. However, I'd like someone to test it for me. Anyone interested? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.