Recommended IDE for Sugarcube?

Hi everyone!
I’m fairly new to IF (authoring that is). I’m a school librarian and I’m creating a CYOA for one of our special needs classes to practice and roleplay life skills. I’m currently using Twine 2 with Harlowe 3.2.1. It’s going pretty well and I’m kind of getting into the groove of it. I’m enjoying myself and starting to think about creating another IF. My daughter loves the Magnus Archives so I’m thinking about making something kind of like that. I think I’m going to switch over to Sugarcube because it looks like you can get a bit fancier.
My question is, what would you recommend for an IDE?
Twine 2 is nice but I’m wondering if there is something else out there that is a little more full-featured (find and replace would be nice). The syntax highlighting is great and I do appreciate the tooltips (I’m starting to turn them off more often, so I’m learning). The story map visualization is also a must for me. My brain is so cluttered I need to SEE the story to keep it straight. Something with a built-in website uploader would be nice too (or whatever that is called). Right now I’m constantly publishing to file and then uploading to my website whenever I update. I’ve gotten pretty fast but something that can do it right in the application would be awesome.
I’m willing to pay for an application so it does not need to be free.
Any recommendations?

2 Likes

Visual Studio Code with the Twee 3 language tools extension, combined with the Tweego compiler sounds like what you’re looking for.

3 Likes

This looks pretty heavy but awesome. I’m up for giving it a try. Is there a step-by-step walkthrough for beginners on creating interactive fiction in VSC?. I have everything installed but can’t figure out how to set the story format to sugarcube. I see the documentation for “StoryData” but how do I do this?

Hi @crios,

So here’s a super simple file to get started with SugarCube v2.30.0:
A really helpful reference for the Twee3 format (and the various story format properties) is available via the Twee3 Specification Docs.

:: StoryTitle
Twee3 Example SugerCube File

:: StoryData
{
   "ifid": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
   "format": "SugarCube",
   "format-version": "2.30.0",
   "start": "Start"
}

:: Start
This is the starting passage.
[[Second]]

:: Second
This is the second passage.

Good luck!

Update: X’d out the IFID number as per @TheMadExile’s comment re: Tweego can generate this for you.

2 Likes

Very helpful. Thank you.

1 Like

Please, do not reuse that, or any other, IFID. They’re supposed to be unique to a project.

If you leave it out, Tweego will generate a new one for you and tell you how to use it.

2 Likes

Interesting. I just compiled a small test program using Tweego using VSCode and the Tweego 3 extension.

It works as expected but I have a lot to learn. (as usual).

Thank you

1 Like

This got me started but I was more confused by the whole workspace thing, and twee document type. I’m a beginner’s beginner. I figured it out (more or less). The story map doesn’t seem to be working for me (it’s not displaying correctly). I am going to be playing around with this. I can see how this will be a big improvement over Twine. I can open multiple editors in the same window and see multiple passages at the same time. My story has already gotten complex enough that I’ll have open two or more instances of Twine so that I can reference different passages. This is going to be super useful. Thanks!

1 Like

For T3LT help/discussion, its primary developer is active on the #tooling channel of the Twine Games Discord.

3 Likes

Thank you for the link!

When you say leave it out, do you mean just include the quotes with nothing in between?

"ifid": "",

or do you mean, leave the x’s?

"ifid": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",

OR, do you mean, don’t include that line at all?

Thanks!

I generated a new IFID number to use with my experimentation.

Works well.

I meant either leave out the value or leave out the property entirely:

Examples

Leave out the value:

{
	"ifid": "",
	"format": "SugarCube",
	"format-version": "2.34.1",
	"start": "Start"
}

Leave out the property entirely:

{
	"format": "SugarCube",
	"format-version": "2.34.1",
	"start": "Start"
}

If you do either of those, Tweego will emit something like the following:

error: Story IFID not found; generating one for your project.

Copy the following line into the "StoryData" special passage's JSON block (at the top):

	"ifid": "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE",

E.g., it should look something like the following:

:: StoryData
{
	"ifid": "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE",
	"format": "SugarCube",
	"format-version": "2.34.1",
	"start": "Start"
}

Where "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" is an actual IFID newly generated for you.

OTOH, if you use an invalid IFID—the Twine ecosystem uses UUIDv4—then Tweego will simply tell you that. For example, an IFID of "XXX…" would yield:

error: Cannot validate IFID; invalid IFID hex value U+0058 'X' at position 1.

There is an IFID generator on the Dialog page:

http://www.linusakesson.net/dialog/index.php

PS. Dialog is an incredible IF authoring system currently in development.

Another possibility is the Eclipse plugin for Twee3 (it only handles sugarcube). GitHub - boyland/twee-plugin: Eclipse plugin for Twee3 + Sugarcube if you create a new story, it will generate the IFID for you.