Feature suggestion: Static variables

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Feature suggestion: Static variables

Post by Abelius »

Hi there,

This may seem a little weird, but there's one thing I'm missing in DS...: static variables. A little contradictory term there, I know... :P

What I mean is that I'd like to have variables that when a game loads, they're reinitialized to their default values as in the Variables tab, regardless of their values in the savegame file.

That way we could have variables that could be used as default game 'settings', which would change according to the developer preferences between versions, which is now not achievable without special code (default variables values are overwritten by savegames values).

My suggestion to implement it would be to include a checkbox next to each variable, so if it's marked it behaves like a static.

That would also allow for variables that in previous versions were 'normal' to be changed to a static behavior, regardless of previous saves containing them (or that is at least my hope).

What do you think? Do you like it?
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Feature suggestion: Static variables

Post by Tony Li »

That's a good idea. I'll look into it (in version 2.x).

As a workaround, as long as you haven't ticked the Dialogue Manager's Persistent Data Settings > Include All Item Data, you can create a "Settings" item that contains these fields. They'll be initialized from the database, but they won't be included in saved games.
Post Reply