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 ... 14, 15, 16 ... 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: Thu Jun 22, 2017 21:35    Post subject: Reply with quote

ShaDoOoW wrote:
hmm what about polymorph? Also - is this a problem for any/every characters or just for player characters?

polymorph does not solve it, and this bug on any characters include players.
Back to top
View user's profile Send private message
Valbor



Joined: 26 Dec 2016
Posts: 145

PostPosted: Thu Jun 22, 2017 21:50    Post subject: Reply with quote

Here Skywing maybe have found a solution, though i'm not understand nothing Smile
http://www.nwnx.org/phpBB2/viewtopic.php?t=1535&postdays=0&postorder=asc&start=90
Back to top
View user's profile Send private message
DarkSet



Joined: 06 Jun 2016
Posts: 98

PostPosted: Mon Jun 26, 2017 22:42    Post subject: Reply with quote

ShaDoOoW wrote:
DarkSet wrote:
I was away for some time and see lot of interesting stuff was added to the patch. Have a question - do you update documentation as well? Scripts library? Or this topic is the only place to find all the changes and one must read it carefully not to miss something?
I didn't update documentation yet, scripts/includes are added in last release.

Thanks.

Don`t remember is there a reposotory with everything together and latest?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Jun 30, 2017 5:01    Post subject: Reply with quote

DarkSet wrote:
ShaDoOoW wrote:
DarkSet wrote:
I was away for some time and see lot of interesting stuff was added to the patch. Have a question - do you update documentation as well? Scripts library? Or this topic is the only place to find all the changes and one must read it carefully not to miss something?
I didn't update documentation yet, scripts/includes are added in last release.

Thanks.

Don`t remember is there a reposotory with everything together and latest?
since its just me working on this using repository is only extra work for no benefit not to mention I never get familiar/satisfied how current git works, good old SVN days...

Documentation is not there either, Im currently not finding so much mood/time to work on nwn and when I do I want to build not to document. Another thing is that I was told CPP is user-unfriendly without documentation , my english is horrible its hard to read so... why bother.
_________________
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: Sat Jul 01, 2017 12:26    Post subject: Reply with quote

ok, thanks.

Just don't forget to update CP releases on vault, pleese Smile
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Mon Jul 10, 2017 17:22    Post subject: Reply with quote

I tried to make some work on combat modes such as power attack.

There are at least two issues:

1) nwn client calculates the AB in character sheet independently on server, so even if you modify power attack to -3AB, client will show -5. This can be solved with NWNCX but those not using it will see incorrect AB.

2) if I remove the hardcoded bonuses of modes from engine and softcode them in nwscript then the bonuses are visible in effect list and character sheet. (To avoid that I would need to be able to make new effect functions like SetEffectVisible - which I so far didn't manage to do.)

So I am probably not going to release 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: Sat Jul 15, 2017 6:46    Post subject: Reply with quote

Is it possible functions, to determine that the item fits in the space of inventory or not? before (or after) copying this item or creating new.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sat Jul 15, 2017 6:53    Post subject: Reply with quote

Valbor wrote:
Is it possible functions, to determine that the item fits in the space of inventory or not? before (or after) copying this item or creating new.

its easily doable within nwscript, at least "after" copyitem

simply check item possessor if its not oPC the item fell on the ground because didnt fit to inventory

or does it have to be before the copy?
_________________
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 Jul 15, 2017 10:59    Post subject: Reply with quote

ShaDoOoW wrote:
or does it have to be before the copy?

yes, to be before the copy and to before creating new item from the palette.
Can be to function checked the compatibility of the proportions from the creating or copied item and free space in inventory for this proportions?
Proportions i.e. InvSlotWidth and InvSlotHeight in baseitems.2da
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Tue Jul 18, 2017 9:25    Post subject: Reply with quote

Managed to do it, it will work like this:

int NWNXPatch_CheckItemFitsInventory(oPC,oItem)


as far as other requests:

Fixing SetGender won't be possible, unlike NWN2 NWN1 client doesn't update gender ever even if the gender update is sent by client. You will have to boot the player to refresh the gender. Are you using this on NPCs? For what purpose? Anyway, maybe it can get working on NPCs, try send the npc into DM area and jump him back, if this won't work try set gender when he enters dm area then jump him back, last idea is to sent him into limbo (which my plugin cannot do so far but nwnx_funcs I think can).

Combat modes are no go due to the client issues - I recommend to rework combat modes the way PRC did it, ie. remove original combat modes feats and replace them with new ones who will work as a "toggle". The only difference is that the new feat won't be seen "on" on client as combat modes are...
_________________
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 Jul 18, 2017 15:24    Post subject: Reply with quote

ShaDoOoW wrote:
Managed to do it, it will work like this:

int NWNXPatch_CheckItemFitsInventory(oPC,oItem)

Very well, i'll wait for release Very Happy
ShaDoOoW wrote:
Fixing SetGender won't be possible, unlike NWN2 NWN1 client doesn't update gender ever even if the gender update is sent by client. You will have to boot the player to refresh the gender. Are you using this on NPCs? For what purpose? Anyway, maybe it can get working on NPCs, try send the npc into DM area and jump him back, if this won't work try set gender when he enters dm area then jump him back, last idea is to sent him into limbo (which my plugin cannot do so far but nwnx_funcs I think can).

I used it on a PC and NPC, and the idea of the Limbo also failed, have to use ActivatePortal function to reconnect the player back to the server.

Question about NWNXPatch_SetFactionId, when changing the faction on player, then functions GetFirstPC, GetNextPC() no determine the player as the PC.

And you can do function, which will define the active zone in the module, i.e. those areas which are players?
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Jul 19, 2017 9:09    Post subject: Reply with quote

Valbor wrote:
Question about NWNXPatch_SetFactionId, when changing the faction on player, then functions GetFirstPC, GetNextPC() no determine the player as the PC.

Hmm, it seems that the engine functions GetFirst and NextPC are returning players by looping in "no faction" faction. Simply speaking.

It would be very difficult to change this, I suggest to replace these functions with custom function that will return players from your own list. To do it, use pseudo-list or pseudo-array and add players when they enter module and remove them when they leave.
Quote:
And you can do function, which will define the active zone in the module, i.e. those areas which are players?

can you be more specific?
_________________
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 Jul 19, 2017 16:10    Post subject: Reply with quote

ShaDoOoW wrote:
Valbor wrote:
Question about NWNXPatch_SetFactionId, when changing the faction on player, then functions GetFirstPC, GetNextPC() no determine the player as the PC.

Hmm, it seems that the engine functions GetFirst and NextPC are returning players by looping in "no faction" faction. Simply speaking.

I gave you not the right information about this bug, and i apologize for that. So i tested this function after changed PC faction, in module heartbeat script:
Code:
    object oPC = GetFirstPC();
    while(GetIsObjectValid(oPC))
    {
        object oObject = GetFirstObjectInArea(GetArea(oPC));
        while(GetIsObjectValid(oObject))
        {
            if(GetObjectType(oObject) == OBJECT_TYPE_CREATURE)
            {
                FloatingTextStringOnCreature(IntToString(NWNXPatch_GetFactionId(oObject)), oObject, TRUE);
            }
            oObject = GetNextObjectInArea(GetArea(oPC));
        }
        oPC = GetNextPC();
    }


A little later i realized that the problem is not GetFirst and NextPC, actually i not have a floating string over my head, if set TRUE in FloatingTextStringOnCreature --> bBroadcastToFaction. And why so i don't know, may be you missed something in your NWNXPatch_SetFactionId function.

In accordance with all this, i thought that i would need a function to determine the PC via GetNearestObject on each active area, i think the function for defining active areas are no longer required Smile
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Wed Jul 19, 2017 18:11    Post subject: Reply with quote

Valbor wrote:
A little later i realized that the problem is not GetFirst and NextPC, actually i not have a floating string over my head, if set TRUE in FloatingTextStringOnCreature --> bBroadcastToFaction. And why so i don't know, may be you missed something in your NWNXPatch_SetFactionId function.

Ok thats much lesser problem then.

The functions simply changes one creature internal value to value you specified. I couldn't mess it up, any weird issues are simply caused because engine never assumed player can have different faction than no-faction.
_________________
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: Thu Jul 20, 2017 11:29    Post subject: Reply with quote

NWNCX_Patch and NWNX_Patch v1.24

DOWNLOAD - contains updated include files and updated softcoded scripts

Fixes:
- added missing skill timer into pickpocket skill softcoded script
- fixed the feedback on scroll learning which was printing incorrect text instead of name of the spell learned
- fixed rare crash issue with custom spell functions (AddKnownSpell etc.)
- removed the forgotten modifications on power attack mode from client which essentially made the combat mode do nothing

New features:
- improved function SetCustomToken to be able to set system tokens 0-9, very usefull for sending player texts with <CUSTOM0>
- improved function GetEffectType to be able to recognize taunt, knockdown and new custom effects
- softcoded taunt skill
- pickpocket skill softcode is now using new functions to better duplicate feedback messages
- disarm softcode is now using EffectDisarm to duplicate vanilla behavior

New custom functions:
int NWNXPatch_CheckItemFitsInventory(object oCreature, object oItem);
effect NWNXPatch_SetEffectTrueType(effect eEffect, int nTrueType);
effect NWNXPatch_SetEffectSpellId(effect eEffect, int nSpellId);
effect NWNXPatch_SetEffectCreator(effect eEffect, object oCreator);
effect NWNXPatch_SetEffectCasterLevel(effect eEffect, int nCasterLevel);
effect NWNXPatch_SetEffectInteger(effect eEffect, int nTh, int nValue);
void NWNXPatch_SetEffectIntegerVoid(object oCreature, int nEffectPosition, int nTh, int nValue);
int NWNXPatch_GetEffectInteger(effect eEffect, int nTh);
int NWNXPatch_GetEffectPosition(object oObject, effect eEffect);
effect NWNXPatch_EffectAttackIncreaseUncapped(int nBonus);
effect NWNXPatch_EffectModifyBAB(int nBaseAttackBonus);

+

int SkillTimerCurrent(object oCreature, int nSkill);
void SkillTimerInitialize(object oCreature, int nSkill);
void SkillTimerReduce(object oCreature, int nSkill);

Which are custom NWScript functions added into 70_inc_main needed for softcoded skill scripts.

Notes:

I finally found a way how to modify effects and make new custom effects. Currently featuring EffectModifyBAB (which will allow you to make true PnP Divine Might without ugly workarounds - using ModifyBaseAttackBonus function had several drawbacks like dispelling...), EffectAttackIncreaseUncapped which will ignore +20 cap and a way how to change your effect into any vanilla effect you like like taunt or bonus feat.

However, all the functions except NWNXPatch_SetEffectIntegerVoid works only on effects declared in NWScript and needs to be applied on creature to get them to work. Ie. you cannot change and already existing effect on creature into something else.

The NWNXPatch_SetEffectIntegerVoid is exception for testing purposes. I don't actually think this function can do anything because of the way how effect works. I tried it on EffectAbilityIncrease and it didn't change the values, I mean it did internally, but the effects on PC didn't change. You can try it maybe it will work on something but I doubt it. If no usage will be found I will remove this function in next release.

Also, I obviously didn't make a research which effect uses which integers and what they mean. Thats something you need to do yourself. I made the function as much general as possible also to avoid too many identifier problem in toolset script editor which would creating extra function for each effect type definitely trigger. Check 70_s2_taunt for example how to use them.

That would be all, let me know if you need some effect function that I didn't add.
_________________
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 ... 14, 15, 16 ... 42, 43, 44  Next
Page 15 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