Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 0.92 Bug? (and other)




>  First, flags in maps that tell it to save changes back permantly, and
> not in /tmp, would need to be added.  This flag would also be needed for
> safety deposit boxes and banks.  An easy solution to that would be to have
> some unique key that allows the player to pass through the door, but doesn't
> destroy it.  thus, only he can get to his stuff (and if he dies, whoever
> finds that key and the matching door.)
> 
>  One problem with banks and deposit boxes I have, is that characters could
> die an no one claim the stuff.  Maps could become filled with junk as
> this happens.

The way I would like banks to work is almost exactly like I want deposits
to work, so I'll lump them together.  The idea is this: each bank/deposit
place has a number of rooms.  Each room can contain at most one player, so
if someone is already in it, no other player can enter.  When you enter,
you see a pile of whatever you have already deposited in the room.  e.g. for
a bank, you might see a stack of gold coins; for a depository there could be
scrolls, spellbooks, wands, food, etc. that the player has left there.  The
player can pick up and drop things to make adjustments.  When the player
leaves, the items left behind on the floor get saved into a special file in
the player directory.

This sort of eliminates the problem you mention in your last paragraph -
it's not the maps that would become filled, but the player directory instead.

How I would like to see this implemented is the following (new idea just
occurred to me, so I apologise if it's obvious drivel):

Each bank/depository needs only one room, which is an entrance to a new map.
This map is marked as special in some way, so that the server creates a new
instance of it each time someone uses the entrance.  This means that at most
one person could be on the map at a given time, because different people
create different maps, and so end up in different places (although they look
the same).

This map would presumably be a small room, with a special archetype which
loads the items from the player's deposits file and puts them into the room.
And when the player leaves, the exit triggers two things: firstly, it saves
the items currently in the room to the deposits file, and secondly the map
is destroyed immediately, as there is no more need for it.  Since these maps
would in general be small, I don't see this will be much of a problem.

To get around the overloading of the exit, the following could be done:
the room could be constructed like a shop, and the teleporters trigger the
loading/saving of the deposits file.  Also, when the server notices a player
leave a map marked special (and no more players are in it, which should be
the case if the above scheme is followed), it knows it can destroy the map
instead of keeping it around.

I would appreciate any comments/suggestions about this.

Cheers,
Geoff.

-------------------------------------------------------------------------------
Geoff Bailey (Fred the Wonder Worm)   |   Programmer by trade --
ftww@cs.su.oz.au                      |       Gameplayer by vocation.
-------------------------------------------------------------------------------