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_Patch
Goto page Previous  1, 2, 3 ... 9, 10, 11 ... 42, 43, 44  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Sat Mar 04, 2017 7:58    Post subject: Reply with quote

Hi ShaDoOoW. At your project is possible the script whose execution will before each attack, and with support functions GetLastAttackMode() and GetLastAttackType()? Also function to detect if this attack is Sneak Attack if it possible?
Back to top
View user's profile Send private message
DarkSet



Joined: 06 Jun 2016
Posts: 98

PostPosted: Mon Mar 06, 2017 2:40    Post subject: Reply with quote

+1 for detecting if attack is a sneak or death attack. At least at OnHit items tag based scripts. But having separate on attack script is even better, if it will fire even if no physical damage delt, as for OnHit.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Mar 06, 2017 6:05    Post subject: Reply with quote

its doable but it might negatively impact game efficiency, i don't think it is good idea

i mean sure, it is no problem to code something inside the plugin which would change for example if attack is sneak or not, but calling a nwscript script that performs this task and then read some local variables to do it is not very good idea for something that occurs so often
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
DarkSet



Joined: 06 Jun 2016
Posts: 98

PostPosted: Mon Mar 06, 2017 8:55    Post subject: Reply with quote

As for me - don't want to change it, just detect if attack is sneak or death. Maybe for efficiency create a script, that fire only in sneak/death attack? For not reading local vars in nwscript to detect it but deal with a fact that atack is a sneak. Like on disarm script, for example.

Also - is there any way to make tag based OnHit work when no physical damage is dealt? I treat it as a bug of nwn, so if it can be fixed globally - it's great.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Mar 10, 2017 12:01    Post subject: Reply with quote

DarkSet wrote:
As for me - don't want to change it, just detect if attack is sneak or death. Maybe for efficiency create a script, that fire only in sneak/death attack? For not reading local vars in nwscript to detect it but deal with a fact that atack is a sneak. Like on disarm script, for example.

Also - is there any way to make tag based OnHit work when no physical damage is dealt? I treat it as a bug of nwn, so if it can be fixed globally - it's great.

I was able to create a function GetLastAttackSneak() but it will work only in OnHitCastSpell scripts, lmk
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Fri Mar 10, 2017 16:49    Post subject: Reply with quote

ShaDoOoW wrote:
I was able to create a function GetLastAttackSneak()...

It suits me, and when will be update?
Back to top
View user's profile Send private message
highv priest



Joined: 01 Mar 2013
Posts: 111

PostPosted: Tue Mar 21, 2017 4:14    Post subject: Reply with quote

Here is a real challenge for you. Put a hook in for whenever an AI executes a pathfind call(doesn't need to be able to stop it, just a signal to know it's happening and ideally have it trigger for the AI actually doing it). I've been trying to figure out how to do this for forever, because one of nwns biggest problems is AI can get stuck and when they do they grab the server by the legs and drag it into the deepest pit of hell with lag(only takes like 20-30 ai to get stuck to start causing some lag).

I know it must be possible because nwnx_profiler knows when a pathfind call is executed, but I can't figure out how they did it.

While I understand realism and such, if an AI gets stuck in a damn wall I'd rather them either kill themselves or use a teleport or something more productive then just spamming the same broken pathing.

EDIT = Also be careful using "GetLastAttackTarget" Shadoow, it works fine for AI, but on players it's... Lacking. I think the actual data read for it doesn't update instantly, because I was using that function combined with on hit cast to trigger a save on death attacks and players were basically triggering the save all the time if they just broke lock and attacked. I ended up recoding my own homebrew GetLastAttackTarget using the OnAttack event from Terra with a local object instead.
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Fri Mar 24, 2017 7:20    Post subject: Reply with quote

Someone knows why on immortal creature does not effecting such effects as paralysis or daze?
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Sat Mar 25, 2017 7:28    Post subject: Reply with quote

Hi, another question for you ShaDoOoW, would you be able to cleave (great cleave) implement after the Devastating Critical? since he is required for taking Devast feat.
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Sat Mar 25, 2017 17:12    Post subject: Reply with quote

Is it possible somehow to apply the effects of Taunt or Wounding at creature from a script?
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Wed Mar 29, 2017 21:20    Post subject: Reply with quote

Bug: When making a devastating critical hit with melee weapons, message is shown that it was normal critical hit (not devastating!), but with ranged weapons the message everything is fine.
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Sat Apr 08, 2017 5:02    Post subject: Reply with quote

In 70_s3_healkit.nss maybe in there is missing part of the code:

if(nResult >= nDC && GetIsEffectValid(eEffect))
{
Code:
if(GetEffectType(eEffect) == EFFECT_TYPE_POISON || (GetEffectType(eEffect) == EFFECT_TYPE_VISUALEFFECT && GetTag(GetEffectCreator(eEffect)) == "70_EC_POISON"))
{
    DeleteLocalInt(oTarget, "POISON_ID");
}
else if(GetEffectType(eEffect) == EFFECT_TYPE_DISEASE)
{
    DeleteLocalInt(oTarget, "DISEASE_ID");
}

RemoveEffect(oTarget, eEffect);
}

this is the conclusion i made after the creature was several different diseases with one DC on all diseases.
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Apr 19, 2017 1:56    Post subject: Reply with quote

highv priest wrote:
Here is a real challenge for you. Put a hook in for whenever an AI executes a pathfind call(doesn't need to be able to stop it, just a signal to know it's happening and ideally have it trigger for the AI actually doing it). I've been trying to figure out how to do this for forever, because one of nwns biggest problems is AI can get stuck and when they do they grab the server by the legs and drag it into the deepest pit of hell with lag(only takes like 20-30 ai to get stuck to start causing some lag).

I know it must be possible because nwnx_profiler knows when a pathfind call is executed, but I can't figure out how they did it.

While I understand realism and such, if an AI gets stuck in a damn wall I'd rather them either kill themselves or use a teleport or something more productive then just spamming the same broken pathing.

EDIT = Also be careful using "GetLastAttackTarget" Shadoow, it works fine for AI, but on players it's... Lacking. I think the actual data read for it doesn't update instantly, because I was using that function combined with on hit cast to trigger a save on death attacks and players were basically triggering the save all the time if they just broke lock and attacked. I ended up recoding my own homebrew GetLastAttackTarget using the OnAttack event from Terra with a local object instead.



Found this in the profiler source: looks to be how the path finding was hooked

CNWTileSurfaceMesh::IntraTileDFS(CNWTile *,CNWArea *,CPathfindInformation *,int,float,int,float,float,float,float,float,int)
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sun May 28, 2017 5:06    Post subject: Reply with quote

Hey guys sorry I was away from NWN for some time.
Valbor wrote:
Bug: When making a devastating critical hit with melee weapons, message is shown that it was normal critical hit (not devastating!), but with ranged weapons the message everything is fine.

I know, I will try to fix this, this is one of the first patches I made and I was glad it was even working without crashes. My previous attempts to restore vanilla floating message feedback crashed. Maybe I can do better now.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sun May 28, 2017 5:08    Post subject: Reply with quote

Valbor wrote:
In 70_s3_healkit.nss maybe in there is missing part of the code:

if(nResult >= nDC && GetIsEffectValid(eEffect))
{
if(GetEffectType(eEffect) == EFFECT_TYPE_POISON || (GetEffectType(eEffect) == EFFECT_TYPE_VISUALEFFECT && GetTag(GetEffectCreator(eEffect)) == "70_EC_POISON"))
{
DeleteLocalInt(oTarget, "POISON_ID");
}
else if(GetEffectType(eEffect) == EFFECT_TYPE_DISEASE)
{
DeleteLocalInt(oTarget, "DISEASE_ID");
}
RemoveEffect(oTarget, eEffect);
}

this is the conclusion i made after the creature was several different diseases with one DC on all diseases.

Hmm. Its been long but it seems to be correct. Thanks will add into "official" code.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
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
Goto page Previous  1, 2, 3 ... 9, 10, 11 ... 42, 43, 44  Next
Page 10 of 44

 
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