There is a line of code that should be removed from the main website documentation + there is a function call with the wrong datatypes being passed in..
Poppy-Airlines opened this issue · comments
Existing page / new
https://www.evennia.com/docs/latest/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Chargen.html
Documentation issue
at the bottom of the page "6.9. Tying the nodes together" in start_chargen
the line "tmp_character.generate()
no ".generate()" method was made for TemporaryCharacterSheet at all during the tutorial. It causes an error, and the code works fine without it.
next, the "start_chargen" function's EvMenu looks like this:
EvMenu(caller, menutree, session=session, startnode="node_chargen", tmp_character=tmp_character)
tmp_character is passed in raw, and the node_chargen is expecting a dictionary:
def node_chargen(caller, raw_string, **kwargs):
tmp_character = kwargs["tmp_character"]
text = tmp_character.show_sheet()
#. . . . . . .
Suggested change
remove "tmp_character.generate()"
and
either make it so node_chargen is not expecting a dictionary and pass in tmp_character raw, or make it so that it gets put into a dictionary first and pass that through the start_chargen's EvMenu.
- Looks like the
tmp_character.generate()
was a leftover from a previous version. Removed it! - Do you actually see an error from the
tmp_character
? Because this is how this is meant to be used - all additional kwargs toEvMenu
becomes available in the**kwargs
of the start node.
If fixed 1, but unless I missed something, I think 2 is correct. I will close this ticket, feel free to ping to re-open if I misunderstood the second issue.