map generating scripts

Michael S. Merrell (llamas@mindspring.com)
Thu, 30 Oct 1997 09:11:32 -0500

I've written up a few scripts to help with mapping chores.

One (san.pl) will "sanitize" a file of one or more turn reports (I have all
mine in one monster file). san.pl produces a file provdata.txt that
contains geographical, city, and inner location data only. All activity,
noble references, etc. have been stripped out. Easier for people to
contribute map data if they can automatically strip out the rest of their
turn and what their nobles did in those provinces, eh?

The other (olymap.pl) will read either the provdata.txt file, and produce
two html files with a map of a size dictated by coordinates entered on the
command line. One map is large scale, with locations listed, the other is
small scale for an overview of the area. It will also create a data.html
file with the city information for the map area. The cities on both maps
will link to the city info.

Current features of large scale map:
Each square displays its coordinate
If present, inner locations are listed
Terrain is represented by .gif files (can alter to taste)
The coordinates on city provinces are links to a datafile containing
all city information. The link indexes to the appropriate city.
Map represents all inner locations gathered from different reports on
that outer location.
Marks provinces for which terrain/city is known, but have not been
visited (ie North to... and cities nearby). This is good for your
personal map, but might be taken out for a shared one...

Current features of small scale map:
Coordinates are listed around edge of map
Visited cities are marked with an * that is linked to the city data info
Terrain is represented by .gif files (can alter to taste)

Current flaws:
The city information in the data file is not an accumulation, like the
inner location info on the map. It is the last report from that city
read from the input file. (My turns are in the file in chronological
order, so this works. Getting reports from different people might
require a different solution to make the city report inner locations
match up with the map's list.)
No save file. The script reads through all the data, each time it makes
a map/data.html file.
The small scale map does not show non-visited cities with *'s. It will
show the terrain for that province.
Inner locations and their sublocations are not listed in order. If
there are multiple inner locations, their sublocations will be listed
together.
Some sublocations are not coming through. I haven't had the time to
spend fixing this. It's usually the sub-sublocations that get
stripped, due to mix-up with stripping away references to nobles.

These are PERL5 scripts. They run fine under WinNT and Win95. I haven't
used them on anything else.

If I had an account that supported CGI, I could easily turn this script
into a custom map generating page. Perhaps it's time to switch ISPs...

A page with the data gleaned from the last few turns of public turns is up
at: <http://www.geocities.com/Area51/Cavern/1425/>

Download link is on the web page.

This is a sample. The olymap.pl script can be edited to change the
resulting pages' characteristics.

--Mike
Free Range Llamas [fd3]

Main Index  |  Olympia  |  Arena  |  PBM FAQ  |  Links