Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARun: Add IFID Info and Recovery Switches #3

Open
2 tasks
tajmone opened this issue Aug 7, 2019 · 2 comments
Open
2 tasks

ARun: Add IFID Info and Recovery Switches #3

tajmone opened this issue Aug 7, 2019 · 2 comments
Labels
💡 feature request New feature request ⚙️ Arun Arun interpreter ⚙️ terps ALAN interpreters ⭐ IFID Topic: Interactive Fiction unique identifier

Comments

@tajmone
Copy link
Contributor

tajmone commented Aug 7, 2019

After having looked into how IFIDs work in ALAN, I gathered the following:

  • The compiler always look for an .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.
  • The compiler (from a certain version onward) now also stores a copy of the IFID string after the ACodeHeader, inside the .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:

  • an -info switch to show some basic info on the .a3c file, including its IFID and the compiler version used.
  • a switch to recover the .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.:

"Adventure IFID:" Say IFID.

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.

@tajmone tajmone added 💡 feature request New feature request ⚙️ terps ALAN interpreters ⚙️ Arun Arun interpreter labels Aug 7, 2019
@thoni56
Copy link
Collaborator

thoni56 commented Aug 12, 2019

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 .ifidfile. The changes mentioned above makes it even easier, and perhaps more "official".

Still need to document this, and the rest of the IFID-handling...

@tajmone
Copy link
Contributor Author

tajmone commented Aug 13, 2019

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).

@tajmone tajmone added the ⭐ IFID Topic: Interactive Fiction unique identifier label Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature request New feature request ⚙️ Arun Arun interpreter ⚙️ terps ALAN interpreters ⭐ IFID Topic: Interactive Fiction unique identifier
Projects
None yet
Development

No branches or pull requests

2 participants