twinejs
twinejs copied to clipboard
Feature Request: ability to directly manipulate tw-passagedata pid numbers?
Originally reported by: tryguy (Bitbucket: tryguy, GitHub: tryguy)
As it currently stands, we don't have much control over where the passages occur in the source code. The numbers are assigned when the passage is first created. It doesn't matter what use we put these passages to.
So, I foresee that as I write a story with a mix of generic story structures (that could be reused) and unique story content, all these passages could end up mixed up and very laborious to find in the wash.
I'd like be be able to dynamically reassign pids to better reflect where they should be found in the source code. It might be troublesome, but if it's a project I add and re-edit over and over again, I'd like to be able to add code passages that fit in with the "code" section in the html file.
I've seen a suggestion of right-button context menu. I think the ID for that passage could be displayed there, and possibly altered. Any left without any IDs could be highlighted as needing attention. But this would allow users to have more say in how the passages are grouped (within the source file).
Another suggestion might be to be able to choose the number that's appended to the passage. So, possibly the generic code (I copy from story to story) is from 1-35. The new story I might be able to tell the program to add any new (story) passages at 100, leaving 65 empty IDs. This would be handy if I had some more code to fit in with the code stuff. I could tell it that the next passage is 36, then switch back.
You see where I'm coming from? I like to keep reusable code together, and other code can follow that. I think sections (1-100, 101-500, etc) would be great for source organization. Does it matter if there are gaps within the numbering? I haven't experimented to see what happens when you delete passages. I guess it just fills that number with the next created passage?
Well, being able to set the numbering to starting levels would be a great help if I'm writing the story and integrating reusable code blocks as I go (like I generally do), since in the current way of adding things, they would just all get intermingled. Better would allow this kind of structure:
001-100: reusable (function) code 101-200: story code intro 201-400: story code chapter 1
And whatever. What think?
So, two ideas: (1) being able to manually change pids to group things, and (2) being able to change the current numbering level (so new passages start from that new level).
- Bitbucket: https://bitbucket.org/klembot/twinejs/issue/189
Original comment by tryguy (Bitbucket: tryguy, GitHub: tryguy):
Yeah, I wrote that feature request a long time ago, and I think it's not really needed. The idea came from the inability to copy passages from within the application.
But, I can see a point where that will no longer be a case (ie you'll be able to copy selections of passages from project to project, just as you can do that with Twine 1). Just have to wait for it.
The whole point of me suggesting a need to better organise the source file was to allow easier hand-copying. But it won't be needed, once high-level copy features are in place. So, probably this kind of low-level management isn't that useful. Or, I can see more productive time spent on user-level functionality.
There are quite a few user-oriented functions still missing with Twine 2. So, let's hope development continues until it's at least brought up to Twine 1 standards again. That's the hope.
Original comment by Leon Arnott (Bitbucket: L, GitHub: Unknown):
Your problem seems to involve the ordering of <tw-passagedata> elements in the source files, which doesn't need to involve pids at all. What if the source files simply arranged <tw-passagedata> elements by tag, then name?