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 ... 38, 39, 40 ... 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: Thu Dec 14, 2017 23:04    Post subject: Reply with quote

Quote:
How can i configure the Weapon of Choice for unarmed strike? In weaponfeats.2da --> WC collum for unarmed i set for example 100 (i.e. focus on unarmed) but no any effects, same situation is with the other types of weapons example such as ranged or creature weapons

I will check this - by the code it should work, there is probably some hardcoded part in engine that prevents it.
Quote:
GetEffectType(eBad) == EFFECT_TRUETYPE_WOUNDING not defined if i have Wounded effect from on monster hit!

can you explain that a bit more?
Valbor wrote:
SetLocalInt(OBJECT_SELF, "SPELL_METAMAGIC_MODIFIER", METAMAGIC_MAXIMIZE); can't make it work.

SetLocalInt(OBJECT_SELF, IntToString(GetSpellId())+"_METAMAGIC_MODIFIER", METAMAGIC_MAXIMIZE); Tried that too, still no Sad

How do i add a second or third metamagic to the already existing metamagic on my spell?

Checked it and the code for this feature is missing. Untill I fix this, you can use spellhook and SPELL_METAMAGIC_OVERRIDE instead. Ie. read current GetMetaMagic value, combine them nMeta
|METAMAGIC_MAXIMIZED and set into this variable.
_________________
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 Dec 17, 2017 7:31    Post subject: Reply with quote

ShaDoOoW wrote:
Quote:
GetEffectType(eBad) == EFFECT_TRUETYPE_WOUNDING not defined if i have Wounded effect from on monster hit!

can you explain that a bit more?

I set at monster weapon property On Monster Hit: Wounding Amount: 1, after hit i check with script:
Code:
    //Search for negative effects
    effect eBad = GetFirstEffect(oObject);
    while (GetIsEffectValid(eBad))
    {
        if (GetEffectType(eBad) == EFFECT_TRUETYPE_WOUNDING))
        {
            /*For example*/ RemoveEffect(oObject, eBad);
        }
        eBad = GetNextEffect(oObject);
    }
but he doesn't see effect from On Hit: Wounding to undertake any action with him.
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Sun Dec 17, 2017 12:32    Post subject: Reply with quote

SetLocalInt(OBJECT_SELF, "ITEM_CASTER_LEVEL_OVERRIDE", 50); also i can't make it work for items.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sat Dec 30, 2017 21:47    Post subject: Reply with quote

Valbor wrote:
I set at monster weapon property On Monster Hit: Wounding Amount: 1, after hit i check with script:
Code:
    //Search for negative effects
    effect eBad = GetFirstEffect(oObject);
    while (GetIsEffectValid(eBad))
    {
        if (GetEffectType(eBad) == EFFECT_TRUETYPE_WOUNDING))
        {
            /*For example*/ RemoveEffect(oObject, eBad);
        }
        eBad = GetNextEffect(oObject);
    }
but he doesn't see effect from On Hit: Wounding to undertake any action with him.

Hmm checked in engine and it assigns correct id to the wounding effect (84).

I recommend to make full debug of what is happening - try print all (internal) effects present on target with their type to see. Also make sure you are retrieving effects from target and not weapon's owner Wink .

Valbor wrote:
SetLocalInt(OBJECT_SELF, "ITEM_CASTER_LEVEL_OVERRIDE", 50); also i can't make it work for items.

works for me, can you sent me the area/creature/item to reproduce?
_________________
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 Jan 02, 2018 9:15    Post subject: Reply with quote

ShaDoOoW wrote:

Valbor wrote:
SetLocalInt(OBJECT_SELF, "ITEM_CASTER_LEVEL_OVERRIDE", 50); also i can't make it work for items.

works for me, can you sent me the area/creature/item to reproduce?

I run the game not through your plugin, with the plugin it works, Sorry.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Tue Jan 02, 2018 14:54    Post subject: Reply with quote

Valbor wrote:
ShaDoOoW wrote:

Valbor wrote:
SetLocalInt(OBJECT_SELF, "ITEM_CASTER_LEVEL_OVERRIDE", 50); also i can't make it work for items.

works for me, can you sent me the area/creature/item to reproduce?

I run the game not through your plugin, with the plugin it works, Sorry.

uhhh this needs to work without plugin as this system has nothing to do with nwnx...
_________________
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: Wed Jan 03, 2018 7:26    Post subject: Reply with quote

ShaDoOoW wrote:

uhhh this needs to work without plugin as this system has nothing to do with nwnx...

I checked with Spell Resistance, Set caster level 50 and without nwnx i casted fireball level 10 from item, this not troughs from spell resist 32 (item bonus in creature). But with nwnx this already through from this spell resist. I still can't understand how it reduces resistance to spells in this case without the nwnx, or in this case ignore this resistance?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Jan 03, 2018 14:45    Post subject: Reply with quote

Valbor wrote:
ShaDoOoW wrote:

uhhh this needs to work without plugin as this system has nothing to do with nwnx...

I checked with Spell Resistance, Set caster level 50 and without nwnx i casted fireball level 10 from item, this not troughs from spell resist 32 (item bonus in creature). But with nwnx this already through from this spell resist. I still can't understand how it reduces resistance to spells in this case without the nwnx, or in this case ignore this resistance?

well there is a caster level for dmg and caster level for SR purposes

the CL for dmg must work properly without plugin
the SR calculation should also work without plugin as long as the script doesn't deal with monk's SR

it works by temporarily reducing target's SR so even with original CL 10 it should be able to penetrate SR 32 from item, can you send me module to test this?
_________________
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: Wed Jan 03, 2018 15:24    Post subject: Reply with quote

I tried this option and now everything works fine even without the nwnx Smile

object oItem = GetSpellCastItem();
SetLocalInt(oItem, "ITEM_CASTER_LEVEL_OVERRIDE", 50);
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Jan 03, 2018 15:51    Post subject: Reply with quote

Valbor wrote:
I tried this option and now everything works fine even without the nwnx Smile

object oItem = GetSpellCastItem();
SetLocalInt(oItem, "ITEM_CASTER_LEVEL_OVERRIDE", 50);

thats how it should be done (or set manually), so what you did differently?
_________________
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: Wed Jan 03, 2018 16:40    Post subject: Reply with quote

ShaDoOoW wrote:

thats how it should be done (or set manually), so what you did differently?
I have a bad English, the question for me is not quite clear.

I think i've already set up this function i have now works.
Back to top
View user's profile Send private message
DarkSet



Joined: 06 Jun 2016
Posts: 98

PostPosted: Wed Jan 03, 2018 21:20    Post subject: Reply with quote

Quote:
the CL for dmg must work properly without plugin
the SR calculation should also work without plugin as long as the script doesn't deal with monk's SR

but how does it work without plugin? It's in CPP spells scripts? So if I have my own custom scripts it will not work?

I thought it changes how GetCasterLevel internal function works so if caster is an item and it has local int for override - function returnes this override instead of item property 2da caster level value.
Is it not?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Jan 03, 2018 22:42    Post subject: Reply with quote

DarkSet wrote:
Quote:
the CL for dmg must work properly without plugin
the SR calculation should also work without plugin as long as the script doesn't deal with monk's SR

but how does it work without plugin? It's in CPP spells scripts? So if I have my own custom scripts it will not work?

I thought it changes how GetCasterLevel internal function works so if caster is an item and it has local int for override - function returnes this override instead of item property 2da caster level value.
Is it not?

There needs to be distunguished between cpp and nwn(c)x_patch plugin.

Spell informations overriding including caster level is done using completely rewritten spellscripts. Those using their own scripts won't be able to use the variables for overriding anything. This feature doesn't use nwnx with exception of the spell resistance workaround where the caster level has to be changed from low value to high value - as said already, there is a working workaround for this via decreasing spell resistance. This however doesn't work against monk players and npcs. Which is where nwnx helps - the script basically attemps to reduce SR using nwn(c)x_patch SpellResist overriding variable - and checks if it worked - if not it will use default workaround.

Changes to caster level using nwnx are tricky anyway - nwn engine in fact doesn't have function to return caster level, it is calculated from scratch on several places.
_________________
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 Jan 23, 2018 18:02    Post subject: Reply with quote

NWNXPatch_SetImmunityOverride(oTarget, IMMUNITY_TYPE_CRITICAL_HIT, FALSE);

This system does not remove the immunity from feats?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Jan 24, 2018 0:28    Post subject: Reply with quote

Valbor wrote:
NWNXPatch_SetImmunityOverride(oTarget, IMMUNITY_TYPE_CRITICAL_HIT, FALSE);

This system does not remove the immunity from feats?

unfortunately the feat's immunity is hardcoded

I think nwnx_cool/nwnx_funcs had the same problem.

I had in plan to fix this but it was lots of work and then EE came. Currently I am not sure I will continue with nwnx_patch for 1.69 development sorry.
_________________
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 ... 38, 39, 40 ... 42, 43, 44  Next
Page 39 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