View previous topic :: View next topic |
Author |
Message |
Aerisarn
Joined: 11 Mar 2008 Posts: 14
|
Posted: Wed Jun 18, 2008 12:43 Post subject: Technical Question |
|
|
The PG object used in nwnx (used for example in SetDescription) is represented as a common gff structure in nwn memory? Is it possible to directly edit that in memory with nwnx api?
It will be useful to know, as we can replace all leto stuff by directly edit that. I know there's the nwexalt project that is doing something similar, but i was just curious and, if it's possible, i'm going to write something, as I really need that as soon as possible. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Jun 18, 2008 13:32 Post subject: Re: Technical Question |
|
|
Aerisarn wrote: | The PG object used in nwnx (used for example in SetDescription) is represented as a common gff structure in nwn memory? Is it possible to directly edit that in memory with nwnx api?
It will be useful to know, as we can replace all leto stuff by directly edit that. I know there's the nwexalt project that is doing something similar, but i was just curious and, if it's possible, i'm going to write something, as I really need that as soon as possible. | No, GFF is used for storage only. |
|
Back to top |
|
|
Aerisarn
Joined: 11 Mar 2008 Posts: 14
|
Posted: Wed Jun 18, 2008 13:53 Post subject: |
|
|
that's too bad. Any source of info of pg objects in nwn memory other than directly hack & try or gdb? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sun Jun 22, 2008 2:38 Post subject: |
|
|
Directly editing memory is possible, but isn't always enough. The NWN network protocol is fairly optimized, so data only gets sent to the client when certain functions are called. Different data on the client and server could cause problems, up to and including a crash (if, for example, a feat were removed from a player in memory, but they then tried to use it because the client still thinks they have it). _________________ Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/
<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.
<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for? |
|
Back to top |
|
|
kucik
Joined: 11 Feb 2009 Posts: 19 Location: Czech Republic
|
Posted: Tue Apr 27, 2010 10:41 Post subject: |
|
|
Is it possible to hook one function twice by two different plugins? For example if I try to hook CNWSCreatureStats__GetEpicWeaponDevastatingCritical, but it is already hooked in nwnx_weapons plugin, could it work? Or only last hook function will be executed? _________________ Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Apr 27, 2010 21:15 Post subject: |
|
|
Theoretically it's possible, but it's very likely that it'll crash.
NWNX 2.8 offers an internal inter-plugin hook API for use of one hook in several plugins. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
kucik
Joined: 11 Feb 2009 Posts: 19 Location: Czech Republic
|
Posted: Thu Apr 29, 2010 10:59 Post subject: |
|
|
Do You mean function nx_hook_function() ? With this I can hook one function in more than one plugin?
I want to try hook critical hit, but this functionality shouldn't be part of nwnx_weapon, where it is already hooked.
Thanks. I'll try it. _________________ Les jambes en l'air, comme une femme lubrique,
Brûlante et suant les poisons,
Ouvrait d'une façon nonchalante et cynique
Son ventre plein d'exhalaisons. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Apr 29, 2010 13:09 Post subject: |
|
|
No, nx_hook_function is just a hooking helper from nwnexalt.
NWNX 2.8 interface provides CreateHookableEvent & HookEvent functions. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
|