I opened an issue on the GitHub regarding this problem & Ren'Py Tom figured it out! This small tweak to renpy/exports.py fixed it.
( Consists of an added list() around the existing line renpy.game.context().scene_lists.at_list[layer].get(tag, None) )
VERY excited to spam little sparkle animations, etc. all over my game with wild abandon and very few characters typed, now that it's working. Big huge thanks to Ocelot for the sanity check & Tom for being the backbone of society.
I'm having goofy little problems with creator-defined statements again, & would love to get a second set of eyes on this one!
I wrote a CDS which shows a displayable using its post_execute function (so: if the statement is written right before a line of dialogue, when that line of dialogue is reached the displayable will be shown.)
EG, the code below would show displayable_name in a location chosen by cds' post_execute function, based on CHARACTER_A's image tag.
Code: Select all
cds displayable_name
CHARACTER_A "Bottom text!"Code: Select all
transform right_side:
yanchor 0.0
ypos 100
xoffset 150I've confirmed that the following code doesn't have this problem:
Code: Select all
show character_b:
xoffset 150...But I'm not sure what else to test to get any meaningful troubleshooting done.
It seems like something about my CDS' implementation isn't working quite right with rollback.
I'm wondering whether this might be because post_execute is supposed to execute "as part of the next statement", whereas a normal "show" statement might accomplish "not drawing the displayable to the screen until the next interaction happens" in a different way? Like this, where the --- separates one statement from the next:
1. REN'PY'S INBUILT THING, WHICH ROLLBACK KNOWS ABOUT
show statement [interacts with some other part of ren'py]
---
say statement [checks some other part of ren'py for things to show]
2. MY NOVEL THING, WHICH ROLLBACK MAY OR MAY NOT UNDERSTAND
cds statement
---
post_execute [directly uses renpy.show(something)]
say statement
Has anyone encountered something like this before? Does this explanation seem plausible?
If my options are either to figure out how show and say do this, then replicate it, or to hard-code a bunch of offset-less positions for my post_execute function to use, then make sure it knows which one to pick in any given situation, I'm honestly not sure which would take longer, so it would definitely help to get an outside opinion or two on the whole situation before I get too deep into either one! (& of course, if there's a secret third option I'm not seeing, let me know?)