Easy way to have alternate dialogue node text when you return to the node?
Posted: Tue Mar 26, 2019 8:35 pm
I've been mocking up a simple text adventure like dialogue, where you get a room description from the "NPC" and then pick where you go next. Typically, when you go back to a room you've visited in these kinds of games you get a shorter version of the description. I'm wondering if there's an easy way to do this kind of thing that I'm missing.
So far what I've done is make a group node for each room, with two child nodes off of it, one with a conditional testing a visited variable for false, the other for true. The false version gives you the long version of the description and sets the visited variable for that node. The true version gives you the short version of that room's description. They then both link to all the choices for where you can go from there.
This all works, but it requires me to have three nodes and a variable for every location, which seems excessive. Is there some way via markup to test a variable and present one of two sets of text based on that? Then I could collapse all that into a single node that presents the full text if the variable isn't set, and then sets it so that the next time that node is visited it uses the short version.
I've also looked at using the simstatus to handle the visited/presented checks, but keeping those around for every conversation just to handle the few that might want to do this also seems like overkill.
What I'd really want is a per-conversation & only keeping simstatus while that conversation is running kind of thing, which is basically what I've written myself via variables. It also seems like if I need a variable for every node in every conversation I'd end up with an amazing clutter of global variables, most of which would only pertain to a single conversation. Is there a concept of conversation local state that I'm missing?
Thanks,
Rick
So far what I've done is make a group node for each room, with two child nodes off of it, one with a conditional testing a visited variable for false, the other for true. The false version gives you the long version of the description and sets the visited variable for that node. The true version gives you the short version of that room's description. They then both link to all the choices for where you can go from there.
This all works, but it requires me to have three nodes and a variable for every location, which seems excessive. Is there some way via markup to test a variable and present one of two sets of text based on that? Then I could collapse all that into a single node that presents the full text if the variable isn't set, and then sets it so that the next time that node is visited it uses the short version.
I've also looked at using the simstatus to handle the visited/presented checks, but keeping those around for every conversation just to handle the few that might want to do this also seems like overkill.
What I'd really want is a per-conversation & only keeping simstatus while that conversation is running kind of thing, which is basically what I've written myself via variables. It also seems like if I need a variable for every node in every conversation I'd end up with an amazing clutter of global variables, most of which would only pertain to a single conversation. Is there a concept of conversation local state that I'm missing?
Thanks,
Rick