logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Base Ability Score Increase

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Red



Joined: 14 Feb 2009
Posts: 21

PostPosted: Sat Feb 14, 2009 22:31    Post subject: Base Ability Score Increase Reply with quote

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
View user's profile Send private message
Red



Joined: 14 Feb 2009
Posts: 21

PostPosted: Sat Feb 14, 2009 23:00    Post subject: Reply with quote

I searched before I posted, I swear Embarassed

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
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Tue Feb 17, 2009 2:11    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message
Red



Joined: 14 Feb 2009
Posts: 21

PostPosted: Sat Feb 28, 2009 21:32    Post subject: Reply with quote

I ended up using th HGLL. Best tip I have had all year.
Thanx.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group