The IFID is defined on an external file that Inform creates when you create a project. It’s just an UUID. You can copy it from the project’s library card and define it as a say phrase in your code, if you want to use it as such:
To say IFID: say "1974A053-7DB0-4103-93A1-767C1382C0B7".
Requesting IFID is an action out of world. Understand "IFID" as requesting IFID.
Carry out requesting IFID: follow the IFID announcement rule.
The IFID announcement rule translates into I6 as "IFID_ANNOUNCEMENT_R".
[ IFID_ANNOUNCEMENT_R ix;
for (ix=8: ix+2 <= UUID_ARRAY->0: ix++) print (char) UUID_ARRAY->ix;
Home is a room.
Test me with "ifid".
Monkeying around with I6 is usually the last resort, though, as there’s no guarantee the underlying I6 implementation will remain the same in future versions of Inform 7.
We create the Requesting IFID action, and make the parser recognize what it means.
The Requesting IFID action is given meaning, in that invoking it triggers a rule we’re going to create, the “IFID announcement rule”. At this point we’ve not yet defined what that rule means; we haven’t even created it.
This line is the key: it tells I7 that the “IFID announcement rule” exists (thus creating it), and that it refers to an I6 routine. It specifies that the corresponding I6 routine will be named IFID_ANNOUNCEMENT_R.
The rest should be reasonably straightforward: it’s basically cribbed from the ANNOUNCE_STORY_FILE_VERSION_R function in ZMachine.i6t, which in that respect is identical to the routine in Glulx.i6t. Which is nice since we don’t need two separate versions of the routine.
Anyway, if you’re at all unsure of I6 hacks, don’t use them. There’s a reason the manual recommends all alternative solutions before I6 hackery.
To say I7 version:
(- PrintI6Text(NI_BUILD_COUNT); -).
To say I6 library version:
(- PrintI6Text(LibRelease); -).
To say I6 compiler version:
(- inversion; -).
[ GetReleaseNumber i;
@aloads ROM_GAMERELEASE 0 i;
[ PrintSerialNumber i;
for (i=0 : i<6 : i++) print (char) ROM_GAMESERIAL->i;
To decide what number is the release version:
(- GetReleaseNumber() -).
To say serial number:
(- PrintSerialNumber(); -).
Every turn when Draconis mentions I6 code:
say "I appreciate it. But I'd rather steer clear from I6 voodoo doodoo because [one of]reasons[or]it scares me[at random].";
now WesLesley is hiding under the bed.