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 
 
Technical Question

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
Aerisarn



Joined: 11 Mar 2008
Posts: 14

PostPosted: Wed Jun 18, 2008 12:43    Post subject: Technical Question Reply with quote

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 Very Happy and, if it's possible, i'm going to write something, as I really need that as soon as possible.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed Jun 18, 2008 13:32    Post subject: Re: Technical Question Reply with quote

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 Very Happy 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
View user's profile Send private message Visit poster's website Yahoo Messenger
Aerisarn



Joined: 11 Mar 2008
Posts: 14

PostPosted: Wed Jun 18, 2008 13:53    Post subject: Reply with quote

that's too bad. Any source of info of pg objects in nwn memory other than directly hack & try or gdb?
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sun Jun 22, 2008 2:38    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kucik



Joined: 11 Feb 2009
Posts: 19
Location: Czech Republic

PostPosted: Tue Apr 27, 2010 10:41    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Apr 27, 2010 21:15    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
kucik



Joined: 11 Feb 2009
Posts: 19
Location: Czech Republic

PostPosted: Thu Apr 29, 2010 10:59    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Apr 29, 2010 13:09    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Page 1 of 1

 
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