Added documentation to rpsystem

This commit is contained in:
Griatch 2015-09-26 18:54:16 +02:00
parent 0cb2daad83
commit f6556b426e

View file

@ -1,36 +1,51 @@
""" """
RP base system for Evennia Roleplaying base system for Evennia
Contribution - Griatch, 2015 Contribution - Griatch, 2015
This module contains the ContribRPObject, ContribRPRoom and
ContribRPCharacter typeclasses. If you inherit your
objects/rooms/character from these (or make them the defaults) from
these you will get the following features:
This RP base system introduces the following features to a game, - Objects/Rooms will get the ability to have poses and will report
common to many RP-centric games: the poses of items inside them (the latter most useful for Rooms).
- Characters will get poses and also sdescs (short descriptions)
that will be used instead of their keys. They will gain commands
for managing recognition (custom sdesc-replacement), masking
themselves as well as an advanced free-form emote command.
emote system using director stance emoting (names/sdescs instead of To use, simply import the typclasses you want from this module and use
replacing with you etc) them to create your objects, or set them to default.
sdesc obscuration of real character names for use in emotes
and in any referencing
recog system to assign your own nicknames to characters, can then
be used for referencing
pose system to set room-persistent poses, visible in room
descriptions and when looking at the person
Emote system: This uses a customizable replacement noun (/me, @ etc) In more detail, This RP base system introduces the following features
to represent you in the emote. You can use /sdesc, /nick, /key or to a game, common to many RP-centric games:
/alias to reference objects in the room.
Sdesc system: - emote system using director stance emoting (names/sdescs).
This relies on an Attribute `sdesc` being set on the Character and This uses a customizable replacement noun (/me, @ etc) to
makes use of a custom Character.get_display_name hook. If sdesc represent you in the emote. You can use /sdesc, /nick, /key or
is not set, the character's `key` is used instead. This is particularly /alias to reference objects in the room. You can use any
used in the emoting system. number of sdesc sub-parts to differentiate a local sdesc, or
Recog system: use /1-sdesc etc to differentiate them. The emote also
The user may recog a user and assign any personal nick to them. This identifies nested says.
will be shown in descriptions and used to reference them. This is - sdesc obscuration of real character names for use in emotes
making use of the nick functionality of Evennia. and in any referencing such as object.search(). This relies
Pose system: on an SdescHandler `sdesc` being set on the Character and
This is a simple Attribute that modifies the way the character is makes use of a custom Character.get_display_name hook. If
listed when in a room as sdesc + pose. sdesc is not set, the character's `key` is used instead. This
is particularly used in the emoting system.
- recog system to assign your own nicknames to characters, can then
be used for referencing. The user may recog a user and assign
any personal nick to them. This will be shown in descriptions
and used to reference them. This is making use of the nick
functionality of Evennia.
- masks to hide your identity (using a simple lock).
- pose system to set room-persistent poses, visible in room
descriptions and when looking at the person/object. This is a
simple Attribute that modifies how the characters is viewed when
in a room as sdesc + pose.
- in-emote says, including seamless integration with language
obscuration routine (such as contrib/rplanguage.py)
Examples: Examples:
@ -38,7 +53,7 @@ Examples:
Tavern Tavern
The tavern is full of nice people The tavern is full of nice people
You see *a tall man* standing by the bar. *A tall man* is standing by the bar.
Above is an example of a player with an sdesc "a tall man". It is also Above is an example of a player with an sdesc "a tall man". It is also
an example of a static *pose*: The "standing by the bar" has been set an example of a static *pose*: The "standing by the bar" has been set
@ -52,6 +67,7 @@ I see:
Tall man (assuming his name is Tom) sees: Tall man (assuming his name is Tom) sees:
The godlike figure looks at Tom and says "Hello". The godlike figure looks at Tom and says "Hello".
""" """
import re import re