Ocelot wrote: ↑Sun Aug 15, 2021 3:24 am
Saving and loading won't store tag properly too IIRC.
Did you try to use ConditionSwitch or DynamicImage for that? Instead of changing whichever image is shown midgame, you just change what that image is displaying.
About the save and load not storing... The tag resets to the default defined at init. I could just use a persistent to set it I guess.
About the ConditionSwitch, I have too many variants of characters and expressions for it to be viable. If I'm understanding correctly, each condition can have only 1 displayable; I have more than 10 characters, each with more than 15-20 expressions. That's a lot of py conditions for one interaction, enough to make the game lag on low-end systems.
I don't know about DynamicImage in this context. It gets a variable that is interpolated at each interaction, but I guess I'd have to use onlayer, so I'd lose the "char expression 'text' " syntax (unless I find a way to keep that syntax). Besides, SideImage() already returns a displayable to show, so doing "x = SideImage()" and then "DynamicImage(x)" would be redundant, wouldn't it? I can't see how DynamicImage would help me. Since I never used it, I guess it could be that it's possible, I just don't know how to do it.
Edit:
Yeah, a persistent can totally overcome the save/load problem at init level. Everytime I define config.side_image_tag to something, I also define persistent.side_image_tag to that same thing. During init phase, config.side_image_tag is defined, but since it is different from the persistent, it is set to the persistent value instead of keeping the default.
Code: Select all
init:
config.side_image_tag = "char1"
if config.side_image_tag != persistent.side_image_tag:
config.side_image_tag = persistent.side_image_tag