Grahame Posted March 18, 2018 Report Share Posted March 18, 2018 Another class of item added to EpochCore client-side in 1.1 are deployable sleeping bags. Here is the code for placing them and a suggestion (and code) for actually making use of them to provide greater flexibility at respawn for your players. Installation Instructions (1) Add the sleeping bag "kits" to your loot tables and trader price lists. The class names are KitSleepingBagGreen, KitSleepingBagBlue and KitSleepingBagBrown (2) Add the following to epoch_config/Configs/CfgItemInteractions.hpp: class KitSleepingBagGreen : Item_Build_base { buildClass = "SleepingBagGreen_SIM_EPOCH"; }; class KitSleepingBagBlue : Item_Build_base { buildClass = "SleepingBagBlue_SIM_EPOCH"; }; class KitSleepingBagBrown : Item_Build_base { buildClass = "SleepingBagBrown_SIM_EPOCH"; }; (3) Add the following to epoch_config/Configs/CfgBaseBuilding.hpp: class SleepingBagGreen_EPOCH : Default { removeParts[] = {{"KitSleepingBagGreen",1}}; GhostPreview = "SleepingBagGreen_Ghost_EPOCH"; staticClass = "SleepingBagGreen_EPOCH"; simulClass = "SleepingBagGreen_SIM_EPOCH"; bypassJammer = 1; }; class SleepingBagGreen_SIM_EPOCH : SleepingBagGreen_EPOCH { removeParts[] = {}; }; class SleepingBagGreen_Ghost_EPOCH : SleepingBagGreen_SIM_EPOCH {}; class SleepingBagBlue_EPOCH : Default { removeParts[] = {{"KitSleepingBagBlue",1}}; GhostPreview = "SleepingBagBlue_Ghost_EPOCH"; staticClass = "SleepingBagBlue_EPOCH"; simulClass = "SleepingBagBlue_SIM_EPOCH"; bypassJammer = 1; }; class SleepingBagBlue_SIM_EPOCH : SleepingBagBlue_EPOCH { removeParts[] = {}; }; class SleepingBagBlue_Ghost_EPOCH : SleepingBagBlue_SIM_EPOCH {}; class SleepingBagBrown_EPOCH : Default { removeParts[] = {{"KitSleepingBagBrown",1}}; GhostPreview = "SleepingBagBrown_Ghost_EPOCH"; staticClass = "SleepingBagBrown_EPOCH"; simulClass = "SleepingBagBrown_SIM_EPOCH"; bypassJammer = 1; }; class SleepingBagBrown_SIM_EPOCH : SleepingBagBrown_EPOCH { removeParts[] = {}; }; class SleepingBagBrown_Ghost_EPOCH : SleepingBagBrown_SIM_EPOCH {}; So, at this point you can place sleeping bags and they look pretty nice, but what's the point. Well, say for example that you would like to seal your jammer away in a dark place in your base but don't want to respawn in that room, but do want to respawn somewhere in a base; or perhaps you are doing a mission or you're off hunting heroes and don't want to make your way from the coast all over again... well, you can set sleeping bags to be spawn points too! (4) Change the definition for the select_jammer class in epoch_config/Configs/CfgActionMenu/cfgActionMenu_target.hpp to: class select_jammer { condition = "((dyna_cursorTargetType isEqualTo 'PlotPole_EPOCH') || (dyna_cursorTargetType isEqualTo 'SleepingBagGreen_EPOCH') || (dyna_cursorTargetType isEqualTo 'SleepingBagBlue_EPOCH') || (dyna_cursorTargetType isEqualTo 'SleepingBagBrown_EPOCH')) && (damage dyna_cursorTarget < 1)"; action = "[dyna_cursorTarget,player,Epoch_personalToken] remoteExec [""EPOCH_server_makeSP"",2];"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\player_inspect.paa"; tooltip = "Make Spawnpoint"; }; RePBO your mission file and upload it to the server. (5) Now unpack epoch_server.pbo. There is one file in there that needs a change which is compile/epoch_player/EPOCH_server_loadPlayer.sqf. Change line 145 from: _jammers = nearestObjects[_CheckLocation, ["PlotPole_EPOCH"], 6]; to: _jammers = nearestObjects[_CheckLocation, ["PlotPole_EPOCH","SleepingBagGreen_EPOCH","SleepingBagBlue_EPOCH","SleepingBagBrown_EPOCH"], 6]; RePBO epoch_server.pbo and upload to your server. You now have sleeping bags that can be built anywhere and used as respawn points. Be aware though! Anyone can pick yours up in the wild (as they should be able to) and you will no longer spawn at its location! (Optional 6) Also note that should you give these as starting gear you may want to add energy to a player at spawn by changing the energy entry in the CustomVarsDefaults array in epoch_config/CfgEpochClient.hpp to something like the following (which gives 1250 energy to a new spawned player): {"Energy",1250,{2500,0}}, Tarabas, Drokz, Razor1977 and 2 others 5 Link to comment Share on other sites More sharing options...
Tarabas Posted March 18, 2018 Report Share Posted March 18, 2018 Working great :) Thank you @Grahame Link to comment Share on other sites More sharing options...
Sneer Posted March 19, 2018 Report Share Posted March 19, 2018 Can you refresh my memory on how to add to loot tables? Link to comment Share on other sites More sharing options...
Grahame Posted March 19, 2018 Author Report Share Posted March 19, 2018 For vanilla Epoch you would need to edit one of the CfgLootTable files in epoch_server_settings. Can provide more info if you need it when I get home Link to comment Share on other sites More sharing options...
Sneer Posted March 20, 2018 Report Share Posted March 20, 2018 What do the numbers mean in CfgLootTable.h and somethings are classified magazine or CfgLootTable. Link to comment Share on other sites More sharing options...
Grahame Posted March 20, 2018 Author Report Share Posted March 20, 2018 I will do something more detailed tomorrow but the numbers are the weighted percentage of an item and the items should be magazines. CfgLootTable means a subtable that is subsequently called. Link to comment Share on other sites More sharing options...
BlackhatEspeed Posted July 22, 2018 Report Share Posted July 22, 2018 Thank you so much for this script, it only makes sense for base building! My server is not starting after installing this script for 1.2. WATCHDOG (3119): [Sun Jul 22 08:47:32 UTC 2018] Starting server (port 2302)... 8:47:32 Could not enable linux core dumps. Error 1 - 8:47:32 SteamAPI initialization failed. Steam features won't be accessible! 8:47:32 Cannot register unknown string STR_3DEN_CAMERA_NAME 8:47:32 Cannot register unknown string STR_DIFF_SCENE_ONLY 8:47:32 Cannot register unknown string STR_DIFF_SCENE_AND_MAP 8:47:32 Initializing stats manager. 8:47:32 Stats config disabled. 8:47:32 sessionID: 994ff4cf491f4543550f75692a99377c592dc023 8:47:38 Unsupported language English in stringtable 8:47:38 Item str_a3_to_c01_m02_036_ta_mechanized_briefing_SOLDIERC_0 listed twice ErrorMessage: File epoch_server_settings\configs\CfgLootTable.h, line 202: Config: '{' encountered instead of ',' Application terminated intentionally 8:47:40 ../lib/Network/networkServer.cpp ClearNetServer:NOT IMPLEMENTED - briefing! File epoch_server_settings\configs\CfgLootTable.h, line 202: Config: '{' encountered instead of ',' 8:47:40 Critical:Destroying running thread! 8:47:40 Critical:Destroying running thread! 8:47:40 Critical:Destroying running thread! 8:47:40 Extensions: WATCHDOG (3119): [Sun Jul 22 08:47:40 UTC 2018] Server died, waiting to restart... Link to comment Share on other sites More sharing options...
Grahame Posted July 22, 2018 Author Report Share Posted July 22, 2018 You have a separate issue in your CfgLootTable.h... ErrorMessage: File epoch_server_settings\configs\CfgLootTable.h, line 202: Config: '{' encountered instead of ',' Application terminated intentionally That's what preventing the server from coming online. What did you add there? The sleeping bags I assume. Link to comment Share on other sites More sharing options...
BlackhatEspeed Posted July 22, 2018 Report Share Posted July 22, 2018 7 hours ago, Grahame said: You have a separate issue in your CfgLootTable.h... ErrorMessage: File epoch_server_settings\configs\CfgLootTable.h, line 202: Config: '{' encountered instead of ',' Application terminated intentionally That's what preventing the server from coming online. What did you add there? The sleeping bags I assume. Yes, I tried to add them, essentially anything I tried to add from your step 1 crashed the server, if you could be so kind as to let us know how you added your Sleeping Bags to the loot tables and spawn tables that would be awesome. In addition, I'm also getting an error message when I try to connect to the server. "Authentication Failed" after a bunch of errors. I'm going to remove all the edits 1 by 1, and then try to start the server again. Then add them back with your edits for step 1. EDIT: I have since got the server to start after removing all the edits and adding all the steps back, but the server starts but I cannot connect to it. The game type has a - in it and the logs look like. After reviewing all the logs problems and it seems that I'm having problems with step 3, where exactly do you put the information in that. I've pretty much fixed everything else, the server is now starting but it's loading me into a black screen I'm guessing because step 3 is not installed. It Gives me an "authentication failed" and kicks me from the server. It now looks as if step 5 is causing this problem. 18:38:52 "CfgEpochCoreServerFunctions" 18:38:52 "Epoch: Advanced Vehicle Repair Enabled" 18:38:52 "Loading Functions: CfgServerFunctions" 18:38:52 Error in expression <Location; }; _jammers = nearestObjects[_CheckLocation, ["PlotPole_EPOCH","Sle> 18:38:52 Error position: <CheckLocation, ["PlotPole_EPOCH","Sle> 18:38:52 Error Missing ] 18:38:52 File epoch_server\compile\epoch_player\EPOCH_server_loadPlayer.sqf, line 146 18:38:52 Error in expression <Location; }; _jammers = nearestObjects[_CheckLocation, ["PlotPole_EPOCH","Sle> 18:38:52 Error position: <CheckLocation, ["PlotPole_EPOCH","Sle> 18:38:52 Error Missing ] 18:38:52 File epoch_server\compile\epoch_player\EPOCH_server_loadPlayer.sqf, line 146 18:38:52 Mission read. 18:38:52 Connected to Steam servers 18:38:52 "Epoch: Starting ArmA3 Epoch Server, Version 1.2.0. Note: If server crashes directly after this point check that Redis is running and the connection info is correct." 18:38:52 CallExtension loaded: epochserver (/home/epoch/arma3/@epochhive/epochserver.so) [] I was able to get the server working though, without this step. EDIT: I was able to get the server started with all the scripts in your post, but whenever I try to build a sleeping bag I get Building Disallowed Frequency Jammer Needed, I built a jammer and was able to place the sleeping bag next to it. I ran off in a field and committed suicide with a grenade and it didn't spawn me at my sleeping bag it spawned me back at the spawn tubes. I have successfully got it working, I see where you use the jammer to set the spawnpoint nice! Link to comment Share on other sites More sharing options...
BlackhatEspeed Posted August 14, 2018 Report Share Posted August 14, 2018 I have a question, when trying to place a sleeping bag it says frequency jammer required, is this part of the script or is it supposed to be place able without one? Thanks. Link to comment Share on other sites More sharing options...
Grahame Posted August 14, 2018 Author Report Share Posted August 14, 2018 Make sure that this line is there for all the bags in CfgBaseBuilding,hpp: bypassJammer = 1; BlackhatEspeed 1 Link to comment Share on other sites More sharing options...
BlackhatEspeed Posted August 21, 2018 Report Share Posted August 21, 2018 On 8/14/2018 at 10:18 AM, Grahame said: Make sure that this line is there for all the bags in CfgBaseBuilding,hpp: bypassJammer = 1; Solution. Link to comment Share on other sites More sharing options...
Sneer Posted January 24, 2019 Report Share Posted January 24, 2019 FYI Step 2 and step 5 there are issues with copying and pasting. If you manually type those lines out then its fine. Grahame 1 Link to comment Share on other sites More sharing options...
Grahame Posted February 2, 2019 Author Report Share Posted February 2, 2019 I have seen this issue with the code snippets... something in the forum software is adding non-printable characters... Link to comment Share on other sites More sharing options...
Tarabas Posted August 21, 2019 Report Share Posted August 21, 2019 How to add Sleeping bags to new Jammerclasses, in compile/epoch_player/EPOCH_server_loadPlayer.sqf ? _jammers = nearestObjects[_CheckLocation, call EPOCH_JammerClasses, 6]; Link to comment Share on other sites More sharing options...
He-Man Posted August 22, 2019 Report Share Posted August 22, 2019 _jammers = nearestObjects[_CheckLocation, ["PlotPole_EPOCH","SleepingBagGreen_EPOCH","SleepingBagBlue_EPOCH","SleepingBagBrown_EPOCH"], 6]; This should still work."call EPOCH_JammerClasses" is only needed, when you have defined other types than the default Jammers as PlotPoles. But you can also use: _jammers = nearestObjects[_CheckLocation, call EPOCH_JammerClasses + ["SleepingBagGreen_EPOCH","SleepingBagBlue_EPOCH","SleepingBagBrown_EPOCH"], 6]; @Tarabas Tarabas 1 Link to comment Share on other sites More sharing options...
YakkyDoo Posted August 10, 2020 Report Share Posted August 10, 2020 Hi is there anyway to make this work for arma2 ?? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now