Plugins: Variable for the text of another doc (based on the outline)
Something like … {{ document_text_-1 }} would pass the text of the previous document linked in the outline, while {{ document_text_+2 }} would pass the text of the document two after the current document.
For me the main use would be to pass the full text of the last two chapters, which I find helps with getting better output from the AI, both in terms of matching my style and also the AI fully understanding what has just happened in my story.
Log in to comment and vote
Comments1
Karistina Lafae
Dec 20, 2024
I see what you’re getting at, but this would run into all kinds of problems when multiple documents are linked to the same chapter because someone created multiple chapter versions.
If it’s going to be based on the outline anyway, it would make more sense to use the chapter summaries in the outline using {{ scene_summary }} as the anchor, possibly {{ scene_summary_-1 }} and {{ scene_summary_+2 }} as you suggested.
I don’t see any way for the text of actual documents to be passed as plugin variables UNLESS Sudowrite were to make it so that only one document could be linked to a specific part of the outline at a time, as documents don’t need to have unique names and therefore couldn’t be referenced by name.
I’d like to be able to show it the text of other documents, but it would take a big change to the way linked chapters function.
There’s a workaround you can use for now like John’s use of Chapter Glue as a worldbuilding card. You could make the text of the chapter(s) you’d like the plugin to look at into worldbuilding cards that you reference by name (potentially through user_text_input, or by specifying in the description that the plugin requires you to update worldbuilding cards with specific names like [Previous Chapter] and [Next Chapter]) after calling the {{ worldbuilding_raw }} variable.