Using the Phoenix conversion script from ifarchive.org

Does anyone know how to use the Phoenix to Inform source perl script from ifarchive.org? I use the phoenix.pl as thus on a linux terminal shell: user@host:~$ perl phoenix.pl sourcefile and get an error saying not a game file…

You need to give the source file a .phx extension and pass the game name with -g on the command line:

$ perl phoenix.pl -g Avon Avon.phx 

This should produce a .phxinf file as output that you can then compile with I6. You’ll also need the phxdefs.inf and phxlib.inf files that come with the perl script, as the generated .phxinf file includes them.

The game name needs to match one of the 13 names hardcoded in the perl script, although it would be easy to add additional names if needed.

Thanks Viaviano! I was wondering, is it possible to make a phoenix style game with the perl script by adding my own title to it and following the framework given by the original codes of the Topologika games on ifarchive.org? Thank you regardless at any point man!

Again, thanks Viaviano… But I ran into a weird compilation error on the perl script. I ran BrandX through, and it says “Can’t open the file in.” I did as you instructed:

perl phoenix.pl -g BrandX BrandX.phx

I haven’t tried it, but I don’t see why not. You can add your game name to the get_arguments function near the beginning of the perl script. You might find this spec helpful in conjunction with the source code for the various games.

Actually, looking at the script more, I see that it doesn’t take a source file name, just the -g argument. It constructs the input file name automatically by adding .phx to the game name that you provide. So, it should just be:

$ perl phoenix.pl -g BrandX

Although, I don’t think that this is your problem. I tested it with “perl phoenix.pl -g BrandX asdfasdf.phx”, and it ignored the bogus file name and produced a BrandX.phxinf file.

I’d suggest changing the perl script to print out the reason for failure. Find the line that says:

open(GAMEIN, '<', $gamename.'.phx') or die "Can't open file in\n"; and change it to:

open(GAMEIN, '<', $gamename.'.phx') or die "Can't open file in ($gamename.phx): $!\n";

You’ll get error output like:

$ perl phoenix.pl -g Avon
Phoenix 1.04 (c) GAN10
Avon (Jonathan R. Partington, 1982)
Can't open file in (Avon.phx): No such file or directory

Thanks Viaviano! I will state more problems if I encounter more errors man!

Alright, I ran the phoenix conversion script as told, after striking out that line of code and replacing it as you instructed me, it says as follows on my LXTerminal:

grey-watcher@moonwatchOne:~/phoenix$ perl phoenix.pl -g BrandX
Phoenix 1.04 © GAN10
BrandX (Peter Killworth and Jonathan Mestel, 1983)
Can’t open file in (BrandX.phx): No such file or directory

This is my files listed in the *NIX directory of ~/phoenix:

BrandX phoenix.pl phxdefs.inf phxlib.inf

And I followed the command for the script as case-sensitive (like a good *NIX user should :stuck_out_tongue: ).

Looks like your BrandX file is missing the .phx extension.

$ mv BrandX BrandX.phx

Doh! After renaming it just in my File Manager to BrandX.phx it worked like a charm! One would think that the perl script would work out of the box with the source code given as just BrandX without the phx extension due to that the source was ifarchive.org that way… But I should have tried that possibility of adding the extension any how…

Once again Viaviano… Thanks and chuss!