Grotesque 0.9.3: IF library manager

Thanks for this! It looks really nice.

I’m having a problem, though. When I try to import my IF folder, Grotesque gets stuck importing Risorgimento Represso (it’s a .ulx, so it should be okay). The program doesn’t freeze or crash; I can cancel the import, no problems. It just doesn’t get anywhere. I left it running while I ate dinner and when I got back it was still wrestling with the same file.

This happens using both 0.9 and 0.9.1. Ubuntu 11.04, GTK 2.

Ah, thanks, that solved it. Hmmm, wonder if you could make it customizable, choosing where to put those Grotesque files that by default go into c:\user[username]\grotesque. Low priority, of course, but it would be nice.

Now, before I was so rudely interrupted by that crash, I was just re-listing all the issues. :slight_smile:

  • I seem to always get that crash (the one that forces me to delete the library file) when I add a game and then quit. I boot up grotesque - I add “A Bear’s Night Out” - I quit - next time I try to open grotesque, I get the error. So that I can’t seem to add any games at all.

  • Feature request: double-click on a game to start it.

  • The only way I can add interrepters is when Grotesque runs for the first time. After that, when I go to the “interpreters and formats” window, all I can do is EDIT an existing entry. If I “ADD” one, then nothing happens - I do get another window with “Format:” and “Interpreter:” and fields to fill in, but clicking either OK or CANCEL in this window makes nothing happen. Now, since I discovered grotesque.cfg, and since I can edit it to add my own interpreters and formats, it’s not THAT big a deal, but it IS an issue. And it would be helpful if every such entry had a “browse” button to easily find the interpreter of our choice.

  • Suggestion: the ability to assign more than one interpreter for a format. I know it sounds silly, but it’s not… there are currently 3 versions of ADRIFT, and until Adrift 5 supports them all I use 3.90 for 3.90 games and 4.x for 4.x games. Then for glulx, there’s WinGit and WinGlulxe, and although the vast majority of games works with WinGit, a lot of Spanish games choke on it.

  • Fix importing .blbs and .ulxs, and add the ability of importing non-ToB games, but this you know…

  • It seems that Grotesque knows a lot under its hood. It knows that z1-z8 and zblorb are ZCode games, and that t3 and gam are TADS files… but if Grotesque has to do all that alone, it’ll choke when Spectrum and Apple II games start coming in. For Spectrum alone you can have lots of formats. I would suggest you allow the user to specificy file extensions rather than format-names, so I could link .tzx, .tap and .sna to my Spectrum emulator. Either that or just allow Windows (or the OS of choice) to open that file with the program it’s already set to use.

That should be easy enough to implement, but it’ll probably come after 0.9.2. Right now I’m focusing on file types.

Hmm…this is strange. I’ve implemented a built in backup/restore facility which works well. I’ll test a lot more on my Windows machinge.

This should already be implemented. Maybe it’s not working in Windows. I’ll test it.

I caught this bug to. It’s already been fixed for 0.9.2.

That’s a good idea. I’ll implement that for 0.9.2.

You’ll be able to do this using the info in the next point, below.

I’ve made it so you can import non-ToB games. This will be in 0.9.2. If it’s non-ToB, metadata extraction will immediately fail and you will be dropped into an edit dialog. The edit dialog now allows you to specify the format. So, for example, I imported an old Zork .exe, which failed as non-ToB. I set the format to exe (it can be whatever you want…dos, exe, whatever). Then in the preferences, I added an interpreter for format exe and specified dosbox as the launcher. And voila, it worked. :slight_smile: So, for different types of adrift, you can manually come up with different format types and launchers for each one…unless they have different extensions, in which case…

You read my mind :wink:. This is what I’m in the middle of implementing now. This will also make adding stories easier: when you import via the ‘+’ button, the filetypes that it shows are hard-coded into the program. But say I want it to also show the .exe games. When I add the dosbox/exe launcher, it should also start showing .exe files in that import dialog. Also, if I choose to import recursively (the ‘folder’ button), I’d like it to also start importing .exes.

Anyway, you would specify a format, ‘spectrum’, specify the extensions in this format: ‘tzx,tap,sna’ (don’t worry, I’ll make it so it cleans it up if you use spaces or otherwise don’t follow the format exactly), and then specify the launcher as your Spectrum emulator. BUT, this will only work if your emulator allows you to launch files from a command line like: spectrum.exe game.tzx. If it only allows you to open games from a menu once the emulator is running, there’s simply no way it will work with Grotesque.

One thing that I haven’t worked out yet is how to handle games that don’t need a launcher. If you’re in Windows, a .exe file doesn’t need a launcher. Windows can launch it natively. I could make it so that if you leave it blank, Grotesque tries to launch it as a native executable, but that might not be an obvious solution. I could put a little hint on there maybe.

Anyway, since 0.9.1 introduced its own bugs, I’m going to work on making sure 0.9.2 is released today, focusing on import problems. I may not have .ulx or .blb import working yet, but it should fail more gracefully (ie not crash the program) when you try to import them.
Thanks for the continued feedback and patience with this beta software!

I can replicate this. There’s an underlying bug in the .ulx metadata extraction which I haven’t worked out yet. I inherited this project from someone else, who is no longer actively contributing, and his code was not documented at all, so I have to not only figure out how .ulx (and .blb) binary files are formatted but then I also have to figure out his code and how he’s trying to read them! So, .ulx and .blb importing might not be fixed for a little while.

In the meantime, for 0.9.2 which should be released today, the program will no longer hang when you try to import such files. It will fail gracefully and allow you to manually enter the story’s info (just find its IFID on IFDB, enter it and hit the search button and let IFDB fill in the rest).

Thanks for letting me know!

ADRIFT 5 still outputs story files as *.taf, but can also output *.blorb.

…which I think is just begging to be confusing, it’s bad enough that some .blb files are games and some are just a collection of multimedia files… couldn’t you have ADRIFT output to, say, .tblorb instead?

Great! Thanks for all your work on Grotesque!

Hmm…that complicates matters. Can you point me to an example on IFDB? What I want to know is if it is saved as a .blorb, does IFDB still mark its format as adrift?

I don’t think IFDB recognises it as the Babel software is out of date. I’ve sent an email to IFDB support about this. You can see an example here. As for the blorb extension, I would have been happy with .ablorb, but Zarf wasn’t keen on that as there are other systems beginning with a, and .adriftblorb just seems too long an extension.

I suppose in terms of Grotesque it’s not really that big a problem, for the end-user - if I can set some games as “GitGlulx” and others as “Glulx”, surely I can set some games as “Blorb” and “AdriftBlorb”.

But it does bother me that I might have to change file associations - which program am I going to want to open blorb files? If I could at least rename “blorb” to “adriftblorb” myself and know that despite the different extension ADRIFT was going to recognise it as an ADRIFT game… but I tried that in TAF, I tried making .t39 and .t4x extensions, and ADRIFT wouldn’t open the files saying they weren’t TAF…

Ok thanks. I just tested it and the Grotesque software recognizes it as an Adrift file.

Now, back to the original concern. Grotesque chooses which interpreter to use based off of which format the story is in, not based off its extension. If someone would prefer to use a different interpreter for each version of Adrift, for example, it still is no problem to create three formats, say, adrift3, adrift4, and adrift5, assign whatever extensions they want to them and their respective interpreters. Then, when stories are imported, they would have to manually change the story format to use whichever interpreter they prefer. There’s really no way for me to automate this.

If the user imports a file that can’t have its Treaty of Babel info read, and it has an extension which is shared by multiple formats, then it will just have to default to “Unknown” for its format.

The way Grotesque is set up, you shouldn’t have to change the extensions. You can just work with the formats, which are only stored in Grotesque’s library and do not affect your files.

You could always do what Microsoft do when opening a *.sln file. It opens with “Microsoft Visual Studio Version Selector” which analyzes the file, then sends to the relevant executable. In the case of a Blorb it should be easy enough to analyze it to grab the Executable format, then process as appropriate.

To jakobcreutzfeldt: Yeah, I know, I was just thinking aloud about my file associations regardless of Grotesque.

Incidently, as long as I’m here, I had a thought… it would be aces if you could allow “.lnk” files (shortcuts) to be added to the list and executed normally. You see, my new Windows doesn’t seem to run any DOS-based IF by itself, so I use Dosbox and D-Fend to create shortcuts I can just double-click to play. If I can’t put those shortcuts in Grotesque, I can’t really add DOS-games to the library.

By the way, you said:

What if the emulator works more like:

“C:\Interactive Fiction\Tools and Interpreters\AppleWin\Applewin.exe”,1

That extra “1” in there. I know very little about these things, but some of my programs don’t load properly on double-clicking the file unless there’s that “1” or maybe “%1” after the filename, as a parametre. Would this be an inconvenience?

This is more or less what’s happening. If you open a .blorb file, it checks the format and opens the appropriate interpreter. Since I’ve (just now) determined that it’s correctly extracting the format to be Adrift or Glulx or whatever from .blorb files (to continue the example), it will always choose the interpreter that you set for those formats.

Cool. :smiley:

I’m not sure how trivial this is; I’ll have to look. But in the case of Dosbox, you can just set the interpreter as dosbox (or the full path to the dosbox executable) and then import the .exe games as normal. When Grotesque launches them, it will correctly handle sending the game to Dosbox. This, at least, is working fine on my system. I’d love for you to try it on 0.9.2 to let me know how it works. The shortcuts shouldn’t be necessary…

I haven’t used AppleWin before. How do you typically use it? Do you start the application and then from within the application, select and open a game to run? If this is the only way to do things, there’s no way for Grotesque to launch AppleWin and tell it which game to run. If you’re comfortable with a DOS-like interface, you can launch the Windows command prompt (in the start menu, type cmd.exe in the search box), navigate to C:\Interactive Fiction\Tools and Interpreters\AppleWin\ and then type Applewin.exe followed by a path to a game for which you would normally require this emulator, and hit enter to try to launch it. If that works, then yes, you can use it in Grotesque by setting the interpreter as that full path (no 1 or %1 needed).

After I finish 0.9.2, we can give it a try.

Re applewin: ah, too bad, it just loads up the program. See, that’s one of the reasons I would sometimes prefer to let Windows handle that sort of thing… would it be too much of a hassle to make it toggleable, or something? Or do “Unknown” file-types default to allowing the OS to do whatever it thinks best? Because in that case I might just leave these files as “Unknown” and be the happier for it. :slight_smile:

Re DOSBOX: I can do it like that, I suppose… I just like the D-Fend way of doing things… but if Grotesque were to just assume it as “Unknown” and allow the OS to run it normally, then it would work well enough, I suppose…

I hope I’m not being too much of a pain - you’re doing a wonderful job. :slight_smile:

You’re not being a pain, you’re helping me make Grotesque the best program possible! Ok, ok, the best program with some bugs here and there, but good nonetheless. :stuck_out_tongue:

Re: AppleWin, that’s a shame. But…When we get 0.9.2 up and running (I think I’ve finished the GTK3 one, then I have to port to GTK2, then I have to build the Windows version), we’ll try it anyway following what I’ve done for getting Dosbox to work:

So the best practice now would be to first set up your interpreters, and then import your library. So, in addition to the default formats supported by Grotesque, I added a format called “dos” (no quotes). In the interpreter, I set it as “dosbox” (which my system knows means the application; I could have also provided the full path). For extensions, I put “exe,bat”, since DOS games are usually either executables or batch files.

Next, I imported a folder which contains the original Zork. When importing a folder or individual files, Grotesque now knows to also look for *.exe and *.bat files. It found two .exes, in the Zork folder but it couldn’t extract ToB info from them so it drops me into edit mode. The first .exe was some other utility and not a game, so I hit ‘Cancel’, which skips it. For the actual zork.exe, Grotesque saw the .exe extension and, since no other formats use .exe, it figured that it must be a “dos” format game. If you click the big play button in the edit dialog, it launches Dosbox and Zork starts up right away. I went on IFDB, found the IFID for Zork and entered it in the field, hit the search button and the rest of the metadata was automagically filled.

So now, all .exe files are automatically recognized as Dosbox games. If it were a blorb and Grotesque can’t extract the metadata, though, the format would be unknown, because it can’t figure it out just from the extension.

Incidentally, I realized that ever since the original 0.2.1 code that I inherited, TADS3 games were being ignored (it wasn’t looking for the .t3 extension)! So that’s fixed too!

I think with this version, it will be much more stable and I can focus on smoothing out whatever rough edges and filling whatever holes remain.

It seem an ideal way of going about it. :slight_smile: