PDA

View Full Version : Map Modify SEQ



Whoopus
04-06-2004, 03:27 PM
Hello all
I recently downloaded maps for SEQ format which has a MAP ext.
How do I modify those? I tried converting to text and just plain opening

Thanks
Whoopus (Still learning)

Marinka
04-06-2004, 08:43 PM
Hello all
I recently downloaded maps for SEQ format which has a MAP ext.
How do I modify those? I tried converting to text and just plain opening

Thanks
Whoopus (Still learning)
Mappie does not natively support SEQ format, however it CAN do it.
If you have a little bit of programming skill, you can modify the file format DLL and store it in the directory you have the maps.

Here's how:
When you install Mappie, click "Custom" and have it install the DLL Source.
Modify it to where it should be for an SEQ file.
Compile it, and place it in the map folder.
Mappie should then be able to understand the file format.

I am pretty sure that someone has a Mappie SEQ DLL floating around somewhere, but I've never seen it. I would have written and released one, but I've never had SEQ maps. Might put it on my to-do list...

Hope this helps. If not, let me know.

Whoopus
04-07-2004, 03:03 PM
Ok I did a search on this web site plus search engines. Unalble to find that DLL. I still keep on looking though.

Thanks for the the idea

slartibartfast
05-28-2004, 03:19 PM
I had a look quite a while back, but the problem with the API is that the function to process a map lnput line expects a single line segment (or point) as a return, which is exactly what you want for a SOE map, but cannot be used for a SEQ Map as a SEQ map has multiple line segments per input file line.

E.g. consider the line A-B-C-D with which is coloured red
a SOE map would look like this

L,Ax,Ay,Az,Bx,By,Bz,R,G,B
L,Bx,By,Bz,Cx,Cy,Cz,R,G,B
L,Cx,Cy,Cz,Dx,Dy,Dz,R,G,B

SEQ map looks like this

M,LineName,RED,4, Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz,Dx,Dy,Dz

We either need a way to return an array of points/line segments.
Or we need to have a way to tell mappie that we have not fully processed the line and it should send it back to us, with an integer that we set to tell us how far through the line we have processed.

e.g.

FILEFORMAT_API int ReadData(char* InputString,SFileFormat* Data, int PointCount)

Then the Read Map Function in Mappie should call ReadData multiple times for each input line until PointCount is set to 0.

Read Map Logic.


Open Map File
While NOT EOF
InputString = ReadLine
PointCount = 0
Do
ReadData InputString, Data, PointCount
StoreData Data
Loop Until PointCount = 0

Loop



For the above Map line the code the SEQ code could then take the line
L RED 4pts, A, B, C, D

On the first call the dll would return the line segment A-B and set PointCount =1 to indicate there are more points to process in this line.
On the second call the dll would know to skip the first point because PointCount =1 and would return the 2nd segment from B-C and set PointCount = 2.
On the 3rd call the dll would return C-D and set the PointCount to 0 to indicate the line has been fully processed.


for your reference these are what a SEQ map looks like:
Map Long Name, Short Name, ????
M,Line Name,Colour,Point Count,X1,Y1,Z1,X2,Y2,Z2,X3...
L,Line Name,Colour,Point Count,X1,Y1,X2,Y2,X3,Y3...
P,Point Name,Colour,X,Y

Note colour will either be a name or RGB value in the format #RRGGBB

e.g.
Misty Thicket,Misty Thicket,212,274,593,550,4023,2345
L,line_name,gray,38,-2575,418,-2568,418,-2557,430,-2556,490,-2545,502,-2496,501,-2475,512,-2431,511,-2440,1167,-1898,1158,-1510,1152,-664,1134,-48,1129,-48,648,-98,650,-100,633,-110,632,-110,584,-48,594,-48,139,-102,139,-100,86,-48,85,-48,-90,-26,-91,-26,1129,1248,1167,1252,831,1254,645,1256,455,1258, 271,1261,86,1263,-142,1267,-457,1269,-775,1332,-778,1416,-789,1442,-815
L,line_name,gray,56,1417,-827,1417,-814,1329,-820,1207,-824,1258,-968,1239,-1150,946,-1149,558,-1146,312,-1145,-56,-1143,-455,-1141,-455,-862,-409,-760,-408,-659,-304,-556,-303,-456,-155,-349,-111,-252,-26,-151,-25,-111,-48,-110,-48,-151,-107,-220,-149,-189,-159,-202,-169,-196,-181,-232,-139,-264,-180,-353,-324,-453,-345,-535,-433,-657,-431,-757,-478,-737,-504,-796,-452,-807,-477,-863,-477,-1141,-654,-1144,-1218,-1155,-1660,-1164,-1971,-1170,-2356,-1178,-2387,-683,-2398,-516,-2411,-309,-2424,-102,-2437,107,-2447,275,-2459,474,-2500,481,-2522,480,-2535,467,-2535,408,-2546,396,-2564,396
M,road,red,16,-2353,505,-48,-2353,505,-48,-2250,503,-48,-2177,427,-63,-2143,370,-58,-1867,103,48,-1550,102,29,-1471,200,-5,-1264,400,74,-1149,398,206,-930,165,159,-780,13,59,-662,-1,51,-447,4,32,-371,-104,25,-64,-101,37
M,road,red,8,-649,-2,53,-649,-2,53,-662,-81,26,-909,-94,4,-1061,-192,-17,-1165,-300,19,-1262,-388,103,-1254,-500,104
P,Druid Ring,white,-1826,-498
P,Rivervale,white,-2409,531
P,Goblins,white,415,-1100
P,Goblins,white,1133,-969
P,Runnyeye,white,1212,-777
P,Goblins,white,1089,-324
P,Orcs,white,1092,1020
P,Undead,white,564,308
P,Succor Point,white,0,0

Marinka
05-29-2004, 03:59 AM
Oh wow... that's a problem.... When I wrote the fileformat API I hadn't thought of that...

Thanks for a sample file, I can probably get something worked out in both the API and in native code for SEQ files now.

Thanks! Hopefully Mappie 1.5 will be released soon... It's having performance issues with line manipulation tools that I want solved before it goes public.

slartibartfast
06-01-2004, 09:17 AM
Couple of points I should mention:

Filename - same name as SOE, but without the _1, and has .MAP extension.

End of line character - May be just LF rather than CRLF as many of the files originate from a linux file system.

slartibartfast
06-01-2004, 12:05 PM
The colour names that are recognised come from UNIX's RGB.txt

The white space rules for this file are a little relaxed, but here is a copy i cleaned up a bit.

I have a preprocessor for colour names that strips spaces, changes grey -> gray and converts it to lower case. This saves quite a bit of memory as many of the entries in the file are essentially the same but with different case, spelling + use of spaces.


private string FixName(string sInput)
{
string sFixed = sInput.ToLower();
sFixed = sFixed.Replace(" ", "");
sFixed = sFixed.Replace("grey", "gray");
return sFixed;
}