Jump to content

Recommended Posts

Hey guys I need a little help with the Co-op Scenarios specifically I need help with saving players position and or progress once they rejoin the mission/server I believe the host is fine but the Clients are having an issue with not spawning where they left off but rather at one of the spawn points I have placed on map. Any help or direction would be Awesome. Thanks Yall

Share this post


Link to post
Share on other sites
13 hours ago, lv1234 said:

I think whenever we get a basebuilding mod/script working for ravage, then I won't mind the night.


What's the difference between using an existing structure to hide and using one you built yourself? It's quite complicated.

I have always wanted a basebuilding mod but I'm not into mods like EDN Fortification, where you just push a button and you can basically place any object out of thin air. We really need something closer to the Exile basebuilding system, where you need resources in order to build. In Exile you can chop down trees and you need a saw to make wood planks, etc. There is a reason that no solid basebuilding standalone mod exists for Arma 3 five years after it's release. A lot goes into basebuilding. You have to make sure that AI are able to properly navigate in and around the base. Otherwise zombies, AI and vehicles will be able to just drive through your base. You do not want AI being able to detect you hiding inside. You also need some sort of restriction system so you do not crash your server with too many objects placed or objects that are clipping into each other, etc. Too many Exile servers have giant penis bases where the people playing in the base just sit on top and try to snipe anyone within a 1000 meter radius. If there is a way to exploit these things people always do.

Unfortunately, almost no one in the community seems to know how to build a proper database for Ravage servers, so having a basebuilding option is pointless. I'm sure there are people who can do this, but I can't find a server with these features. From what I can tell... no one has even been able to create storage for Ravage servers. They are all using Exile or other systems for these things.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Gill93 said:

Hey guys I need a little help with the Co-op Scenarios specifically I need help with saving players position and or progress once they rejoin the mission/server I believe the host is fine but the Clients are having an issue with not spawning where they left off but rather at one of the spawn points I have placed on map. Any help or direction would be Awesome. Thanks Yall


Just enable MP persistency in the editor. It should save players current position on the map as well as whatever items or gear they have on them. Also make sure they are using the same character profile for Arma 3.

Share this post


Link to post
Share on other sites
26 minutes ago, Donnie_Plays said:


Just enable MP persistency in the editor. It should save players current position on the map as well as whatever items or gear they have on them. Also make sure they are using the same character profile for Arma 3.

Its weird I have the MP Persistency on but according to the host he spawns where he left off with same gear but when his friends try to join its says something like playername has been forced to respawn and then they have to choose a spawn point rather then just loading back where they left off. I will make sure to let them know to use the same profile aswell. I also added the script in the spoiler but have no clue if it works until someone triestesting it again.  I created a initServer.sqf and added the script to it but it might need to be added to init.sqf

Spoiler

TAG_fnc_loadClientData = {
 _this params ["_loadoutStr", "_positionASL", "_dir"];
 call compile _loadoutStr;
 player setDir _dir;
 player setPosASL _positionASL;
};

if(isServer) then {
 addMissionEventHandler [
  "HandleDisconnect",
  {
   params ["_body", "_id", "_uid", "_name"];
   
   if(!isNull _body) then {   
    //Init storage var
    if(isNil "TAG_disconnectedLoadouts") then {
     TAG_disconnectedLoadouts = [];
    };
    
    //Save loadout as script for easy broadcast
    private _loadoutStr = [player, "script", false] call BIS_fnc_exportInventory;
    {
     private _index = _loadoutStr find _x;
     if(_index > -1) then {
      private _strArray = toArray _loadoutStr;
      _strArray deleteRange [_index, count _x];
      _loadoutStr = toString _strArray;
     }; 
    } forEach ["// Remove existing items","// Add containers","// Add weapons", "// Add items", "// Set identity"];
     
    //Find in storage
    private _uidIndex = TAG_disconnectedLoadouts find _uid;
    if(_uidIndex > -1) then {
     //Found -> update
     private _loadoutIndex = _uidIndex + 1;
     TAG_disconnectedLoadouts set [_loadoutIndex, _loadoutStr];
    } else {
     //Not found -> Add new
     TAG_disconnectedLoadouts pushBack _uid;
     TAG_disconnectedLoadouts pushBack [_loadoutStr, getPosASL _body, getDir _body];
    };
   };
   false
  }
 ];

 addMissionEventHandler [
  "PlayerConnected",
  {
   params ["_id", "_uid", "_name", "_jip", "_owner"];
   if(_jip) then {
    private _clientData = missionNamespace getVariable ["TAG_disconnectedLoadouts", []];
    private _uidIndex = _clientData find _uid;
    if(_uidIndex > -1) then {
     private _loadoutIndex = _uidIndex + 1;
     (_clientData select _loadoutIndex) remoteExec ["TAG_fnc_loadClientData", _owner];
    };
   };
  }
 ];
};

 

Share this post


Link to post
Share on other sites
2 hours ago, Gill93 said:

Its weird I have the MP Persistency on but according to the host he spawns where he left off with same gear but when his friends try to join its says something like playername has been forced to respawn and then they have to choose a spawn point rather then just loading back where they left off. I will make sure to let them know to use the same profile aswell. I also added the script in the spoiler but have no clue if it works until someone triestesting it again.  I created a initServer.sqf and added the script to it but it might need to be added to init.sqf

  Reveal hidden contents

TAG_fnc_loadClientData = {
 _this params ["_loadoutStr", "_positionASL", "_dir"];
 call compile _loadoutStr;
 player setDir _dir;
 player setPosASL _positionASL;
};

if(isServer) then {
 addMissionEventHandler [
  "HandleDisconnect",
  {
   params ["_body", "_id", "_uid", "_name"];
   
   if(!isNull _body) then {   
    //Init storage var
    if(isNil "TAG_disconnectedLoadouts") then {
     TAG_disconnectedLoadouts = [];
    };
    
    //Save loadout as script for easy broadcast
    private _loadoutStr = [player, "script", false] call BIS_fnc_exportInventory;
    {
     private _index = _loadoutStr find _x;
     if(_index > -1) then {
      private _strArray = toArray _loadoutStr;
      _strArray deleteRange [_index, count _x];
      _loadoutStr = toString _strArray;
     }; 
    } forEach ["// Remove existing items","// Add containers","// Add weapons", "// Add items", "// Set identity"];
     
    //Find in storage
    private _uidIndex = TAG_disconnectedLoadouts find _uid;
    if(_uidIndex > -1) then {
     //Found -> update
     private _loadoutIndex = _uidIndex + 1;
     TAG_disconnectedLoadouts set [_loadoutIndex, _loadoutStr];
    } else {
     //Not found -> Add new
     TAG_disconnectedLoadouts pushBack _uid;
     TAG_disconnectedLoadouts pushBack [_loadoutStr, getPosASL _body, getDir _body];
    };
   };
   false
  }
 ];

 addMissionEventHandler [
  "PlayerConnected",
  {
   params ["_id", "_uid", "_name", "_jip", "_owner"];
   if(_jip) then {
    private _clientData = missionNamespace getVariable ["TAG_disconnectedLoadouts", []];
    private _uidIndex = _clientData find _uid;
    if(_uidIndex > -1) then {
     private _loadoutIndex = _uidIndex + 1;
     (_clientData select _loadoutIndex) remoteExec ["TAG_fnc_loadClientData", _owner];
    };
   };
  }
 ];
};

 


The issue sounds like it is related to how respawns are handled. How does the mission start? If you start out selecting your spawn position, there may be an issue where every new time you connect it is reverting to the start for clients. Something is restarting their connection, which is clearing their loadouts and re-assigning starting loadouts. That has to be respawn related.

Share this post


Link to post
Share on other sites

I intended for players to spawn at the camp I created and then later have the ability to choose a respawn point manually if they wanted after finding a map. If players died they would automatically respawn where they died after about 40 seconds and that was not really working out so I changed the multiplayer settings to respawn on custom position along with ticking the box that says choose respawn point its after doing so now the players have the ability to choose a spawn location when first starting. I am not exactly sure what to do so I just disabled the choose respawn location option should I leave it at respawn at custom location or disable that aswell but by doing so I don't think they would be able to respawn at all.

Share this post


Link to post
Share on other sites
7 hours ago, Donnie_Plays said:


What's the difference between using an existing structure to hide and using one you built yourself? It's quite complicated.

I have always wanted a basebuilding mod but I'm not into mods like EDN Fortification, where you just push a button and you can basically place any object out of thin air. We really need something closer to the Exile basebuilding system, where you need resources in order to build. In Exile you can chop down trees and you need a saw to make wood planks, etc. There is a reason that no solid basebuilding standalone mod exists for Arma 3 five years after it's release. A lot goes into basebuilding. You have to make sure that AI are able to properly navigate in and around the base. Otherwise zombies, AI and vehicles will be able to just drive through your base. You do not want AI being able to detect you hiding inside. You also need some sort of restriction system so you do not crash your server with too many objects placed or objects that are clipping into each other, etc. Too many Exile servers have giant penis bases where the people playing in the base just sit on top and try to snipe anyone within a 1000 meter radius. If there is a way to exploit these things people always do.

Unfortunately, almost no one in the community seems to know how to build a proper database for Ravage servers, so having a basebuilding option is pointless. I'm sure there are people who can do this, but I can't find a server with these features. From what I can tell... no one has even been able to create storage for Ravage servers. They are all using Exile or other systems for these things.

VD is planning on that already after seeing his works. He actually has you gather resources to build stuff rather building them out of thin air. He had a base building script that relied on edn fortifications but as of right now, he has chosen to abandon it due to it not working everytime you save and exit. Instead he is planning to build a new fresh basic and simple base building script that no longer relies on edn fortification. Gotta say it looks good so far.

 

I do gotta say though he should be careful about the ai and zombie "walking" through the structures though like you stated. 

Share this post


Link to post
Share on other sites

mind tho that my scripts are usually very simplistic. Having said that, i do indeed think its important that you gather the ressources (maybe for quite a while) and maybe refine them (e.g. woodblocks to wooden boards) for building a base - as this is part of the gameplay enhancements such a "basebuilding" features brings.

 

i personally do not like basebuilding in larger scale/competitive mp environements, for the reasons pointed out by donnie.

What I do like is the possibility to build a hideout and add the feature that you can gather materials on your journeys - but this is more in a sp or coop perspective. it may even have some sort of a roleplaying feature to it =)

indeed MP basebuilding usually fails because the players abuse it

13 hours ago, Donnie_Plays said:

If there is a way to exploit these things people always do.

 

I think the Z walking through structures issue is Arma given, as far as i know=(

 

as for my BB script - its a pain in the ass, i finally had some time yesterday to test some stuff with the BB script and after 3 hours i shut down arma because it annoyed me haha XD right now i think i ll have to keep it as simple as possible to ensure it works with multiple players.

My goal is a ressource and gathering system, a raw material - refining system, a placement, moving and removing system with multiple cool basic blueprints. if this works properly, enhancements may be looked at.

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, Vandeanson said:

indeed MP basebuilding usually fails because the players abuse it

Breaking Point has perfect MP bases - lockable houses. I'd like to improve it with visuals though: the more the house is reinforced, the more details are added to the outside look, so it's looking like a fortified base.

Overall, for MP, it is better to look forward an already existing MP mod, and slowly integrate survival/immersion features into it, don't see any problem in that. Apart from the thing, which you mentioned - most SP/Coop scripts are pretty simple, while MP persistance/database/dedicated server support things are much harder to work out.
You cannot simply copy-paste:)

As a fan of MP survival, I've chosen BP as a start, but I'd like to add SP-quality expirience to the mission. Maybe merge it with some Ravage modules.

  • Like 1

Share this post


Link to post
Share on other sites

@VD: just a quick shoot from the hip regarding the persistence and the problem of zeds walking thru your carefully crafted walls:

 

When I played around with my usual ALIVE-RAVAGE Combo I noticed that all those fences or boxes or whatever other objects wich had been pre-placed in editor and later been moved by the built-in logistics system of ALIVE would KEEP their zed-stopping capability even if transported to another location on the map.  So my quick and hacky idea is to place a few "simple objects/disable simulation treated" fortification parts in warehouses or in a remote location on a platform in the sea and have them teleported to the player if he collected enough of the "raw materials" or "ressources" necessary to build that kind of object. This object can then be used for an actual working fortification. 

 

Hope there are better ways to get that done in a performance-friendly way - or you come up with something entirely different, but I just wanted to give my 2 ct. on this.

 

Regards & Keep up your coding magic

 

tourist

  • Like 1

Share this post


Link to post
Share on other sites

thanks @tourist

 

thanks for the input, i am always happy for suggestions or ideas from various directions, it keeps creativity up:)

 

in the past, placement with the edn mod code has blocked AI from walking through structures in my testing. will look out for issues with it during my testing of the new script tho.

 

cheers

vd

 

 

Share this post


Link to post
Share on other sites

I have made some significant progress with the Breaking Point Addons mod that I released on workshop. I have managed to get a custom inventory UI to work in game as well as a custom main menu screen for BPA. Ravage is the backbone of the missions. I've probably spent the last month trying to figure out how to make a custom main menu. Have been banging my head against the wall. The custom intro and main menu only properly works when the malden intro world loads. It seems to default to Tanoa.

Here is the mod link...
https://steamcommunity.com/sharedfiles/filedetails/?id=1369729654
There is a photo on my workshop page. You can see what the main menu looks like when the correct world loads.

How can I get this main menu to load and specifically call for Malden as the intro and world? I know Ravage uses custom intros.

@Haleks... how do you get Ravage to bypass the default Tanoa main menu?

Share this post


Link to post
Share on other sites
8 hours ago, Donnie_Plays said:

@Haleks... how do you get Ravage to bypass the default Tanoa main menu?

 

I'm not sure about custom menus, but it looks like they are scripted inside the intro-cutscene?

 

Here's a config sample showing how to define your own intro cutscenes for different terrains :

class CfgPatches {
	class rvg_missions {
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Map_Stratis", "A3_Map_Altis", "ravage"};
		author = "Haleks";
	};
};

class cfgWorlds {
	class CAWorld;
	class Stratis: CAWorld {
		cutscenes[] = {"Stratis_intro_rvg"};
	};
	class Altis: CAWorld {
		cutscenes[] = {"Altis_intro_rvg"};
	};
};
class CfgMissions {
	class Cutscenes {
		class Stratis_intro_rvg {
			directory = "rvg_missions\scenes\rvg_scene.Stratis";
		};
		class Altis_intro_rvg {
			directory = "rvg_missions\scenes\rvg_scene.Altis";
		};
	};
};

From there I suppose you just have to replicate the custom menu code for each intro cutscene/mission.

  • Like 2

Share this post


Link to post
Share on other sites

The main menu edits are all working for me. My problem is ever since APEX came out, the main menu background world defaults to Tanoa instead of Malden when players connect who have APEX. I have already created the CfgPatches, World and Missions. I can get my main menu to work if the Malden world loads by default. I can create one for Tanoa and put it in the mod, but I'm pretty sure if I put Tanoa on listed required addons it's going to keep people from playing who do not have APEX as it will create a dependency.

I know there is a startup parameter in the Arma launcher that can set a specific world to load for the main menu. Is anyone aware of a way to run this parameter for players via scripting in my config or another way in the mod?

Share this post


Link to post
Share on other sites
7 hours ago, Donnie_Plays said:

I know there is a startup parameter in the Arma launcher that can set a specific world to load for the main menu. Is anyone aware of a way to run this parameter for players via scripting in my config or another way in the mod?

 

Great question. I've always wanted to do this, but never had a reason to. Yes, you can code this - and it's not complicated.

 

You basically make an intro in the editor, save it with the right name and then create initIntro.sqf, which is just a simple file with the world name and some co-ordinates

 

Have a look at this wiki page for details:

https://community.bistudio.com/wiki/Arma_3_Main_Menu

  • Like 1

Share this post


Link to post
Share on other sites
33 minutes ago, kodabar said:

Great question. I've always wanted to do this, but never had a reason to. Yes, you can code this - and it's not complicated.

You basically make an intro in the editor, save it with the right name and then create initIntro.sqf, which is just a simple file with the world name and some co-ordinates

Have a look at this wiki page for details:

https://community.bistudio.com/wiki/Arma_3_Main_Menu


I actually already did this. I'm basically using the same code that Haleks is using for Ravage. I have actually tried various forms of very similar code. I am able to get everything to work if players set "Malden" as their world in the parameters. Unfortunately, for whatever reason the main menu still defaults to Tanoa, regardless of what I do with the script. I even tried using the same code BI uses and directing the path to Malden, but it simply does not work. I have spent the last month working on this. I have researched various sources. I can't get a good answer.

Share this post


Link to post
Share on other sites
1 hour ago, Donnie_Plays said:

I actually already did this

 

Ah, bother. Plus I didn't realise they only introduced the current form of altering the main menu in the Apex release, so it's doubly ineffectual.

Share this post


Link to post
Share on other sites
On 26/11/2018 at 4:19 PM, Donnie_Plays said:

Unfortunately, almost no one in the community seems to know how to build a proper database for Ravage servers, so having a basebuilding option is pointless.

Grad persistence its easy to use, that not require an external database and it can save vehicle, cargo and static object this script is perfect for make a persistent Ravage with base building on dedicated server.

The only issue with that script + Ravage, the ravage vehicle module can`t be used cause on each server restart the script will save every vehicle on the map and ravage module will create new vehicle, so after few server restart there will be too much empty vehicle on the server.

 

Grad persistence + Ravage persistence character its the best way to set up easely a persistent server, it will save vehicle and vehicle cargo, tent and tent cargo.

  • Like 4

Share this post


Link to post
Share on other sites
On 26/11/2018 at 9:04 PM, Gill93 said:

I intended for players to spawn at the camp I created and then later have the ability to choose a respawn point manually if they wanted after finding a map. If players died they would automatically respawn where they died after about 40 seconds and that was not really working out so I changed the multiplayer settings to respawn on custom position along with ticking the box that says choose respawn point its after doing so now the players have the ability to choose a spawn location when first starting. I am not exactly sure what to do so I just disabled the choose respawn location option should I leave it at respawn at custom location or disable that aswell but by doing so I don't think they would be able to respawn at all.

add this in your description.ext :

respawnOnStart = 0;

Share this post


Link to post
Share on other sites
On 27/11/2018 at 5:37 AM, Vandeanson said:

My goal is a ressource and gathering system, a raw material - refining system, a placement, moving and removing system with multiple cool basic blueprints. if this works properly, enhancements may be looked at

You can just focus on the ressource and gathering system... and use R3F logistic scriptto be able to move the static object...

Share this post


Link to post
Share on other sites
7 hours ago, damsous said:

You can just focus on the ressource and gathering system... and use R3F logistic scriptto be able to move the static object...

its ok i got the moving objects bit covered:)

Share this post


Link to post
Share on other sites
13 hours ago, damsous said:

You can just focus on the ressource and gathering system... and use R3F logistic scriptto be able to move the static object...

5 hours ago, Vandeanson said:

its ok i got the moving objects bit covered:)

 

I agree with Damsous. R3F works great and I use it on every mission! Will save you lots of time that you can focus on other things!

 

By the way have you seen this before? https://forums.bohemia.net/forums/topic/189405-arma-3-underground/

Share this post


Link to post
Share on other sites
13 hours ago, damsous said:

The only issue with that script + Ravage, the ravage vehicle module can`t be used cause on each server restart the script will save every vehicle on the map and ravage module will create new vehicle, so after few server restart there will be too much empty vehicle on the server.

 

Grad persistence + Ravage persistence character its the best way to set up easely a persistent server, it will save vehicle and vehicle cargo, tent and tent cargo.

 

Great tip! Thanks! I want to start using Grad Persistance in my mission. 

 

How did you resolve the vehicles issue? You disabled vehicle saving/loading in Grad Persistance? How did you do that?

Share this post


Link to post
Share on other sites
37 minutes ago, LSValmont said:

How did you resolve the vehicles issue? You disabled vehicle saving/loading in Grad Persistance? How did you do that?

 this is my exemple in description to not save editor placed object this feature is broken i think that duplicate the object :

 

class CfgGradPersistence {
    missionTag = "rvgaltis";
    loadOnMissionStart = 1;
    missionWaitCondition = "true";
    playerWaitCondition = "false";
    saveUnits = 0;
    saveVehicles = 1;
    saveStatics = 1;
    savePlayerInventory = 0;
    savePlayerDamage = 0;
    savePlayerPosition = 0;
    savePlayerMoney = 0;
    saveTeamAccounts = 0;
};

 

If you use the ravage vehicle module put it on lowest spawn rate, and use only empty vehicle (no wreck) to avoid too much wreck on the road, disable also AI vehicle patrol.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×