Contribution by InspectorCaracal, 2022
Commands for managing and initiating an in-game character-creation menu.
In your game folder
commands/default_cmdsets.py, import and add
ContribCmdCharCreate to your
from evennia.contrib.rpg.character_creator.character_creator import ContribCmdCharCreate class AccountCmdSet(default_cmds.AccountCmdSet): def at_cmdset_creation(self): super().at_cmdset_creation() self.add(ContribCmdCharCreate)
In your game folder
typeclasses/accounts.py, import and inherit from
on your Account class.
(Alternatively, you can copy the
at_look method directly into your own class.)
from evennia.contrib.rpg.character_creator.character_creator import ContribChargenAccount class Account(ContribChargenAccount): # your Account class code
In your settings file
server/conf/settings.py, add the following settings:
AUTO_CREATE_CHARACTER_WITH_ACCOUNT = False AUTO_PUPPET_ON_LOGIN = False
(If you want to allow players to create more than one character, you can
customize that with the setting
By default, the new
charcreate command will reference the example menu
provided by the contrib, so you can test it out before building your own menu.
You can reference
the example menu here for
ideas on how to build your own.
Once you have your own menu, just add it to your settings to use it. e.g. if your menu is in
mygame/word/chargen_menu.py, you’d add the following to your settings file:
CHARGEN_MENU = "world.chargen_menu"
The contrib overrides the character creation command -
charcreate - to use a
character creator menu, as well as supporting exiting/resuming the process. In
addition, unlike the core command, it’s designed for the character name to be
chosen later on via the menu, so it won’t parse any arguments passed to it.
The contrib version works mostly the same as core evennia, but adds an
additional check to recognize an in-progress character. If you’ve modified your
at_look hook, it’s an easy addition to make: just add this section to the
playable character list loop.
for char in characters: # contrib code starts here if char.db.chargen_step: # currently in-progress character; don't display placeholder names result.append("\n - |Yin progress|n (|wcharcreate|n to continue)") continue # the rest of your code continues here
This document page is generated from
evennia/contrib/rpg/character_creator/README.md. Changes to this
file will be overwritten, so edit that file rather than this one.