View previous topic :: View next topic |
Author |
Message |
acaos
Joined: 08 May 2007 Posts: 153
|
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri May 11, 2007 23:52 Post subject: |
|
|
Good work.
I think that it isn't very funky to hook the middle of the function, though. |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Sat May 12, 2007 0:11 Post subject: |
|
|
Yes, that's a really ugly place to put it.
From what I could determine, that entire function I hooked is used to push and copy variables before a function call. I didn't want to hook anything but the effects part, so other variable types would not be slowed down at all.
I'm still looking for a better place to stick it. There's a call right after, but it's a computed call and can go to several different places.
Acaos |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Sun May 13, 2007 2:15 Post subject: |
|
|
I've updated the plugin to v1.1. This adds GetEffectInteger() and SetEffectInteger().
The indices to use depend on the specific effect type. You'll need to play around to find out what's what. The index is limited to between 0 and 15 as a safety measure to prevent poking too deep into memory.
Acaos |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Sun May 13, 2007 8:40 Post subject: |
|
|
Another update, this one to 1.2.
This adds the ability to get the duration of an effect as well as the remaining time on the effect.
The CalculateEffectDurationBasis() function must be called before calling GetEffectDurationRemaining(), targeting a creature or player. It only needs to be called once. I haven't yet managed to dig out the internal uptime timer, so this does a bit of a song and dance to determine that.
Acaos |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Wed Jun 13, 2007 8:52 Post subject: |
|
|
Updated to version 2.0.
Plugin renamed to nwnx_structs.
This renames CalculateEffectDurationBasis() to CalculateStructDurationBasis().
Adds support for reading and manipulation of values in item property structures.
Acaos |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Mon May 19, 2008 2:09 Post subject: |
|
|
I've updated the link to make this accessible again.
Also, I received a recent request via PM about effect icons. Although this version of structs does not support it, NWNeXalt, my new 1.69 NWNX plugin, does have an EffectIcon() function which displays icons from the effecticons.2da file.
Acaos |
|
Back to top |
|
|
Ginden
Joined: 07 Feb 2009 Posts: 4
|
Posted: Sun Apr 18, 2010 21:20 Post subject: |
|
|
EffectBonusFeat prevents the use of horse menu from patch 1.69. _________________ In Soviet Russia, NWNX edit you! |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Sun Jun 06, 2010 3:35 Post subject: |
|
|
acaos wrote: | I've updated the link to make this accessible again.
Also, I received a recent request via PM about effect icons. Although this version of structs does not support it, NWNeXalt, my new 1.69 NWNX plugin, does have an EffectIcon() function which displays icons from the effecticons.2da file.
Acaos | Well there is EffecIcon function and it work, a bit.
I was able to change icon to any existing one, but there is only very few unused one. Making new effect icon via adding new line into 2da and use that line number didn't worked. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Sun Jun 06, 2010 7:03 Post subject: |
|
|
axs wrote: | It's equal to orginal effecticons.2da icons number, 130. So you can only replace not used icons. | so thats why it didnt worked, thanks axs _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Fri Jul 09, 2010 17:00 Post subject: |
|
|
You need to actually edit the client executable to add new effect icons, unfortunately. Here's the necessary hex editing (from our client patch on HG):
Windows Version
- This version of the client changes byte 0x15476C from 0x82 to 0xFE. This raises the limit on effect icons from 129 to 254.
Linux Version
- This version of the client changes byte 0x07B9CA from 0x81 to 0xFE. This raises the limit on effect icons from 129 to 254.
Acaos |
|
Back to top |
|
|
Ravine
Joined: 26 Jul 2006 Posts: 105
|
Posted: Wed Dec 01, 2010 12:31 Post subject: |
|
|
To be specific: the SetEffectCreator and SetEffectSpellId works, but only inside the script which modified it. When i check the spellId from other scripts, the ID returns the original value :S |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Dec 15, 2010 11:50 Post subject: |
|
|
nwnx_structs manipulates the local copies of effect structs stored in local variables. To apply these changes, you have to re-apply the effect. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Mon Feb 07, 2011 2:02 Post subject: |
|
|
I'm trying to make a version of the iprp functions for windows, but I suck at reading bytecode, nor do I have a linux executable...
Does "8B 46 10 8B 7D 0C 8B 4A 08 FF 34 B8 0F BE 04 1F" (from the signature search function of nwnx_structs) equal StackPushEngineStructure? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Feb 08, 2011 11:39 Post subject: |
|
|
No, it's in the middle of CVirtualMachineStack::AssignLocationToLocation. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
|