View previous topic :: View next topic |
Author |
Message |
Red
Joined: 14 Feb 2009 Posts: 21
|
Posted: Sat Feb 14, 2009 22:31 Post subject: Base Ability Score Increase |
|
|
I am sure this is a common question, but I thought it wise to ask anyway.
I have completed a new PW for NWN and find myself looking to NWNX and Leto to complete a task.
I will be giving players an item called a Booster Shot that increases a base stat by x amount, permanently. I have learned the hard way you cannot do this with NWScript.
My question is fairly simple, do I need to go the NWNX_Leto route or has someone already developed the SetAbilityScore function for windows that I see in the Linux nwnx_func?
Wanted to ask before I start plugging away on this one. I have NWNX and Leto installed. I am also open to ideas and instruction in regards to the best way to go about this. I know I will be forcing my clients to relog, I will just have to deal with that until something is developed for windows that does that function real time. I am a copy/paste coder, otherwise I would try to port those functions myself.
For argument sake, I realize turning to NWNX for a single function seems overkill. I can see myself using NWNX for more down the line as I grow more familiar with it.
Thanx in advance.
Red |
|
Back to top |
|
|
Red
Joined: 14 Feb 2009 Posts: 21
|
Posted: Sat Feb 14, 2009 23:00 Post subject: |
|
|
I searched before I posted, I swear
Maybe I can just do this, I found it in a recent search
Code: | void main()
{
//get the PC
object oPC = GetItemActivator();
//add commands to the stack
//open the players bic in leto
LetoWorkWithPC(oPC);
//make the changes in leto
StackedLetoScript(AdjustAbility(ABILITY_STRENGTH, 1));
//save the players bic
LetoSavePC(GetBicFileName(oPC));
//no actual work has been done at this point
//its just been queued up
//now you boot the PC so you can modify their file
BootPC(oPC);
//then you do the changes when the player is offline
DelayCommand(0.5, VoidStackedLetoScriptRun());
} |
That was posted by dragon iirc |
|
Back to top |
|
|
Lokey
Joined: 02 Jan 2005 Posts: 158
|
Posted: Tue Feb 17, 2009 2:11 Post subject: |
|
|
You'll find LETO function wrappers in the PRC (the test module I think) or Higherground system. Some script ability would be recommended, needs to hook to a few different places to be safe. _________________ Neversummer PW NWNx powered mayhem |
|
Back to top |
|
|
Red
Joined: 14 Feb 2009 Posts: 21
|
Posted: Sat Feb 28, 2009 21:32 Post subject: |
|
|
I ended up using th HGLL. Best tip I have had all year.
Thanx. |
|
Back to top |
|
|
|