Log in

View Full Version : Annotated maps + tool


MaxWilson
May 25th, 2008, 03:09 AM
Sometimes I get tired of chasing down provinces for events and site-searching spells. "Bob has cast Arcane Probing. 1 new magic site was found in Anaphale. Goto commander." But of course, the commander isn't in Anaphale, so I have to scroll through the province list until I find it.

So, the logical thing to do was to annotate the map files so that Anaphale gets renamed with its province number. "1 new magic site was found in Anaphale 20." Then I can just hit "#" on the map, type in 20, and voila! it jumps to Anaphale. And of course I took one look at Glory of the Gods and decided I didn't want to annotate it by hand, so I did it with a quick Python script. And I share this script, and a couple of sample output files, with you.

Usage: mapfix.py <filename>

(Outputs new mapfile to screen, so I usually redirect it. "mapfix.py silentseas.map &gt; silentseas_annotated.map" makes a file called silentseas<font color="red">_annotated</font>.map. I didn't make the script do the writing because I didn't want to mess with the file permissions headache/security vuln.)

Hope it's useful to someone.

-Max

<font color="red">Edit: minor typo correction.</font>

lch
May 25th, 2008, 08:33 AM
Nice idea! In a game I am playing in, somebody renamed ALL his commanders / spies to carry the province number in the name so that he could determine exactly WHERE somebody got mindhunted. The messages window clearly could use an improvement there.

Jagdpanther
May 25th, 2008, 11:29 AM
Excellent Idea. Having to search for a province IS annoying.

Unfortunately, about half of my play is on random maps which don't have "#landname" lines.

I guess I'll try modifying your code:
For each #terrain line that does NOT have a corresponding #landname line: add a #landname line (with your province number fix)

I can get names from the dom executable ('strings dom3_x86')
The only issue is I can't find a &lt;terrain type&gt; list in docs or un-official mod guide. Anyone have a &lt;terrain type&gt; list? (I don't want to randomly give a mountain range the name of an ocean.)

Jagdpanther
May 25th, 2008, 11:40 AM
Never mind. This post shows the different terrain types:

http://www.shrapnelcommunity.com/threads/showflat.php?Cat=&amp;Board=d3smm&amp;Number=487342

Jagdpanther
May 26th, 2008, 02:32 AM
Attached is a zip with a modified version of MaxWilson's mapfix.py, that I call addProvinceNo. The big difference is that if the .map file doesn't have #landname lines, this script will add those names.

MaxWilson
May 26th, 2008, 05:51 PM
Thanks!