Results 1 to 12 of 12

Thread: Script to "Fix" Mapfiend Maps

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    48

    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.

  2. #2
    Registered User
    Join Date
    Aug 2002
    Posts
    189

    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/;

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    48

    Re: Script to "Fix" Mapfiend Maps

    Show off.

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    550

    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.

  5. #5
    Developer
    Join Date
    Jul 2004
    Posts
    920

    Re: Script to "Fix" Mapfiend Maps

    grey100 looks better to me at least. That's what I use too.

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    30

    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?

  7. #7
    Registered User
    Join Date
    Jan 2002
    Posts
    1,508

    Re: Script to "Fix" Mapfiend Maps

    Black to White

  8. #8

  9. #9
    Registered User
    Join Date
    Aug 2002
    Posts
    189

    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.

  10. #10
    Registered User
    Join Date
    Jun 2003
    Posts
    550

    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"

  11. #11
    Registered User
    Join Date
    Jan 2002
    Posts
    1,508

    Re: Script to "Fix" Mapfiend Maps

    This is a test... just ignore it

  12. #12
    Registered User
    Join Date
    Dec 2001
    Posts
    118

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On