#HEADER
from typeclasses.characters import Character
#CODE
caller.msg("There are {0} "
"Characters.".format(Character.objects.count()))
Running Batch-code processor - Automatic mode for tutorial_examples.test_command ...01/02: from typeclasses.characters import Character 02/02: caller.msg("There are {0}"
"Characters.".for[...]>>>
>>> 06: # batchcode code:
>>> 07:
>>> 08:
>>> 09: caller.msg("There are {0}"
>>> 10: "Characters.".format(Character.objects.count()))
>>> 11:
>>> 12:
>>> 13: Traceback (most recent call last):
>>>
>>> File "<string>", line 10, in <module>
>>>
>>> NameError: name 'Character' is not defined
>>>#HEADER
#CODE
from typeclasses.characters import Character
caller.msg("There are {0} "
"Characters.".format(Character.objects.count()))
You can also find more help in our Coding-Introduction.
t = evennia.search_object("TestPlayer")[0]
print( t.db.stats_character.hp )
>>> 100t.db.stats_character.hp = 20