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

CF: Bottles (was Re: ice cubes)



Hwei Sheng TEOH wrote:

> On Fri, 3 Sep 1999, Mark Wedel wrote:
> 
> [snip]
> >  The most obvious, and easiest, is to treat them exactly like containers.  To
> > empty a bottle, you open it like a container, and then take out the contents.
> > And likewise to fill it.  There should probably be a LIQUID flag or the like,
> > which means the player can't have it in their inventory, and it is allowed in
> > these special containers (and these containers can only hold one liquid at a
> > time.)

    How about a new object type: liquid?  It would be treated pretty much
the same way a potion is, but can only be picked up if you have an empty
potion bottle, or potion of the same substance, marked in your inventory.

Hwei Sheng TEOH wrote:

> Exactly what I have in mind. Liquid will have to be transferred from container
> to container. I'm not sure about allowing someone to pour it out on the
> ground. How "realistic" is it to be able to pour water (or any liquid for that
> matter) on the ground and be able to collect it all back into the bottle? :-)
> I guess I'm thinking about how exactly does a player collect something like a
> water elemental's residue? Certainly he won't be able to collect every last
> drop... which means that some of the stuff will be lost if the player pours it
> out and tries collecting it again. Or maybe just make it simple and disallow
> pouring out completely, and only allow transferring into another container.
> (or make pouring out completely waste the liquid).

    I'd say that pouring out a liquid should completely waste it.  For now,
the only things that should be able to hold liquid are potion bottles and
cauldrons.  Possibly a chalice, but that's debatable.  Fountains are good
for filling bottles with water, or whatever the fountain happens to be
filled with.  And perhaps pouring a different substance into a fountain
should pollute it.  On the other hand, pouring a bottle of poison into a
town's fountain would be a pretty nasty trick.  Maybe town fountains are
magically purified, but random dungeon fountains (which might hold some
potion liquid) can be contaminated.

> Also, we'd have to differentiate between containers like bookshelves and
> cauldrons -- while cauldrons may contain objects other than liquids, they can
> also hold liquid, so that we can pour out the contents of our potions into the
> cauldron when brewing something. But I don't think you'd want to let players
> "store" liquid in a bookshelf. :-)

    A "watertight" flag for containers might be in order, but you better be
careful about pouring a potion of fire into a bag full or scrolls.

> >  The problem is actually applying it.  If you have to open the container, and
> > then apply the liquid inside the container to drink it, that makes things more
> > difficult, especially in combat.
> >
> >  I suppose you could add a new command like 'drink'  which does both those
> > steps.

    A better idea might be to leave drinking the potion as the "apply"
command and make "open" and "close" the new commands.  Bottles don't have to
be normal containers.  When you mark a bottle and "open" it, it doesn't open
like a container, but is marked "open" and set FLAG_APPLIED.  You can pour
any liquid into it if it's empty or more of the same liquid if it's
partially full, by dropping other bottles or picking up residue from the
ground or water from a fountain.  To pour out the contents, into a cauldron
if you have one open, or onto the ground to discard it, drop the bottle
while it's marked "open".
    This also introduces the idea of partially full, which implies that
potions might have a number of doses.  I would suggest three as the maximum
number of doses per bottle for normal potions, with stat potions filling
whole bottles.


> Hmmm, interesting point. If we make these bottles exactly like other
> containers, how would the player, during combat, tell exactly which bottle
> contains what potions (if there's more than one bottle with the same colored
> liquid)? Does he actually have to open the bottle to find out what's in it???
> Or should we treat them specially and change their names according to what
> they contain? (eg. "bottle of healing potion" or "flask of magic power potion"
> etc.)

    With the method I'm proposing, closed potions would be exactly as they
are now.  You have to mark and open them to treat them as containers.


> Also, is it really necessary to be able to open a bottle when you apply it? I
> guess this is for transferring the contents of the bottles -- but if they can
> only hold one thing at a time, why not just make it so that you can only
> "open" empty bottles, and be able to transfer the contents of another bottle
> into the empty one by "dropping" it (like we do with bags and stuff now)?
> Is it safe to assume that applying a non-empty bottle means you want to drink
> whatever's in it?

    Yes, exactly.  Although it's often not safe drink unidentified potions,
"drink" should remain the default action for all sorts of bottles and
potions.  Except for empty bottles, in which case "open" becomes the
default.  Note that we still need to be able to open full bottles, even if
they can only hold one dose, so that they can be poured out and emptied.


> The only reason I mentioned this was to avoid having to create new graphics
> for existing potions which already have their own "look". I was thinking that
> by restricting potion contents to "potion-shaped" bottles we might avoid the
> need to create a dozen or so versions of a healing potion, etc.. But I suppose
> it's better to go for the general solution.

    Let's at least start with the general solution.  Special cases can be
added later if necessary.

    I think I can implement this change within the current object
structure.  All it requires is adding a "liquid" object and an empty bottle
and adding the "open" and "close" commands.  That's a non-trivial change,
though, so I'll wait for some feedback before I get started on this one.


-- 
            -Dave Noelle,                 dave@Straylight.org
            -the Villa Straylight,  http://www.straylight.org
Coalition Against Unsolicited Commercial Email  ==  http://www.cauce.com

Disclaimer: U.C.L.A. doesn't share my opinions; life isn't that good.

Quote of the Day:
"Tilting at windmills hurts you more than the windmills." - Lazarus Long
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]