S.Crowe 142 Posted September 15, 2016 THIS IS UNOFFICIAL - Please don't bother the ALiVE team with issues involving this work. Okay! Would you like to save your ALiVE game locally. Me too. So I present NWR : No War Room This is not feature complete, you can only load and save virtual profiles, military objectives, and military logistics. More features will come later. Here is the github: https://github.com/stcrowe/NWR How to install: Download iniDBI2 If using a server, install on server and use this command on your command line -serverMod=@inidbi2; If your local hosting, make sure the local hoster has @inidbi2 loaded in their mod list Download the files from the github Place the NWR folder in your mission In your description.ext in the mission folder maker sure to have this added: class CfgFunctions { #include "NWR\cfgfunctions.hpp" }; Now it's installed in your mission. Saving - If you want to save data, you need to call these functions (I don't care how you do this, I use Debug Console in the ALiVE Admin menu) To save virtual profiles all you have to use this function: [] call NWR_fnc_saveVirPro; To save military logistic numbers you have to use this function: [] call NWR_fnc_saveMilLog;To save military objectives you have to use this function: [] call NWR_fnc_saveMilObj; Loading - If you want to load data, you need to call these functions (I don't care how you do this, I use Debug Console in the ALiVE Admin menu) To save virtual profiles all you have to use this function: [] call NWR_fnc_loadVirPro; To save military logistic numbers you have to use this function: [] call NWR_fnc_loadMilLog;To save military objectives you have to use this function: [] call NWR_fnc_loadMilObj; FAQ Does this work with the War Room? Yes it does. Your server will still save the War Room as long as you put the correct module down with the correct settings. Does ALiVE support local databases out of the box? Kinda yes, checkout this page for more info. Special Thanks: Blunts for dealing with my bugs. Everyone at Task Force Arma Everyone at on the ALiVE team, especially friznit, tupolov, and spyder 6 Share this post Link to post Share on other sites
S.Crowe 142 Posted September 15, 2016 NOTE!!!! Before you load your saved data, wait until ALiVE loads up the mission. Otherwise, it might erase over your loaded data. I usually wait a minimum of 60 seconds after mission loads. 1 Share this post Link to post Share on other sites
pikey 2 Posted September 16, 2016 I just randomly hit the Alivemod.com website to see if they ever got around to changing the functionality from a local Admin in game save to an unattended save so i could realise my goal of making 24/7 campaigns like the RP servers do and oh look....you are well on your way (got the hard part done) to doing that! I'm not sure the team or others ever got why what you are doing is a good idea, so I thank you sincerely for attempting this! For the purpose of colouring in the 'use case scenario': I had wanted Alive to be the backbone of a persistent JIP campaign server that would support saving states for reboot/restart purposes without having to go into the game, manually press "SAVE" and doing that which was hit and miss anyway during the dev phase i was in. I looked at iniDB but it couldn't handle (or I didn't know how to) get the virtualised units and logistics saved into it, objects were fine. Assuming you can get the Alive virtualised modules into a save state for IniDB, you already got this done, in which case, it looks like months later my dream has come true! I'd be interested to hear if you were looking at this scenario for your goal or there was another motivation behind the local saves? 1 Share this post Link to post Share on other sites
S.Crowe 142 Posted September 16, 2016 @pikey I made this for 4 reasons: War Room doesn't play nice with every server. War Room is slow - using my functions, you can save or load within a minute If you host a game, you can't save your progress, which is sad :( You can't save your game in single player (unless you run a local database) By the way, all of my saving and loading is through ALiVE functions. I just take the data and store it locally. The big thanks goes to the creator of iniDBI2. Future Goal Future goal is to support saving all ALiVE stuff (markers, sitreps, etc). I also, I want to support Ravage. Also want to add some special features of my own (saving item box inventories). The goal is to have a series of server side addons which you pick and choose (or you can use the script version). 3 Share this post Link to post Share on other sites
friznit2 350 Posted September 16, 2016 Really happy to see this finally coming together! A number of individuals have wanted more flexibility for persistence for a while so it's great that you have this working. @Pikey - sure we got it! It's just never been high on our list of priorities because we have focused our efforts on the War Room model. There are instructions on our github for setting up a local db using CouchDB, which will support all the normal ALiVE persistence locally. Share this post Link to post Share on other sites
tupolov 520 Posted September 16, 2016 To be honest, none of this is needed. We have always had the ability to save to a local DB, we've just never detailed how you achieve that. We did let Sean know this, but I guess he is keen on heading down this path - and there's no problem with that. The reason we chose not to support a local DB option is because of the PITA it is to support 1000+ groups of people trying to admin their own DB. Its much easier for us to support a non DB solution for you guys (i.e. a single central DB for us to manage). All you need is an internet connection and a config file. It makes our life easier and yours. Still, if you want a local DB solution, please go here https://github.com/ALiVEOS/ALiVE.OS/issues/97and vote it up! Cheers, Tup 1 Share this post Link to post Share on other sites
spyderblack723 407 Posted September 16, 2016 I'm not sure the team or others ever got why what you are doing is a good idea, so I thank you sincerely for attempting this! Keep in mind that A2 MSO utilized a local DB for saving. The ALiVE persistence monkeys know the benefits of a local DB, but they also know the downsides that it brings when it comes to support. They chose to migrate to an online database instead as it was easier and still fit the needs of the majority of the community. With that said, I think we all appreciate the work done here. And being on university WIFI now, it's possible I may need to contribute to this in the future :) 1 Share this post Link to post Share on other sites
S.Crowe 142 Posted September 16, 2016 We did let Sean know this, but I guess he is keen on heading down this path 2 Share this post Link to post Share on other sites
S.Crowe 142 Posted September 16, 2016 In all seriousness, the ALiVE team has been awesome. They are a great group of guys, and I thank them for their help and support. The fact you guys went open source deserves major gratitude from me and everyone else who plays Arma. Share this post Link to post Share on other sites
pikey 2 Posted September 19, 2016 I missed the Open Source launch and I know saying ALiVE doesn't have a certain feature is bound to cause defensiveness, you can do anything with technology. It was a complete project with highly defined scope with the intention to keep support manageable. When I was working out how to do this, I didn't have the time or the knowledge to invest to get ALiVE working in the different way I wanted it and I did spent a lot of posts on ALiVE forums trying to do that, and whilst the people there are lovely and helpful, yes, no one was going to do this for me. I got the information on how to call the saves from local, but I still had issues with persistence at that time so I dropped my attempt to use ALiVE for a 24/7 automated JIP campaign server. It was probably the straw that broke this camels back, I can think of a way to call it right now, I'll likely revisit it soon. So from this angle, someone making something more tailored helps people like me. I don't think it's reinventing the wheel, it's just relabelling it for a different use case. You still need a War Room account and registered IP for the local Couch implementation anyway, so there's morte than just one reason to embark on this. ALiVE has more potential than it realised, I think somewhere a boat was missed. 1 Share this post Link to post Share on other sites
S.Crowe 142 Posted September 19, 2016 Just in case anyone was wondering. You could create a constant saving function (in the below case every 30 minutes) in your mission by simply adding something like this to your init.sqfDoesn't take into account if a module is paused. SAVE_SETUP = false; [] spawn { if (isServer && !SAVE_STEP) then { SAVE_SETUP = true; while {true} then { sleep 1800; [] call NWR_fnc_saveVirPro; [] call NWR_fnc_saveMilLog; [] call NWR_fnc_saveMilObj; }; }; }; See a better version 3 post down Share this post Link to post Share on other sites
pikey 2 Posted September 21, 2016 So would this perhaps be better in the initServer.sqf if that still exists and the load functions in the init.sqf? So the mission starts, loads the last saved progress and then saves and overwrites every 1800? I've also got some questions on what exactly would get saved in the current functions and what is still left to do. Are you going to hybridise the IniDB functions on saving players and so on? I'm tempted to embark right now but not sure if I have enough peices yet! Share this post Link to post Share on other sites
S.Crowe 142 Posted September 21, 2016 @pikey So would this perhaps be better in the initServer.sqf Sure, put in it that file. I just offered a code snippet to show you want you can do. Trying to get ideas out there. would get saved in the current functions It tells you in the first post. The things that are saved atm are virtual profiles, military objectives, and military logistics. Those three are the most important, because they kinda make the mission the mission. A lot things are not saved yet: Markers Sitreps Spotreps Logistics (moving shit - not the military logistics) Player stats Honestly, you can live without most of those. The next on my list to do is Logistics, and then Markers. Also, remember this is WIP... for advance mission makers. Share this post Link to post Share on other sites
S.Crowe 142 Posted September 21, 2016 Here is a better version of the script I posted earlier. This one loads, and saves, and it pauses if no one is on server SAVE_SETUP = false; [] spawn { if (isServer && !SAVE_STEP) then { SAVE_SETUP = true; waitUntil {ALIVE_profileSystemInit}; sleep 20; [] call NWR_fnc_loadVirPro; [] call NWR_fnc_loadMilLog; [] call NWR_fnc_loadMilObj; "ALiVE Data Loaded" remoteExec ["hint", -2]; while {true} then { sleep 1800; _pause = false; // Pause saving if there are no players _allPlayers = []; { if (isPlayer _x) then { _allPlayers pushBack _x; }; } forEach playableUnits; if (count _allPlayers == 0) then { _pause = true; }; // End pause saving if (!_pause) then { [] call NWR_fnc_saveVirPro; [] call NWR_fnc_saveMilLog; [] call NWR_fnc_saveMilObj; //"ALiVE Data Saved" remoteExec ["hint", -2]; }; }; }; }; 2 Share this post Link to post Share on other sites
S.Crowe 142 Posted September 21, 2016 Update inbound (expect it before Friday): New things: Saving logistics (moving, as military is already saved) Share this post Link to post Share on other sites
pikey 2 Posted September 22, 2016 Looks great. Fighting the urge to get started before you release the logisitics part! Share this post Link to post Share on other sites
S.Crowe 142 Posted September 22, 2016 It should be done today. I'm waiting for my Arma to update before I finish it. 1 Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted September 22, 2016 So after this update, what would be left that War Room can do this this won't? Keep up the good work! Although I'm waiting to use it until it stores as close to what War Room does as possible before giving it a go, I am following and appreciate you putting in all this effort. Share this post Link to post Share on other sites
S.Crowe 142 Posted September 22, 2016 Need to finish: Markers Sitreps Spotreps Player Stats - like position, inventory, etc. 1 Share this post Link to post Share on other sites
pikey 2 Posted September 22, 2016 fwiw the script said 21:30:52 Error then: Undefined variable in expression: nwr_fnc_loadvirpro description.ext updated, NWR foler in the mission. I was runnign in MP from the eden editor if that makes any difference (not sure how it processes description.ext there. Share this post Link to post Share on other sites
Guest Posted September 23, 2016 Release frontpaged on the Armaholic homepage. No War Room v0.1 Share this post Link to post Share on other sites