Skip to content

Add float variable type #11

@RailKill

Description

@RailKill

Use Case

A story may have a simple money or math conversation that it would be good to store values with decimal points, so users can have some haggling where the price changes in their dialogue for example. Monologue's strength is with its cross-compatibility via JSON, the data may be read by other engines or applications, so it would be great to have float values be managed by Monologue too, at least it's quite a common primitive type.

Current Implementation

No float variable type.

Proposed Implementation

When adding this variable type, consider refactoring the way Variable is handled in Monologue. Notice how there are many match and checking of 0, 1, 2 indices that are common across multiple nodes such as RootNode, ActionNode and ConditionNode. Each of these node panel controls are slightly different from one another, but we can create a VariableHandler node with @export variables that can take in user-defined UI controls from the Inspector, so that this VariableHandler can update the GUI controls as needed while still retaining the core logic of dealing with variables in its own script. With this refactoring, adding new variable types across all related nodes will be trivial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions