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 
 
Bug: NWNXFixes - settings below -10 hitpoints for death.

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



Joined: 03 Jun 2007
Posts: 30
Location: USA

PostPosted: Tue Jan 17, 2017 17:34    Post subject: Bug: NWNXFixes - settings below -10 hitpoints for death. Reply with quote

If you set your negative hit point value in the nwnx2.ini file to anything less than -10 the OnPlayerDying script does not fire.

example:
Code:

hp_limit = -20                     # Negative HP limit - values up to -127 are allowed


the player is then attacked by a creature or takes damage in some other way.
50 hitpoints combat continues
25 hitpoints combat continues
15 hitpoints combat continues
-17 hitpoints, combat continues and now you are walking around dead.

what should happen:

the player is then attacked by a creature or takes damage in some other way.
50 hitpoints combat continues
25 hitpoints combat continues
15 hitpoints combat continues
-17 hitpoints, combat continues and the OnPlayerDying script should fire causing you to do what is in the script (bleed, stabilize, die).

I can reproduce this bug always.
you can see it for yourself if you contact me on the nwvault irc channel, i can demonstrate it on twitch.tv

Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
MetaPhaze



Joined: 03 Jun 2007
Posts: 30
Location: USA

PostPosted: Tue Jan 17, 2017 18:50    Post subject: Reply with quote

Quote:
<20Zebranky18> char *pIsPCDyingPatch = (char *)0x081d5511;
[10:30:05] 18<20Zebranky18> d_enable_write((dword) pIsPCDyingPatch);
[10:30:05] 18<20Zebranky18> *pIsPCDyingPatch = hpLimit;
[10:30:10] 18<22nwvault18> <niv> there, something like this: https://gist.github.com/niv/380338f7dad0d0f06656ed766a746d8f
[10:30:41] 18<20Zebranky18> I mean, sure, if you want to do it properly
[10:31:26] 18<20Zebranky18> But throw in those three lines immediately after FixesHooks.cpp:421 and it should do the trick

This seems to work (zebranky's fix)
putting it through more testing.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
MetaPhaze



Joined: 03 Jun 2007
Posts: 30
Location: USA

PostPosted: Mon Apr 16, 2018 6:32    Post subject: Reply with quote

This was working fine, then I did a git pull, seems someone has messed it up again. Compiling with GCC 6.4.0 works, but when you load the server up it will crash with the only debug message as oShutting downo
I used my copy of FixesHooks.cpp and it compiled and runs fine.
Something funky going on in that file on git.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux 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