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

Expression/Variable update #1486

Merged
merged 3 commits into from
Mar 23, 2023
Merged

Expression/Variable update #1486

merged 3 commits into from
Mar 23, 2023

Conversation

Jowan-Spooner
Copy link
Collaborator

This update is centered around expressions but it has spiraled into much more.

The biggest changes are:

  • Set Variable now allows use of expressions
  • Set Variable now expects "" around strings
  • {Variable Insertion} now allows use of expressions
  • Set Variable ui changed, there is now a type selector for the value
  • Set Variable random is now an expression
  • Condition Picker ui changed, there is now a type selector for both variable and value
  • Event resources can now request an update and set a warning
  • Both the Set Variable and the Condition/Choice event show an error when using a string incompatible operator with a string.
  • The Expression logic in DialogicGameHandler.execute_condition() was generalized and moved into a dedicated subsystem 'Expression'. This one is in a new Core folder together with the End Branch event.
  • Autoloads can be accessed again in conditions and set/get variables
  • Multiple Event Node fields have been simplified (except condition picker which got much more complicated)
  • a bug with condition tangling has been removed
  • Icons for "Go to Variable Editor" and "Go to character Editor" have been changed.
  • OptionSelector has now a "icon only" mode.
  • Warning icon has been better placed.
  • Removed nodes have been deleted from the game_ui.tscn

This update is centered around expressions but it has spiraled into much more.

The biggest changes are:
- Set Variable now allows use of expressions
- Set Variable now expects "" around strings
- {Variable Insertion} now allows use of expressions
- Set Variable ui changed, there is now a type selector for the value
- Set Variable random is now an expression
- Condition Picker ui changed, there is now a type selector for both variable and value
- Event resources can now request an update and set a warning
- Both the Set Variable and the Condition/Choice event show an error when using a string incompatible operator with a string.
- The Expression logic in DialogicGameHandler.execute_condition() was generalized and moved into a dedicated subsystem 'Expression'. This one is in a new Core folder together with the End Branch event.
-  Autoloads can be accessed again in conditions and set/get variables
- Multiple Event Node fields have been simplified (except condition picker which got much more complicated)
- a bug with condition tangling has been removed
- Icons for "Go to Variable Editor" and "Go to character Editor" have been changed.
- OptionSelector has now a "icon only" mode.
- Warning icon has been better placed.
- Removed nodes have been deleted from the game_ui.tscn
This is because (also to support autoload variables) get_variable() will now execute the given string if no variable could be found for that path.

Removed some prints()

Fixed an error with float conversion.
You can now escape variables with \ Meaning \{my_variable} will not get replaced. Insert variables also now can contain first level variables allowing stupid shit like: 
`Here comes a variable {len({MyVariable})}` or `{{Some Variable}+{Some Other Variable}}`

- fixed the set random mode for visual editor
- fixed more float conversion problems
@Jowan-Spooner Jowan-Spooner merged commit 8332451 into main Mar 23, 2023
@Jowan-Spooner Jowan-Spooner deleted the expression-update branch April 19, 2023 09:36
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.

None yet

1 participant