Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching for variables #1562

Open
3 tasks done
Bengeljo opened this issue Oct 8, 2024 · 3 comments
Open
3 tasks done

Searching for variables #1562

Bengeljo opened this issue Oct 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Bengeljo
Copy link

Bengeljo commented Oct 8, 2024

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

  • set $Variable found in [Passage 1 , 2 , 8 and 23]
  • if $Variable found in [Passage 12 and 30]

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

  • I am interested in working on code that would implement this feature request. (This is not required to submit a suggestion.)
  • I have done a search and believe that an issue does not already exist for this idea in the GitHub repository.
  • I have read and agree to abide by this project's Code of Conduct.
@Bengeljo Bengeljo added the enhancement New feature or request label Oct 8, 2024
@klembot
Copy link
Owner

klembot commented Oct 24, 2024

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
Copy link
Author

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
Copy link
Owner

klembot commented Oct 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants