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 ... 11, 12, 13 ... 42, 43, 44  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sat Jun 03, 2017 21:32    Post subject: Reply with quote

Valbor wrote:
ShaDoOoW wrote:
are you sure you test this in singleplayer? it is not enabled in server mode yet. If so perhaps send savegame.

In single player everything is fine, and will soon release this function for multiplayer?

Yes it will but currently Im developing new features for singleplayer because it is easier to test. After its tested I redo the code for multiplayer as well.

Currently Im working on modifying number of attacks. Got it working via variables ie. "NUM_ONHAND", "NUM_OFFHAND" and "NUM_EXTRA". But while this is working in my PW-only plugin I had even better feature which implemented PnP Divine Power and Tenser Transformation ie. setting BAB to fighter of same level as long as the spell is running. This was set as a constant inside plugin ie. if character has spellid divine power bab = level but thats not suitable for community patch because not everyone will want such feature and thus I need to come up with something dynamic. Currently thinking about EffectModifyBaseAttackBonus but Im struggling to code custom effect...
_________________
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: Sun Jun 04, 2017 20:16    Post subject: Reply with quote

I've found a strange bug in x3_inc_horse.nss in function HorseGetIsDisabled(object oCreature=OBJECT_SELF) in GetEffectType(eEffect)==EFFECT_TYPE_INVALIDEFFECT. It defines effect from EffectModifyAttacks(int nAttacks) as invalid effect, and does not mounted on horse with effect of additional attacks per round. This bug has nothing to do with Community Patch, but maybe you could somehow add an ID for such effects as EffectModifyAttacks, example EFFECT_TYPE_MODIFYATTACKS, EFFECT_TYPE_KNOCKDOWN etc?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Tue Jun 06, 2017 10:20    Post subject: Reply with quote

Valbor wrote:
I've found a strange bug in x3_inc_horse.nss in function HorseGetIsDisabled(object oCreature=OBJECT_SELF) in GetEffectType(eEffect)==EFFECT_TYPE_INVALIDEFFECT. It defines effect from EffectModifyAttacks(int nAttacks) as invalid effect, and does not mounted on horse with effect of additional attacks per round. This bug has nothing to do with Community Patch, but maybe you could somehow add an ID for such effects as EffectModifyAttacks, example EFFECT_TYPE_MODIFYATTACKS, EFFECT_TYPE_KNOCKDOWN etc?
thats not a bug but a workaround for engine limitation

I also cannot fix this the way you wish because if the GetEffectType suddenly returned EFFECT_TYPE_MODIFYATTACKS the code above would fail. And while I can modify the code and put it inside comunnity patch those who use only plugin and not patch or just use 1.69 version of x3_inc_horse will have a malfunctions anyway.

I can try to make a new custom nwnx function that returns correct effect type but effects still give me a headache Smile so it won't be soon.
_________________
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: Tue Jun 06, 2017 16:35    Post subject: Reply with quote

Just noticed a bug, your scripts 70_s2_knockdown.nss and 70_s2_disarm.nss not executed when the use of these special attacks.

And could you add scripts to Stunning fist, Called shot and Sap attacks?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Thu Jun 08, 2017 19:25    Post subject: Reply with quote

Valbor wrote:
Just noticed a bug, your scripts 70_s2_knockdown.nss and 70_s2_disarm.nss not executed when the use of these special attacks.

And could you add scripts to Stunning fist, Called shot and Sap attacks?

it seems that I actually never managed to get knockdown working and the code is currently disabled in my plugin, disarm works for me in singleplayer however the script triggers after the roll which is known limitation.

I am working on this now. I think I got better way to hook disarm and hopefully I will be able to do the same for knockdown. Will release new singleplayer plugin with this soon.
_________________
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: Fri Jun 09, 2017 1:17    Post subject: Reply with quote

here it is: DOWNLOAD

new nwncx_patch version that brings better disarm and knockdown softcoded scripts, this time you can change the skill check too

updated scripts are inside archive

Notes:
1) still not possible to change the AB modifiers, its easy to statically but doesn't fit the idea of doing this dynamically
2) the knockdown effect differs from vanilla a bit - I simply used EffectKnockdown where vanilla uses EffectSetState or something like that - this means that knockdown from softcoded script is now detectable by GetEffectType but also it might perform a little differently than expected
3) knockdown effect is set for 6.0 seconds, nwn wiki says the vanilla knockdown effect duration is 1 round - current flurry which I don't know how to implement
4) both knockdown and disarm applications are done in different time than in vanilla - the softcoded script runs OnAttack where the skill check is calculated but in vanilla the effect applications are delayed and done at the time OnDamaged - I added delays to make it as much close to vanilla but its not the same
5) in case you would be bothered with changes 2-4 you can force plugin to perform vanilla effect application, details in scripts


Tommorrow I will try to add stunning fist and called shot.
_________________
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: Fri Jun 09, 2017 23:54    Post subject: Reply with quote

Stunning fist and Sap done as well with also Quivering Palm remake that should now offer same features as other special attacks

I also made interesting discovery. I found a way how to force game to show custom special attack floating text such as
*Crippling Strike hit*

I still don't know how to add a new feat that, when used would work as special attack but even this could have interesting usage for NPCs who can use one of the vanilla mode such as stunning fist where softcoded script would perform different effect and forced plugin to write something else instead of defaul *Stunning Fist* over npc's head.

EDIT: yes I think I will be able to add possibility of custom special attacks
_________________
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: Sat Jun 10, 2017 8:37    Post subject: Reply with quote

Bug: With two or more of disarms at flurry attacks, copied two or more times of disarmed weapon from his right hand, due to the fact that copy weapon and destroy weapon is different in time (even with the difference in 0.0 seconds will bug):
Code:
void Disarm(object oWeapon, object oTarget)
{
    CopyObject(oWeapon, GetLocation(oTarget));
}

        if(GetIsPC(oTarget))
        {
          //CopyObject(oWeapon, GetLocation(oTarget));
            AssignCommand(oTarget, Disarm(oWeapon, oTarget));
        }
        DestroyObject(oWeapon, 0.0);//there needs to be a delay because the script to get it closer to vanilla

it's a my variant this solution.

I also remember a funny thing in standart game, when me disarmed NPC with unarmed attack and my weapon was in his inventory, then had to kill him to get my weapon back Smile Maybe this also a standard functions from vanilla disarm?
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Sat Jun 10, 2017 12:04    Post subject: Reply with quote

You can add function for perform attacks of opportunity with ranged weapons?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sat Jun 10, 2017 12:51    Post subject: Reply with quote

Valbor wrote:
Bug: With two or more of disarms at flurry attacks, copied two or more times of disarmed weapon from his right hand, due to the fact that copy weapon and destroy weapon is different in time (even with the difference in 0.0 seconds will bug):
oh right, delays... yea didn't realize this might happen and didn't notice multiple copies under my feet ingame too Very Happy

Valbor wrote:
You can add function for perform attacks of opportunity with ranged weapons?

I will try it should be doable.
_________________
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: Sat Jun 10, 2017 19:59    Post subject: Reply with quote

Is it possible the Defensive Roll function add in softcoded? And there save DC is reset if the damage is more than 127, i would like it as something to fix.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Jun 12, 2017 11:21    Post subject: Reply with quote

Quick status update:

So I got all special attacks except called shot softcoded. Smite good/evil, Stunning Fist, Quivering Palm, Knockdown, Disarm, Sap.
On top of that it will be possible to modify dealt damage (since thats what Smite does) using functions NWNXPatch_Get/SetTotalDamageDealtByType

unfortunately currently its no longer possible to force vanilla effect behavior and we have to suffice with the scripted replacement in softcoded scripts.

I also managed to make possible custom special attacks using NWNXPatch_ActionUseSpecialAttack function which will then trigger script '70_s2_specattk' where you will be able to code pretty much anything.

Currently, I am thinking about the attack roll modification for many special attacks and how to allow user to modify it.
One idea is to trigger the softcoded script again (so it will fire twice) and code it as a two-event script "pre-attack roll/post-attack roll". This would then allow to softcode the attack roll modifications however at the cost of making it maybe unneccessary complicated.

Second option would be to trigger one script for all special attacks which will calculate it, say 70_s2_attkroll or something like that.

And third option is to provide a source code for plugin where the attack roll bonuses will be softcoded inside plugin, so experienced builders will be able to modify it and recompile plugin to get their changes apply.

EDIT: or just redo it completely and use one script for all special attacks and all events. So everything would be coded in 70_s2_specattk.
_________________
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: Mon Jun 12, 2017 12:13    Post subject: Reply with quote

ShaDoOoW wrote:
So I got all special attacks except called shot softcoded. Smite good/evil, Stunning Fist, Quivering Palm, Knockdown, Disarm, Sap.
and Ki Damage? Smile
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Jun 12, 2017 13:09    Post subject: Reply with quote

Valbor wrote:
ShaDoOoW wrote:
So I got all special attacks except called shot softcoded. Smite good/evil, Stunning Fist, Quivering Palm, Knockdown, Disarm, Sap.
and Ki Damage? Smile

oh i forgot one then Smile good catch
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
highv priest



Joined: 01 Mar 2013
Posts: 111

PostPosted: Mon Jun 12, 2017 14:02    Post subject: Reply with quote

Does this modify the attack when used? When swung? Or when hit?
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 ... 11, 12, 13 ... 42, 43, 44  Next
Page 12 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