Jump to content

Hogs Respawn System - A long series of tubes


hogscraper

Recommended Posts

You may not know this but, when you spawn into the cloning area, the pedestals you use to leave are actually manhole covers. The recent earthquakes hitting Altis have scrambled the tubes and tunnels underneath the island! Sanitation, old utilities, cartel mule tunnels, they've all gotten mixed up somehow. Now when you leave the spawn area, you never know which tunnel you'll end up coming out of! Nearly 320 different tunnel exits have been noted so far! 

 

This will be a how to rather than a file dump as I'm still not clear on what epoch files they are cool with being posted. So my easy out was to edit the server settings pbo.

 

I came up with this idea after talking with forum user Havoc302. He wanted to get rid of safezones and find a way to disperse players at random points. Since I didn't know which files in Epoch controlled all of the setpos calls from spawn teleporters I didn't want to even bother with that route since it could involve core epoch files. I decided that a trigger under the ocean would serve well as a layover point. When a player uses one of the teleport pads at the epoch spawn, they will be sent to a trigger in the ocean that will in turn run the sqf that chooses where the players go. I wanted to mention this as there is a less than a second time period where players will be looking at the bottom of the ocean before being sent to the correct destination. I have code to black out the screen, but since I have to let epoch do the teleporting first, it could still be on screen if the player or server are laggy.  

 

1. Unpacking, editing and repacking the server settings pbo

 

Download a pbo unpacker if you don't already have one. I use Mikero's tools for unpacking and PBO Manger to repack. You don't need PBO Manger, I just like that the right click option works well in most situations so I will write this assuming you have both tools. Mikero's is quite a few programs so take your time, go through the readme in the root directory and install all of his tools somewhere on the pc you use to write code. These tools are a must for any server admin who wants to make something different from all of the cut and paste servers out there. 

 

http://dev.withsix.com/projects/mikero-pbodll/files

http://www.armaholic.com/page.php?id=16369

 

Find your Arma 3 directory then go to @EpochHive\Addons\. After installing PBO Manager you will now have a right-click, context sensitive menu for pbo files. Right click a3_epoch_server_settings.pbo and choose PBO Manger>>Extract to a3_epoch_server_settings\

 

Inside the folder that was just created, find and open config.cpp

 

Around line 245 you will find telePos[]. This array holds all of the start and end points of the three teleporter pads. The positions on the right are the destinations so edit each one like this:

{200, 200, 0.1 } }, // Trader city 1

Make all three of them go to the same {200,200,0.1} location and save that file.

 

Navigate back to the Addons folder and delete the original a3_epoch_server_settings.pbo.

 

Right click the a3_epoch_server_settings folder and choose PBO Manger>>pack into "a3_epoch_server_settings.pbo"

 

Now, when your server loads, it will send the same coordinates to epoch code whenever a player uses the teleporter pads at the central spawn.

 

2. Adding a trigger to your mission.sqm 

 

Here is where PBO Manager fails:( Some pbo's have compressed files inside and I find Mikero's tools in many cases where PBO Manager does not.

 

Navigate to your Arma 3\MPMissions folder and leave that window open.

 

Open another window and navigate to the folder where you installed Mikero's tools. Inside that folder look for DePboTools\bin\.

 

Drag the epoch.Altis.pbo from your MPMissions folder and directly onto ExtractPbo.exe in the bin\ folder. This will create a folder in your \bin called epoch.Altis\.

 

Delete the original pbo from your MPMissions folder then cut and paste your new epoch.Altis folder into MPMissions. Since it is named the same thing, your config will still load this mission

if you choose not to repack it when you're finished with this tutorial.

 

Inside epoch.Altis you need to find and open mission.sqm. 

 

Inside this file, look for the end of the Markers section around line 2100. After the final }; of that section insert the following code:

class Sensors
{
items=1;
class Item0
{
position[]={200,-185.97,200};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="player_spawn_bump";
expActiv="[] execvm ""custom\player_spawn_mover.sqf"";";
class Effects
{
};
};
};

Save and close this file. 

 

3. Create and fill player_spawn_mover.sqf

 

Inside your epoch_Altis\ folder create a new folder and name it

custom

 

Inside Arma 3\MPMissions\epoch.Altis\custom\ create a new file and name it

player_spawn_mover.sqf

 

Open that new file and paste the following code inside of it

 

if(!isServer)then{
titleCut ["", "BLACK FADED", 999];
_temp_locations=[
[20748,6726.75,0.1],
[21631.6,7593.58,0.1],
[18470.2,8170.48,0.1],
[20603.1,8803.3,0.1],
[14884,11099.2,0.1],
[17138.6,11473.9,0.1],
[21446.5,10915.9,0.1],
[20024.2,11627.7,0.1],
[16624.6,12560.9,0.1],
[16856.4,12485.3,0.1],
[17142,12920.5,0.1],
[19239.7,13245,0.1],
[19502.2,13410.8,0.1],
[22386.9,13595.6,0.1],
[21557,14072.5,0.1],
[19340.8,14415.3,0.1],
[18299.1,14093.1,0.1],
[17417,13352.3,0.1],
[22309.9,15384.6,0.1],
[21343.9,15344,0.1],
[20658.3,15587.7,0.1],
[19327.8,15402.8,0.1],
[18071.9,15753.6,0.1],
[17871,15239.2,0.1],
[18296.5,15153.9,0.1],
[24128.2,15656.9,0.1],
[23948.7,15885.2,0.1],
[22133.1,15874,0.1],
[23788.1,16440.8,0.1],
[23436.6,16634.3,0.1],
[22377.2,16305,0.1],
[22138.5,16848,0.1],
[21545.3,16495.1,0.1],
[21470.7,16261.6,0.1],
[21197.1,16452.9,0.1],
[21146.2,16846.7,0.1],
[20538.1,16105,0.1],
[19937.5,16830.6,0.1],
[19182.7,16050.4,0.1],
[18624.4,16490.2,0.1],
[19055.9,16734.9,0.1],
[19167.8,16962.3,0.1],
[17518.9,16620.6,0.1],
[16748,16136.1,0.1],
[16675.9,16372.1,0.1],
[15950.8,16436.4,0.1],
[16334,16870.9,0.1],
[15936.6,17257.4,0.1],
[16608.5,17463.9,0.1],
[17177.1,17265.8,0.1],
[17811.6,17739.9,0.1],
[18358.7,17149.9,0.1],
[18880.9,17665.1,0.1],
[19171.3,17659.8,0.1],
[19841.5,17439.7,0.1],
[20091.6,17735.9,0.1],
[20962.6,17335.9,0.1],
[21427.3,17193.6,0.1],
[22225.6,17857.6,0.1],
[22727,17214.5,0.1],
[22899.1,18856.6,0.1],
[22245,18307.5,0.1],
[21343.1,18749.6,0.1],
[21457.2,18118.6,0.1],
[20762.1,18386,0.1],
[20079.5,18082.9,0.1],
[19756.9,18730,0.1],
[19049.3,18054.4,0.1],
[17754,18027.2,0.1],
[18468.7,18014.7,0.1],
[18923.2,18357,0.1],
[19375.9,19316,0.1],
[20097.8,19808.1,0.1],
[20382.9,19205.5,0.1],
[20824.9,19399.8,0.1],
[21550.3,19405.2,0.1],
[22197.3,19834.8,0.1],
[22846.1,19087.9,0.1],
[23108.1,19834.8,0.1],
[23790.7,19756.4,0.1],
[24355.7,19710,0.1],
[24853,19553.1,0.1],
[25325.3,19193,0.1],
[25467.9,19708.2,0.1],
[27374.9,20884.8,0.1],
[26783.2,20793.9,0.1],
[26095.3,20658.4,0.1],
[25811.9,20239.5,0.1],
[25277.2,20316.1,0.1],
[25090,20831.3,0.1],
[24471.6,20827.7,0.1],
[24491.2,20287.6,0.1],
[23653.5,20811.7,0.1],
[23225.7,20540.7,0.1],
[23311.3,20023.8,0.1],
[22470.1,20111.1,0.1],
[22475.4,20571,0.1],
[20666.4,20262.6,0.1],
[20185.2,20114.7,0.1],
[27823.8,21591.5,0.1],
[27148.8,21468.2,0.1],
[26483.3,21703.8,0.1],
[26582.9,21218.4,0.1],
[25893.6,21422.3,0.1],
[25495.3,21561.5,0.1],
[25482.6,21063.4,0.1],
[25082.7,21754.4,0.1],
[24546.8,21868.2,0.1],
[24347.7,21269,0.1],
[23528.8,21727.5,0.1],
[23128.9,21112.5,0.1],
[22419.1,21148.8,0.1],
[21820,21136.2,0.1],
[22773.4,22292.8,0.1],
[23293.5,22194.8,0.1],
[23633.3,22737.1,0.1],
[24491.7,22534.7,0.1],
[25368.6,22239.8,0.1],
[25750.4,22732.3,0.1],
[26618.5,22201.6,0.1],
[26911.9,22957.4,0.1],
[27494.7,22543.3,0.1],
[27225.4,23063.9,0.1],
[26785.3,23512.1,0.1],
[26045.8,23343.3,0.1],
[25336.4,23160.4,0.1],
[24498.4,23104.1,0.1],
[24215.1,23881.9,0.1],
[23668.5,23628.7,0.1],
[23863.6,24239.1,0.1],
[26805,24357.3,0.1],
[27563.6,24940.6,0.1],
[12612,7068.36,0.1],
[11470.6,7152.78,0.1],
[9205.79,7717.57,0.1],
[9479.09,8481.34,0.1],
[11358,8702.43,0.1],
[12394.9,9259.18,0.1],
[11317.8,9534.54,0.1],
[10138.2,10181.7,0.1],
[10907.2,10875.6,0.1],
[8205.15,10097,0.1],
[8431.5,10803.8,0.1],
[9499.11,10966,0.1],
[6154.51,10901,0.1],
[6047.02,10319.3,0.1],
[5034.53,10737.4,0.1],
[5557.76,10363.7,0.1],
[4770.42,9892.74,0.1],
[4624.27,10245.6,0.1],
[4479.91,10823.1,0.1],
[3719.18,10682.4,0.1],
[3615.7,10282.1,0.1],
[2866.51,10014,0.1],
[3432.88,11779.4,0.1],
[3905.13,11285,0.1],
[4153.81,11965.8,0.1],
[4303.03,11624.3,0.1],
[4907.89,11271.9,0.1],
[5087.72,11027.9,0.1],
[5459.39,11343.3,0.1],
[5844.37,11778.2,0.1],
[6459.26,11188.2,0.1],
[6835.33,11753.2,0.1],
[7275.56,11403.9,0.1],
[7820.95,11667.7,0.1],
[8197.02,11592.8,0.1],
[8954.5,11469.8,0.1],
[8788.75,11963.5,0.1],
[9345.82,11978.6,0.1],
[9802.88,11570.9,0.1],
[10194.7,11401.9,0.1],
[10847.9,11336.7,0.1],
[11218.6,11532.8,0.1],
[11735.7,12097.4,0.1],
[12372.4,12720.5,0.1],
[11299.5,12659.9,0.1],
[10829.2,12253.4,0.1],
[10340.1,12239.7,0.1],
[9472.34,12598.7,0.1],
[9280.71,12049.4,0.1],
[7197.22,12330.2,0.1],
[6691.37,12761.7,0.1],
[5679.68,12278,0.1],
[4868.75,12652.6,0.1],
[4136.85,12693.7,0.1],
[3381.25,12233.7,0.1],
[3591.49,12647.9,0.1],
[3798.29,13345.1,0.1],
[3799.11,13929.1,0.1],
[4225.12,13656.2,0.1],
[4707.08,13457.8,0.1],
[5371.56,13338.7,0.1],
[6558.35,13687.9,0.1],
[7487.96,13540.1,0.1],
[8773.76,13121.7,0.1],
[9609.74,13678.3,0.1],
[10678.8,13143.8,0.1],
[10865.7,13640.1,0.1],
[11319.9,13443.2,0.1],
[11934.8,13875.2,0.1],
[12857.2,13461.3,0.1],
[13123.7,14918.7,0.1],
[12464.3,14651.4,0.1],
[12039.2,14095.1,0.1],
[11555.5,14265.2,0.1],
[10888.4,14524.5,0.1],
[9310.88,14590.8,0.1],
[8189.55,14546.6,0.1],
[7305.35,14496.3,0.1],
[6159.9,14624.9,0.1],
[5452.54,14657.1,0.1],
[3471.12,14363.7,0.1],
[4506.04,14691.2,0.1],
[4698.96,15665.9,0.1],
[5701.73,15479,0.1],
[6457.32,15754.3,0.1],
[7572.62,15147.4,0.1],
[8490.98,15388.6,0.1],
[9509.82,15694,0.1],
[10474.4,15374.5,0.1],
[11788.7,15907,0.1],
[12582.4,15479,0.1],
[13697.7,15408.7,0.1],
[14089.3,15984.7,0.1],
[14124.7,16862.2,0.1],
[13263.8,16914.4,0.1],
[12240.6,16449.7,0.1],
[11306.1,16194.7,0.1],
[10420.2,16502.9,0.1],
[9160.46,16434.9,0.1],
[8564.56,16867.7,0.1],
[7465.67,16551.7,0.1],
[6396.23,16540.4,0.1],
[5068.49,16424.9,0.1],
[4494.26,16382.6,0.1],
[3301.66,17829.9,0.1],
[4500.25,17458.5,0.1],
[5784.94,17585.3,0.1],
[6756.95,17236.5,0.1],
[7735.76,17796,0.1],
[8342.98,17619.3,0.1],
[9815.73,17841.3,0.1],
[10488.77,17531,0.1],
[11508.3,17517.4,0.1],
[12181.2,17859.4,0.1],
[13937.2,17476.6,0.1],
[14512.7,17845.8,0.1],
[14623.7,17417.7,0.1],
[15588.9,17721.2,0.1],
[16338.9,18629.5,0.1],
[15416.7,18362.2,0.1],
[14650.9,18817.5,0.1],
[14211.3,18160.6,0.1],
[13402.5,18369,0.1],
[12330.8,18400.7,0.1],
[11526.4,18552.5,0.1],
[10144.3,18613.6,0.1],
[9369.4,18733.7,0.1],
[7291.7,18529.8,0.1],
[6408.05,18652.1,0.1],
[5397.52,18634,0.1],
[4482.15,18545.7,0.1],
[3145.36,18733.7,0.1],
[3539.21,19588.2,0.1],
[4671.39,19429.3,0.1],
[5463.15,19497.6,0.1],
[6534.24,19746.7,0.1],
[7721.89,19288.7,0.1],
[8919.58,19513.7,0.1],
[9811.82,19590,0.1],
[10727.8,19313.6,0.1],
[11670.3,19313.6,0.1],
[12681,19602.1,0.1],
[13771.8,19497,0.1],
[14709.3,19436.4,0.1],
[15709.2,19791,0.1],
[16660.9,19546.9,0.1],
[17459.4,19219,0.1],
[16298.6,20497.6,0.1],
[15335.6,20404.8,0.1],
[14359.1,20681.1,0.1],
[13369,20484,0.1],
[12358.4,20454.6,0.1],
[11414.3,20523.3,0.1],
[10618.6,20692.5,0.1],
[9452.92,20591,0.1],
[8385.32,20548.2,0.1],
[7419.31,20664,0.1],
[6508.54,20569.6,0.1],
[5352.16,20649.6,0.1],
[4411.86,20348.4,0.1],
[3254.06,20491.1,0.1],
[3484.09,21562.8,0.1],
[4439.17,21621.8,0.1],
[5665.87,21928.8,0.1],
[6508.7,21335.4,0.1],
[7677.87,21659.3,0.1],
[8670.28,21663.8,0.1],
[9721.59,21779.3,0.1],
[10607.5,21824.6,0.1],
[11663.4,21217.6,0.1],
[12866.5,21700,0.1],
[13704.8,21142.8,0.1],
[14749.3,21618.5,0.1],
[15596.7,21385.2,0.1],
[16541.5,21756.6,0.1],
[15304.6,22270.2,0.1],
[14396.3,22304.4,0.1],
[13441.8,22469.1,0.1],
[12619.9,22565.5,0.1],
[11225.3,22236.1,0.1],
[10296.8,22370.7,0.1],
[9073.03,22400.8,0.1],
[8050.17,22439,0.1],
[6157.17,22218,0.1],
[4095.37,22388.7,0.1]
];
 
_good_position=true;
 
_temp_pos = _temp_locations select (floor random (count _temp_locations));
_nearest_objects=_temp_pos nearObjects 30;
_built_objects = ["Foundation_EPOCH","MetalFloor_EPOCH", "CinderWallHalf_EPOCH", "CinderWall_EPOCH", "WoodFloor_EPOCH", "WoodFloorHalf_EPOCH", "WoodFloorQuarter_EPOCH", "WoodLargeWall_EPOCH", "WoodSmallWallThird_EPOCH"];
 
{
if(_x in _nearest_objects)then{
_good_position=false;
};
} forEach _built_objects;
 
if(_good_position)then{
player setPos _temp_pos;
titlecut [" ","BLACK IN",1];
}else{
[] execvm "custom\player_spawn_mover.sqf";
};
};

 

Save and close that file.

 

You should now be good to go!

 

NOTES:

Some respawn systems I've seen in the past use code to randomly choose a location, find out if something in the exclude list is there, and setpos the player accordingly. I wanted to use an array of positions so I could control the locations a little better. Since they are set locations, however, I needed a very large list to keep griefing down as much as possible. Once I was joking about the tubes thing with a friend, it actually made more sense to go this route. While slim, there is still a chance that a player will die enough to see the same spawn twice, but even if they do, it fits the story:)

 

I added in code to redirect players if the selected spawn point is within 30 meters of certain Epoch buildables. I didn't want to include everything but there are core pieces that I felt would be part of most bases and settled on this smaller list and the possible performance increase instead of a full list. You can easily add any object to the _built_objects array to check for. I'm not even sure if this will impact performance but I like to limit operations where I can. If you have certain areas you don't want players to spawn in, you may want to utilize that array instead of manually going through all of the spawn points to delete the offending ones. You could place that item on your map and into the _built_objects array, increase the 30 to 50-75 and keep any spawn point from getting used if its within that radius. I wouldn't go too much higher than 50 as you definitely will decrease performance with a really high number and a large amount of items like near cities. I also have not been able to fully test this bit out. If you find that players seem to have something in their base that needs to be added to the main list above, just let me know. 

 

Thanks for reading this far! I hope this helps gets some interest going on your server and if you find some errors or crazy nonsense, let me know as well and I will add your tips/changes to the guide.

hogs

 

 

Link to comment
Share on other sites

  • 6 months later...

Isn't the server settings pbo protected by a .dll and unable to be edited? Each time I have tried to modify the server settings pbo the server fails to load. Note that I am only changing certain values, not making large edits and changes, so the code is only altered slightly and there is no error in it....

Link to comment
Share on other sites

Isn't the server settings pbo protected by a .dll and unable to be edited? Each time I have tried to modify the server settings pbo the server fails to load. Note that I am only changing certain values, not making large edits and changes, so the code is only altered slightly and there is no error in it....

a3_epoch_server_settings.pbo is not protected but the a3_epoch_server.pbo is protected.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...