Fed2 Star - the newsletter for the space trading game Federation 2

The weekly newsletter for Fed2
by ibgames

EARTHDATE: November 26, 2017

Fed2 Star index Fed2 Star: Official News page 1 Fed2 Star next page

THE PROBLEMS OF WRITING A PLANET WITHOUT USING THE WORKBENCH

by Hazed

The Fed2 Workbench is a marvellous thing. It’s a set of programs that let you design your own planet, with a graphic interface that means you don’t have to get to grips with anything as unpleasant as coding.

But the Workbench is only available for Windows machines. There is a Mac version but it’s out of date, and doesn’t run on all versions of the Mac.We are still hoping that a player will volunteer to port the Windows version to the Mac for us – that’s how the original Mac version was done, but the player who did it for us no longer plays Fed.

This means that Mac users who want to dabble in planet design, rather than just live with one of the stock planets we provide, have to resort to unorthodox methods.

A recent wannabe PO did just that. He decided to have a crack at writing the planet files without using the Workbench.

This was a very brave thing to do! And he did a pretty good job, too. Unfortunately, not a perfect job. He made a few tiny mistakes in the file, and although they were really small errors, they were enough to stopan the files loading into the game.

Computers, you see, are very picky. If information is not in the exact form they expect it to be, it gives them the collywobbles.

The files that make up a planet – map, message, object and event files – are all XML files. XML stands for Extensible Markup Language, which means the file is a text file that contains data and also the instructions about what to do with the data.

In the case of a map file, a location looks like this:

<location num='772' >
<name>Mars shuttle landing pad</name>
<desc>   This is the shuttle landing area of Marsport, in the northwest corner of the spaceport. Personal shuttles are parked in bays, ready to transport their owners back to their orbiting ships. They all seem to have a reddish tinge to them - caused by the red dust that constantly blows around in the thin Martian atmosphere.</desc>
<exits e='773' se='837' s='836' no-exit='moves.noexit.4'/>
</location>

Something as simple as missing off a closing pointy bracket, or even putting an extra space in where it shouldn’t be, is enough to make the file incompatible with the game.

This is why we say in the manual that you should never, ever, load a planet file into a word processor program such as Word, because that will quite likely mangle the text – for example, by swapping the straight up-and-down quotes with curly quotes that lean to the right and left. In fact, we advise you to never save your planet files in anything except the proper Workbench editors.

Now, as in the case of our Mac-using PO, we accept that sometimes you can’t use the Workbench so you have no alternative but to try to edit the XML files yourself.

If you are in that position then we have two requests:

  1. Run your files through an XML Syntax Validator, such as this one: https://www.w3schools.com/xml/xml_validator.asp. That will point out some of the errors such as missing brackets or incorrect quote marks.
  2. When you submit the files to us, tell us in your email that you have edited the files outside of the Workbench. Then I will take extra care checking the files to make sure they work, before they are put into the game.

Incidentally, just to make sure that validator does the job, I ran the Mars map through it – and it passed!

Fed2 Star index   Fed2 Star next page