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

Add sideimage slots #5436

Open
Gouvernathor opened this issue Mar 25, 2024 · 4 comments
Open

Add sideimage slots #5436

Gouvernathor opened this issue Mar 25, 2024 · 4 comments
Assignees
Labels
enhancement A proposed or requested enhancement or improvement to renpy's features.

Comments

@Gouvernathor
Copy link
Member

There is a use for having several side images present in the say screen, typically one on the left and one on the right.
I suggest adding a slot parameter to the Sideimage function, defaulting to 0, and a sideimage_slot parameter to Characters which sets them to (typically) have their image be shown on the left or on the right.
A function such as get_sideimage_slot, intended to be used in the say screen, returns the slot number of the speaking character or None if it has no side image. Its behavior when Sideimage returns None is unspecified (there is the use case where image="greg" is passed to a Character but the side greg image doesn't exist, it's just to pilot the greg image using say-with-attribute). That function may be useful ir order to apply transforms (like blurring or sepia) to the character on the right who spoke before and is still shown but doesn't speak now.
A way should be found for clearing a specific slot of the image it contains - since the non-active slots are retained from previous lines.

@Gouvernathor Gouvernathor added the enhancement A proposed or requested enhancement or improvement to renpy's features. label Mar 25, 2024
@Gouvernathor Gouvernathor self-assigned this Mar 25, 2024
@MiiNiPaa
Copy link

A function to set a specific sideimage slot to an arbitrary value — for example, to set up portrait of the character you are talking to before they speak — would be useful. It will also enable slot clearing by setting specific slot to None.

@Gouvernathor
Copy link
Member Author

The issue with using functions is that Python is not easy to predict. Whereas you can already set the portrait of an arbitrary slot :

andre "{nw}" # sets portrait 2
eileen "Ah, you're there." # uses portrait 1

@MiiNiPaa
Copy link

Good point, and clearing might be done by providing sideimage_slot to a character, but not providing image and using that character.

Alternatively a separate sideimage statement could be added to both allow prediction and make manual sideimage handling less awkward.

@Gouvernathor
Copy link
Member Author

I'm not sure how we should do it :

  • the character you describe would have no other use than to turn off that slot, so it seems very magic and not very intuitive
  • a new statement is something that should not be introduced too lightly... but at the same time the sideimage management is already quite magic and making it explicit could have benefits
  • Python, as I said, is not predictable... however, removing a portrait and the associated image doesn't bring up a new image which would fail to be predicted, it just removes the need for an image that was predicted, ultimately for nothing. That could work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A proposed or requested enhancement or improvement to renpy's features.
Projects
None yet
Development

No branches or pull requests

2 participants