Furniture #146
DavidRieman
started this conversation in
Ideas
Furniture
#146
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How would one go about making furniture like Couches and Beds? For example, you walk into a room and, after the room description, see:
"A comfy couch, occupied by: Abe and Bob."
or
"A comfy couch, currently empty."
(Not to be confused with #145 [Furnishings] which intentionally only have descriptions and no detailed interactive Behaviors.)
These days, like most interesting world interactions, this would be accomplished through Behaviors. There could be a
SittableBehavior
which provides automatic context-commands like "sit in" / "sit on" / "sit". The behavior could have aMaxOccupants
property to cancel attempts to sit with "There is no more room there for you" or whatnot. From here, we have to consider some options:OnMovementEvent
to remove their tracked occupant, and log out events to do the same, etc. This has the benefit of simply letting the player keep access to room context commands (like exit "e" command to go east), but may make some other later tasks harder.Thing
of the furnitureThing
, and give context commands like "stand up" / "stand" that you have to use to exit the furniture, in order to leave it. This probably has the most "consistent" experience with what could be "vehicles" and the like, but with the minor drawback that if we wanted the player to still be able to type "e" to leave east, the furniture has to know about their own parent (room) context commands and automatically eject the player before having them try to execute that "e".Suppose one also wants to give furniture game-specific benefits like improved recovery rates... Given the above options:
ConditionalEffect
base class that takes a configurable function arg that returns true/false depending on whether the condition is still being met. Then the Behavior would pass a lambda targeting the furnitureThing
. But this wouldn't work well with persistence either. Hmm, I think this way is proving too complicated and edge-casey.So I'm leaning option 2, as it also gives a more incremental approach - we can make the furniture enterable/exitable and then later add conveniences for auto-leaving furniture through mirrored exit commands or whatnot (if we even want that).
Beta Was this translation helpful? Give feedback.
All reactions