Script to "Fix" Mapfiend Maps
I use the default black background for the SEQ map window and most of the new Mapfiend maps use black lines. This makes me grumpy so I wrote the following little script:
Code:
#!/bin/bash
perl -pi -e "s/, 0, 0, 0/, 255, 255, 255/g;" *
perl -pi -e "s/, 0, 0, 0/, 255, 255, 255/g;" *
Just put it that in a file in your maps folder, make it executable (chmod u+x it), and run it with no arguments. It'll make the maps a bit more SEQ-friendly and hopefully not screw up anything else (labels, etc.)
And yeah, I know the regular expressions suck and that I could write it so that it only has to do one pass. The script works, though, and I hate writing those things so I'm content with how it is.
Re: Script to "Fix" Mapfiend Maps
Code:
#!env perl -pi
# Description: Converts black lines and points in EQ-style maps to black.
# Usage: whitelines.pl file [file2 file3 ...]
s/(,\s*0){3}(\s*)$/, 255, 255, 255$2/;
Re: Script to "Fix" Mapfiend Maps
Re: Script to "Fix" Mapfiend Maps
I did color conversion script from the point of view that the map has already been converted into SEQ format. I call it recolor.sh
Code:
perl -pe 's/#000000/grey100/g' $1
used like:
Code:
./recolor.sh hateplaneb.map
and yes, regular expressions suck :) I never understood them, even in college when I was supposed to.
Re: Script to "Fix" Mapfiend Maps
grey100 looks better to me at least. That's what I use too.
Re: Script to "Fix" Mapfiend Maps
Quote:
Originally Posted by ksmith
Code:
#!env perl -pi
# Description: Converts black lines and points in EQ-style maps to black.
# Usage: whitelines.pl file [file2 file3 ...]
s/(,\s*0){3}(\s*)$/, 255, 255, 255$2/;
Black to black? :D
Re: Script to "Fix" Mapfiend Maps
Re: Script to "Fix" Mapfiend Maps
Quote:
Originally Posted by OgerSEQ
Black to black? :D
Never trust documentation!
Re: Script to "Fix" Mapfiend Maps
Quote:
Originally Posted by uRit1u2CBBA=
I did color conversion script from the point of view that the map has already been converted into SEQ format. I call it recolor.sh
Code:
perl -pe 's/#000000/grey100/g' $1
used like:
Code:
./recolor.sh hateplaneb.map
and yes, regular expressions suck :) I never understood them, even in college when I was supposed to.
Aww, give regular expressions a chance. They're amazingly useful/powerful.
It's nice to see that hateplaneb.map still gets some love, even if it's just in examples.
Re: Script to "Fix" Mapfiend Maps
I thought someone would appreciate me using that as an example. It's one of the best drawn maps in the game, and by far the largest of all the map files :) And also seems to be the hardest to get a hold of when someone reformats and goes "oh shit, I don't have that map anymore" :)
Re: Script to "Fix" Mapfiend Maps
This is a test... just ignore it
Re: Script to "Fix" Mapfiend Maps
The hateplaneb map is the only one actually generated from the zone file. it is also the reason the scripts were written to optimize maps. If I recall correctly,the original version of that map was like 11 megs.