Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: scene expression disable exception throwing, show text instead for missing image name #5499

Open
levicki opened this issue May 5, 2024 · 2 comments
Labels
duration - hour Resolving this is estimated to an hour of development unintended behavior Something not working the way it's supposed to, without causing a crash or exception
Milestone

Comments

@levicki
Copy link

levicki commented May 5, 2024

Is there a way that you could modify scene expression so that it only shows name of the (dynamic) image which is missing on the screen like scene does when file is not found instead of crashing and burning?

The way it is now it's really inconvenient for testing the game when you don't have all the image combinations ready in advance.

So basically, if I have code:

$ location = "basement"
$ timeofday = "night"
$ clothes = "dirty_rags"
scene expression "[location]_[timeofday]_[clothes].png"

And if the image basement_night_dirty_rags.png doesn't exist then just write it on the screen as if the code was:

scene basement_night_dirty_rags.png

Thanks in advance for considering it.

@mal
Copy link
Member

mal commented May 6, 2024

I think you're looking for config.raise_image_exceptions which can be set to False.

@levicki
Copy link
Author

levicki commented May 6, 2024

I think you're looking for config.raise_image_exceptions which can be set to False.

That doesn't work in latest released binary (8.2.1).

Here is the spot where it crashes:

raise Exception(error)

Apparently, that version of find_target isn't affected with flag you mentioned.

@renpytom renpytom added unintended behavior Something not working the way it's supposed to, without causing a crash or exception duration - hour Resolving this is estimated to an hour of development labels May 30, 2024
@renpytom renpytom added this to the 8.2.2 / 7.2.2 milestone May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duration - hour Resolving this is estimated to an hour of development unintended behavior Something not working the way it's supposed to, without causing a crash or exception
Projects
None yet
Development

No branches or pull requests

3 participants