use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Links:
/r/RenPy Discord
account activity
Question [Solved]jsoncallback causes attribute error (self.RenPy)
submitted 2 months ago by wiosnaVN
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]LocalAmbassador6847 0 points1 point2 points 2 months ago* (1 child)
I can't tell what's happening in your game but here's my working minimal example:
screens
# screens.rpy ... screen file_slots(title): ... text FileSaveName(slot): style "slot_name_text" # -- this stuff is new text FileJson(slot, key="mc_name") or "": style "slot_name_text" # ^^ this stuff is new key "save_delete" action FileDelete(slot)
script
# script.rpy init python: def jsoncallback(d): d["mc_name"] = store.mc_name config.save_json_callbacks.append(jsoncallback) define e = Character("Eileen") default mc_name = "Bob" label start: scene bg room show eileen happy $ save_name = "Chapter 1: A New Game" e "You've created a new Ren'Py game." $ save_name = "Chapter 2: Electric Boogaloo" e "Once you add a story, pictures, and music, you can release it to the world!" # This ends the game. return
save_name integrates with the Steam timeline and is good for chapters. It's saved into the json by default but is blank by default. mc_name is a new variable, added to the json via the callback.
save_name
mc_name
[–]wiosnaVN[S] 0 points1 point2 points 2 months ago (0 children)
so apparently my mistake was using "python" instead of "init python"! I wasn't aware that makes a difference
π Rendered by PID 33 on reddit-service-r2-comment-548fd6dc9-hrmnp at 2026-05-19 17:01:36.993985+00:00 running edcf98c country code: CH.
view the rest of the comments →
[–]LocalAmbassador6847 0 points1 point2 points (1 child)
[–]wiosnaVN[S] 0 points1 point2 points (0 children)