update for new settings
This commit is contained in:
parent
f0ddea0ba9
commit
472d36cce1
2 changed files with 11 additions and 8 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
# Character Creator contrib
|
# Character Creator contrib
|
||||||
by InspectorCaracal
|
by InspectorCaracal
|
||||||
|
|
||||||
This contrib is designed to be used in MULTISESSION_MODE = 2 or higher, where characters are not automatically created to match the account. To use this with lower modes, you'll need to implement your own solution for preventing the built-in automatic character creation.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
In your game folder `commands/default_cmdsets.py`, import and add `ContribCmdCharCreate` to your `AccountCmdSet`.
|
In your game folder `commands/default_cmdsets.py`, import and add `ContribCmdCharCreate` to your `AccountCmdSet`.
|
||||||
|
|
@ -30,6 +28,14 @@ class Account(ContribChargenAccount):
|
||||||
# your Account class code
|
# your Account class code
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In your settings file `server/conf/settings.py`, add the following settings:
|
||||||
|
```python
|
||||||
|
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 `MAX_NR_CHARACTERS`.)
|
||||||
|
|
||||||
By default, the new `charcreate` command will reference the example menu provided by the contrib, so you can test it
|
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](/evennia/contrib/rpg/character_creator/example_menu.py) for ideas on how to build your own.
|
out before building your own menu. You can reference [the example menu here](/evennia/contrib/rpg/character_creator/example_menu.py) for ideas on how to build your own.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
"""
|
"""
|
||||||
Character Creator contrib, by InspectorCaracal
|
Character Creator contrib, by InspectorCaracal
|
||||||
|
|
||||||
This contrib is designed to be used in MULTISESSION_MODE = 2 or higher,
|
|
||||||
where characters are not automatically created to match the account.
|
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
The primary feature of this contrib is defining the name and attributes
|
The primary feature of this contrib is defining the name and attributes
|
||||||
|
|
@ -29,9 +26,9 @@ from evennia.utils.evmenu import EvMenu
|
||||||
|
|
||||||
_CHARACTER_TYPECLASS = settings.BASE_CHARACTER_TYPECLASS
|
_CHARACTER_TYPECLASS = settings.BASE_CHARACTER_TYPECLASS
|
||||||
try:
|
try:
|
||||||
_CHARGEN_MENU = settings.CHARGEN_MENU
|
_CHARGEN_MENU = settings.CHARGEN_MENU
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
_CHARGEN_MENU = "evennia.contrib.rpg.character_creator.example_menu"
|
_CHARGEN_MENU = "evennia.contrib.rpg.character_creator.example_menu"
|
||||||
|
|
||||||
class ContribCmdCharCreate(MuxAccountCommand):
|
class ContribCmdCharCreate(MuxAccountCommand):
|
||||||
"""
|
"""
|
||||||
|
|
@ -60,7 +57,7 @@ class ContribCmdCharCreate(MuxAccountCommand):
|
||||||
new_character = in_progress[0]
|
new_character = in_progress[0]
|
||||||
else:
|
else:
|
||||||
# we're making a new character
|
# we're making a new character
|
||||||
charmax = settings.MAX_NR_CHARACTERS if settings.MULTISESSION_MODE > 1 else 1
|
charmax = settings.MAX_NR_CHARACTERS
|
||||||
|
|
||||||
if not account.is_superuser and (
|
if not account.is_superuser and (
|
||||||
account.db._playable_characters and len(account.db._playable_characters) >= charmax
|
account.db._playable_characters and len(account.db._playable_characters) >= charmax
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue