( search forums )
Map Info
Soldat Forums - Soldat Talk - Developers Corner
Dustpuppy
August 20, 2003, 6:35 pm
Here is a PHP class I made to give some info on a map file. Not sure if one exists, but I thought it would be nice for map sites to show some details for downloadable maps.

Download Attachment: [IMAGE] mapinfo.zip1.57 KB

b00stA
August 20, 2003, 9:57 pm
I guess you're the first one, congratulations :)

I didn't test it, although I have apache running but.. what kind of details does it show?

(gonna try it later..)

Dustpuppy
August 20, 2003, 10:09 pm
As of yet, it reads:

Map Name Arena2.PMS
Comment Soldat, Upper Colour, Lower Colour, Weather Effects, Ground Type, Jet Fuel, Medikits and Grenades.


I might add more at some point, but I didn't actually set out to do this. I was looking for map size information, but I found this stuff so I thought I'd make the script.

Dragon88
August 22, 2003, 12:19 am
well, i've found out the number of tris in the map. It's stored as a 4 byte integer at offset 88 (decimal). U could add that and that might be interesting...

Dustpuppy
August 22, 2003, 1:40 pm
"Tris" = polygons?
Not really something the average map user wants to know about, but useful all the same.

b00stA
August 22, 2003, 7:03 pm
Sometimes this info helps.. kind of..
I mean, you can be pretty sure that a map with like 8 polygons isnt really good looking (except with a lot of scenery) or very advanced.

Dragon88
August 22, 2003, 7:13 pm
I think that i may have located the size values, but I will need to do more testing to be sure.

Dustpuppy
August 22, 2003, 9:11 pm
I guess I could put in a detail string, which uses the number of polys.

And I don't think the size info is actually stored, I think it just uses the far positions of the polygons to determine size.

Dragon88
August 22, 2003, 10:10 pm
that could be, I had just seen two values which were identical in a map that was perfectly square, and assumed that they were the size info, but I guess i was wrong. I've also found the format of the vertex data, but that would be useless to you.

Dustpuppy
August 22, 2003, 10:36 pm
I thought the same (the two values).
Would you care to share the poly format? I was going to try and work it out but I ended up doing other things.

Dragon88
August 25, 2003, 7:41 pm
Umm, I don't have all the fields worked out yet, but here goes:
Starting at offset 0x5c
Vertex Data, formatted as: 4 (x as float), 4 (y as float), 4 (unknown), 4 (unknown), 1 (alpha), 1 (red), 1 (green), 1 (blue), 4 (unknown), 4 (unknown)
(so that is one vertex)
Then after each tri there is 37 (unknown).

One thing to note however is that the map is stored upside down and sideways (or maybe I'm rendering it that way :)).

All those numbers are bytes.

EDIT: I'm pretty sure that those color values are in the wrong order or place or somthing, but if u use that (what i wrote) then u can get the positions and sizes and all that stuff for the polys.

Aquarius
August 30, 2003, 6:29 am
Great work!

I tried to make .PDF -> .PMS compiler, because I wanted to make geometry of map in vector graphics program (Illustrator or CorelDraw) but I stuck, because .PMS file is to complicated for me and there is no .PMS specification. I think Michal should release some informations about .PMS file format.

Dragon88
August 30, 2003, 7:19 pm
I can send u a copy of my research into the format, that should be able to get u started, but u won't be able to use scenery or bots, or anything like that :(

Aquarius
August 30, 2003, 11:10 pm
Thanks! Please, send it here: rbrbr@o2.pl

Dragon88
September 1, 2003, 6:28 pm
Anyone else want it?

Aquarius
September 2, 2003, 12:04 am


Maybe just post it here!

I have done some research about .PMS file too, here it is:

MAP OPTIONS in .PMS file (ALL numbers are decimals!)
====================================================

byte
adress: variables: description:
------------------------------------------------------------------

69-72 4 x BYTE background upper color: blue, green, red, alpha(?)
73-76 4 x BYTE background lower color: blue, green, red, alpha(?)
77-78 1xINTEGER fuel: 0 = none, 190 = normal, 800 = "maximum" (not maximum really)
81 1xBYTE number of medkits
82 1xBYTE number of grenades
83 1xBYTE weather effects: 0 = none, 1 = rain, 2 = sand storm, 3 = snow
84 1xBYTE step sounds: 0 = hard ground, 1 = soft ground, 2 = none


Aquarius
September 2, 2003, 12:12 am
opsss, sorry, it cuts spaces. Once again:


MAP OPTIONS in .PMS file (ALL numbers are decimals!)
====================================================

byte .... variables .. description
------------------------------------------------------------------
69-72 ... 4xBYTE ..... background upper color: blue, green, red, alpha(?)
73-76 ... 4xBYTE ..... background lower color: blue, green, red, alpha(?)
77-78 ... INTEGER .... fuel: 0 = none, 190 = normal, 800 = "maximum" (not maximum really)
81 ...... BYTE ....... number of medkits
82 ...... BYTE ....... number of grenades
83 ...... BYTE ....... weather effects: 0 = none, 1 = rain, 2 = sand storm, 3 = snow
84 ...... BYTE ....... step sounds: 0 = hard ground, 1 = soft ground, 2 = none


Dragon88
September 2, 2003, 8:48 pm
Sweet, I looked for some of that stuff (weather, step sounds, and the fuel) and didn't find it. Thanx.

EDIT: He has those offsets starting at 1. All the hex editors I know of start at 0, so subtract 1 from the numbers he gives to really find this stuff.

EDIT2: Here's what I've got:

quote:
PMS - Soldat File Format
Many THNX to Aquarius for some of this...

4 Bytes - Signature: 0x0b000000
1 Byte - Length of map name
Map Name of the length given above
7 Bytes - Unknown
1 Byte - Length of texture name
Texture Name of the length given above
Offset 0x44, 1 Byte - Top Color Red
1 Byte - Top Color Green
1 Byte - Top Color Blue
1 Byte - Top Color Alpha
1 Byte - Bottom Color Red
1 Byte - Bottom Color Green
1 Byte - Bottom Color Blue
1 Byte - Bottom Color Alpha
2 Bytes - Fuel For Jetpack
1 Byte - Number of Grenades (max spawned at any given time?)
1 Byte - Number of MedKits (max spawned at any given time?)
1 Byte - Weather FX (0 = none, 1 = rain, 2 = storm, 3 = snow)
1 Byte - Step Sound (0 = hard, 1 = soft, 2 = none)
Offset 0x58, 4 Bytes - Number of Tris
Vertex Data, formatted as: 4 (x as float), 4 (y as float), 4 (unknown), 4 (unknown), 1 (alpha), 1 (red), 1 (green), 1 (blue), 4 (tex coord x as float), 4 (tex coord y as float)
And after each three verts there are - 37 (unknown)

Then there is a whole bunch of crap that I'm not sure about...

Dustpuppy
September 2, 2003, 10:13 pm
*cough*
Everything that Aquarius posted was in my php script that I posted.

Aquarius
September 2, 2003, 11:15 pm
Oh... Maybe I should read posts more carefully :)
However, I didn't take map info from your PHP script.

Dragon88
September 3, 2003, 12:42 am
I know nothing either way, so I'm not gonna change it. Anyways... That isn't even close to complete... I've found out some stuff with regards to scenery, but I need to find out what a whole bunch of other stuff is b4 I can use what I know (can't get proper offset for the scenery).

Aquarius
September 3, 2003, 1:13 am
I have found information about polygon type:


And after each three verts there are 37:

1-36 .... unknown
37 ...... polygon type (0 - normal, 1 - only bullets collide, etc... but I didnt check other values)


Dragon88
September 3, 2003, 1:18 am
awwww, sweet! I kinda thought that would be in there somewhere!

Meitzi
September 11, 2003, 5:52 pm
Guys, slow in progress ;)

To me it took only 8 days to find out 70% of 1.0.5 mapfileformat info. And 30 days to make full working mapeditor.

Dragon88
September 17, 2003, 4:56 pm
shut it. There's prolly a lot more in 1.1.5 maps anyways. like stat. guns, and prolly other stuff.

b00stA
September 17, 2003, 7:00 pm
Meitzi, if it's so easy to do that.. umm you said you stopped working on your map editor because of the changing of the map file format if I recall correctly.
:)

Meitzi
September 20, 2003, 10:38 am
quote:Originally posted by Dragon88
shut it. There's prolly a lot more in 1.1.5 maps anyways. like stat. guns, and prolly other stuff.

Sorry if you take it that way. I just want to say that you all can do much better if you want.

quote:Originally posted by b00stA
Meitzi, if it's so easy to do that.. umm you said you stopped working on your map editor because of the changing of the map file format if I recall correctly. :)

Where did I said that?

I can't say that it didn't mean anything, but I stopped because I didn't play Soldat anymore. And new fileformat was good point to stop hole thing.

If there is someone who will make new editor if he know format, I can take that challenge. (Edit: i mean i can find out the format if i know it will be used)

Dragon88
September 25, 2003, 6:35 pm
Well, much as i'd like to take u up on that, i can't.

Dragon88
December 17, 2003, 12:10 am
Anyone else found anything new/given up?

samthemon
February 1, 2004, 10:32 am
okay. first of all. metzei needs to learn some humility.

next of all. thanks for the class dustpuppy, i was just about to start hackign the .pms and you sped it along a bit :P. okay. heres the problem tho. you've missed something VERY important in the header. try running your info prog on a diff map file. screwed. this is because all your offsets are based on the Arena2 map. this map of course, has a long description, and, of course, all other maps have diff descriptions with diff lens. i know you're going to say "no worries, just get len of the description and chuck x amount of bytes on it.", this is what i would have thought. in fact. this is what i did. however different maps have different data after the description too! i'm still just checking out what this might be.

and heres another interesting thing. im nto sure what triggers it, but sometimes you will get 00 after your description. sometimes you don't. i'm still in the process of working out wtf this is for, everyone else check it out too. save a map, check the bytes, save it again, look again. ya might have to do it a few times. i dunno.

Peace ouT.

Dragon88
February 3, 2004, 12:55 am
HMMMM... u bring up some interesting points... I know that the offsets aren't static, and I think I've fixed most of them. I'd have to look at the file again tho.

samthemon
February 3, 2004, 5:03 am
they are certainly not static :P. try looking at a few maps and getting the len between the end of the description and the beginning of the map upper colour and lower colour. quite variable.

Aquarius
February 3, 2004, 12:39 pm
> they are certainly not static

I think the differences in the lenght of map name is the reason.

Dragon88
February 4, 2004, 3:02 am
yeah. If I remember correctly, that is indeed the reason.

samthemon
February 4, 2004, 5:18 am
please try to read my post properly. "no worries, just get len of the description and chuck x amount of bytes on it". problem is, len between end of description and the colours for example, is variable from map to map.

samthemon
February 4, 2004, 5:32 am
aight guys. ignore everyhting i've said. im a failure lol. the len change between the end of the description, and, say, the upper and lower colours was due to the len of the map texture lol. im dumb :P

Sam!

Dustpuppy
February 4, 2004, 6:41 pm
I checked it plenty of times on other maps, and it worked fine...
Could the map format have changed in 1.2?

samthemon
February 5, 2004, 12:46 am
actually. i think it has. but even so dustpuppy, your php file's offsets were static. I tried them on other maps to now avail.

dabookshah
February 12, 2004, 12:44 pm
Ok, this is an old topic, so i'm not sure how far you guys have got on .PMS files. Could someone please tell me how far you have got, and also send me the information you have already collected? My email is dabookshah@hotmail.com

Dragon88
February 12, 2004, 9:46 pm
Naw, I'll just post it here, but I'm not sure how up-to-date it is. This is at least part of the 1.1.5 format.



Download Attachment: [IMAGE] PMS.txt1.8 KB

dabookshah
February 13, 2004, 6:45 am
1.1.5??? format has probably changed since 1.1.5, i thought i saw someone saying that. But thanks. Although i thought from the look of what you'd been saying that you would have something more definite than a "not sure how up to date it is". Surely someone can send me a current version. anyone?

Meitzi
February 13, 2004, 5:42 pm
I'm here because I got couple of emails like "we want new EditPro". So i came here to check out.

It seems that new version of EditPro will not happen so maybe I can help otherways. This is old 1.0.5b version fileformat. The biggest change between new and old is of course dynamic filesize but I think many calculations (collisions, compile info) still same.

Download Attachment: [IMAGE] soldatmapfile.txt8.14 KB (old 1.0.5b mapfileformat)

When you are trying to find out new info start just with minimal info. First save empty map, then add just one polygon and see what happen, then maybe change polygon color...

"meitzi needs to learn some humility." And some english.

dabookshah
February 14, 2004, 6:28 am
Um......Thanks, but remember this is(supposedly) the nerds corner - I would take down that microsoft banner if i were u - they get upset sometimes..........

Meitzi
February 14, 2004, 8:49 am
quote:Originally posted by dabookshah
Um......Thanks, but remember this is(supposedly) the nerds corner - I would take down that microsoft banner if i were u - they get upset sometimes..........


Who you get upset? If you mean Microsoft, I have official rights use this banner. (I got certifigate signed by Bill Gates, I laught when i got it)

samthemon
March 2, 2004, 7:17 am
right. "certified professional" who can't spell right? laught... im laughing. okay. ive laught enuff now.

pongo
March 10, 2004, 1:54 pm
mm...
who know 'demo format'? but need (de)compressor for demo

Aquarius
May 1, 2004, 9:16 pm
IMPORTANT!

I have a good news for all developers [;)] In the polish interview I asked Michal... well, just read:

16. (Aquarius) Will you release the map file format specification, so others could easily make the new maping tools or some converters to PMS format from other formats (for example from vector graphics formats)?

MM: Yes, I'm going to release the PMS format. I will make the specification available soon. Wait for the news on the Soldat homepage or on the Forum.


Sorry for the translation, I hope you understood [;)]

Dragon88
May 9, 2004, 2:44 am
!? Wow... that's gonna be good. Thnx aquarius for grabbing that info.

PsychoMark
June 26, 2004, 10:18 pm
Finally, that is great news! Perhaps now I can get round to finishing my version of an editor :-) ([URL])

Deleted User
June 26, 2004, 10:25 pm
A paint tool?

PsychoMark
June 26, 2004, 10:36 pm
Yeah, much like the Darken/Lighten in the original editor but with a fixed color instead... it's not done by far btw, haven't got scenery or waypoints, but for the most part I was waiting for the map format. Other than that it works like a charm, must say I like it waaaay better than the default editor in user-friendliness (no offence Michal :-))...

Deleted User
June 27, 2004, 9:29 pm
Wow i hope you get it released. :D

Dragon88
July 1, 2004, 7:35 pm
quote:I will make the specification available soon.

With all due respect to michal, I hope he's not using the (in)famous '1.2 release' definition of 'soon'.

Arenth
October 26, 2004, 10:58 pm
From the best I can tell from the source, I dont know delphi but it seems as tho blockwrite adds some bytes to the file, this would explain variable offsets, and the unknown bytes.

If someone could confirm this for me it would be greatly appreciated, as i am attempting to make a converter for blender (blender treats polygons as whole objects and it is a very polished 3d studio which I find is much easier to draw complex smooth objects with then the map editor itself) so I can dump polygons from blender into a sort of blank map then polish it with the map editor, if I actually get this done I may actually make a full fledged map editor. Sorry for the run on sentences and stuff. Been working on this for a while. And I'm sorta burned out. Anyways help would be greatly appreciated on the Blockread Blockwrite thing.