I assume you mean within Twine 2, because published stories are always self-contained.
Going on the above assumption, yes, you can use SugarCube offline as long as you download the local/offline version and install it. Since you're asking about offline use, I'll also assume you're also using the local version of Twine 2.
Unpack the archive and place the directory someplace safe. It's probably easiest to place it in the storyformats directory of your Twine 2 install (if you do not, then the URL in step 6 will be different).
Launch Twine 2.
Click on the Formats link in the Twine 2 sidebar.
In the dialog that opens, click on the tab Add a New Format.
Finally, paste the URL given below into the textbox and click the +Add button.
storyformats/SugarCube-local/format.js
If everything went according to plan, you should now have two SugarCube entries to choose from, the default one titled "SugarCube" and the new local/offline one titled "SugarCube (local/offline)".
Thanks for the instructions MadExile, but when I tried this it is giving me this error:
The story format at storyformats/SugarCube-local/format.js could not be added (Could not load story format source).
when I try pasting in the URL you posted. I tried using my local file address instead and that didn't work either. Not really sure what else to do. Any suggestions?
Did you place the directory you extracted from the archive into the storyformats directory of your local Twine 2 install, so that the structure looks like the following?
I use that version, and so I followed the instructions above and it worked okay, except that when I want to "change story format" it does not list the SugarCube(local/offiline) as an option, and only lists the Harlowe and Snowman formats, along with a "loading..." icon which goes around endlessly in circles.
The actual SugarCube format is present locally, because when I play my story offline (from the Twine 2 interface) it loads the sugarCube format, but it is just not present as an option within "change story format" if I am offline. It IS available when I am online (along with the online version of SugarCube).
At a guess, Twine 2 isn't timing out attempts to load remote story formats, so even though you have a local version installed it gets stuck trying to load the online version.
Comments
Going on the above assumption, yes, you can use SugarCube offline as long as you download the local/offline version and install it. Since you're asking about offline use, I'll also assume you're also using the local version of Twine 2.
Thank you for your fast answer. It works perfectly.
The story format at storyformats/SugarCube-local/format.js could not be added (Could not load story format source).
when I try pasting in the URL you posted. I tried using my local file address instead and that didn't work either. Not really sure what else to do. Any suggestions?
Did you place the directory you extracted from the archive into the storyformats directory of your local Twine 2 install, so that the structure looks like the following?
I use that version, and so I followed the instructions above and it worked okay, except that when I want to "change story format" it does not list the SugarCube(local/offiline) as an option, and only lists the Harlowe and Snowman formats, along with a "loading..." icon which goes around endlessly in circles.
The actual SugarCube format is present locally, because when I play my story offline (from the Twine 2 interface) it loads the sugarCube format, but it is just not present as an option within "change story format" if I am offline. It IS available when I am online (along with the online version of SugarCube).
I wonder why it behaves like that. any ideas?