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 
 
Possess Creature
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Tue Jul 28, 2009 23:22    Post subject: Possess Creature Reply with quote

Possible with any current plugins (or even possible at all) to possess creatures that are owned by players?
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Wed Jul 29, 2009 9:32    Post subject: Reply with quote

I've done it for tests, it's possible, but when two players controls one creature there are strange behaviours, also if you change player possession to other creature, this creature will be saved in to PC bic file.

So I've abandoned this for now, because this require more changes in other server functions.
Back to top
View user's profile Send private message
Quixsilver



Joined: 20 Jan 2009
Posts: 30

PostPosted: Wed Jul 29, 2009 14:50    Post subject: Reply with quote

This would be superb functionality.
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Wed Jul 29, 2009 15:48    Post subject: Reply with quote

I'd love to see this work.
Back to top
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Jul 29, 2009 23:04    Post subject: Reply with quote

Why? I'd like to hear what you'd use it for, as I can't really think of an application for it offhand.
_________________
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
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Thu Jul 30, 2009 1:56    Post subject: Reply with quote

Zebranky wrote:
Why? I'd like to hear what you'd use it for, as I can't really think of an application for it offhand.


Off the top of my head charm comes to mind, but being able to directly take control of another player's charmed summon, or how about role-playing.

But besides that not everything needs to have a useful purpose to it anyway, what's wrong with good clean fun? have we all been scripting so long we've lost all of our rational thoughts and forgotten the main reason we're doing this to begin with.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Thu Jul 30, 2009 2:35    Post subject: Reply with quote

Zebranky wrote:
Why? I'd like to hear what you'd use it for, as I can't really think of an application for it offhand.
for example, PC's clone, like Shadow Adept prc one. The default or even custom AI is useless for the clone.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Quixsilver



Joined: 20 Jan 2009
Posts: 30

PostPosted: Thu Jul 30, 2009 4:08    Post subject: Reply with quote

Zebranky wrote:
Why? I'd like to hear what you'd use it for, as I can't really think of an application for it offhand.


Remote control of drones and vehicles.
Back to top
View user's profile Send private message
Quixsilver



Joined: 20 Jan 2009
Posts: 30

PostPosted: Sun Aug 02, 2009 1:29    Post subject: Reply with quote

axs wrote:
I've done it for tests, it's possible, but when two players controls one creature there are strange behaviours, also if you change player possession to other creature, this creature will be saved in to PC bic file.

So I've abandoned this for now, because this require more changes in other server functions.


Both of the problem scenarios sound like they could easily have scripted protections put in place to prevent them. Thoughts? Maybe the plugin is really ok as is?
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Sun Aug 02, 2009 11:25    Post subject: Reply with quote

Ok, it's one of my testing sources, i've added prototypes for
Possess, UnPosses and GetFlatFooted.

Please test possession well, and use it to your own responsibility Smile

(FOR TESTING ONLY) funcsext.test.tar.gz
Back to top
View user's profile Send private message
Quixsilver



Joined: 20 Jan 2009
Posts: 30

PostPosted: Sun Aug 02, 2009 22:02    Post subject: Reply with quote

Thanks a bunch. I'll test it out and see if I can find any problems that can't be scripted around. Very Happy
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Wed Aug 12, 2009 14:53    Post subject: Reply with quote

Hmmm am I missing something, I don't see any function to for possessing in the .nss.
Back to top
View user's profile Send private message
Kiri-Jolith



Joined: 01 Jul 2009
Posts: 10

PostPosted: Sat Aug 15, 2009 1:46    Post subject: Reply with quote

Found these in FunctionHooks.h file.

void PossessCreature(CNWSCreature *pCreature, dword pToPossess);

void UnpossessCreature(CNWSCreature *pCreature);


Pure guess, I haven't played with this plug-in, but...

Code:

void PossessCreature(object oPossessingCreature, object oCreatureToPossess );

void UnpossessCreature(object oCreature );


Share your results, if you would.
Back to top
View user's profile Send private message
axs



Joined: 11 Feb 2005
Posts: 76

PostPosted: Sat Aug 15, 2009 11:56    Post subject: Reply with quote

Prototypes for nwscript:
Code:
void PossessCreature(object oPC, object oCreature) {
    SetLocalString(oPC, "NWNX!FUNCSEXT!POSSESS", ObjectToString(oCreature));
    DeleteLocalString(oPC, "NWNX!FUNCSEXT!POSSESS");
}

void UnPossessCreature(object oPC, object oCreature) {
    SetLocalString(oPC, "NWNX!FUNCSEXT!UNPOSSESS", "            ");
    DeleteLocalString(oPC, "NWNX!FUNCSEXT!UNPOSSESS");
}


Somehow I have packed wrong file.
Back to top
View user's profile Send private message
Kiri-Jolith



Joined: 01 Jul 2009
Posts: 10

PostPosted: Sat Aug 15, 2009 23:11    Post subject: Reply with quote

Wasn't totally wrong... kinda right... srry. Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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