Author Topic: Logout AI  (Read 1954 times)

Offline quixadhal

  • BFF
  • ***
  • Posts: 642
    • View Profile
    • WileyMUD
Logout AI
« on: September 16, 2007, 04:15:38 pm »
Not sure if this is really a driver question, a design question, or a specific mudlib question.  ???

In any case, I was reading the code for object persistance and it occured to me to ask if it's possible, in MudOS and perhaps under DS, to rehook a player object so that it becomes an NPC when the player logs out, and (if still loaded) again rehook the connection object to it when they log back in?

One of the things I always felt important to a really persistant world, was the idea that all players would be in it.  Just as mobs wander about doing whatever they were coded to do, likewise, players could be sleeping in an inn, or their own castle -- or perhaps they would choose to let the AI roam them about to try and gain minimal treasure.  That would allow really unique objects to exist, and if a player didn't purchase enough traps/guards/other safeguards to protect themselves, they could be stolen.

Not everyone's cup of tea, I'm sure.  But it was a thought, and I figured I'd ask folks who've done low level mudlib coding before I hurt myself too much. :)

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1022
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Logout AI
« Reply #1 on: September 16, 2007, 11:20:38 pm »
Quote
it occured to me to ask if it's possible, in MudOS and perhaps under DS, to rehook a player object so that it becomes an NPC when the player logs out, and (if still loaded) again rehook the connection object to it when they log back in

No reason at all you can't do this, since you can do anything in LPC.

As to how *easily* you can do this...well, it's not an obvious implementation,
nor trivial. This is because the modification in question assumes

  • A persistent world
  • No resets

There are a few other assumption thrown in, such as the NPC's death
[affecting | not affecting] the player's status when she resumes play, etc.

The thing is, as of today, DS (specifically 2.5a12 and below) is not
world-persistent. It is only inventory-persistent. If you drop a thing
in the mud, and nobody else picks it up, and you log back in a few days
later, it won't be there anymore, due to the mud's cleanup routines (exceptions
exist, but you get the idea).

World persistence is a neat idea and a fun thing I want to try and include
in the lib. Like mounts and (upcoming) vehicles, it's the sort of thing I
enjoy adding to DS, and I already have a general idea of how I'll do it.

But it doesn't currently exist in the default DS disto, and therefore the
question of droppping into NPC mode on quitting is moot.

Now, once world persistence *is* available on DS, I'm not that inclined
to add NPC-conversion. It may be that I'm an old fuddy duddy...after all, this
is not the first time I've heard this question, so maybe there's a real demand for
this sort of functionality.

But my feeling is that people like to completely control their chars, and
turning into an NPc on quitting subverts that in a fundamental way,
independent even of whether they are killable in NPC form.

Realistically, I doubt I will add this functionality to DS, because it will
be difficult enough to balance a persistent world (where *do* the orcs come
from in such a world? Can you run out of them?) and it's the sort of thing I'll
probably leave to individual muds to work out on their own.

-Crat