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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top