( search forums )
Map version value
Soldat Forums - Soldat Talk - Developers Corner
rapterion
September 13, 2005, 7:42 am
Well I noticed that the map version value is defined as being 11 in the map editor... How reliable would this be for checking the validity of a soldat map file, or is there some other attribute for a map file that I'm not seeing that could be used to check validity?

Deleted User
September 13, 2005, 8:11 am
I dont think that value is used at all except if you try and play a 1.1.5+ map on Soldat 1.05b

Checking if the map is valid is done via Checksum, and also a random 6 char number which is in the map files header aswell.

rapterion
September 13, 2005, 8:16 am
Where in the map file is the checksum stored... also I know about the random ID but thats not really that useful for checking if a map is valid... since its random, its more or less an attempt at a unique ID for soldat to use internally.

Deleted User
September 13, 2005, 11:58 am
Checksums are not stored in the maps, they are generated when the maps are being loaded.. Starting to sound like your trying to make a map hack.

the randomID was soldats old defence, checksums is the current one.

rapterion
September 13, 2005, 1:02 pm
No, I'm not trying to make map hacks, I have set up what I wanted to do (it took all night), goto http://bluefire.hopto.org/upload.php, It will let you upload a map onto my server which is located at bluefire.hopto.org. Now all I have to do is get it added to the rotation:S

The problem with using checksums, is I dont know the checksum of the map being uploaded to begin with:S

Deleted User
September 13, 2005, 1:35 pm
Are you trying to make sure somone does overwrite an existing map?

rapterion
September 13, 2005, 1:37 pm
They cant, if you upload a map with the same name as an existing map, its just deleted. Also the uploader wont accept files larger then 500k, and they have to have a .pms extension, as well there are some checks right now to make sure its a soldat map file, but they are kind of weak, not that it matters, you cant execute anything you post anyways;)

Deleted User
September 13, 2005, 1:40 pm
er, basically I was asking why you want to get a checksum for the maps O.o

rapterion
September 13, 2005, 1:43 pm
well i didnt want the checksum... I wanted a way to verify that a given file was actually a soldat map, and not some script kiddy trying to upload dlls onto my server in the hopes of taking it over.

GAMEOVER
September 13, 2005, 5:23 pm
Just make sure there PMS files I guess :/

Deleted User
September 14, 2005, 3:21 am
just make sure the first 4 bytes are 0B 00 00 00

peemonkey
September 14, 2005, 3:35 am
teh value!

rapterion
September 14, 2005, 8:00 pm
I did that, I also make sure that the texture name ends in .bmp, since soldat only uses bmps;)