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

Allow expressions as portraits #2201

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

Jowan-Spooner
Copy link
Collaborator

@Jowan-Spooner Jowan-Spooner commented Apr 24, 2024

You can now use variables as portraits. You can also use expressions, for example if your character can have multiple genders, you could put those portraits in separate groups like this:

- male
   - default
   - happy
   - sad
-female
   - default
   - happy
   - sad

Then you can now use {Player.gender}+"/happy" as your portrait (assuming the Player.gender variable is either "male" or "female").
Note that this will be parsed when the portrait is set. It won't update the portrait live, in case you change the variable later, unless the portrait is set again with this expression!

Other stuff

  • also stops duplicated portrait items from reporting name changes
  • also adds a print_debug_moment() method to the DialogicGameHandler that allows to easily print the timeline and event for errors.

This prints the timeline and event at which an error appeared, for better debugging. This can be called wherever it makes sense when an error is reported.
@Jowan-Spooner Jowan-Spooner merged commit 56c3eda into dialogic-godot:main Apr 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the use of variables when choosing portrait
1 participant