PDA

View Full Version : ShowEQ Map Converter Patch



UnGod
09-12-2003, 01:03 AM
I was trying to get some nice LDoN maps for SEQ and scanning the threads for the map converter scripts as I have SOE maps, but not SEQ maps for the new zones.
Went through the hassle of finding all the stuff I needed, converting the maps, etc, and realized I do this a lot.
So I went ahead and added a new 'Tools' menu to showeq with:
Map Conversion->SOE to SEQ, and SEQ to SOE!

This is a BETA patch, as in I have tested it, it works, but I have only tested it a little, individual usage may vary!

I am posting it here not because I would like it in CVS, but because I would like to hear other peoples comments on it, modifications to it, etc, so it can be a nicer addition to the ShowEQ code.

(Hence why it's only a link on this page at the moment and not on the SEQ Patches page)

Right now it does VERY basic map conversions (no line predictions when converting SOE->SEQ just straight 2 point M lines)

Colors are properly converted (with the exception of 0,0,0 (black))from SOE maps to SEQ maps (which it turns to 255 255 255 (white))
(Actually it uses if R < 20 && G < 20 && B < 20)

Converting from SEQ maps to SOE maps, it properly converts HEX values to RGB, and also from named colors (eg. blue) to RGB without using an external RGB.txt file

I have tested this with a few zones and it *seemed* to work fine, though some lines were hard to see when loaded in EQ for example since SEQ primarily uses white ish lines, on the default EQ background is a bit hard to see ;)

SOE->SEQ works like a charm too :)

Feel more than free to chop up the code, rewrite parts, whatever, just please post here if you make a dramatic addition or fix (eg. line prediction so you can use multipoint M lines when going from SOE->SEQ)

It will patch against stock 4.3.12 as well as 4.3.12 with my previous patch adding shared platinum info.

Syntax to patch is:
cd showeq
patch -p1 < ../wherethepatchis/09-11-2003_4.3.12_mapConvert.patch

And you know the rest.

Well thats it for me for now.
Have fun and hope it helps out a bit :)

Belith/UnGod

UnGod
09-12-2003, 01:04 AM
Here is the actual patch... Preview post decided to forget my attachment infos.

Elyon
09-12-2003, 06:46 AM
I have only tested it on a couple of flat maps, but it worked flawlessly.
Thanks for taking the time to add this valuable tool to SEQ :D

LordCrush
09-12-2003, 06:47 AM
Sounds Great =)

I will test ist soon when i have time

uRit1u2CBBA=
09-12-2003, 09:25 AM
I've not looked at this yet, but was wondering if this was good only for files one at a time, or can I give a path that contains a list of maps and it would do them all.

Thanks for the feature :)

S_B_R
09-12-2003, 11:26 AM
Great Patch. Although maybe this could be just a first step, the next step would be to modify SEQ's map system to simply support SOE's map format natively?

Just a thought :cool:

guice
09-12-2003, 11:44 AM
Although maybe this could be just a first step, the next step would be to modify SEQ's map system to simply support SOE's map format natively?

That would be my suggestion. Instead of having to use a converter, just make SEQ work natively with SOE's maps.

Ratt
09-12-2003, 01:59 PM
Probably a good idea...

In the interim, what's preventing SEQ from automagically running a SOE map through the converter before storing it in memory, instead of saving it to a file?

Being as I haven't looked at the map format in more than a year... is there an easy way to determinte which type of map it is?

ieatacid
09-12-2003, 03:07 PM
Got a chance to try this out, only on one zone so far - mmce. But the map it produced was identical to the one I got by running the SOE map through ksmiths converter script. Very nice work :)

Any idea how to get the maps to load automatically when you zone into a zone? Instead of having to File>Open Map ?

uRit1u2CBBA=
09-12-2003, 04:45 PM
If you note the zone number (the bottom line of SEQ will show unknown_xxxx), then add that zone to the zones.h file with the correct number, it will come up properly.

I've only been on one adventure myself, and that was with the .11 version where zone numbers were not correct after patch.

As soon as I can get on a few adventures this weekend, I'll try to get a few updates for zones.h and races.h

ieatacid
09-12-2003, 05:55 PM
Thanks :) Been wondering why my PoE map wasn't working. It was named Poearth.map when it should've been Poeartha.map according to that file. Now I don't have load it or my new LDoN maps manually :) Thanks again.

BTW, what's the correct folder to put the maps in? /usr/local/share/showeq or /showeq/maps/ ?

LordCrush
09-13-2003, 01:41 AM
/usr/local/share/showeq

jesterbam
09-13-2003, 05:02 AM
I am a bit confused about how to apply this patch. I would like to restate in newbie terms what is going on here and see if I have missed something.

1. This patch adds a map conversion feature to show eq.

2. To patch, download and

Syntax to patch is:
cd showeq .<-----this is the showeq that has all the precompiled source code
patch -p1 < ../wherethepatchis/09-11-2003_4.3.12_mapConvert.patch

3. recompile SEQ

4. download SOE map files to my Linux box

5. use tool to convert SOE to SEQ maps.

6. making sure the new maps are in /usr/local/share/showeq .<-----this is the showeq that has all the postcompiled .conf and map files


Is that the basics?

Thanks in advance for all the great work done to keep SEQ up and running

Elyon
09-13-2003, 06:28 AM
Yes, you got it right :D

UnGod
09-13-2003, 09:17 AM
Originally posted by Ratt
Probably a good idea...

In the interim, what's preventing SEQ from automagically running a SOE map through the converter before storing it in memory, instead of saving it to a file?

Being as I haven't looked at the map format in more than a year... is there an easy way to determinte which type of map it is?

There's not much preventing it, that was my first attempt actually, but I kinda fudged it up a bit so I decided to go the route of a converter.

Now I have the base for the converter, the rest should be easy eneough :)

And that will probably be my next task, attempting to get a system for SEQ to simply load the maps :)

Belith/UnGod

CybMax
09-13-2003, 05:58 PM
Do anyone want to post a collection of theese LDoN maps somewhere? For the ones that aint really into CVS versions and compiling stuff and such.. :P

Cyber

Vangard
09-14-2003, 04:08 PM
I'd be willing to host them. I've been lurking here for about 2 years.. suppose it's about time I did something to contribute.

Of course, that requires that I have them. :)

Raistlin
09-14-2003, 05:55 PM
Just went through and pulled out the maps for Veksar, Hate_B, and all the new LDON zones that I have (That should be all of them on EQ-Toolbox.).

I've gone ahead and converted the BEST map of each over to SEQ format using the new patch to SEQ to convert maps. The rule I used was that the "roomed" maps took precidence over the "Lines" maps. (go to EQ Toolbox and take a look at the difference between gukd_1.txt and gukd_3.txt to see what I mean) In other words, the more "complete" maps were the ones I converted. If there was no "complete" map, then the map with just the lines was converted. A list of those is following:

guka, gukg, gukh, mirb, mire, mirf, mirh, mirj, ruja, taka, takg, and takh

Of note is mirj, which may or may not be done at all (there's some lines on it but it looks AWEFULLY small).

To derail a second, the map conversion patch is an AWESOME patch, PLEASE get this into CVS, it makes adding new maps COMPLETELY trivial, or at best i'd like to beg and plead with the developer of the patch to keep it updated...this has been invaluable.

Back on track: I've gotten all maps for LDON, Hate B and Veksar transferred and have verified that all of them load into SEQ via the file/open command (I've not gone through and gotten the names corrected yet, will have to have a look at the zones.h file shortly).

Anyway, i'm gziping them as I speak...who wants to host them and how do I get them to you...PM me or just post back here.

--Raistlin

p.s. I also just did SolC as well. Chardok B is there also.

jesterbam
09-14-2003, 06:03 PM
THanks Elyon, All went well untill I cut and pasted the name of the file and realized the "C" in the file name is really lowercase. After that worked like a charm.

fryfrog
09-14-2003, 10:30 PM
is it to big to just attach to the thread here?

kevinargh
09-15-2003, 09:00 AM
yes.. mine are over 700KB tar'ed and gzipped. it says max is 25600 bytes here on my reply screen. :(

Raistlin
09-15-2003, 09:08 AM
Ok, for all of you waiting for the download instructions...here they are:

Follow this Link: NewZoneMaps.tar.bz2 (http://whi.ja.gs/~nutbuckle/NewZoneMaps.tar.bz2)
Or This Link:
NewZoneMaps.tar.bz2 (http://www.pythias.net/NewZoneMaps.tar.tar )
From there, you should get a tar.bz2 file downloaded that has all the updated / converted maps in it I have.

Move that file into your /usr/local/share/showeq directory and uncompress (I use bzip2 -cd <file> | tar xvf -, but I know that's not the "best" command to use).

Anyway, that will extract the maps to the appropriate directory.

One item of note: Till the zones.h file gets updated with all the zones and their correct numbers SOME of these maps will not load automatically. Also, there seem to be some missing maps I think as well (not on maps.eq-toolbox.com). If someone knows of missing maps that they have SOE maps for, please let me know and i'll get them converted and into the zip.

Also, there were 2 other people who sent me PMs for hosting these maps. To help distribute the load, feel free to download the file from the link above and upload it to your sites as well (I can edit the message here to include the other links).

And if someone official like wants to take a look at what's in the download and consider putting it into RCS that might work too...

As always, if anyone finds any issues with any of the maps, please let me know.

Thanks

Oh, and PS, yea, the download is about 700K...too large to attach here. It's that Hate Plane B map that's doing it i'm sure..:)

S_B_R
09-15-2003, 12:08 PM
Tip:
bzip2 -cd <file> | tar xvf -can be replaced with
tar xjvf <file> ;)

ksmith
09-15-2003, 12:55 PM
Originally posted by Raistlin
Oh, and PS, yea, the download is about 700K...too large to attach here. It's that Hate Plane B map that's doing it i'm sure..:)

Suuure, blame my hateplaneb map... I dare you to remap it smaller :p

I actually would like to see someone re-map it by hand rather than just converting the zone file though.

Mapfiend
09-15-2003, 10:35 PM
I managed to get hateplaneb down to 393k from 515k just by running it through my converter twice. The only thing that changed is instead of having each line "segment" on a seperate line, it combines consecutive lines that a) are the same color, AND b) have common end points (within 5 units of each other)

I could widen the range on the end points and get an even smaller map, but that may affect accuracy.

It's located at:
http://mapfiend.eq-toolbox.com/Hateplaneb_opt.txt

bonkersbobcat
09-15-2003, 11:50 PM
Ok, for all of you waiting for the download instructions...here they are:

Follow this Link: NewZoneMaps.tar.bz2

I will be happy to get these checked in, but I don't have time to go and test them all (I have time to see if they all load, but I don't have time to see if when visiting these zones, they get picked up properly...)

If there is consensus here that they are all good, I'll check them in.

Edit: This doesn't have to be all or nothing, if there is a group of maps that folks feel are ready for check in, thats fine too.

Zaphod
09-16-2003, 12:11 AM
I'm going to include the map converter code into my next CVS commit.

Enjoy,
Zaphod (dohpaZ)

AnotherCoreDump
09-16-2003, 01:59 AM
Originally posted by Mapfiend
I managed to get hateplaneb down to 393k from 515k just by running it through my converter twice. The only thing that changed is instead of having each line "segment" on a seperate line, it combines consecutive lines that a) are the same color, AND b) have common end points (within 5 units of each other)
If you loop till no further optimisation can be done, you can still cut down the map more with common points only off x/y=2 and z=1 (see mapping forum, java converter), my Hateb.map is 254k - or we use a different SOE map.

kevinargh
09-16-2003, 03:56 AM
i'm probably doing something wrong but i tried to convert the LOIO map to include the veksar building and it killed the blue outline of the lake..

Tor K'tal
09-16-2003, 03:17 PM
Awesome job with this patch to incorperate the converter tool.

Can I request a change to it before it is committed to CVS?

While black on black is unreadable, I agree, the bright white that replaces it obscures skittles at times.

On line 717, 718, and 719 of map.cpp change them from 255 to 196 for standard SEQ grey.

~ TK

Sneaky
09-16-2003, 10:23 PM
Tried untarring this

get this message

This does not look like a TAR archive


What is it then?

Nevermind. Renamed file and it worked.

Raistlin
09-26-2003, 10:35 AM
I'm going to commit the mortal sin here and post without searching first (i've got a limited time here at work before someone walks by today, so my apologies in advance.)

Anyone fixed the issue with loading the LDON maps automatically?

The maps that I posted earlier in this thread do not automatically load for me (none of them do so far) and i've go to manually go in and load them up...supposedly something about the zone number going into some wierd ass negative number when you start zoning then getting set back correctly once you zone in...

--Raistlin

LordCrush
09-29-2003, 02:52 AM
@Raistlin:

http://seq.sourceforge.net/forums/showthread.php?s=&threadid=4022