Ifsitegen.py

If you want to have a standalone Parchment page on your own web site or somewhere like itch.io, then you need to go through the scripting process to convert your z-code game to base64 (with a little bit of Javascript).

Similarly, if you want to customise the look of your page with a custom layout, colours or what have you, then you can only do this by customising the html and css files.

1 Like

Regarding itch.io, just to understand, what is the drawback of doing something like this:
Adrift 4 demo using Parchment on itch.io by kenped

I mean, you use itch.io for customizing the webpage around the Parchment window, whereas inside the Parchment window you have Parchment running which you can’t customize.

I am only aware of one drawback which may be important to some, and that is you must have put your z5-file somewhere else online than itch.io.

There’s nothing wrong with that if you’re happy with the boring black on white text provided by iplayif and you have somewhere to host your story file.

Take a look at one of mine for a different approach:

The theme matches the theme of the game page and everything is hosted in the one place, whereas your method requires three different web sites.

1 Like

Ok, I see that you can change the text and background color of the game itself which is neat. I did not know that. On the other hand you loose e.g. the pretty leaves surrounding the game window for Kenny Koala, though that would be possible to fix with some more html-coding if you are good at it.

I don’t see the problem in getting data (interpreter and game) from other sites, though I do see a problem in having to update the story file on another site which may be a lot slower to access such as the IF Archive where it takes several days before a game is updated. So that problem would depend on your options for hosting the story file somewhere else. I personally use the Adrift site where I am also in full control of my files.

In the case of itch.io, you can run the game in an iframe (which is what I think you’re doing) or you can run it in a full page (which is what I’m doing) so that you get to use more screen real estate. The point is that you have options and you can use whatever option suits you best.

1 Like

Yes, it’s for itch.io. Ideally I’d want to customise the CSS as Garry describes, but for the moment I’m just looking at all the options and trying to get something working.

2 Likes

Managed to get it working in a way I’m happy with for now (have tried it out with Morris on Itch). Thanks for your help everyone.

3 Likes

Looks great :smiley:
I can see the advantages of being able to customize so much.

1 Like

Nice! :+1:

It’s interesting that you got it working with an older version of Parchment (2021.11, going by the number in the lower left of the window).

I first tried it out with the later version 2022.8, which comes with the latest release of Inform 7, and it didn’t work. However, the very latest version 2023.3 from Github fortunately does.

So, for people coming across the thread in the future, two things might be worth mentioning explicitly:

1.

As Stefan said above, download the latest version of Parchment for Inform. Put the zip file in the same directory as the Python script and call the script with the argument -i parchment-for-inform7.zip.

2.

I don’t know if it’s the same issue which you describe, but to inject author and title into the template, the command line options on Windows (in the normal command prompt) have to be slightly different from the syntax given in the OP.

Instead of --author 'Firstname Lastname' in single quotes, one should use double quotes: --author "Firstname Lastname".

So, putting it together:

python ifsitegen.py -i parchment-for-inform7.zip --author "Firstname Lastname" --title "My Title" mygamefile.z5
3 Likes

I did actually use the latest version of Parchment but perhaps the text hasn’t been updated in the code!

Edit: yup, found it. I would need to update it manually in play.html.

Edit 2: and that makes sense about the Windows command prompt too, thanks for that.

2 Likes

Looks good, but you get an error if you click on the small cover image. My browser showed:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>
Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).
</Details>
</Error>

Hmm. Not sure why that’s happening, but I can live with it for now.