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 
 
nwnx_func problems

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Sun Oct 10, 2010 20:53    Post subject: nwnx_func problems Reply with quote

I'm useing the nwnx_functions by mad I belive cant rem exactly.
1st lvl pc to lvl 40
2nd pc just happens(for testing) to get all abilities set to 243(max if want to give them items with 12 on abils)

3rd PROBLEM!! Now... fort/will/reflex negitive, and some skills negitive.

Is there some 2da I need to fix like the encumberence problem that allows saves and skills to be at high numbers, or a script/nwnx_function that looks and then sets to disiered amount so pc stats correct when it comes to saves and skills.

Forgive my gramical errors
God Bless

Greyfort
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Oct 11, 2010 2:18    Post subject: Reply with quote

If I understand you correctly you're wanting abilities, skills and saving throws to be higher than 255 or 127?

The problem with that lies in the way the programmers of nwn chose to do certain things, more specifically what "types" to use to store those values.

Abilities use a BYTE which can only hold values from 0 to 255 - that's a computer related limit and there's pretty much nothing to be done about that.

Skills and Saving throws have the same limit, except that they can also be negative which puts the upper limit at 127.

If you try to go above those limites the numbers "roll over" meaning they start again at their lower limit. for example if a skill is at 127, adding 1 to it will put it at -127 (not 128).
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Mon Oct 11, 2010 6:40    Post subject: Reply with quote

no I dont want it to go over the 255, when we as programers set abils to 243 so players can have +12 gear which gives the max abil score of 255.

That seems to mess up the saves, ie they turn to neg is there something in the 2das I need to fix.

or i guess if I set there abilis higher I need to also check saves and make sure they dont go higher then 127. and the skills they also dont go higher then 127? so over all even though abils can go to 255 (243 if want to include gear) this fritz out saves and skills and there is no work around other then checking and scripting setting to max to insure no neg. right.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Mon Oct 11, 2010 19:01    Post subject: Reply with quote

Nope. While ability scores are unsigned 8-bit integers (0 to 255), skills and saves are signed 8-bit integers (-128 to 127). There's no way to change that without rewriting the game.
Back to top
View user's profile Send private message
Lokey



Joined: 02 Jan 2005
Posts: 158

PostPosted: Tue Oct 12, 2010 12:52    Post subject: Reply with quote

You'll need to change their saving throw fields, as those roll over. I don't think skills do (now or if they ever did).
_________________
Neversummer PW NWNx powered mayhem Wink
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Tue Oct 12, 2010 22:17    Post subject: Reply with quote

Yeah thats what I said at ed of post...*checking and scripting setting to max to insure no neg.*

so thats what I did and now I have saves in positive amount. I was just unsure and before I spent time tryn to script something that may have been a 2da I asked. Thankyou all of you.
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Thu Nov 18, 2010 5:40    Post subject: Reply with quote

Ok I have another question also I noticed the spell slots if you have a lvl 40 cleric you have 34 spell slots for lvl7-9, 35 for lvl6, 36 for lvl3-5, 37 for lvl 1-2. My QUESTION is will this cause server to crash, if so can it be fixed with 2da
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Thu Nov 18, 2010 18:58    Post subject: Reply with quote

Greyfort wrote:
Ok I have another question also I noticed the spell slots if you have a lvl 40 cleric you have 34 spell slots for lvl7-9, 35 for lvl6, 36 for lvl3-5, 37 for lvl 1-2. My QUESTION is will this cause server to crash, if so can it be fixed with 2da


Will this cause crash? I dont know, yo might be the first one who gets so many spell slots. Try it. Tell us.

Can it be fixed with 2da? I doubt about it...
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Thu Nov 18, 2010 21:54    Post subject: Reply with quote

ok Yes server crashes your char cant move, all spells seem gone all levles disapeared in book.
*SO DONT MEM all spell slots will cause crash*.

Anyone know ware I might be able to fix that.

Remember this is a lvl 40 cleric with 243 all abilities with armor that raises abills to 255 save throws at +127 all done through nwnx_func scripting. is there a 2da that works with spell slots?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Nov 19, 2010 1:13    Post subject: Reply with quote

Greyfort wrote:
is there a 2da that works with spell slots?
hmm actually there is, I forget about it, cls_spgn_* but this handles only number of spell slots per level of chosen class. It has nothing to do with bonus spell slots from extremely high ability, so there is no way to fix it via this.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Fri Nov 19, 2010 6:15    Post subject: Reply with quote

Ok another thing I found you can only have 255spells memed

so 6 cantrips and 249 of anyspell level...or 0 cantrips 255 spells of any level. Thats what seems to keep server from crashing.

With that said my issue now is can I remove xtra spell slots from pc char to make sure they only have 255 total, other wise they can cause them selfs and posssible server to crash.

Another NOTE: if you dont go over first 3 lines of spell slots thats 9*3=27spells per level( 1-9) 243 total + 6 cantrips = 249 spells total with 6 spell buffer just incase when meming you go over 1 or 2 etc. you can increase this buffer to 12 if you exclude cantrips with 243 spells who needs them.

GOOD RULE THUMB JUST DONT MEM MORE THEN 27 SPELLS PER LEVEL, even if you realy realy REALY want to !!!DONT!!!

That make sense to you all, is there a fix for anything described in the post?
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 development 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