Open tajmone opened 5 years ago
Thanks for good suggestions for making working with the IFIDs easier!
The command line interpreter already had a -v
verbose switch that shows the version of the interpreter. In (very) recent commits I've added the printout of the game version (that was already available with -d
) and the IFID(s) if that switch is given.
Unfortunately there was a bug in the compiler so that games generated before that fix will not show IFIDs. They are still there, but can't be shown with the -v
command line option. There was no way to handle this than to refrain from trying if the game is not Beta 7 or higher. And since Beta 7 is not out yet this functionality is of limited use right now, but will work as soon as there are games produced with Beta 7.
As for the suggestion about Say IFID.
I consider this a very low priority feature. Primarily since I want to focus the language on the authoring. This should really be, as you've already suggested, in the tooling.
I have added the request about supporting this with WinArun and Gargoyle to the Alan tracker.
Re-creating the .ifid
file is very easy (although not documented), just dump the game file and put the IFID string in the .ifid
file. The changes mentioned above makes it even easier, and perhaps more "official".
Still need to document this, and the rest of the IFID-handling...
Unfortunately there was a bug in the compiler so that games generated before that fix will not show IFIDs. They are still there, but can't be shown with the -v command line option. There was no way to handle this than to refrain from trying if the came is not Beta 7 or higher. And since Beta 7 is not out yet this functionality is of limited use right now, but will work as soon as there are games produced with Beta 7.
Unfortunate, but not tragic — is not as if hundred of games were released in the meantime. But interesting to know, since I've been working on-and-off on a custom tool to analyse Alan storyfiles, and have been struggling between the ACodeHeader definitions found in the sources and the actual results I can see in the hex editor — so, I wonder, if that bug might have been the source of my confusion in this respect.
Re-creating the .ifid file is very easy (although not documented), just dump the game file and put the IFID string in the .ifidfile. The changes mentioned above makes it even easier, and perhaps more "official".
I'll try this myself and then write down some notes on the new Wiki.
Still need to document this, and the rest of the IFID-handling...
I don't know if this might help or not, but I've started to jot down some notes on IFID and UIDs on my own Wiki:
https://github.com/tajmone/alan/wiki/IFID-vs-UUID
They're still in draft, and not yet fully comprehensive, but if some of the text there might come handy, feel free to just copy and paste it (no credits due, just use it).
After having looked into how IFIDs work in ALAN, I gathered the following:
.ifid
file with same-name as the source adventure, and if the file exists (and contains a valid IFID string) it will reuse that IFID again, otherwise it will generate a new IFID..a3c
story file.The problem is that if the user looses the original
.ifid
file, he/she has no way to recover it from the story file (except via an hex-editor).I propose to add to ARun:
-info
switch to show some basic info on the.a3c
file, including its IFID and the compiler version used..ifid
file from an.a3c
story file — i.e. parse the IFID string contained after the ACodeHeader and recreate the lost text file.It seems to me that currently the IFID doesn't play a big role in Alan — it's there, but not much visibility is given to it. For example, it would be good to be able to access the IFID from within an adventure in order to be able to print it — via some built-in keyword constant, like
IFID
. E.g.:The other terps (WinARun, Gargoyle slot, etc.) should also have a menu to show the IFID and compiler version info of the currently running adventure.