TheSuperCow Profile Joined February 2011 12 Posts Last Edited: 2012-04-19 08:21:39 #1



This is just a hack and meant merely as a demonstration of how easy it is to implement technically, though through my limited testing it has worked fine to resume multiplayer games.



Note that this is a 3rd party program, it does modify Starcraft 2 in memory, and I provide no warranty; use at your own risk.







How to use the thing:



First you need to hit 'Inject' (provided SC2 is running). The program then loads itself into SC2.



The resume time textbox specifies the time (in minutes:seconds) at which the game will be resumed; when the game starts, it will quickly progress up until the specified time, then play will resume as normal. Do not perform any actions in-game while the game is progressing, or things might get screwed up



The 'Resume replay' button makes it so the next replay that is viewed in SC2 will be resumed with the player playing as the player who saved the replay the host of the original game. There will be no replay UI as there usually is. Not really a very useful feature, but it was easy to implement, so why not.



The 'Resume game' button will resume the next regular game played. This requires a replay to be specified (using the Browse button). It is important that the game settings (map, number of players and races) are the same as in the replay, or things will not go as planned.

This can be used, for instance, to resume a disconnected multiplayer game, if all players specify either the exact same replay or their respective replays from the same game, and exactly the same resume time.







A feature to resume disconnected games is needed in Starcraft 2. It's not hard to make. One can only hope that Blizzard realizes this.



edit:



I made it so it pauses the game upon reaching the specified time, and it disables user input until then. I also included the code contained in util.lib, since people have been requesting it. StormLibRAS.lib is, well, StormLib.

It does not wait for all players to finish fast-forwarding, however, so it be best to confirm all players are ready before unpausing.







There is of course a few issues, the most notable right now is that it seems to matter who hosted/which order people joined. Most likely, the order joined/slot occupied by player must match with the originals from the replay, this is again most likely due to simple unit numbering internally in SC2, where the host's units are created first and so forth.



Oh, and control groups are not restored. At least not with regards to the user interface.

There should be no issues with spawn positions as this is indirectly determined by the random seed, which is overridden.



If anyone actually wants to use this, or if Blizzard would approve of use of this program, then I would need to make a better version.



edit: I fixed control groups, yey.



edit: Okay, I fixed the whole join in the right order thing. You should now play as the player who was in your spot, regardless of which order you joined in. It also sets your race. I hope I didn't break anything :D



edit: I fixed unicode support in the UI. It turns out koreans play this game, too.



Download:

Source code:

I wrote a program that allows games to be resumed (eg. after a disconnect) by using the replay to recreate the game up to a certain point and then resuming play as normal.This is just a hack and meant merely as a demonstration of how easy it is to implement technically, though through my limited testing it has worked fine to resume multiplayer games.Note that this is a 3rd party program, it does modify Starcraft 2 in memory, and I provide no warranty; use at your own risk.How to use the thing:First you need to hit 'Inject' (provided SC2 is running). The program then loads itself into SC2.The resume time textbox specifies the time (in minutes:seconds) at which the game will be resumed; when the game starts, it will quickly progress up until the specified time, then play will resume as normal. Do not perform any actions in-game while the game is progressing, or things might get screwed upThe 'Resume replay' button makes it so the next replay that is viewed in SC2 will be resumed with the player playing asthe host of the original game. There will be no replay UI as there usually is. Not really a very useful feature, but it was easy to implement, so why not.The 'Resume game' button will resume the next regular game played. This requires a replay to be specified (using the Browse button). It is important that the game settings (map, number of players and races) are the same as in the replay, or things will not go as planned.This can be used, for instance, to resume a disconnected multiplayer game, if all players specify either the exact same replay or their respective replays from the same game, and exactly the same resume time.A feature to resume disconnected games is needed in Starcraft 2. It's not hard to make. One can only hope that Blizzard realizes this.edit:I made it so it pauses the game upon reaching the specified time, and it disables user input until then. I also included the code contained in util.lib, since people have been requesting it. StormLibRAS.lib is, well, StormLib.It does not wait for all players to finish fast-forwarding, however, so it be best to confirm all players are ready before unpausing.There is of course a few issues,There should be no issues with spawn positions as this is indirectly determined by the random seed, which is overridden.If anyone actually wants to use this, or if Blizzard would approve of use of this program, then I would need to make a better version.edit: I fixed control groups, yey.edit: Okay, I fixed the whole join in the right order thing. You should now play as the player who was in your spot, regardless of which order you joined in. It also sets your race. I hope I didn't break anything :Dedit: I fixed unicode support in the UI. It turns out koreans play this game, too.Download: http://www.mediafire.com/?2lj5cjbzc9wgbxr Source code: http://www.mediafire.com/?iy2i6la3ommq1o4