I’d like to break apart my story’s source into separate extensions, but for most of them, they will still be project-specific. I.e. I want to version control them with my project under GitHub, and not in a separate place for fully independent extensions.
I can create the extension, edit and debug it in the IDE, then (while the IDE is closed) move it from
That lets me keep the extension under my project’s root folder(s) for ease with GitHub.
The extension even gets found when my project builds, so that’s good.
However, I can’t see a way to further open and edit the extension when it’s located there…
Is there some trick to this, or are project-specific extensions not supported well?
Also, when modifying included extensions but not the main story file, the IDE doesn’t consider the project changed, and won’t rebuild it. Have to close and reopen…
It would be nice if the IDE kept track of referenced extension file modification times (recursively) and considered those when determining if the project needs recompiling.
In the short term, you don’t have to close and reopen the project. The Mac IDE (at least) is weirdly sensitive and will recompile if you type commands in the game pane, even if the source hasn’t changed. (I think it consider a Skein change to be a source change?)
You could also just hit space or enter in the IDE, changing the main source file by one character. That will definitely trigger a rebuild. Yes, it’s a pain.
To second what Zarf says: I’ve been using headers as extensions for as while, in Notepad++. I find the convenience far outweighs the nuisance & notepad++'s text editor allows for mass regex changes my (old? Maybe the updated version does) version of the Windows IDE doesn’t.
I have a batch commands that let me open up files quickly too. (I’m on Windows.) Batch files kinda stink, of course, but I can do stuff like “ni vf ta” to open up Very Vile Fairy File’s Tables.i7x file, for instance. Or “ni ai te” for Ailihphilia’s tests file.
It’s a nuisance compared to more robust programs and IDEs but given that all the programmers are maintaining and developing Inform for free, I’m okay with not having huge bells and whistles.
Small tangent: for those considering breaking your project into header files beyond just “volume x” and “volume y” I really recommend it, in conjunction with source control. I like having certain stuff that’s relatively stable, where I pretty much know – hey, this is a core file, I’d better think before I change anything in it.
And I can see whether or not I’m changing story text or mechanics pretty easily.
But speaking from experience, on reorganizing story.ni into Game Tables.i7x, etc., headers, I very quickly found ways to restructure and improve my code, and I found some bugs I would not have seen otherwise. So even though the IDE is not perfectly convenient, I really recommend going through with what you want to do.