It's not a DM game without people attacking the save files

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
seebs
Posts: 268
Joined: Sat Apr 14, 2012 8:58 pm

It's not a DM game without people attacking the save files

Post by seebs »

So, save files. What are they? Quick scanning shows character names aren't present in cleartext, and files contain a suspiciously even spread of byte values -- so they're compressed or encrypted, presumably. First few bytes look like a header:

x000000 47 52 49 4d 04 00 00 00 85 c5 0e 00 78 9c ec bd 'GRIM........x...'

If I add a single map note, the save file gets almost 2KB bigger, and the header changes to:

x000000 47 52 49 4d 04 00 00 00 81 c2 0e 00 78 9c ec 7d 'GRIM........x...'

I'm assuming that the 04 is a version tag or something similar. None of these look like length values for the save, and it's not immediately obviously IFF or zlib (the two things I look for first). In any event, I see no zlib stuff. I do note the game's got embedded Lua in it, which suggests that you could have a ton of fun if you could find a script console. :)
User avatar
germanny
Posts: 530
Joined: Sat Apr 07, 2012 10:52 pm
Location: Kiel, Germany

Re: It's not a DM game without people attacking the save fil

Post by germanny »

Ah :) Thats the first thing i do after first play, open up a save in Hexeditor : D
Console?
SpoilerShow
spawn items from console works fine^^


you may search this topic:
viewtopic.php?f=3&t=905
Dungeon Master Resource Pack worker and passionated Beer drinker
seebs
Posts: 268
Joined: Sat Apr 14, 2012 8:58 pm

Re: It's not a DM game without people attacking the save fil

Post by seebs »

Super handy. I now have pretty good debugging tools for it.
Krotch ScroteGuzzle
Posts: 23
Joined: Fri Apr 13, 2012 4:04 pm

Re: It's not a DM game without people attacking the save fil

Post by Krotch ScroteGuzzle »

Is this possible on Steam? Or do they save the files to Steam Cloud?
seebs
Posts: 268
Joined: Sat Apr 14, 2012 8:58 pm

Re: It's not a DM game without people attacking the save fil

Post by seebs »

Krotch ScroteGuzzle wrote:Is this possible on Steam? Or do they save the files to Steam Cloud?
No clue. Haven't gotten anywhere on the save files, but I have some nice debugger console stuff now.
User avatar
Loktofeit
Posts: 90
Joined: Tue Mar 06, 2012 3:59 pm

Re: It's not a DM game without people attacking the save fil

Post by Loktofeit »

Krotch ScroteGuzzle wrote:Is this possible on Steam? Or do they save the files to Steam Cloud?
If it is saving to the cloud, you can turn that off and it will save the files to your Documents folder ( drive:\Users\username\Documents\Almost Human\Legend of Grimrock )
User avatar
Dej
Posts: 8
Joined: Sun Apr 29, 2012 9:42 pm
Location: Geneva, Switzerland

Re: It's not a DM game without people attacking the save fil

Post by Dej »

x000000 47 52 49 4d 04 00 00 00 81 c2 0e 00 78 9c ec 7d 'GRIM........x...'

I'm assuming that the 04 is a version tag or something similar.
The 04 after the "GRIM" keyword is in fact the size of the segment data. That size is encoded as a 32-bit word in little-endian and will be the same on all save files: 04 00 00 00.

The segment data is therefore the next 32-bit word (at offset 8). It is also a size, and also little-endian. It is the size of the uncompressed zlib data. In the example above 81 c2 0e 00 --> 0x0EC281 = 967'297 bytes.

Following that is the zlib data. The first 16-bit word (offset 12) is the zlib data header. It will not change from one save file to the other: always 0x789C (which corresponds to a standard zlib compression). Following that is the compressed data.
User avatar
kitty
Posts: 32
Joined: Fri Apr 06, 2012 9:42 am

Re: It's not a DM game without people attacking the save fil

Post by kitty »

OK, lets try to look at this problem from the other side. From the point of view of dungeon designer.

Imagine a situation that your dungeon is based on "Im missing this item" or some dungeon setup - for example locked mapping. Wouldnt be better if such files as savegames and *.dat files were not only compressed but also passworded? I know this is hard to accomplish to hide password. Because everytime there will be someone who will crack that.

There must be a way how to prevent ruining user created dungeons with spoiler free highway.
User avatar
zalewapl
Posts: 45
Joined: Sun Apr 22, 2012 12:39 am

Re: It's not a DM game without people attacking the save fil

Post by zalewapl »

kitty wrote:OK, lets try to look at this problem from the other side. From the point of view of dungeon designer.

Imagine a situation that your dungeon is based on "Im missing this item" or some dungeon setup - for example locked mapping. Wouldnt be better if such files as savegames and *.dat files were not only compressed but also passworded? I know this is hard to accomplish to hide password. Because everytime there will be someone who will crack that.

There must be a way how to prevent ruining user created dungeons with spoiler free highway.
Yeah. Disregarding the fact that this is the worst idea I've ever seen, how would the game launch the dungeon if it was passworded? You would have to provide the password or no game for you.
kitty wrote:There must be a way how to prevent ruining user created dungeons with spoiler free highway.
If someone wants to cheat in a single player game then let them.
User avatar
kitty
Posts: 32
Joined: Fri Apr 06, 2012 9:42 am

Re: It's not a DM game without people attacking the save fil

Post by kitty »

The idea was about password hidden in the game. So only application can read that file. Technically what i was suggesting was encryption instead of only zipping. Encryption is known system. Im sure everybody knows or at least heard about it.
zalewapl wrote:If someone wants to cheat in a single player game then let them.
As long as such a cheater is not ruining dungeon with spoilers on public forums.
Post Reply

Return to “Modding”