klembot / twinejs

Twine, a tool for telling interactive, nonlinear stories
https://twinery.org
GNU General Public License v3.0
2.05k stars 308 forks source link

Searching for variables #1562

Open Bengeljo opened 1 month ago

Bengeljo commented 1 month ago

Is your feature request related to a problem? Please describe.

I am working on someone elses story and see required variables but sometimes it is hard to find them in the passages since he got 680 passages and doesn't have a structure like setting them at the top, cause sometimes cause it is a link they are further down.

Describe the solution you'd like.

It would be cool if there is a section where you can look up variables. They would be listed like

Or like you can use the search function and the passages will be highlighted

Describe alternatives you've considered.

The Go To menu button could be used for that as well. You can enter text but in the project if you go with (set: $variable to 1) it doesn't show what I am looking for, but the variable is named after a character so it will show the passages with the characters name. Maybe a filter for the go to section so when you write set: it knows you looking for variables ?

Additional context on this suggestion.

No response

Presubmission checklist

klembot commented 1 month ago

This would need to be a story format extension and not logic built into Twine itself, since every format uses a different format for variables. I'm not sure, though--how would this be different from using the search function?

Bengeljo commented 1 month ago

Hey thanks for getting to the ticket. Since I am working on a project from someone else, I don't know all the variables. Wouldn't it be possible to list everything that starts with $ since that will show a variable? or does it not work when you use SugarCube, Harlowe or something else ?

klembot commented 1 month ago

Harlowe and SugarCube use $ in front of variables, but Snowman and Chapbook don't. That's why I think this would need to be something that story formats specify and not a universal option.