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

Dialogue: Pass all Dialogue Choices to the Dialogue Message Scene, visible or otherwise #841

Open
ch0m5 opened this issue Dec 5, 2024 · 1 comment
Labels
kind/enhancement New feature or request

Comments

@ch0m5
Copy link

ch0m5 commented Dec 5, 2024

Description

Currently visibility property in a Dialogue Choice determines whether the Scene in the Dialogue Message receives that option in the Array of options or not.

However, this incurs an (arguably) unnecessary limitation, which is that non-visible options are inaccessible in GDScript, as in not included in the Array the Scene gets to decide how to process the data in the Dialogue Message.

image
image

This prevents the user from processing "unavailable" options altogether, as their data is just not available. E.g., showing the option but "graying it out" to flag it as unavailable, or allowing its selection regardless of conditions in a debug environment.

Implementation ideas

Currently, a dictionary called dialogue_data is passed to the Dialogue Message Scene with the character_name, message, and options keys. Any options that are flagged as "not visible" will simply not be in the options Array.

I propose that options contains every option, visible or otherwise, and extra "visibility" data is added for the user to process it.

  • Option A: options Array contains Dictionaries as values, with text and visible keys and String and Boolean values, respectively, reflecting the contents of a Dialogue Choice Node.
  • Option B: options Array contains all options and an additional options_visibility Array is added within dialogue_data as an Array of Booleans, reflecting the visibility of each option.

Ideas for alternative approaches are welcomed. The main goal is to make all Dialogue Message/Choice Node data available to the user.

@ch0m5 ch0m5 added the kind/enhancement New feature or request label Dec 5, 2024
@ch0m5 ch0m5 changed the title Pass all Dialogue Choices to the Dialogue Message Scene, visible or otherwise Dialogue: Pass all Dialogue Choices to the Dialogue Message Scene, visible or otherwise Dec 16, 2024
@Naros
Copy link
Member

Naros commented Dec 16, 2024

I think Option A is a reasonable way to tackle this, and so I see no reason to over-engineer it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants