About saves

I really need to notivate myself to work on my story again.

I have 2 questions about saves. The first one is, how do I customise the save buttons so that they’re not blue? The blue clashes with the rest of the colour sceheme.

For the second question, I have my story set up to keep clearing and revealing text in the same passage, but the saves only save at the start of the passage and you have to start over to advance it, meaning I have to either have checkpoints between passages, have separate passages for every line (which would be a load of hassle), or have shorter passages which means I would still have more of them than I want to have. I thought about the possibility of removing the code that clears text and instead having it in a scrolling box so that the page size does not increase, you can still see the image above, and you can scroll up and reread the text, but that still doesn’t solve the problem of how far you’ve progressed the text in the passage not being saved. I just don’t know what the best way to go about this is.

EDIT: I guess another option is for there to be an “Are you sure?” pop up if you try to refresh, but I don’t know if that’s possible or not.

Quick Note: There isn’t an image, so I’m not sure what it’s looking like.

Changing the Save Buttons: The buttons in the save dialog are all targetable in CSS with .saves button so you can easily have a custom style to change their color, like:

.saves button { background: red; }

The individual buttons also have IDs to make them easy to style, namely #saves-export #saves-import #saves-clear for the top row, and #saves-disk-save and #saves-disk-load for the bottom row.

Saving mid-passage: Sugarcube only saves the game state when a passage is loaded, so any changes to story variables between one passage transition and the next are not saved anywhere. That affects saves (as you’ve seen) and browser refreshes, so it’s a weakness of the “dynamic passage text” approach that the passage will always reset to the start.

There’s no easy fix for this one. You can force a “fake” passage transition mid-passage with <<goto `passage()`>>, or equivalent Javascript, but that will reset temporary variables as well. My best advice is to minimise having lots and lots of steps within a passage but without a transition, and find a way to automate doing what you are doing but with passage changes in the background. For example you could use a story variable to track which section you are on, and refresh the passage silently between each block.

I’m not sure how you are managing your blocks of text, but if you are using CTP (or a derivative like MCTP) then version 2 supports persistent text revealing that could do just what you need.

I’ve found Twine isn’t the best engine for sprawling conversations like RPGs often use due to the save issue.You can use story variables to keep track of things along the way and refresh the page, but you’re working against the engine by adding more complexity and extra memory bloat.

Sorry, I might have given you the wrong idea. I don’t mean the text appearing as if it was being typed, I mean there being a box where you advance the text and as more of it appears, rather than force you to scroll down the page to read it all, it’s done inside the box instead and you can scroll inside that rather than the entire page. I’m not good at putting things into words, sorry.

No no, I think that’s pretty much what I thought you meant.

If you can post the screenshot that was missing from the first post it might help though.

1 Like