AtlasMapper Posted March 24, 2016 Author Report Share Posted March 24, 2016 21 hours ago, sanderd17 said: a map should always be square Ouch.. This is an issue.. I planned to remove just an area and resize as a non-square map. Ok so it is useless in this example. Ok, is it necessary to use python or any script to access the pmp data ? Is there any way to uncompile the pmp file to get some human-readable format and access the data this way (or am I dreaming) ? Especially in this case, for just a small modification on one map (I understand the need of setting a script to batch process lots of map to allow compatibility between two game versions). It might be useful for later projects too. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted March 24, 2016 Report Share Posted March 24, 2016 The map format is binary, so unless you want to edit it with a binary editor, you'll need to at least have a script to do some conversion. Quote Link to comment Share on other sites More sharing options...
AtlasMapper Posted March 24, 2016 Author Report Share Posted March 24, 2016 Well I was expecting something different from this... I imagined it would be something I could modify (quite) easily, like some game saves you can hack easily by find and replace some values in the binary file.. I tried this way to find the values corresponding to the map dimensions in the binary file, but there are nothing that looks like such a thing. There's a few ASCII numeric and text values, but not much. By the way, I don't understand the need of a script to edit the values. I have a binary editor that let me set up some kind of macro (this would be an editing script then, right ?), but if I can't find the values, it is useless. Anyway, all of this is just to satisfy my curiosity, don't waste too much time to explain me all of this. I guess going in the depth of the .pmp file would require lot of knowledge. I had to try. Thanks. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted March 24, 2016 Report Share Posted March 24, 2016 The meaning of the different bytes are explained as comments in that script I linked. The first fixed number of bits are some metadata, then you get a huge block of terrain heights, and then a huge block of terrain textures. And I guess that's all. Quote Link to comment Share on other sites More sharing options...
AtlasMapper Posted March 25, 2016 Author Report Share Posted March 25, 2016 So the final size of the map is just defined by the amount of [terrain hight] and [terrain texture] blocks ? And both should have the same size ? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted March 25, 2016 Report Share Posted March 25, 2016 No, the map size is encoded as the 12th to 15th byte in the file, but it should match the number of blocks. Quote Link to comment Share on other sites More sharing options...
AtlasMapper Posted March 25, 2016 Author Report Share Posted March 25, 2016 Oh yeah lol now I understand: # 4 bytes PSMP to start the file # 4 bytes to encode the version of the file format # 4 bytes a for file size (which shouldn't change) so 12 bytes # 4 bytes to encode the map size so bytes 12-15 I interpreted the comments in another way. I think I will try to play with these bytes manually to see how it messes the map (on a trashable map copy obviously). Again, thanks for your patience and knowledge sharing! Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted March 25, 2016 Report Share Posted March 25, 2016 Oh, and file size would also change in your case (if you resize the map). But perhaps you can only calculate it after transforming the map. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.