evennia.contrib.chargen

Contribution - Griatch 2011

> Note - with the advent of MULTISESSION_MODE=2, this is not really as necessary anymore - the ooclook and @charcreate commands in that mode replaces this module with better functionality. This remains here for inspiration.

This is a simple character creation commandset for the Account level. It shows some more info and gives the Account the option to create a character without any more customizations than their name (further options are unique for each game anyway).

In MULTISESSION_MODEs 0 and 1, you will automatically log into an existing Character. When using @ooc you will then end up in this cmdset.

Installation:

Import this module to mygame/commands/default_cmdsets.py and add chargen.OOCCMdSetCharGen to the AccountCmdSet class (it says where to add it). Reload.

class evennia.contrib.chargen.CmdOOCLook(**kwargs)[source]

Bases: evennia.commands.default.general.CmdLook

ooc look

Usage:

look look <character>

This is an OOC version of the look command. Since an Account doesn’t have an in-game existence, there is no concept of location or “self”.

If any characters are available for you to control, you may look at them with this command.

key = 'look'
aliases = ['ls', 'l']
locks = 'cmd:all()'
help_category = 'general'
func()[source]

Implements the ooc look command

We use an attribute _character_dbrefs on the account in order to figure out which characters are “theirs”. A drawback of this is that only the CmdCharacterCreate command adds this attribute, and thus e.g. account #1 will not be listed (although it will work). Existence in this list does not depend on puppeting rights though, that is checked by the @ic command directly.

lock_storage = 'cmd:all()'
class evennia.contrib.chargen.CmdOOCCharacterCreate(**kwargs)[source]

Bases: evennia.commands.command.Command

creates a character

Usage:

create <character name>

This will create a new character, assuming the given character name does not already exist.

key = 'create'
locks = 'cmd:all()'
func()[source]

Tries to create the Character object. We also put an attribute on ourselves to remember it.

aliases = []
help_category = 'general'
lock_storage = 'cmd:all()'
class evennia.contrib.chargen.OOCCmdSetCharGen(cmdsetobj=None, key=None)[source]

Bases: evennia.commands.default.cmdset_account.AccountCmdSet

Extends the default OOC cmdset.

at_cmdset_creation()[source]

Install everything from the default set, then overload

path = 'evennia.contrib.chargen.OOCCmdSetCharGen'