
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
Multiplayer Saves
I find it quite annoying that you cannot play saved multiplayer games in KaM. When you select them it displays some really random stuff in the description. (such as 0 players and out of bounds width/height) Here is a screenshot of that. You can see that no one is allow to join, because there are no free slots.
I thought that maybe the multiplayer saves were completely corrupt, but I disproved that by starting the save in single player mode, and it worked! (although I lost the game straight away) I could see the map and my storehouse/units for a few second anyway. So the multiplayer saving system was not so broken.
So I had a look at a save file. First I found that the map is saved in exactly the same format near the start of the file. (it varies between files, so I can't give an index) I found a few interesting values after quite a bit of experimenting. Each player has a section of code right near the beginning and in that there is a byte that states whether they are allowed in the game or not. In normal (single player) games these are just left as 0. When KaM saves a multiplayer game they are also 0. However, if you set them to FF then they are allowed to join.

Here is a list of the values I found:
$80 contains the total number of players displayed in the description. (but it doesn't effect whether players can join or not)
$361 is player 1's enable control (0 for cannot join, FF for can join)
$75F is player 2's
$F5B is player 4's
$1757 is player 6's
I can find the others, (but I am too lazy to do it for this) and I am sure you will be able to as well. They are evenly spaced due to the fact that they are in the players section.
Ok, so then I saved a 2 player multiplayer game and enabled the first 2 players. I then hooked 2 computers together and tested it.
I worked! The start button was now enabled, and both computers were selected. I clicked start. Then it said: "Transferring saved game"
Screenshot (as far as I know no one else has seen this before!!!)
Now for the bad news: It crashed just after the transfer was complete.
Still, I have achieved something, even if it is just that screenshot.

Then I had a great idea, why not test an old version to see if the bug existed then? So I tried 1.52, and it still didn't work, and it crashed after transferring when I enabled the players.
I did the same thing with 1.1471. When I selected a save created by a newer version it still displayed the corrupt values. I was unable to test creating a save due to computer availability. (family needed to use the spare one) My guess is that it still won't work.
I guess I was being a bit hopeful to think that I could fix this issue, but anyway. If someone else decides to decode the save files then my info may be of some help.
If anyone knows if the multiplayer saves were ever working then PLEASE let me know so I can see if it is a change in the save file or in the EXE.
Lewin.