Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving in Multiplayer? #184

Open
Alias-Me opened this issue Nov 1, 2018 · 2 comments
Open

Saving in Multiplayer? #184

Alias-Me opened this issue Nov 1, 2018 · 2 comments

Comments

@Alias-Me
Copy link

Alias-Me commented Nov 1, 2018

So after playing DUWS in SP a long time I got some friends on board to play Multiplayer.
But after loading the scenario on a server I realized I couldnt save, the ESC Menu option obviously didnt work, but the SITREP or REST save options in-game also weren`t available.

I don`t think the scenario is supposed to be played in one sitting, is it? Seems a little much, so am I missing something? Or am I wrong?

@CaiusAjiz
Copy link

Came across this one tonight too, I've given the code a cursory glance and here's what i'm seeing:

When it's a server I can see where it's adding the action to save (example is fn_HQaddactions.sqf )
if (isServer) then { _hq addaction ["<t color='#00b7ff'>Rest (wait/save)</t>", duws_fnc_savegame, "", 0, true, true, "", "_this == player"]; };

but on searching, I can't see duws_fnc_savegame anywhere beyond it being added as an action or in CfgFunctions.hpp where class savegame references it . I'll have a proper dive in soon and see if I'm losing my mind or it's really not there.

@CaiusAjiz
Copy link

CaiusAjiz commented Sep 1, 2020

Ok so I've been looking at this. Turns out I was misunderstanding how CfgFunctions.cpp works. What's happening currently is when you Rest with either "Rest (Wait/Save)" on SP or MP, "Rest" on a dedi or by getting a SITREP, it runs duws_fnc_savegame (which is just functions/generic/fn_savegame.sqf).

In here is just a saveGame; which i think is an SP only thing.

So to fix this (As DUWS-R doesn't rely on mods) I think it's going to be a case of taking all of the necessary gamestate floating about in the various variables, and saving them into a profileNamespace on the dedi itself , which persists on to disk and then at mission load, check for a gamestate in these variables, and load those instead of starting a new mission each time it starts.

I'm working on a PR. Might take some time for me to unpick and put back together what's going on so the mission can load properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants