Skip to content

Saving in Multiplayer? #184

Open
Open

Description

@Alias-Me

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?

Activity

  1. CaiusAjiz commented on Aug 15, 2020

    @CaiusAjiz

    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.

  2. CaiusAjiz commented on Sep 1, 2020

    @CaiusAjiz

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions