[SUPPORT] - Sheeps Epoch Repack

hey so do I have to put in the position I want the weed farm to spawn at? because I have it activated and I cant find them anywhere? clearly im doing something wrong haha, also I looked at the safezone script and is there any way to make it push cars out of the safezone on restart? and any chance you figured out the maintenance? =P sorry got a whole list im trying to check off here at once ha
weed farms random spawn :) if your an admin it should show em with green markers on map but i think its busted :(

you can try edit this to make em show up scripts\harvesthemp\randomweedfarm.sqf

try this one
Code:
//Script by HALV
//edit by fallingsheep
if (isServer)then{
    private["_blacklistedAreas"];
    diag_log "[Random_Weed_Farm]: waiting for BIS_fnc_findSafePos";
    waitUntil {(!isNil "BIS_fnc_findSafePos")};
    if(isNil "dayz_MapArea")then{dayz_MapArea = 7000};
    _WorldName = toLower format ["%1", worldName];
    //how many will spawn farms, note that farms can spawn "on top" of eachother (min 1, default 6)
    _farms = 6;
    //min farms (min 1, default 2)
    _farmsmin = 2;
    //how many plants per farm (min 1, default 9)
    _plants = 9;
    //min plants (min 1, default 4)
    _plantsmin = 4;
    //min dist (in meters) from roads to build farms (default 200m)
    _mindist2roads = 200;
    //the object to spawn, default "Fiberplant"
    _fiberplant = "Fiberplant";
    _spawnarea = (dayz_MapArea/2);
    switch(_WorldName)do{
        case "napf":{
        _blacklistedAreas = [
        [[8246.3184,15485.867,0],    500],
        [[15506.952,13229.368,0],    500],
        [[12399.751,5074.5273,0],    500],
        [[10398.626,8279.4619,0],    500],
        [[5149.9814,4864.1191,0],    500],
        [[6633.1538,7254.916,0],    500],
        [[13288.313,19590.338,0],    800]
        ];
        };
        case "chernarus":{
        _blacklistedAreas = [
        [[23999.742,2.4571743,0],    500],
        [[6325.6772,7807.7412,0],    500],
        [[4063.4226,11664.19,0],    500],
        [[11447.472,11364.504,0],    500],
        [[1606.6443,7803.5156,0],    500],
        [[12944.227,12766.889,0],    500],
        [[8122.35,13464.5,0],        500] // <-- no comma for last entry
        ];
        };
        default{
        _blacklistedAreas = [
            [[0,0,0],    0]
        ];
        };
    };
    _fnc_positions_array = {
        private ["_posi"];
        _pos = _this select 0;
        _amnt = _this select 1;
        _adjust = _this select 2;
        _include = if(count _this > 3)then{_this select 3}else{true};
        _positions = [];
        _buildDir = 0;
        _buildRow = 0;
        _Row = 0;
        _build = 0;
        if(_include)then{_positions set [count _positions,[_pos select 0,_pos select 1,0]];_amnt = _amnt - 1;};
        for "_i" from 0 to (_amnt-1) do {
            if(_Row > 1)then{_buildRow = _buildRow + 1;_Row = 0;};
            if(_buildDir > 3)then{_buildDir = 0;};
            for "_i" from 0 to _buildRow do {
                switch (_buildDir) do{
                    case 0:{
                        _posi = [(_pos select 0),(_pos select 1) + _adjust]; //up
                        _positions set [count _positions,[_posi select 0,_posi select 1,0]];
                    };
                    case 1:{
                        _posi = [(_pos select 0) + _adjust,(_pos select 1)]; //left
                        _positions set [count _positions,[_posi select 0,_posi select 1,0]];
                    };
                    case 2:{
                        _posi = [(_pos select 0),(_pos select 1) - _adjust]; //down
                        _positions set [count _positions,[_posi select 0,_posi select 1,0]];
                    };
                    case 3:{
                        _posi = [(_pos select 0) - _adjust,(_pos select 1)]; //right
                        _positions set [count _positions,[_posi select 0,_posi select 1,0]];
                    };
                };
                _pos = _posi;
                _build = _build + 1;
                if(_build >= _amnt)exitWith{};
            };
            _buildDir = _buildDir + 1;
            _Row = _Row + 1;
            if(_build >= _amnt)exitWith{};
        };
//        diag_log format["[Random_Weed_Farm]: Debug - _build: '%1' _amnt: '%2' _positions: '%3' %4",_build,_amnt,(count _positions),_positions];
        _positions
    };
    _amnt = round(random _farms);
    if(_amnt < _farmsmin)then{_amnt = _farmsmin};
    if(_amnt < 1)then{_amnt = 1};
    diag_log format["[Random_Weed_Farm]: Function loaded ... Server Building %1 Weed Farm(s)",_amnt];
    _locations = [];
    for "_i" from 0 to (_amnt-1) do {
        private ["_coords"];
        while{true}do{
            scopeName "posiscope";
            _coords = [getMarkerPos 'Center',0,_spawnarea,25,0,2000,0] call BIS_fnc_findSafePos;
            _roadlist = _coords nearRoads _mindist2roads;
            _IsBlacklisted = false;
            {if(_coords distance (_x select 0) < (_x select 1))exitWith{_IsBlacklisted = true};}forEach _blacklistedAreas;
            if((count _roadlist < 1) and !_IsBlacklisted)then{breakOut "posiscope"};
        };
        _locations set [count _locations,[_coords select 0,_coords select 1,0]];
        _amnt = round(random _plants);
        if(_amnt < _plantsmin)then{_amnt = _plantsmin};
        if(_amnt < 1)then{_amnt = 1};
        diag_log format["[Random_Weed_Farm]: Found Location for a farm (%1) %2 with %3 plants",mapGridPosition _coords,_coords,_amnt];
        //aparently sizeOf has problems sometimes, so we iput this manually - else perhaps use [position, amount, sizeOf "object"]
        _plantpositions = [[(_coords select 0),(_coords select 1),0],_amnt,5] call _fnc_positions_array;
        {
            _plant = createVehicle [_fiberplant, _x, [], 0, "CAN_COLLIDE"];
            _plant setPos _x;
            _uID = str(round(random 999999));
            _plant setVariable ["ObjectID", _uID, true];
            _plant setVariable ["ObjectUID", _uID, true];
            _plant setVariable ["lastUpdate",time,true];
        }forEach _plantpositions;
    };
    _markersOn = true;
    //create markers
    if(_markersOn)then{
        _nr = 1;
        for "_i" from 0 to ((count PV_HALV_Broadcast_weedlocations)-1) do {
            _markername = format["WeedFarm_%1",_nr];
            _markertext = format["Weed Farm %1",_nr];
            _marker = createMarker [_markername, (PV_HALV_Broadcast_weedlocations select _i)];
            _marker setMarkerType "Warning";
            _marker setMarkerText _markertext;
            _marker setMarkerColor "ColorGreen";

            diag_log format["[Random_Weed_Farm]: Client created marker %1 ...",_nr];
            _nr = _nr + 1;
        };
    };
    diag_log "[Random_Weed_Farm]: Weed Farm(s) Done ... Broadcasting locations for clients";
};

to turn markers off edit _markersOn = true;


safezones not sure about the car thing, you would have to teleport the car to the edge of the zone as they cant be "pushed"


maintenace stuff coming just making sure i got the right files :)
 
to edit maintenace you need to do the following

open fixes\fn_selfActions.sqf

find
Code:
if (s_player_maintain_area < 0) then {
            s_player_maintain_area = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
            s_player_maintain_area_preview = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
        };
and change to this
Code:
if (s_player_maintain_area < 0) then {
            s_player_maintain_area = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "fixes\maintain_area.sqf", "maintain", 5, false];
            s_player_maintain_area_preview = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "fixes\maintain_area.sqf", "preview", 5, false];
        };

create a new file in the fixes folder called maintain_area.sqf and paste this into it
Code:
//Code developed by Axe Cop - Massiv improvments && performance tunes by Skaronator
private ["_missing","_missingQty","_proceed","_itemIn","_countIn","_qty","_num_removed","_uniqueID","_removed","_removed_total","_tobe_removed_total","_obj","_objectID","_objectUID","_classname","_location","_dir","_objectCharacterID","_object","_temp_removed_array","_textMissing","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_itemText","_option"];
if (DZE_ActionInProgress) exitWith { cutText [(localize "STR_EPOCH_ACTIONS_2") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;
player removeAction s_player_maintain_area;
s_player_maintain_area = 1;
player removeAction s_player_maintain_area_preview;
s_player_maintain_area_preview = 1;
_target = cursorTarget; // Plastic_Pole_EP1_DZ
_objectClasses = DZE_maintainClasses;
_range = DZE_maintainRange; // set the max range for the maintain area
_objects = nearestObjects [_target, _objectClasses, _range];
//filter to only those that have 10% damage
_objects_filtered = [];
{
if (damage _x >= DZE_DamageBeforeMaint) then {
_objects_filtered set [count _objects_filtered, _x];
};
} count _objects;
_objects = _objects_filtered;
// TODO dynamic requirements based on used building parts?
_count = count _objects;
if (_count == 0) exitWith {
cutText [format[(localize "STR_EPOCH_ACTIONS_22"), _count], "PLAIN DOWN"];
DZE_ActionInProgress = false;
s_player_maintain_area = -1;
s_player_maintain_area_preview = -1;
};
_requirements = [];
switch true do {
case (_count <= 10): {_requirements = [["ItemGoldBar10oz",1]]};
case (_count <= 20): {_requirements = [["ItemGoldBar10oz",2]]};
case (_count <= 35): {_requirements = [["ItemGoldBar10oz",3]]};
case (_count <= 50): {_requirements = [["ItemGoldBar10oz",4]]};
case (_count <= 75): {_requirements = [["ItemGoldBar10oz",6]]};
case (_count <= 100): {_requirements = [["ItemBriefcase100oz",1]]};
case (_count <= 175): {_requirements = [["ItemBriefcase100oz",2]]};
case (_count <= 250): {_requirements = [["ItemBriefcase100oz",3]]};
case (_count <= 325): {_requirements = [["ItemBriefcase100oz",4]]};
case (_count <= 400): {_requirements = [["ItemBriefcase100oz",5]]};
case (_count <= 475): {_requirements = [["ItemBriefcase100oz",6]]};
case (_count <= 550): {_requirements = [["ItemBriefcase100oz",7]]};
case (_count <= 625): {_requirements = [["ItemBriefcase100oz",8]]};
case (_count > 625): {_requirements = [["ItemBriefcase100oz",9]]};
};
_option = _this select 3;
switch _option do {
case "maintain": {
_missing = "";
_missingQty = 0;
_proceed = true;
{
_itemIn = _x select 0;
_countIn = _x select 1;
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
} forEach _requirements;
if (_proceed) then {
player playActionNow "Medic";
[player,_range,true,(getPosATL player)] spawn player_alertZombies;
_temp_removed_array = [];
_removed_total = 0;
_tobe_removed_total = 0;
{
_removed = 0;
_itemIn = _x select 0;
_countIn = _x select 1;
_tobe_removed_total = _tobe_removed_total + _countIn;
{
if ((_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
_num_removed = ([player,_x] call BIS_fnc_invRemove);
_removed = _removed + _num_removed;
_removed_total = _removed_total + _num_removed;
if (_num_removed >= 1) then {
_temp_removed_array set [count _temp_removed_array,_x];
};
};
} forEach magazines player;
} forEach _requirements;
// all required items removed from player gear
if (_tobe_removed_total == _removed_total) then {
cutText [format[(localize "STR_EPOCH_ACTIONS_4"), _count], "PLAIN DOWN", 5];
PVDZE_maintainArea = [player,1,_target];
publicVariableServer "PVDZE_maintainArea";
} else {
{player addMagazine _x;} count _temp_removed_array;
cutText [format[(localize "STR_EPOCH_ACTIONS_5"),_removed_total,_tobe_removed_total], "PLAIN DOWN"];
};
} else {
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
cutText [format[(localize "STR_EPOCH_ACTIONS_6"), _missingQty, _textMissing], "PLAIN DOWN"];
};
};
case "preview": {
_cost = "";
{
_itemIn = _x select 0;
_countIn = _x select 1;
_itemText = getText(configFile >> "CfgMagazines" >> _itemIn >> "displayName");
if (_cost != "") then {
_cost = _cost + " and ";
};
_cost = _cost + (str(_countIn) + " of " + _itemText);
} count _requirements;
cutText [format[(localize "STR_EPOCH_ACTIONS_7"), _count, _cost], "PLAIN DOWN"];
};
};
DZE_ActionInProgress = false;
s_player_maintain_area = -1;
s_player_maintain_area_preview = -1;

to edit the cost change this part

Code:
case (_count <= 10): {_requirements = [["ItemGoldBar10oz",1]]};
case (_count <= 20): {_requirements = [["ItemGoldBar10oz",2]]};
case (_count <= 35): {_requirements = [["ItemGoldBar10oz",3]]};
case (_count <= 50): {_requirements = [["ItemGoldBar10oz",4]]};
case (_count <= 75): {_requirements = [["ItemGoldBar10oz",6]]};
case (_count <= 100): {_requirements = [["ItemBriefcase100oz",1]]};
case (_count <= 175): {_requirements = [["ItemBriefcase100oz",2]]};
case (_count <= 250): {_requirements = [["ItemBriefcase100oz",3]]};
case (_count <= 325): {_requirements = [["ItemBriefcase100oz",4]]};
case (_count <= 400): {_requirements = [["ItemBriefcase100oz",5]]};
case (_count <= 475): {_requirements = [["ItemBriefcase100oz",6]]};
case (_count <= 550): {_requirements = [["ItemBriefcase100oz",7]]};
case (_count <= 625): {_requirements = [["ItemBriefcase100oz",8]]};
case (_count > 625): {_requirements = [["ItemBriefcase100oz",9]]};

change the 1,2,3 etc to how many 10oz bars it should cost
_count <= 10 is how many items at the base
so if you have 10 or less base items it cost one 10ozgoldbar to maintain

im not sure but i think base maintain is disabled in the pack :) meaning you dont have to maintain... youll have to test it :)
 
dang! nice, thanks for the update! Ill try it out and let you know if everything runs smoothly :D and ya I think it is disabled, so do I have to enable it? or will this new script enable it?
 
Last edited:
Hi folks,

Mr Sheep, thank you so much for your awesome work. I've been using your repacks for ages now and they're second to none. I'd modified 0.15 to work with single coins and it was working beautifully. I had quite a number of players who really liked the server and all credit has to go to you for the awesome work you did with your repack.

I've been really busy with RL stuff for quite a few months and so I took my server down until recently. Long story short, I ended up resetting my system back to a default Epoch install for a while. Last weekend I had a burst of inspiration and decided I needed an Overpoch Napf server, and when I saw 0.16 on your Github, I couldn't resist it.

Everything installed beautifully and I made no changes, but coins are being lost when a user logs off. I can't see any errors in HiveExt.log or the RPTs. The coins are being lost without the server being restarted. As soon as a user logs off, when they log back in their coins are gone.

When I changed the 0.15 repack to use coins I had the same issue, but was able to trace it to the dlls on the server, and so I assumed that this was a recurrence of that same issue.

I just cant seem to sort it though. I've tried with the standard dlls that are installed when the server is built (and rebuilt), and as a test, I even tried with Soul's HiveExt.dll.

Could someone point me to a source where I can all of the get the correct dll's for ZSC 3.0?

The only other thing I'm wondering is whether it could be due to a failure I get when trying to import the SQL file. I get errors when it's trying to import the events which remove locked vehicles and empty objects etc., but the all the tables are intact, and I can see the CashMoney column in the character_data table.

Apologies for the long post guys. I'm starting to go round in circles.

I still suspect that it's dll related but I'm unsure if you should expect to see errors in the logs.

My setup is:

Build: 0.16

No errors in any logs.

I've only made changes within ScriptControl.sqf.

Am using a hosted server, hosted by Streamline Servers (They've given me access to all files and I'm able to change dll's)

No Antihack added.

I started from a working Napf Epoch server prior to changing the mission, server pbo and importing the database file.

Thanks again for your awesome, awesome repack Sheep.
 
Hi folks,

Mr Sheep, thank you so much for your awesome work. I've been using your repacks for ages now and they're second to none. I'd modified 0.15 to work with single coins and it was working beautifully. I had quite a number of players who really liked the server and all credit has to go to you for the awesome work you did with your repack.

I've been really busy with RL stuff for quite a few months and so I took my server down until recently. Long story short, I ended up resetting my system back to a default Epoch install for a while. Last weekend I had a burst of inspiration and decided I needed an Overpoch Napf server, and when I saw 0.16 on your Github, I couldn't resist it.

Everything installed beautifully and I made no changes, but coins are being lost when a user logs off. I can't see any errors in HiveExt.log or the RPTs. The coins are being lost without the server being restarted. As soon as a user logs off, when they log back in their coins are gone.

When I changed the 0.15 repack to use coins I had the same issue, but was able to trace it to the dlls on the server, and so I assumed that this was a recurrence of that same issue.

I just cant seem to sort it though. I've tried with the standard dlls that are installed when the server is built (and rebuilt), and as a test, I even tried with Soul's HiveExt.dll.

Could someone point me to a source where I can all of the get the correct dll's for ZSC 3.0?

The only other thing I'm wondering is whether it could be due to a failure I get when trying to import the SQL file. I get errors when it's trying to import the events which remove locked vehicles and empty objects etc., but the all the tables are intact, and I can see the CashMoney column in the character_data table.

Apologies for the long post guys. I'm starting to go round in circles.

I still suspect that it's dll related but I'm unsure if you should expect to see errors in the logs.

My setup is:

Build: 0.16

No errors in any logs.

I've only made changes within ScriptControl.sqf.

Am using a hosted server, hosted by Streamline Servers (They've given me access to all files and I'm able to change dll's)

No Antihack added.

I started from a working Napf Epoch server prior to changing the mission, server pbo and importing the database file.

Thanks again for your awesome, awesome repack Sheep.
ZSC 3.0 dosnt use custom DLLS so you need to go back to stock epoch DLLS try that first
 
ZSC 3.0 dosnt use custom DLLS so you need to go back to stock epoch DLLS try that first

Thanks for the quick reply mate. I actually rebuilt the server from scratch last night, hoping that the default dll's would be restored, but still no go.

I'll try and source the standard dll's from somewhere and copy them over.

Thanks again Sheep, really appreciate your help.
 
Well, it's definitely not dll related. I've rolled back to the 0.15 build with ZSC 3.0 and coins are fine. I'll keep using it for now and give 0.16 another go at a later date. Thanks for replying Sheep. Keep up the amazing work!
 
I had this problem before, if your using zupas 3.0 coin script he has a few spelling errors that he never fixed in the final draft, ill have to look again and ill let you know but I had the same exact problem and when I changed that it all worked perfectly and everything saved correctly, ill get back to you on what it was, it was the same word rapidity that he kept spelling wrong too and I think he also had a ";{" somewhere that wasn't supposed to be there, like I said ill look again and let you know
 
Thanks for the quick reply mate. I actually rebuilt the server from scratch last night, hoping that the default dll's would be restored, but still no go.

I'll try and source the standard dll's from somewhere and copy them over.

Thanks again Sheep, really appreciate your help.
Ok, Part One: in the Server_Monitor.sqf search for /*ZSC*/ and he spelt inventory "intentory" twice, change them to inventory.
Part Two: search your Server_updateObjects.sqf
find this code

_object_inventory = {
private["_inventory","_previous","_key"];
_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
];
}; <------ Delete this guy "};" at the bottom

Part Three: in the Server_updateObjects.sqf
Seach for _inventory = [somestuff] and change it to _inventory = [somestuff,somestuff,somestuff,_object getVariable["cashMoney",0]]

I don't know if your variable is called cashMoney, but that should give you the idea of what you are missing.
This all happened to me as well and this all fixed it on my end, hopefully it works for you!!
 
Ok, well when I changed all this stuff, mine started to work perfectly, and I had the same problem you had, first people money would disappear the second they locked their safe, then I fixed it to where it would stay till the server restarted, then I got it to where it worked how it is supposed to by doing all this, I also don't know how Sheep has it all set up in the pack, he may have changed some things in there as well, I was just giving my input on what fixed it for me
 
Oh mate, Tradewell, thank you so much! It's really good of you to post this. I'm just about to head off to work but I'll try this tonight.

I kind of hit the wall with 0.16 and rolled back to 0.15, which works fine with the dlls on my server. Very strange.

I'm gonna give this a try though. Thanks again Tradewell, really appreciate your help mate!
 
Ok, Part One: in the Server_Monitor.sqf search for /*ZSC*/ and he spelt inventory "intentory" twice, change them to inventory.
Part Two: search your Server_updateObjects.sqf
find this code

_object_inventory = {
private["_inventory","_previous","_key"];
_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
];
}; <------ Delete this guy "};" at the bottom

Part Three: in the Server_updateObjects.sqf
Seach for _inventory = [somestuff] and change it to _inventory = [somestuff,somestuff,somestuff,_object getVariable["cashMoney",0]]

I don't know if your variable is called cashMoney, but that should give you the idea of what you are missing.
This all happened to me as well and this all fixed it on my end, hopefully it works for you!!
so the inventory thing is changed but the other this are good no extra }; or missing var
(in the pack the var is bankMoney),

0.16 standard overpoch updated with fixes needs testing --- doing NAPF later very busy

i dont play much at all any more so i rely heavliy on bug reports to tell me whats up :p ive moved onto to ARK and an modding for that now
 
Last edited:
appling fixes to 0.16 builds :) good find, i dont play much at all any more so i rely heavliy on bug reports to tell me whats up :p ive moved onto to ARK and an modding for that now

Oh man, how exciting! I'm planning on buying ARK tomorrow and am really looking forward to playing. I'm equally excited to see what you're creating for it Sheep.
 
Oh mate, Tradewell, thank you so much! It's really good of you to post this. I'm just about to head off to work but I'll try this tonight.

I kind of hit the wall with 0.16 and rolled back to 0.15, which works fine with the dlls on my server. Very strange.

I'm gonna give this a try though. Thanks again Tradewell, really appreciate your help mate!
No prob, just let me know if it works or not :)
 
so the inventory thing is changed but the other this are good no extra }; or missing var
(in the pack the var is bankMoney),

0.16 standard overpoch updated with fixes needs testing --- doing NAPF later very busy

i dont play much at all any more so i rely heavliy on bug reports to tell me whats up :p ive moved onto to ARK and an modding for that now
And ya I figured you probably caught most what zupa missed, I was just going off of what I had to change when I put it in my old server, before I put your pack in :p thanks for the help though!
 
Back
Top