Extraction of Kinds and World indices given source code?

Hello everyone,
Assuming I have the source file (.ni) of an Inform game, is there any way to programatically extract the Kinds and World Indices?


You have to compile it (with the ni compiler), and then look in the project.inform/Index directory.

Great, that’s easy enough.
I’m actually having a really hard time compiling games. I’m using Inform version 6.33/6M62, but for most games I get endless compilation errors, also after installing extensions.

Some that I’ve tried are:
ifarchive.org/if-archive/games/ … oldiron.ni

The only one that has worked is ifarchive.org/if-archive/games/ … of_Law.txt

Assuming it must be version incompatibility issues, is there any way around this?

Sorry for the newbie questions, I’ve looked for help online but the only place I can find it is here - so I owe you big time :slight_smile:

I see basically three options:

A) If you want to be able to compile code in the newest version of Inform 7 while making a minimum of changes to the code, I suggest sticking to games that were released using the current build of Inform 7 (6M62) or one of the two most recent builds that came before it (6L38 or 6L02). That will limit you roughly to games released in 2014 (later in the year) or in more recent years.

B) If you want to compile code from older versions of Inform 7 without having to make any changes to the code, the only way I know if is to install an older version of Inform that the game is compatible with, and get all the old versions of the extensions that were originally used in the game.

If there is a compiled version of the game available to play (at IFDB, for example), the banner that appears near the start of the game should tell you which build of Inform was used, and the VERSION command should tell you what versions of the extensions were used.

C) If you want to compile code from older versions of Inform 7 in a newer version of Inform, and it’s not compatible, you’ll have to update the code. You can start by looking at the release notes for the various builds of Inform 7 to see what changes were made between versions: inform7.com/download/

I don’t know of any shortcuts (but if others do, I imagine they will say so).

No shortcuts, I’m afraid. The I7 language has changed with each release. The jump from 6G60 to 6L02 was particularly lumpy.

I see you tried compiling Cold Iron. I added a comment near the top saying “I implemented this game using Inform 7 build 6G60”, and it turns out that’s the version you have to use.