View previous topic :: View next topic |
Author |
Message |
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Wed Jul 26, 2017 19:19 Post subject: |
|
|
Quote: | - ini option in nwnplayer.ini ? |
this
---
Could you put a list of all the levers for the plug-in?
I suspect that new ones have been added that are not known |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Thu Jul 27, 2017 17:32 Post subject: |
|
|
The option to turn off TAB key feature must be variable actually...
I am still solving the HighlightObject function. Found out its possible to highlight object in several colors (red, green, light purple, bright white), but even after several hours I couldn't decrypt the color codes. They don't match anything already used in game elsewhere like fog colors.
So there are three options:
- make it so it will always highlight in bring white
- make it so it will highlight in a color it would be highlighted if player pressed TAB (ie. enemies red, friendlies green, player purple, rest white)
- let scripter choose one of these colors with additional parameter
- let scripter mix his own color using 3 parameters (and give him the color codes for those 4 colors known) _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Thu Jul 27, 2017 17:51 Post subject: |
|
|
Hello Terra_777 long time no see!
These are the values used:
//red highlight
//object->Hilite(1065353216,1036831949,1036831949,2,0,1);
//green highlight
//object->Hilite(1050253722,1065353216,1050253722,2,0,1);
//light purple
//object->Hilite(1053609165,1053609165,1065353216,2,0,1);
//light green
//object->Hilite(1050253722,1065353216,1065353216,2,0,1);
//bright light
//object->Hilite(1065353216,1065353216,1065353216,2,0,1); _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Thu Jul 27, 2017 18:26 Post subject: |
|
|
Quote: | - make it so it will always highlight in bring white
- make it so it will highlight in a color it would be highlighted if player pressed TAB (ie. enemies red, friendlies green, player purple, rest white)
- let scripter choose one of these colors with additional parameter
- let scripter mix his own color using 3 parameters (and give him the color codes for those 4 colors known) |
How do you want.
I would prefer
Quote: | - let scripter mix his own color using 3 parameters (and give him the color codes for those 4 colors known) |
|
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Fri Jul 28, 2017 4:25 Post subject: |
|
|
NWNCX_Patch and NWNX_Patch v1.27
DOWNLOAD
Fixes:
- fixed SetCurrentHitPoints
New custom functions:
NWNXPatch_HighlightObject(object oPlayer, object oObject, int nColorCode1, int nColorCode2, int nColorCode3);
NWNXPatch_UnhighlightObject(object oPlayer, object oObject);
NWNXPatch_DisableClientObjectHighlight(object oPlayer);
void SetImmunityOverride(object oCreature, int nImmunityType, int bResult);
void RemoveImmunityOverride(object oCreature, int nImmunityType);
Notes:
So as was said, highlight object takes 3 parameters the function header shows the known colors, if you want different color you have to experiment.
Disabling client highlighting had to be done this way, its better anyway as this allows to exclude DMs or specific players.
Forgot to add function header into SetImmunityOverride and RemoveImmunityOverride. Its working probably the same way as in nwnx_funcs. You set certain immunity to return true or false for oCreature and then you apply effect you want to succed or fail. However it seems its not possible to override lvl 20 monk immunity as far as I tested, might have same results on other immunity feats. If its true, can you check if nwnx_funcs has same issue or not?
Also, I need to decide whether to use "NWNXPatch_" prefix for these kind of functions that actually simply set variable. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Valbor
Joined: 26 Dec 2016 Posts: 145
|
Posted: Fri Jul 28, 2017 6:58 Post subject: |
|
|
And what is this function RemoveImmunityOverride(oObject, IMMUNITY_TYPE_*)? if you have this SetImmunityOverride(oObject, IMMUNITY_TYPE_*, FALSE);
Your SetImmunityOverride its worked normally, unlike NWNXFuncs_*. Also not worked on feats |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Fri Jul 28, 2017 8:18 Post subject: |
|
|
Valbor wrote: | And what is this function RemoveImmunityOverride(oObject, IMMUNITY_TYPE_*)? if you have this SetImmunityOverride(oObject, IMMUNITY_TYPE_*, FALSE);
Your SetImmunityOverride its worked normally, unlike NWNXFuncs_*. Also not worked on feats |
SetImmunityOverride(oObject, IMMUNITY_TYPE_*, TRUE); = when applying effect that should be negated by immunity_type_* it will return true and the effect application will fail
SetImmunityOverride(oObject, IMMUNITY_TYPE_*, FALSE); = when applying effect that should be negated by immunity_type_* it will return false and the effect application will succed
RemoveImmunityOverride will remove the overrides
the usual usage is:
SetImmunityOverride(FALSE);
ApplyEffectToObject
RemoveImmunityOverride _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Jul 28, 2017 12:59 Post subject: |
|
|
Thanks.
I'll go to test
Last edited by Antegate on Fri Jul 28, 2017 15:07; edited 1 time in total |
|
Back to top |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Jul 28, 2017 15:07 Post subject: |
|
|
Quote: | NWNXPatch_DisableClientObjectHighlight(object oPlayer); |
is not working
Maybe there is not enough variable on the module, but I do not know its value and name.
Maybe you forgot to add the code to nwnx_patch? I see the function in the client's log and can not see the in the server log.
Could you put a list of all new the levers and local variables for the plug-in?
Please |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Fri Jul 28, 2017 17:08 Post subject: |
|
|
Antegate wrote: | Quote: | NWNXPatch_DisableClientObjectHighlight(object oPlayer); |
is not working
Maybe there is not enough variable on the module, but I do not know its value and name.
Maybe you forgot to add the code to nwnx_patch? I see the function in the client's log and can not see the in the server log.
Could you put a list of all new the levers and local variables for the plug-in?
Please |
No the error was in client. That happens when you do something, you test it, it works but then you change the code to be more efficient and don't re-test it.
nwncx_patch 1.27b - fixed DisableClientHighlightObject
Note I made minor improvement.
The function DisableClientHighlightObject can now be used again to enable it again. Ie. the function works as a toggle. First use disable second use enable. I will change the function name in next release as well to ToggleClientHighlightObject.
This allows to make it disabled only in certain area or under certain effect (darkness) as you need.
EDIT: just realized this will make some issues.
Each time client shutdown nwn and restart it you must send him this function to disable it again. Now with this change, if he only exits server but do not shutdown client and logs it again, he will still have last value (ie disable) and disabling again make it enable.
To workaround this, you need to track clients on which you used DisableClientHighlightObject, and use it again to toggle it off when they leave server (OnClientExit) and reapply OnClientEnter if needed.
I suppose I can make this automatical and send it internally when player is leaving server, or to change the function to take integer parameter - yes/no. Let me know what you think. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Last edited by ShaDoOoW on Fri Jul 28, 2017 17:20; edited 1 time in total |
|
Back to top |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Jul 28, 2017 17:20 Post subject: |
|
|
is working |
|
Back to top |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Jul 28, 2017 18:09 Post subject: |
|
|
Quote: | I suppose I can make this automatical and send it internally when player is leaving server, or to change the function to take integer parameter - yes/no. Let me know what you think. |
Automatically - it would be good, but then you need a switch of local variable on the module |
|
Back to top |
|
|
Antegate
Joined: 20 Apr 2012 Posts: 100
|
Posted: Fri Jul 28, 2017 20:00 Post subject: |
|
|
Creaturespeed.2da
0 PC_Movement **** PLAYER 2.00 4.00
1 Immobile 2319 NOMOVE 0.00 0.00
2 Very_Slow 2320 VSLOW 0.75 1.50
3 Slow 2321 SLOW 1.25 2.50
4 Normal 2322 NORM 1.75 3.50
5 Fast 2323 FAST 2.25 4.50
6 Very_Fast 2324 VFAST 2.75 5.50
7 Default 6614 DEFAULT 0.00 0.00
8 DM_Fast 6893 DFAST 5.50 11.00
Quote: | NWNXPatch_SetMovementRate(oPC, 1);
NWNXPatch_SetMovementRate(oPC, 4); or NWNXPatch_SetMovementRate(oPC, 0); |
is not working. Character Immobile =/ |
|
Back to top |
|
|
highv priest
Joined: 01 Mar 2013 Posts: 111
|
Posted: Sat Jul 29, 2017 3:43 Post subject: |
|
|
ShaDoOoW wrote: | Hello Terra_777 long time no see!
These are the values used:
//red highlight
//object->Hilite(1065353216,1036831949,1036831949,2,0,1);
//green highlight
//object->Hilite(1050253722,1065353216,1050253722,2,0,1);
//light purple
//object->Hilite(1053609165,1053609165,1065353216,2,0,1);
//light green
//object->Hilite(1050253722,1065353216,1065353216,2,0,1);
//bright light
//object->Hilite(1065353216,1065353216,1065353216,2,0,1); |
1065353216 represents the floating point value of 1.0 in C. If the colors are following standard RGB format this means the first example having 1065353216 means it is 1.0.
Likewise the number 1036831949 means 0.1... So the colors are literally just decimal value representations in hexadecimal format and nothing else.
So the first one being red has 1.0 red and 0.1 green and blue for pure red.
EDIT= Also this is the very same coloration used by fog colors. If you enter in 1065353216 as a fog color number you will get red(and 1036831949 is black). This is because you gave the raw number, which would be just the first one(Red) and the others being 0(green/blue).
You can create colors just by using 0xFFFFFF, where each F represents a location that can be a number. Then convert it.
Sorry colors is kind of my specialty.... Usually the first thing I hex edit into a game.
To create more colors easily these websites should do the trick:
http://www.binaryconvert.com/convert_float.html
http://www.binaryhexconverter.com/decimal-to-hex-converter |
|
Back to top |
|
|
|
|
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
|