PlaneShift

  • Status New
  • Percent Complete
    0%
  • Task Type Feature Request
  • Category
  • Assigned To No-one
  • Operating System
  • Severity Medium
  • Priority
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 3
  • Private
Attached to Project: PlaneShift
Opened by A. Kiefner - 01.06.2008
Last edited by Lanarel - 01.06.2008

FS#1642 - /possess an NPC

This command has been on the wishlist (and also on the ToDo list for releases) since a very long time. I post it here in the hope it will be more visible to interested people to implement.
The idea of the command is to control an NPC completely, not just talk as them through /impersonate. However, since controlling the actual body of an NPC is extremely complicated, it would be much more convenient (also from GM side) to simply make it seem so to the player.

Thus a possible way to implement the /possess command:
The syntax would be

/possess [NPC_name|target]|reset

Issueing the command would have the following effects:

1. The GM is moved to the location of the NPC.
2. The NPC is renamed to “$originalNPCsurname_P” (family name is unaffected).
3. The GM is renamed to $originalNPCname and the original GM name is stored in an extra db field.
4. The label color of the GM is set to NPC (/setlabelcolor).
5. The NPC is /slid u 1000.
6. All scripts (most importantly movement) of the possessed NPC are temporarily frozen.
7. GM temporarily gets all traits of the NPC (original traits of GM are stored on db).
8. GM is /set invisible off.

Issueing /possess reset would have the reversed effects:

1. Possessed NPC is moved to the location of the GM.
2. The name of the GM is restored.
3. The NPC is renamed back to §originalNPCsurname.
4. Labelcolor of GM is reset.
5. Scripts of the NPC enabled again.
(GM is not moved).

It’s important that the status of NPC (possessed), name and traits of the possessing GM are stored on DB so that a possible server crash has as little impact as possible.

If one is possessing an NPC already and then tries to possess another NPC, it should automatically issue /possess reset before executing /possess otherNPC.
When possessing, it should give a warning that the path of the NPC might be disturbed if /possess reset is issued too far away from the original position.

As a final cut, resuming scripts of the NPC should be delayed for 2 more minutes, giving the GM time to switch back into possession without paths getting in the way. That way it is possible to possess two or more NPCs back and forth.

The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
1985 PlaneShift FS#1985 - List of all GM feature requests [or dev lvl requests] Low Aresilek Besolez
0%
Caarrie commented on 01.06.2008 19:22

there has been  bug 708  that covered this just not in so much detail for ages.

Project Manager
Lanarel commented on 01.06.2008 19:34

 bug 708  sounds like a simple version of this command (without movement and such). When someone is going to implement this, make sure all possible side effects are handled. Kerol names a few ('releasing' an npc far from where he should be) but there are probably others.

Project Manager
Lanarel commented on 01.06.2008 19:36

Also, marked new as it is a feature request, and made category NPC. This is no GM system, even if it will be only available to GMs. Actually, it is more categories probably :)

Steven Schwartfeger commented on 02.06.2008 02:23

Hmm, I'd have thought it would be simpler and better to take over control of the actual NPC character from the npclient. In the database, the NPC characters are almost identical to players, though I have not looked at the code in great detail… the npcclient is I think pretty much like a normal client, it just has a special security level. In any case all I think it would need, is a way to add and remove characters from the npcclient while it is running, and a way of marking the character "possessed" so that the normal chat responses or whatever are disabled.

But likely I'm wrong :)

Thom commented on 02.06.2008 12:15

"1. Possessed NPC is moved to the location of the GM."
Wouldn't it be better to move the NPC back to it's default location? That wouldn't work in an event of course, but it would be quite a chore to move all NPCs back to their default positions after an event. Perhaps some syntax could be added that will make the NPC stay in its location or will reset it to its default DB position, depending on whether it has been added or not.

A. Kiefner commented on 11.06.2008 16:43

"Wouldn't it be better to move the NPC back to it's default location? That wouldn't work in an event of course, but it would be quite a chore to move all NPCs back to their default positions after an event. Perhaps some syntax could be added that will make the NPC stay in its location or will reset it to its default DB position, depending on whether it has been added or not."
It's not a problem to move the NPC back after an event as needed and if paths assigned, the NPC gets automatically restored to next WP if it's too far away.

"there has been  bug 708  that covered this just not in so much detail for ages."
This is NOT related to  bug 708 . We already *have* /impersonate which works as supposed. #708 only suggests a simplification of /impersonate.
/possess is a completely different command whatsoever.

I also don't think it's easier to do this over npcclient as Vornne suggested since we want to apply other GM commands while we possess, with the security level we have and not sec level 99. Also it is probably not trivial to solve the communication (player → npc → GM) taking quest triggers and KAs into account, compared to the solution given in the report.

Caarrie commented on 11.06.2008 16:56

when i was asked as part of the gm team to add their wishlist to the tracker i made  bug 708  as a bug for this feature just missing the details. So either way do you need the changes or do you want the new command?

A. Kiefner commented on 30.06.2008 23:53

"So either way do you need the changes or do you want the new command?"
I'd say we need both, but more urgently the new command.

Dajoji commented on 01.08.2008 03:40

This would make things a lot easier for us. I don't think we need to store the GM character's name and stats since it's more likely that we will be using event characters for this and /setskill all fixes any modifications. What the GM should do in any case (and I don't know if this is a 'trait' as described in #7. in the first post) is copy the NPC's description, maybe adding a line about current mood or visible state of mind.

A. Kiefner commented on 06.10.2008 03:50

With the new possibilities at hand this one is even easier to realise than ever before.

It is possible to move an NPC to another instance by using
/teleport target there 1
for example, if the teleportation limitation is commented out (tested it thoroughly with Aiken on trunk).
The good thing about this is that it doesn't disturb the NPC paths at all. You can move them to another instance even while the walk about. They just continue to do so without even noticing. Only when they get killed, they respawn in instance 0.

It is also possible to /settrait and also /changename me forceall npcfirstname npclastname.

The only thing that would be needed to "possess" an NPC (actually anyone) would be to make a command that

1. checks the name of the target and applies it in the suggested manner (using forceall as argument)
2. checks the traits of the target and applies them via /settrait to yourself
3. stores the original name and traits

so that /possess target would switch your name and traits to those of the target and stores the stuff (but doesn't do anything else). If you /posses anothertarget
while you're "possessing", you would switch traits but it would notice that the "original properties" field is not empty so it won't overwrite it.

To actually apply it in an event you would have a shortcut to
/teleport me target; /possess target; /teleport target there 1; /set invisible off

This way a GM would have a lot of freedom in regards of how to "possess" an NPC - it would even allow for "evil twins" events while it doesn't require to implement a "disable paths" function etc. as suggested previously.

Project Manager
Lanarel commented on 15.11.2008 12:11

Sounds doable, but still a work around. It is not perfect to have an instance with NPCs walking around :). At least there should also be a reset option to move the npc back. ALso, what would happen with trade and train options? I assume they are not copied (which is probably OK).

A. Kiefner commented on 15.11.2008 17:16

I don't see this as a workaround. It's transparent and relatively easy to maintain. It doesn't mess around too much with NPCs (thus preventing bugs) but still gives freedom for manipulation in future implementations.
/possess reset could simply be an alias for /killnpc <name> for now, which would reload the NPC at its spawn (in instance 0, ignoring where it was before) and clearly cancel all paths, effects etc.
That might be modified in future if needed, but should be sufficient for now.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing