Possible to allow multiple saves in multiplayer? (Also: SaveGame() does nothing.)

Weep

Godspeed to the sound of the pounding
Reaction score
400
Is there a way to allow a player to save multiple times in a multiplayer game? Normally it's limited to once per player; I don't care whether it's some mojo to actually allow you to press the save button in the menu more than once (I have already tried PreventSave; it still expends the one allowed save) or by chat command.

[ljass]call SaveGame("string.w3z")[/ljass] seems to do nothing. Suggestions?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Well my idea was to use PreventSave with the native, but I guess you've tried that.
Unless I did it wrong, but I don't think I did (since saving was successfully prevented. :p)

Thanks for taking a look, though. I was getting a little frustrated that nobody seemed to know or care anything about this. :D

JASS:

// ?
SaveGame("string.w3z") => SaveGame("string")
The default value when picking a save/load game action in GUI includes the file extension, so I kept it.
 

tooltiperror

Super Moderator
Reaction score
231
The rest of the Game API:

JASS:

//============================================================================
// Game API
native VersionGet takes nothing returns version
native VersionCompatible takes version whichVersion returns boolean
native VersionSupported takes version whichVersion returns boolean

native EndGame takes boolean doScoreScreen returns nothing

// Async only!
native          ChangeLevel         takes string newLevel, boolean doScoreScreen returns nothing
native          RestartGame         takes boolean doScoreScreen returns nothing
native          ReloadGame          takes nothing returns nothing
// %%% SetCampaignMenuRace is deprecated.  It must remain to support
// old maps which use it, but all new maps should use SetCampaignMenuRaceEx
native          SetCampaignMenuRace takes race r returns nothing
native          SetCampaignMenuRaceEx takes integer campaignIndex returns nothing
native          ForceCampaignSelectScreen takes nothing returns nothing

native          LoadGame            takes string saveFileName, boolean doScoreScreen returns nothing
native          SaveGame            takes string saveFileName returns nothing
native          RenameSaveDirectory takes string sourceDirName, string destDirName returns boolean
native          RemoveSaveDirectory takes string sourceDirName returns boolean
native          CopySaveGame        takes string sourceSaveName, string destSaveName returns boolean
native          SaveGameExists      takes string saveName returns boolean
native          SyncSelections      takes nothing returns nothing
native          SetFloatGameState   takes fgamestate whichFloatGameState, real value returns nothing
constant native GetFloatGameState   takes fgamestate whichFloatGameState returns real
native          SetIntegerGameState takes igamestate whichIntegerGameState, integer value returns nothing
constant native GetIntegerGameState takes igamestate whichIntegerGameState returns integer

Nothing after [LJASS]// Async only![/LJASS] works on battle.net I'd assume?

This has actually inspired me for a save/load code system (Just display the code when they "save" the game and prevent save, would look REALLY professional with SimErr)

Perhaps you can do something similar?

And my last idea, probably not going to work, BUT ...

JASS:

call SyncSelections()
call SaveGame("mysave.w3z")
 

DioD

New Member
Reaction score
57
what about savecodes?

ofc position\hp of every unit will be loooooong, but if you decrease number of data you may save entire game with single savecode.
 

Nestharus

o-o
Reaction score
84
Well, you can use save codes, and actually, if you use the proper systems, save/load codes can be rather short ; ).

Older save/load codes save data with twice as many characters as newer ones.

I recently made this save/load system -> http://www.thehelper.net/forums/showthread.php/162416-Encoder

If you want to try your hand at making your own, making optimal secure ones are pretty easy now, given you know the math ;P.

http://www.thehelper.net/forums/showthread.php/162435-UnitStatePercent
http://www.thehelper.net/forums/showthread.php/162359-Salt
http://www.thehelper.net/forums/showthread.php/162016-BigInt
http://www.thehelper.net/forums/showthread.php/162015-Base
http://www.thehelper.net/forums/showthread.php/162358-Knuth-Checksum
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
ofc position\hp of every unit will be loooooong, but if you decrease number of data you may save entire game with single savecode.
Unfortunately, that data ought to include timer states, variable settings, shop item stock, cooldown states, and so forth. It's a nice idea, but I'm pretty sure it's impractical for my project. :( (I'm not even sure it's possible to set some of those via triggers.)

I might give it consideration again once my map progresses more, though. I'm still hoping for a way around the one-save-per-player limitation. I'd even settle for one-save-per-player if I can somehow cause a null, neutral, or computer player to be the initiator of the save.
 

tooltiperror

Super Moderator
Reaction score
231
>Use save/load code system.
Did you even read the post about yours?

Weep clearly explained save&load was impractical.
 

DioD

New Member
Reaction score
57
1) Imagine - you are running console - xbox ps3 or whatever.
2) You may save only at checkpoints, every checkpoint is point of no return.
3) ????
4) PROFIT

since you have all needed data for next checkpoint already precached into game files, everything already inside map, you store only very limited amount of information, health+mana+items+skills of every hero ever for 12 players will be 5-9 long string.

this is only way, also its possible to use zip deflate, making codes both secure and short.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
2) You may save only at checkpoints, every checkpoint is point of no return.
Yes, that is something I might decide to do if there is no solution to my actual question. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top