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 
 
NWNX Visibility

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



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jun 25, 2010 21:11    Post subject: NWNX Visibility Reply with quote

A new NWNX plugin is available: NWNX Visibility.
Using this plugin you can override object visibility - globally (always visible/invisible by default) or per player.

NWNX Visibility 1.0
http://data.virusman.ru/nwn/nwnx_visibility-1.0.0-linux.rar
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Jun 25, 2010 21:32    Post subject: Re: NWNX Visibility Reply with quote

virusman wrote:
A new NWNX plugin is available: NWNX Visibility.
Using this plugin you can override object visibility - globally (always visible/invisible by default) or per player.

NWNX Visibility 1.0
http://data.virusman.ru/nwn/nwnx_visibility-1.0.0-linux.rar


Another words, control over perceptions.

Possible uses: Create an Invisibility Power which makes you invisible ONLY to the target.
: Create a counter power, which renders you immune to the said invisibility effect. Eg - Prevents someone from going invisible to you.

One thing though, because the code uses an object array/list in c++, and it performs a test against each object I assume, to see if it matches the object in question, could this potentially cause performance issues, if the object list is left unmanaged.
Eg - Say for instance a bad scripter configures it to add ALL perceived objects to the list, and left it running for 2 days. Im assuming even after log offs etc, player objects will still be in the list, being tested against the requested object. More objects in the list -> more time required, albeit small time, to find the correct match.

Do you forsee this requiring some sort of management or cleanup function, to maintain the object list/array, or empty it after certain durations?


Note - Im still a noob at nwnx plugin creation, any chance of windows? hehe.
I have the location of the testobjectvisibility function here
CNWSMessage::TestObjectVisible - 0x004409F0

Im just not sure how to impliment your code on windows, because everyone has their own coding style, its hard to understand the code when bouncing between plugins.
Ive got no hope of creating my own plugin from scratch.

I have next to no c++ experience, only just taught myself how to add hooks via studying the Events plugin, although, your hook in visibility is bit more complex. hehe.

If im not mistaken, its a code cave method your using, is it not?
It sort of resembles what I understand of a code cave.
You have it set to redirect to another address, where you have your custom code in, then it performs the changed code, then it returns back to the 'almost' original location as if it had never left that subroutine, none the wiser that the subroutine result was changed mid flight.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sat Jun 26, 2010 2:13    Post subject: Re: NWNX Visibility Reply with quote

Baaleos wrote:
virusman wrote:
A new NWNX plugin is available: NWNX Visibility.
Using this plugin you can override object visibility - globally (always visible/invisible by default) or per player.

NWNX Visibility 1.0
http://data.virusman.ru/nwn/nwnx_visibility-1.0.0-linux.rar


Another words, control over perceptions.

Possible uses: Create an Invisibility Power which makes you invisible ONLY to the target.
: Create a counter power, which renders you immune to the said invisibility effect. Eg - Prevents someone from going invisible to you.

One thing though, because the code uses an object array/list in c++, and it performs a test against each object I assume, to see if it matches the object in question, could this potentially cause performance issues, if the object list is left unmanaged.
Eg - Say for instance a bad scripter configures it to add ALL perceived objects to the list, and left it running for 2 days. Im assuming even after log offs etc, player objects will still be in the list, being tested against the requested object. More objects in the list -> more time required, albeit small time, to find the correct match.

Do you forsee this requiring some sort of management or cleanup function, to maintain the object list/array, or empty it after certain durations?


Note - Im still a noob at nwnx plugin creation, any chance of windows? hehe.
I have the location of the testobjectvisibility function here
CNWSMessage::TestObjectVisible - 0x004409F0

Im just not sure how to impliment your code on windows, because everyone has their own coding style, its hard to understand the code when bouncing between plugins.
Ive got no hope of creating my own plugin from scratch.

I have next to no c++ experience, only just taught myself how to add hooks via studying the Events plugin, although, your hook in visibility is bit more complex. hehe.

If im not mistaken, its a code cave method your using, is it not?
It sort of resembles what I understand of a code cave.
You have it set to redirect to another address, where you have your custom code in, then it performs the changed code, then it returns back to the 'almost' original location as if it had never left that subroutine, none the wiser that the subroutine result was changed mid flight.

This is not actually a perception hook. Perception is used for both NPCs and PCs. Visibility is only checked for PCs.
I don't think it'll cause any noticeable performance issues whatsoever even if you add a lot of objects to the list.
I'll add Remove/Clear functions in later versions.
_________________
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