Change dialogue depending on subsequent viewings. #402
eisegesis-623
started this conversation in
Ideas
Replies: 2 comments
-
Dialogue Manager is stateless and tracking viewed lines would go against that. Tracking titles is something you would implement in your custom balloon by connecting to the |
Beta Was this translation helpful? Give feedback.
0 replies
-
@nathanhoad makes sense. Thanks so much for the reply! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using the "actionable" system to trigger dialogue, it's often desirable to show different text the second, or even third, time that you interact with the dialogue.
This functionality is of course possible right now thanks to the ability to access variables in autoloads, but it's really verbose. The following code is my current solution (which I'm positive could be done much better).
That's a LOT for two lines of dialogue (not to mention, it's kind of hard to follow). This sort of functionality is a lot simpler than "if character has X in inventory, then choose this dialogue" and doesn't need to persist beyond runtime
(Having to add a new variable or key manually into the autoload every time you write a new dialogue label is redundant, so I'm doing it in the dialogue itself.)
My proposal is to keep track of how many times a given label has been accessed in the DialogueManager itself. This way, all you need to do within dialogue is check to see how many times you've accessed it.
Here's a hypothetical example using
label(how_many_times_accessed)
.I can already see a lot of issues with this particular implementation. It doesn't really make sense how it would know to stop at
elif label(4)
with the if statement. And in the below example, you couldn't ever see the text "this is a different first time" if you accessed the dialogue beforeSomeGlobal.variable
becametrue
.Perhaps this could be solved by keeping track of how many times a particular dialogue line has been accessed, rather than the label. Alternatively, using
=> another_label
to house the actual dialogue andlabel(how_many_times_accessed)
checks could work.I don't think anything I've suggested here is remotely close to a proper solution. Maybe handling this in the actionable itself is the best way to go, rather than in the dialogue. However, I do think there's a case to be made for this (or something similar) being a built-in feature. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions