View previous topic :: View next topic |
Author |
Message |
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Sun Mar 24, 2013 11:30 Post subject: NWNX modification of CopyItemAndModify? |
|
|
Haven't found it yet if there is one, but if not...
Could someone make a small NWNX plugin (Windows) that replaces or modifies the hardcoded CopyItemAndModify script function to allow the color value for 3-part items (such as weapons) to stretch from 0-9 (instead of the built in 1-4)?
Currently, the function changes any value under 1 to 1, and any value over 4 to 4. This makes it impossible to script changes to weapon models that use extra appearances ("colors" 0, 5, 6, 7, 8, 9). The changes can be made directly in the toolset, but not via scripting.
Thanks in advance for any responses. |
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Sun Mar 24, 2013 18:22 Post subject: |
|
|
Don't know if this will help or not, but Lightfoot8 posted some locations for a value for this. I'm not a programmer, so it does me no good personally.
From the BSN forums:
Quote: | Lightfoot8 wrote...
If you are changing the value in memory after the server is running the location is: 0x0058A872
If you are hacking the .exe the location is at: 0x0018A872 in the file.
and just incase I have done something to my copy of the exe that has offset the location in the file here is a hexstring with the needed value highlighted.
14 02 00 00 E9 6B 02 00 00 8B 45 0C 83 F8 31 BA 04 00 00 00 74 21 83 F8 65 74 1C 83 F8 68 74 17 83 F8 1A 75 0B 85 C9 75 22 BA 03 00 00 00 EB 24 |
|
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Mon Mar 25, 2013 19:09 Post subject: |
|
|
This might be what you're looking for: http://terrahnet.no-ip.org/nwnx/memory%20editor%20plugin/nwnx_mem_func.nss
All files needed can be found here
Above is pure memory editing and was more intended for development purposes so use with caution as its purely memory editing and could proper screw over stuff if done wrong.
I believe that nwnx_funcs has something similar aswell but I'm unsure how to use it, find it here: http://www.nwnx.org/phpBB2/viewtopic.php?t=1535 it should be the safer out of the two though.
If you do go for the nwnx alternative which alters the memory you can force the item appearance to update by first setting their numbers with the memory altering functions and then copy the item with nwn standard function. Which would emulate what you're trying to do only that you can do more then one edit on the item before copying it. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Tue Mar 26, 2013 2:04 Post subject: |
|
|
Thanks for the response, Terra_777.
Unfortunately, neither memory editor nor nwnx_funcs has what I'm looking for. The memory editor one could possibly work for armor (followed by a CopyItem run), but doesn't have a function for altering parts of weapons or other 3-part items. nwnx_funcs can change some things like stack sizes and values, but nothing for changing item parts. |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Tue Mar 26, 2013 16:59 Post subject: |
|
|
Well its only one byte you want changed so here you go:
http://terrahnet.no-ip.org/terra/nwnx_minipatch.rar
Just dump the dll in your nwn folder and its done. It changes your 04 byte to FF instead which should set the cap to 255 instead but I couldn't test it so be careful. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Tue Mar 26, 2013 20:07 Post subject: |
|
|
Thanks! I'll test it out sometime today and let you know if it works out. |
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Tue Mar 26, 2013 21:46 Post subject: |
|
|
Copied the nwnx_minipatch.dll over to my server's NWN directory and restarted NWNX2 and the server software.
Nothing changed in-game. Checked the logs, found this in the nwnx.txt log....
Quote: |
NWN Extender V.2.6.1
(c) 2005 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org
* Loading plugins...
* Plugin chat is loaded.
* Plugin events is loaded.
* Plugin funcs is loaded.
* Plugin leto is loaded.
* An error occured while loading extension minipatch (127: The specified procedure could not be found. )
* Plugin reset is loaded.
* Plugin resetplugin is loaded.
* NWNX2 activated.
|
|
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Tue Mar 26, 2013 21:54 Post subject: |
|
|
mini patch is compiled using nwnx v 2.7-b4 which is the newest one which includes the GetObject hook.
If that doesnt do it then you might need the newest C++ runtimes as the plugin was compiled in vs2012. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Tue Mar 26, 2013 23:20 Post subject: |
|
|
Using that version of NWNX. Downloaded and installed C++ runtimes (2012, x86 version for XP).
Same result. |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Tue Mar 26, 2013 23:51 Post subject: |
|
|
I'm not entirely sure what you're missing then since I wasn't able to replicate it myself.
Did the plugin create a logfile? Not writing anything to it so it should be empty. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Wed Mar 27, 2013 2:09 Post subject: |
|
|
No log file for nwnx_minipatch.
Can anybody else test this and see if they can get it to work? Maybe I'm just missing some minor thing I need to do to get it to load up like all the other plugins. |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Wed Mar 27, 2013 22:26 Post subject: |
|
|
Did you update all the dlls from the package? Only thing I could think off is that something is out of date. Could possibly try to compile it yourself or get someone to help you with it using an older compiler then vs2012. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Sat Apr 13, 2013 2:00 Post subject: |
|
|
Thanks! I'll test it tonight or tomorrow. |
|
Back to top |
|
|
The Amethyst Dragon
Joined: 21 Jun 2011 Posts: 20
|
Posted: Sat Apr 13, 2013 9:53 Post subject: |
|
|
Unfortunately, I got the same result in the nwnx.txt log as before, and the plugin doesn't load for me on my Windows XP server.
I get the same result and error message trying to get your nwnx_cool plugin to work. |
|
Back to top |
|
|
|