Skip to content

Library: Postures

ThePix edited this page Jul 27, 2018 · 1 revision

This allows the player to sit, stand or recline on furniture. In addition the player can kneel, crawl, crouch, lie or sit on the ground. Some example commands are: STAND ON STOOL, GET ON CHAIR, SIT, LIE DOWN ON GROUND, KNEEL. The following commands can then be used to adopt the normal free-standing posture: GET OFF, OFF, U, D, STAND, GET OFF CHAIR. The player will automatically stand when going to a different room.

Note that if the player is in a posture, the posture takes priority for up and down. If the player is sat, and types UP, the player will stand, rather than going up to the attic (but DOWN will still take her down to the cellar).

Check the "posture" attribute of the player to see the current posture (null if just free-standing) and "posture_object" to see the object involved.

You can download the library here

Furniture

Let us suppose we want to add a stool to our game. After you have added the library to your name, you will see a new Postures tab. Go there, and set the stool to be furniture. You can then set the preferred posture for the item. This is used if the player types GET ON STOOL; Quest will select a posture based on this setting. For the stool, we want that to be "sit", which is the default.

We can then select the options available: Does this item allow standing, sitting or reclining? For the stool, we shall say the player can sit on it or stand on it, but not lie on it. As you tick and untick the checkbox, you will see different options for messages appear and disappear - you can see exactly for yourself what they are. The default messages use ### as a place holder for the object's name. You can use that too, or just write the full text.

The Floor

The player can also sit on the floor by default. If you go to the Postures tab of a room, you will see you can tick a box to prohibit that. If sitting and reclining is allowed, you can give the ground a name that will appear in the confirmation message, eg "the floor". Otherwise, you can set the messages when sitting or reclining is disallowed.

Note that the system can cope with SIT ON GROUND or LIE DOWN ON FLOOR. If you want the player to be able to sit or recline on another surface (so the player could LIE ON THER GRASS for example), you would need to create that as an object.

Postures for NPCs

You can also tell NPCs to sit or recline. You will also need CompliantNpcLib, and you need to ensure that that is listed before PostureLib. You need to give your NPCs two inherited types (on their Attributes tab); compliant_npc and posturing_npc.

NPCs use the same attributes as the player. Adopting a posture has a compliance level of 13, so an NPC needs a compliance of 14 or over to agree.

There are a whole bunch of script attributes you can modify for specific NPCs so they have their own messages when adopting a posture. Look at the attributes tab, and see what is listed for "posturing_npc".

Clone this wiki locally