IFIDs for Undum Stories


Does anyone know how IFIDs for Undum stories are assigned? http://ifwiki.org/index.php/IFID told me to use the TADS IFID generator, but I also read in http://babel.ifarchive.org/babel_rev8.txt that

Which should I do?

Also, once I have an IFID, where should I put it? So far I have undum.game.id = 'A7798F78-C870-11E2-90CC-606C662AE7E3'; // IFID in my JavaScript and [code]

[/code] in my HTML (because http://ifwiki.org/index.php/IFID said it should be copied there). I guess I also need to prepare a library card?


I landed here just by looking for the same answer. Anyone?

I can only imagine this possible answer:

You are supposed to use a unique ID sequence. Undum’s tutorial suggests

So anything unique should work. Yes, you could get an MD5 for your game since its file is unique but it has only sense for released/final first versions so your game code isn’t changing anymore and an MD5 / UUID code can be assigned. Or you can adhere yourself to the babel treaty and use the TADS IFID generator I guess. It’s meant for TADS and other babel-aware authoring systems and Undum won’t give you one.

I may be wrong but this is what I can figure out about all this or better, imagine from lack of knowledge in all this areas. Have you found anything else more clarifying?

There is a RFC document that specifies how to generate UUID, in five different “versions”. You can use this to generate a UUID, and it can also be used as IFID.

Unless there is an official, specified way of generating Undum IFIDs and that is added to the Treaty, I would stick to using the MD5 hash of the file. An automated tool for identifying the file type will first check to see if it’s a type that it recognizes and then it will scan for / generate the IFID based on what it knows about the file. If it can’t identify the file type, it will fall back to calculating the MD5 sum. Don’t depend on it scanning for “UUID://.*//”, because according to the treaty, that only applies to z-code/glulx games generated with Inform. A tool probably won’t scan for UUID unless it already knows it’s a z-code or glulx game.

Which file? Undum stories come in entire web pages with several resource files. Typically there’s a main JavaScript file that has most of the story content but not always.

Are there any library tools set up to guess IFIDs with md5 hashes? It wouldn’t seem like a very useful feature to me, especially not for text files. If you saved it on Windows and Linux with their different line endings wouldn’t you get a different hash?

Yes. The official babel tool does exactly that. So, pyifbabel does that too.

As for text files, I would suppose that it’s only being edited on one machine, so the line-endings aren’t changing when it’s run by the user.

Ah, sorry, I hadn’t realized that it ships as multiple files. What about the MD5 hash of the file that the user is expected to open in their browser to play the game? I imagine there must be a single specific file for any given story that the user will open first.

Otherwise, yes, a unified method of generating IFIDs would have to be developed. The point is just that it be consistent for all Undum stories.

Wouldn’t work; with Undum you don’t need to edit the index.html file (which is the file that starts the story) so it can be identical between multiple stories.

(I don’t quite understand the point of MD5ing files for new stories anyway. Can’t you just generate a UUID and be done with it?)

Ah, ok, I see now why that wouldn’t work.

The point is to be able to uniquely identify a file if it hasn’t been formally given an IFID.

After perusing the treaty some more, I take back what I said. I think the two most important things are: a) that the story somehow be easily identifiable as being an Undum story (although with recent discussion on the treaty, that would more specifically be that it’s “html” and maybe that the author tool was Undum) and b) that it have a unique identifier following the basic specification in the treaty (a unique combination of 8-63 upper-case letters, numbers or hyphens). So, the UUID method is fine (although I still think that having a consistent IFID scheme for all stories made by an author tool would be nice). Sorry for the noise.