PDA

View Full Version : Converting SOE maps to SEQ maps



AlphaBeta
03-17-2003, 09:29 AM
Does anyone have a util that converts the SOE game maps to Seq maps yet? No offence but some of the SOE maps have much better detail to them.

ksmith
03-17-2003, 10:44 AM
There is an awk script I posted to one of the map conversion threads that does exactly that.

http://seq.sourceforge.net/showthread.php?s=&threadid=2973&perpage=15&pagenumber=4#post22344

AlphaBeta
03-17-2003, 01:08 PM
Thanks K

Leetlewon
03-21-2003, 06:25 PM
I tried your script and it just hangs. I'm not too familiar with awk so I don't know how to debug it offhand. I thought I might just do it in perl, which I know.

I'm running it on a RH 8.0 box exactly as you have described. I've checked permissions and everything (script executable, write permisssions to the .map file, read permission for the .txt file) and it all looks ok. I copied the RGB.txt file into the same directory with the awk script.

When I attempt to run it, it creates a 0k file with the correct name, but the script just hangs there. Here is what I am running:


BEGIN {
RS="\r\n";
print "Converted map,converted,0,0"
}

/^L / {
gsub(",", "");
gsub("L", "");
print "M,line," getcolorname($7, $8, $9) ",2," int(-$1) "," int(-$2) "," int($3*10) "," int(-$4) "," int(-$5) "," int($6*10);
}

/^P / {
gsub(",", "");
gsub("_", " ", $9);
print "P," $9 "," getcolorname($5, $6, $7) "," int(-$2) "," int(-$3)
}

function getcolorname( r, g, b) {
cmd = "grep \"" r " " g " " b "\" RGB.txt";
cmd | getline color
if (color != "") {
split(color, C);
return C[4];
} else {
print "*unknown color: " r ", " g ", " b > "/dev/stderr";
return "unknown";
}
}

Leetlewon
03-21-2003, 10:24 PM
The problem might be the RGB.txt file. I see that SeQ doesn't like the standard file.

ksmith
03-24-2003, 09:33 AM
function getcolorname( r, g, b) {
cmd = "grep \"" r " " g " " b "\" RGB.txt";


Change the regex that grep is using if your RGB.txt uses tabs instead of spaces. Or even better, just have it look for any whitespace.

rathric
03-26-2003, 01:37 PM
hhmm...changed the rgb.txt and replaced the tabs with spaces..ran the script and am getting this:

unkown color 0,0,0

ideas?

ksmith
03-26-2003, 02:21 PM
Originally posted by rathric
hhmm...changed the rgb.txt and replaced the tabs with spaces..ran the script and am getting this:

unkown color 0,0,0

ideas?

rgb.txt or RGB.txt? It's looking for RGB.txt in the current directory.

Or just use this RGB.txt (http://kyle.13th-floor.org/eq/maps/RGB.txt)

CybMax
04-12-2003, 05:27 PM
I cant get this to work.. Yeah.. i know.. i am a n00b.. But i only get a couple of lines in that .map file..

This if when i tried to convert the hatesfury_1.txt file :
Converted map,converted,0,0
M,line,black,2,-30,958,-6099,-30,965,-6099

And that's it.. no error messages no nothing. Used the above script (named it eqmapconv.awk) and this command to convert :
awk -f eqmapconv.awk < hatesfury_1.txt > hatesfury.map

I also used the RGB.txt file from the link above.

Anyone got the loy converted .map files? Could you post 'em for a lost soul like me? :)

CybMax
04-13-2003, 10:45 AM
Oki.. it seems like many of the links to threads pointed out as URL's in posts here are not working.. Recon this has to do with the new layout and structure of the boards.

But.. i managed to find a link where i could find the LoY .MAP files for myseq.

http://kyle.13th-floor.org/eq/maps/gif/

Only map there that is not complete is the nadox one tho..

lostpacket
04-14-2003, 04:30 PM
*edit* ok 2 hours and I got it working. Nevermind!

ksmith
04-15-2003, 12:45 PM
If you're having problems with nothing showing up at all when you run a map through the awk script, try changing the RS from "\r\n" to just "\n".

Gunthak map (http://kyle.13th-floor.org/eq/maps/gif/Gunthak.map)

Dulak map (http://kyle.13th-floor.org/eq/maps/gif/Dulak.map)

Torgiran map (http://kyle.13th-floor.org/eq/maps/gif/Torgiran.map)

Nadox map (http://kyle.13th-floor.org/eq/maps/gif/Nadox.map)

Hate's Fury map (http://kyle.13th-floor.org/eq/maps/gif/Hatesfury.map)

CybMax
04-17-2003, 03:14 AM
Kewl Ksmith! Thanx!!

Now.. if the myseq just would figure out the right packets for LoY zones..

guice
04-21-2003, 01:18 AM
hmm, Hates Fury map is a bit .. upside down. The labels are fine, but the zone bounry lines are upside down.

ksmith
04-21-2003, 03:58 AM
hrm, ok... I fixed my in-game map to be right-side up... I'll re-generate the showeq map tomorrow.

Amadeus
06-21-2003, 12:20 PM
There is an awk script I posted to one of the map conversion threads that does exactly that.

http://seq.sourceforge.net/showthre...ber=4#post22344


This link seems broken.... Could you repost the script?

Fatal
06-22-2003, 12:40 AM
Ama,

Check your pms.

domesticbeer
09-09-2003, 08:04 PM
Fatal can you pm me with it too.

topgun
09-10-2003, 07:40 AM
Me 2 plz :)

Hendrix_Morton
09-10-2003, 08:18 AM
I hate to say it...But I also would like a copy of that script since the converter isnt working online...

ImNotDeadYet
09-10-2003, 08:43 AM
Same here please. :)

What's the latest word about this showing up at eq-toolbox?

INDY

ksmith
09-10-2003, 09:57 AM
Since the original awk script is buried in the middle of a rather long thread, here it is again.


#!/bin/awk -f

BEGIN {
#RS="\n";
print "Converted map,converted,0,0"
}

/^L / {
gsub(",", "");
gsub("L", "");
print "M,line," getcolorname($7, $8, $9) ",2," int(-$1) "," int(-$2) "," int($3*10) "," int(-$4) "," int(-$5) "," int($6*10);
}

/^P / {
gsub(",", "");
gsub("_", " ", $9);
print "P," $9 "," getcolorname($5, $6, $7) "," int(-$2) "," int(-$3)
}

function getcolorname( r, g, b, color, cmd) {
#print "*looking up color: " r " " g " " b > "/dev/stderr";
cmd = "grep \"" r " " g " " b "\" RGB.txt";
cmd | getline color
close(cmd);
if (color != "") {
split(color, C);
#print "**found: " C[4] > "/dev/stderr";
return C[4];
} else {
print "**unknown color: " r " " g " " b > "/dev/stderr";
return "unknown";
}
}


This awk script expects a space delimited RGB.txt file to exist so it can convert the RGB color values to a name for showeq.

Usage:

awk -f eqtomap.awk < hateplaneb_1.txt > Hateplaneb.map

Jel321
09-10-2003, 12:53 PM
OK, i ran the guka map through the converter (nice work btw), its seems like its working mostly, except for the line color i believe is was is showing as unknown.

I used the RGB.txt file posted earlier in this thread and Im guessing something isnt lining up right?

Im still looking at it trying to see what i am messing up, but if someone knows right off any help is appreciated :)

Thanks,
J

This is a sample error line, there are plenty more.
**unknown color: 0 0 240


Here's the converted map.
Converted map,converted,0,0
M,line,unknown,2,-326,984,10,-326,1018,-20
M,line,unknown,2,-433,833,10,-433,801,-20
M,line,unknown,2,-323,832,10,-323,798,-20
M,line,unknown,2,-379,832,10,-378,798,-20
M,line,unknown,2,-292,831,10,-461,833,10
M,line,unknown,2,-292,908,-130,-292,831,10
M,line,unknown,2,-380,987,10,-381,1018,-20
M,line,unknown,2,-436,983,10,-436,1016,-20
M,line,unknown,2,-292,985,10,-462,982,10
M,line,unknown,2,-291,909,-140,-292,985,10
M,line,unknown,2,-326,967,-250,-323,851,-250
M,line,unknown,2,-381,968,-250,-379,853,-250
M,line,unknown,2,-436,968,-250,-433,855,-250
M,line,unknown,2,-281,908,-130,-503,908,-500
M,line,unknown,2,-14,905,-120,-281,908,-130
M,line,unknown,2,-14,878,-120,-14,905,-120
M,line,unknown,2,29,876,-140,-14,878,-120
M,line,unknown,2,-78,1397,-500,-51,1394,-500
M,line,unknown,2,-78,1324,-500,-78,1397,-500
M,line,unknown,2,45,1399,-500,28,1398,-500
M,line,unknown,2,50,1327,-500,45,1399,-500
M,line,unknown,2,-49,1281,-600,-15,1280,-650
M,line,unknown,2,-80,1301,-560,-49,1281,-600
M,line,unknown,2,-83,1319,-510,-80,1301,-560
M,line,unknown,2,-59,1342,-490,-83,1319,-510
M,line,unknown,2,4,1342,-430,-59,1342,-490
M,line,unknown,2,50,1327,-500,4,1342,-430
M,line,unknown,2,50,1300,-570,50,1327,-500
M,line,unknown,2,40,1281,-570,50,1300,-570
M,line,unknown,2,-15,1282,-650,40,1281,-570
M,line,unknown,2,-14,1137,-220,-15,1282,-650
M,line,unknown,2,-12,1080,-230,-14,1137,-220
M,line,unknown,2,22,1079,-230,-12,1080,-230
M,line,unknown,2,22,1079,-230,22,999,-230
M,line,unknown,2,34,999,-230,22,999,-220
M,line,unknown,2,27,817,-120,34,999,-230
M,line,unknown,2,30,897,-120,158,900,-180
M,line,unknown,2,-23,-283,-520,86,-279,-510
M,line,unknown,2,-257,-516,-260,-185,-513,-250
M,line,unknown,2,-185,-513,-250,-184,-485,-250
M,line,unknown,2,-184,-485,-250,-148,-485,-240
M,line,unknown,2,-148,-485,-240,-43,-485,-410
M,line,unknown,2,-43,-485,-410,52,-490,-250
M,line,unknown,2,-47,-485,-410,-50,-640,-260
M,line,unknown,2,-44,-485,-410,-50,-351,-250
M,line,unknown,2,-50,-351,-250,-51,-350,-250
M,line,unknown,2,-51,-350,-250,-18,-351,-250
M,line,unknown,2,-18,-351,-250,-27,-239,-250
M,line,unknown,2,-26,-246,-250,-56,-240,-250
M,line,unknown,2,-56,-240,-250,-53,-218,-250
M,line,unknown,2,-27,-239,-250,1,-237,-250
M,line,unknown,2,1,-237,-250,1,-215,-250
M,line,unknown,2,1,-215,-250,29,-214,-250
M,line,unknown,2,29,-214,-250,25,-74,0
M,line,unknown,2,25,-74,0,59,-36,0
M,line,unknown,2,59,-36,0,56,30,0
M,line,unknown,2,56,30,0,20,65,-20
M,line,unknown,2,56,3,0,-40,-2,0
M,line,unknown,2,-40,-2,0,-37,-27,0
M,line,unknown,2,-37,-27,0,-77,-27,-10
M,line,unknown,2,-77,-27,-10,-75,72,0
M,line,unknown,2,-76,16,-10,-120,17,0
M,line,unknown,2,-120,17,0,-125,41,0
M,line,unknown,2,-125,41,0,-167,43,-10
M,line,unknown,2,-167,43,-10,-162,9,0
M,line,unknown,2,-162,9,0,-196,10,0
M,line,unknown,2,-122,45,0,-121,203,-210
M,line,unknown,2,-121,203,-210,-178,275,-210
M,line,unknown,2,-178,275,-210,-176,365,-210
M,line,unknown,2,-176,365,-210,-209,364,-210
M,line,unknown,2,-209,364,-210,-208,402,-220
M,line,unknown,2,-208,402,-220,-164,405,-220
M,line,unknown,2,-164,405,-220,-165,453,-210
M,line,unknown,2,-165,453,-210,-138,453,-210
M,line,unknown,2,-138,453,-210,-140,493,-210
M,line,unknown,2,-140,493,-210,-165,494,-230
M,line,unknown,2,-165,494,-230,-171,531,-170
M,line,unknown,2,-165,490,-220,-224,485,-210
M,line,unknown,2,-224,485,-210,-247,456,-210
M,line,unknown,2,-131,452,-210,28,449,-450
M,line,unknown,2,28,449,-450,23,417,-450
M,line,unknown,2,23,417,-450,117,376,-350
M,line,unknown,2,117,376,-350,180,404,-420
M,line,unknown,2,110,372,-350,96,326,-310
M,line,unknown,2,96,326,-310,115,298,-130
M,line,unknown,2,113,387,-340,123,452,-170
M,line,unknown,2,123,452,-170,95,451,-170
M,line,unknown,2,95,451,-170,94,524,-170
M,line,unknown,2,94,524,-170,204,527,-170
M,line,unknown,2,141,528,-170,141,649,-330
M,line,unknown,2,141,649,-330,107,649,-330
M,line,unknown,2,107,649,-330,106,676,-330
M,line,unknown,2,106,676,-330,5,689,-330
M,line,unknown,2,5,689,-330,5,813,-120
M,line,unknown,2,5,813,-120,27,817,-120
M,line,unknown,2,69,-833,-20,-105,-841,250
M,line,unknown,2,-105,-841,250,-116,-789,260
M,line,unknown,2,-116,-789,260,-147,-761,260
M,line,unknown,2,-147,-761,260,-152,-635,10
M,line,unknown,2,-152,-635,10,-185,-638,10
M,line,unknown,2,-185,-638,10,-187,-583,10
M,line,unknown,2,-187,-583,10,-212,-582,10
M,line,unknown,2,-212,-582,10,-236,-546,10
M,line,unknown,2,-236,-546,10,-247,-458,10
P,guka
,unknown,83,-839
P,hostage (Zok Druppeli)
,unknown,-440,1016
P,Jail
,unknown,-371,909
P,DEAD END
,unknown,36,1414
P,DEAD END
,unknown,-54,1412
P,Cauldron of Lost Souls
,unknown,-17,1343
P,T intersection
,127064000,-15,1291
P,DEAD END
,unknown,201,895
P,xroad
,127064000,28,883
P,DEAD END
,unknown,86,-279
P,DEAD END
,unknown,69,-490
P,xroads
,127064000,-49,-487
P,DEAD END
,unknown,-50,-640
P,pit/bridge
,unknown,-24,-325
P,water area
,unknown,-5,446
P,To Innothule Swamp
,magenta,69,-833
P,bridge/pit
,unknown,-235,-554

curio
09-10-2003, 02:08 PM
nm, i didnt read your message fully.

T.C. Jaguar
09-10-2003, 05:18 PM
Jel321-

Had the same issues. I don't know much about awk, but it seems the grep expression was getting mangled because sometimes the r g b variables in getcolorname() were being treated as strings and not ints ... or something.

So I forced them to be ints in the getcolorname calls, as follows:



print "M,line," getcolorname(int($7), int($8), int($9)) ",2," int(-$1) "," int(-$2) "," int($3*10) "," int(-$4) "," int(-$5) "," int($6*10);


That seems to solve the conversion problem. I haven't been able to test any maps yet tho.

-TC

uRit1u2CBBA=
09-10-2003, 10:34 PM
With that updated line, and adding a few entries into RGB.txt, I converted all of the LDoN zones that were in the allfiles.zip from eq-toolbox (not all zones were there yet, but most).

I've not had a chance to zone into any since I did the conversion -- if they look good, I'll post them for others to play with.

bonkersbobcat
09-10-2003, 10:36 PM
Once posted and tested, I can put them in to CVS.

BB

uRit1u2CBBA=
09-11-2003, 06:38 AM
Sounds like a plan.

Has Veksar and HatePlaneB maps been placed in CVS yet?

I have a very detailed (almost too detailed) HatePlaneB map that I can post with it for completness (I know I got it from here, so it has been posted already by someone)

And I used the same script to update Veksar, since the .php script converter didn't quote work well with it. I'll try to zone into Veksar later today to test that too.

AJMot
09-11-2003, 04:33 PM
I have done the up-date line to the awk script. I have the correct RGB.txt file in the same dir and still get the same errors as Jel321 recieved. Does anyone have any ideas?

ImNotDeadYet
09-11-2003, 04:37 PM
I got the same errors on most of the LDoN maps I ran thru, but a quick fix is to just search and replace all of the
"unknown" with "white". That made all of the maps very usable.

INDY

AJMot
09-11-2003, 04:39 PM
I found my problem when I copied down RGB.txt and placed it in the folder. For some reason the put RGB in small caps. I renamed the file and it works.

Elyon
09-11-2003, 06:35 PM
When ever I run the awk script as follows

awk -f eqtomap.awk < SoldungC_1.txt > Soldungc.map

I get the following:

awk: eqtomap:2:
' in expression:2: ^ invalid char '

and nothing else.

RH 9 full install.

Any ideas? This happens with ANY maps I have.

ieatacid
09-11-2003, 07:13 PM
**unknown color: 0 0 240 I'm getting this too :(

But then I tried it with "Poknowledge_1.txt" (from my EQ map folder) just to test, and it worked fine. Got some "]**unknown color:" stuff but loaded it up in SEQ and it was identical to the one that SEQ comes with. So maybe it's something with the new LDON zone maps from eqtoolbox?

Thoughts?

AJMot
09-12-2003, 08:44 AM
Originally posted by Elyon

awk -f eqtomap.awk < SoldungC_1.txt > Soldungc.map


My EQ map txt files do not start with a Capitial Letter. If your file names are all in small cap's, then change your awk line to -

awk -f eqtomap.awk < soldungC_1.txt > Soldungc.map

Hope that helps

ksmith
09-12-2003, 11:39 AM
Jel321

P,water area
,unknown,-5,446
P,To Innothule Swamp
,magenta,69,-833
P,bridge/pit
,unknown,-235,-554


After you fix your RGB.txt file (see below), change:

BEGIN {
#RS="\n";
print "Converted map,converted,0,0"
}


to


BEGIN {
RS="\r\n";
print "Converted map,converted,0,0"
}


ieatacid

unknown color 0 0 240


That means you need to add that color to your RGB.txt file. Not knowing which map in particular you're looking at, I'd suggest adding

0 0 240 blue
to your RGB.txt file.

Elyon

awk: eqtomap:2:
' in expression:2: ^ invalid char '


My guess is that you failed to copy and paste the awk script correctly.

ieatacid
09-12-2003, 12:46 PM
Thanks for the reply ksmith. That fixed the problem for all but "unknown color: 0 0 0"

It's in RGB.txt as "0 0 0 black"

An example of this happening is in guka_1.txt. Here's a sample of the first few lines:

L 326, -984, 1, 326, -1018, -2, 0, 0, 0
L 433, -833, 1, 433, -801, -2, 0, 0, 0
L 323, -832, 1, 323, -798, -2, 0, 0, 0
L 379, -832, 1, 378, -798, -2, 0, 0, 0
L 292, -831, 1, 461, -833, 1, 0, 0, 0
L 292, -908, -13, 292, -831, 1, 0, 0, 0

domesticbeer
09-12-2003, 01:50 PM
Ksmith,

I am getting the same error as elyon. I cut and pasted the script as you posted it. Not sure what might be the issue.

ieatacid
09-12-2003, 02:43 PM
Also, once I get a map that loads up in-game and looks good, how do I get it to load automatically when i zone into that zone?

Fatal
09-12-2003, 05:57 PM
change the name to match the zone name.

ieatacid
09-12-2003, 07:48 PM
Thanks. My map names weren't matching the ones in zones.h

Zaphod
09-12-2003, 11:20 PM
Originally posted by ieatacid
Thanks. My map names weren't matching the ones in zones.h
The zones.h zone names are the short zone names and the list of new ones match those in eqgame.exe.

Enjoy,
Zaphod (dohpaZ)

AJMot
09-14-2003, 09:46 PM
Originally posted by Zaphod
The zones.h zone names are the short zone names and the list of new ones match those in eqgame.exe.

Enjoy,
Zaphod (dohpaZ)

I have combine some of the new maps and they look fine. Some information is missing but they work. I looked at the file "zones.h" and the new zones were already added with the correct names, they start at 229 through 278 When I zone into a new zone it said un_know_zone with the following number "1357185297". I manually loaded the map which the name was "Rujj.map". The next step I wanted to find out what number would be displayed if I commement out some of the zones in the "zones.h" file. I did it to the zones 1 through 85. I then restarted SEQ and had my character zone into EC. EC came up and worked with no problems, even after I made the change to "zones.h" file. The "zones.h" file seems to do nothing. The only thing I see in the "zones.h" file is the names of the zones start with a small letter. But where the maps files are stored on the Hard Drive start with a capitial letter. The location of the "zones.h" file I was looking at is /seq/showeq/src/zones.h.

I would appreciate any help you can provide.

ieatacid
09-14-2003, 10:13 PM
I'm no expert, but I think if you change zones.h (or any source files) you have to recompile for any changes to take effect.

AJMot
09-15-2003, 12:26 AM
TY , But I tried it and it didn't work. There has to be something eles.

ksmith
09-17-2003, 08:12 AM
For those of you getting

awk: eqtomap:2:
' in expression:2: ^ invalid char '
when trying to run the awk script, this is because you're using gawk.

Try changing

/^L/ {
to

$1 == "L" {

and

/^P/ {
to

$1 == "P" {

Unfortunately, I don't have gawk to test this with.

AnotherCoreDump
09-17-2003, 08:59 AM
GAWK for WIN32 is easy enough to get:
http://unxutils.sourceforge.net
;)