Jump to content

Home

The agony of the Feat(script)


Curs0r

Recommended Posts

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

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

Welcome. :D

 

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

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

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...