[SUPPORT] - Sheeps Epoch Repack

but why is it that when i harvest the weed it doesnt dissapear so all my players can just keep standing and harvest the same plant for hours
Again, this another post where I provide too much information, but I think just giving completed code and fixes without explanation doesnt help anyone learn anything. I linked all the files on github so you can see which files and lines I am talking about.

that sounds like a coding error. I have never fooled with the harvesthemp scripts as I personally find the practice of encouraging marijuana use and drug dealers to be ... subversive ... So this is based on my following the code on github.

You activate your own hemp file that spawns in all the weed farms. What about the default one? You didnt disable the harvesthemp in the scriptcontrol (and you shouldn't) or else the click action would not be working. If you look here you will see that when you 'harvest weed' in the click config.sqf file , it calls the hemp.sqf file (lines 87-)
Code:
If(HarvestHempScript)then{
HARVEST = [
["ItemKiloHemp","Smoke Weed","[] execVM 'scripts\HarvestHemp\smokeweed.sqf';","true"],
["ItemKnife","Harvest Weed","[] execVM 'scripts\HarvestHemp\hemp.sqf';","true"]
];
now we look at the hemp.sqf file and we see that in order to delete the weed it needs to retrieve the objectID and objectUID on lines 23-24. So far, so good. No problems yet
Code:
if (IsHarvesting)then{
cutText [format["You are already gathering Weed!"], "PLAIN DOWN"];
}else{
IsHarvesting = true;
disableSerialization;
_gearmenu = FindDisplay 106;
_gearmenu CloseDisplay 106;
player playActionNow "Medic";
r_interrupt = false;
sleep 6;
_objectID = _weed getVariable["ObjectID","0"];
_objectUID = _weed getVariable["ObjectUID","0"];
deleteVehicle _weed;
[_objectID,_objectUID] call server_deleteObj;
_weed setDamage 1;
player addMagazine "ItemKiloHemp";
sleep 2;
cutText [format["You've Gathered Some Weed. Smoke it or sell it to a Black market dealer!"], "PLAIN DOWN"];
IsHarvesting = false;
This is where your problem begins:
But in your hempfarm.sqf file you are not creating any and assigning those to the plants you are spawning. This code is from the randomweedfarm.sqf file starting on line 117 where you can see the setvariable for objectId and objectUID which are just randomly generated.
Code:
_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;
};

So your solution is to copy the random objectID and objectUID code and assign those variables to the weeds you are spawning. You can either do it for each and every fiberplant on the map by adding code to your hemp file like this:
Change each instance of your "fiberplant" code block from this (taken from your hempfarm.sqf file line 94, there are 58 instances of this code block in your file.
Code:
if (true) then
{
  _this = createVehicle ["fiberplant", [1848.5686, 14561.254, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setPos [1848.5686, 14561.254, -3.0517578e-005];

};
into this which adds the objectUID and ID to each plant.
Code:
if (true) then
{
  _this = createVehicle ["fiberplant", [1848.5686, 14561.254, -3.0517578e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_20 = _this;
  _this setPos [1848.5686, 14561.254, -3.0517578e-005];
            _uID = str(round(random 999999));
            _this setVariable ["ObjectID", _uID, true];
            _this setVariable ["ObjectUID", _uID, true];
            _this setVariable ["lastUpdate",time,true];
};

Alternatively, and a better option is you can add a single block at the bottom of your hemp.sqf file to find all fiberplants on the map and add the random uid and id to them..
Code:
_plantpositions = nearestObjects[getmarkerpos "center", ["fiberplanet"],5000];
{
_uID = str(round(random 999999));
_x setVariable ["ObjectID", _uID, true];
_x setVariable ["ObjectUID", _uID, true];
_x setVariable ["lastUpdate",time,true];
}forEach _plantpositions;
And here is the pastebin link for your fixed hempfarm.sqf file with this code already inserted.
http://pastebin.com/8j36hP5F
may not work ... not tested.
 
Last edited:
do you mean like this? sorry for asking a bunch of questions

l08Lkde


http://imgur.com/l08Lkde
 
No, it needs to go at the bottom of your hempfarm.sqf file so that each plant you create has those variables attached to them. at the bottom of my previous post is a link to your hempfarm.sqf with the code inserted. Again, not 100% that will work, but its close and is the solution you need.
 
No, it needs to go at the bottom of your hempfarm.sqf file so that each plant you create has those variables attached to them. at the bottom of my previous post is a link to your hempfarm.sqf with the code inserted. Again, not 100% that will work, but its close and is the solution you need.
so i basiclly just replace my hempfarm sqf with this instead and maybe it will work so i sont need to do anything to it just paste it in?
 
give it a shot, it should work. I will test it right now in the editor.
i will test it i am currently working on a big cherno mad addition realease so i have bin in my 3d editor all day and i also need to test a whole new playable server map that i have bin working on so i will test it in just some time
 
@Sheep
Can you advise how I would edit the compile.sqf to add Virtual Garages.
I need to edit the compile.sqf which I have found in the fixes folder. I also need to edit the server_updateobject which is where I run into problems. I know it isn't something you are supporting but any info would be great.
 
I had to look for a bit to find the files, in the future post links to the script you are needing help with. found this one by Overheat https://github.com/0verHeaT/VehicleGarage
As well, there are multiple versions of sheeps repack, so which one are you using (sometimes it does matter, not always) I am using the code from the 015 overpoch here
Compiles.sqf seems straightforward, add this to your compiles.sqf. I put it right near the top on line 7. Here is an edited file for download http://pastebin.com/h369g8yv
Code:
garage_getnearVeh = compile preprocessFileLineNumbers "Garage\garage_nearvehicles.sqf";
garage_getstoredVeh = compile preprocessFileLineNumbers "Garage\garage_storedvehicles.sqf";
garage_manage = compile preprocessFileLineNumbers "Garage\garage_manage.sqf";
garage_fillplayers = compile preprocessFileLineNumbers "Garage\garage_fillplayers.sqf";
garage_addfriend = compile preprocessFileLineNumbers "Garage\garage_addfriend.sqf";
garage_removefriend = compile preprocessFileLineNumbers "Garage\garage_removefriend.sqf";
garage_spawnVehicle = compile preprocessFileLineNumbers "Garage\garage_spawnvehicle.sqf";
garage_storeVehicle = compile preprocessFileLineNumbers "Garage\garage_storeVehicle.sqf";

I can see where you would have trouble with the server_updateobject. This retard Overheat thinks his script is so important you can just overwrite all your code with his ... I hate that. Anyway, I used theNotepad++ compare plugin to compare and merge the files. IF you have the default server_updateobject.sqf file from Sheeps Repack (you have not edited it for any new scripts), then you can download and TRY this file that I edited to insert the Garage code. http://pastebin.com/vdvhCsg6

Open your server_updateobjects.sqf and find:
Code:
if(isNull(_object)) exitWith {
    diag_log format["Skipping Null Object: %1", _object];
};
Insert this just below the find
Code:
if ((typeOf _object) in DZE_Garage) then {_garagelist = _this select 2;};

find:
Code:
_object_inventory = {
    private["_inventory","_previous","_key"];
        _isNormal = true;

Insert just below the found line
Code:
            if ((typeOf _object) in DZE_Garage) then {
            if (isNil "_garagelist") then {
                _garagelist = _object getVariable ["StoredVehicles",[]];
            };
            if (_objectID == "0") then {
                _key = format["CHILD:309:%1:%2:",_uid,_garagelist];
            } else {
                _key = format["CHILD:303:%1:%2:",_objectID,_garagelist];
            };

            _key call server_hiveWrite;
        }

find:
Code:
_object_damage = {
    private["_hitpoints","_array","_hit","_selection","_key","_damage"];
        _hitpoints = _object call vehicle_getHitpoints;
        _damage = damage _object;
        _array = [];
        {
            _hit = [_object,_x] call object_getHit;
            _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
            if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
            _object setHit ["_selection", _hit];
        } count _hitpoints;
REPLACE above code with this
Code:
if ((typeOf _object) in DZE_Garage) then {
            _damage = damage _object;
            _array = _object getVariable ["GarageFriends",[]];
        } else {
            _hitpoints = _object call vehicle_getHitpoints;
            _damage = damage _object;
            _array = [];

            {
                _hit = [_object,_x] call object_getHit;
                _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
                if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
                _object setHit ["_selection", _hit];
            } count _hitpoints;
        };


AS ALWAYS:
I do not have a Dayz server, so this code is UNTESTED and might contain errors or be completely hosed up.
MAKE A BACKUP OF YOUR FILES FIRST!
Post any errors or issues and we can try to get them fixed.
 
Last edited:
I had to look for a bit to find the files, in the future post links to the script you are needing help with. found this one by Overheat https://github.com/0verHeaT/VehicleGarage
As well, there are multiple versions of sheeps repack, so which one are you using (sometimes it does matter, not always) I am using the code from the 015 overpoch here
Compiles.sqf seems straightforward, add this to your compiles.sqf. I put it right near the top on line 7. Here is an edited file for download http://pastebin.com/h369g8yv
Code:
garage_getnearVeh = compile preprocessFileLineNumbers "Garage\garage_nearvehicles.sqf";
garage_getstoredVeh = compile preprocessFileLineNumbers "Garage\garage_storedvehicles.sqf";
garage_manage = compile preprocessFileLineNumbers "Garage\garage_manage.sqf";
garage_fillplayers = compile preprocessFileLineNumbers "Garage\garage_fillplayers.sqf";
garage_addfriend = compile preprocessFileLineNumbers "Garage\garage_addfriend.sqf";
garage_removefriend = compile preprocessFileLineNumbers "Garage\garage_removefriend.sqf";
garage_spawnVehicle = compile preprocessFileLineNumbers "Garage\garage_spawnvehicle.sqf";
garage_storeVehicle = compile preprocessFileLineNumbers "Garage\garage_storeVehicle.sqf";

I can see where you would have trouble with the server_updateobject. This retard thinks his script is so important you can just overwrite all your code with his ... I hate that. Anyway, I used theNotepad++ compare plugin to compare and merge the files. IF you have the default server_updateobject.sqf file from Sheeps Repack (you have not edited it for any new scripts), then you can download and TRY this file that I edited to insert the Garage code. http://pastebin.com/vdvhCsg6

Open your server_updateobjects.sqf and find:
Code:
if(isNull(_object)) exitWith {
    diag_log format["Skipping Null Object: %1", _object];
};
Insert this just below the find
Code:
if ((typeOf _object) in DZE_Garage) then {_garagelist = _this select 2;};

find:
Code:
_object_inventory = {
    private["_inventory","_previous","_key"];
        _isNormal = true;

Insert just below the found line
Code:
        if ((typeOf _object) in DZE_Garage) then {
            if (isNil "_garagelist") then {
                _garagelist = _object getVariable ["StoredVehicles",[]];
            };
            if (_objectID == "0") then {
                _key = format["CHILD:309:%1:%2:",_uid,_garagelist];
            } else {
                _key = format["CHILD:303:%1:%2:",_objectID,_garagelist];
            };
            _key call server_hiveWrite;
        } else {
            _inventory = [
                getWeaponCargo _object,
                getMagazineCargo _object,
                getBackpackCargo _object
            ];
            _previous = str(_object getVariable["lastInventory",[]]);
            if (str(_inventory) != _previous) then {
                _object setVariable["lastInventory",_inventory];
                if (_objectID == "0") then {
                    _key = format["CHILD:309:%1:%2:",_uid,_inventory];
                } else {
                    _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
                };
                //diag_log ("HIVE: WRITE: "+ str(_key));
                _key call server_hiveWrite;
            };
        };

find:
Code:
_object_damage = {
    private["_hitpoints","_array","_hit","_selection","_key","_damage"];
        _hitpoints = _object call vehicle_getHitpoints;
        _damage = damage _object;
        _array = [];
        {
            _hit = [_object,_x] call object_getHit;
            _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
            if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
            _object setHit ["_selection", _hit];
        } count _hitpoints;
REPLACE above code with this
Code:
if ((typeOf _object) in DZE_Garage) then {
            _damage = damage _object;
            _array = _object getVariable ["GarageFriends",[]];
        } else {
            _hitpoints = _object call vehicle_getHitpoints;
            _damage = damage _object;
            _array = [];

            {
                _hit = [_object,_x] call object_getHit;
                _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
                if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
                _object setHit ["_selection", _hit];
            } count _hitpoints;
        };


AS ALWAYS: I do not have a Dayz server, so this code is UNTESTED and might contain errors or be completely hosed up. MAKE A BACKUP OF YOUR FILES FIRST!
Post any errors or issues and we can try to get them fixed.

yo blanks i tried to do as you told me but it didnt work i just copied everything in the pastebin and then pasted and replaced it with the codes in my hempfarm sqf without chaning everything and i just get stuck at
"waiting for server to start authentication" what should i do?
 
I had to look for a bit to find the files, in the future post links to the script you are needing help with. found this one by Overheat https://github.com/0verHeaT/VehicleGarage
As well, there are multiple versions of sheeps repack, so which one are you using (sometimes it does matter, not always) I am using the code from the 015 overpoch here
Compiles.sqf seems straightforward, add this to your compiles.sqf. I put it right near the top on line 7. Here is an edited file for download http://pastebin.com/h369g8yv
Code:
garage_getnearVeh = compile preprocessFileLineNumbers "Garage\garage_nearvehicles.sqf";
garage_getstoredVeh = compile preprocessFileLineNumbers "Garage\garage_storedvehicles.sqf";
garage_manage = compile preprocessFileLineNumbers "Garage\garage_manage.sqf";
garage_fillplayers = compile preprocessFileLineNumbers "Garage\garage_fillplayers.sqf";
garage_addfriend = compile preprocessFileLineNumbers "Garage\garage_addfriend.sqf";
garage_removefriend = compile preprocessFileLineNumbers "Garage\garage_removefriend.sqf";
garage_spawnVehicle = compile preprocessFileLineNumbers "Garage\garage_spawnvehicle.sqf";
garage_storeVehicle = compile preprocessFileLineNumbers "Garage\garage_storeVehicle.sqf";

I can see where you would have trouble with the server_updateobject. This retard Overheat thinks his script is so important you can just overwrite all your code with his ... I hate that. Anyway, I used theNotepad++ compare plugin to compare and merge the files. IF you have the default server_updateobject.sqf file from Sheeps Repack (you have not edited it for any new scripts), then you can download and TRY this file that I edited to insert the Garage code. http://pastebin.com/vdvhCsg6

Open your server_updateobjects.sqf and find:
Code:
if(isNull(_object)) exitWith {
    diag_log format["Skipping Null Object: %1", _object];
};
Insert this just below the find
Code:
if ((typeOf _object) in DZE_Garage) then {_garagelist = _this select 2;};

find:
Code:
_object_inventory = {
    private["_inventory","_previous","_key"];
        _isNormal = true;

Insert just below the found line
Code:
            if ((typeOf _object) in DZE_Garage) then {
            if (isNil "_garagelist") then {
                _garagelist = _object getVariable ["StoredVehicles",[]];
            };
            if (_objectID == "0") then {
                _key = format["CHILD:309:%1:%2:",_uid,_garagelist];
            } else {
                _key = format["CHILD:303:%1:%2:",_objectID,_garagelist];
            };

            _key call server_hiveWrite;
        }

find:
Code:
_object_damage = {
    private["_hitpoints","_array","_hit","_selection","_key","_damage"];
        _hitpoints = _object call vehicle_getHitpoints;
        _damage = damage _object;
        _array = [];
        {
            _hit = [_object,_x] call object_getHit;
            _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
            if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
            _object setHit ["_selection", _hit];
        } count _hitpoints;
REPLACE above code with this
Code:
if ((typeOf _object) in DZE_Garage) then {
            _damage = damage _object;
            _array = _object getVariable ["GarageFriends",[]];
        } else {
            _hitpoints = _object call vehicle_getHitpoints;
            _damage = damage _object;
            _array = [];

            {
                _hit = [_object,_x] call object_getHit;
                _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
                if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
                _object setHit ["_selection", _hit];
            } count _hitpoints;
        };


AS ALWAYS:
I do not have a Dayz server, so this code is UNTESTED and might contain errors or be completely hosed up.
MAKE A BACKUP OF YOUR FILES FIRST!
Post any errors or issues and we can try to get them fixed.


Shooting blanks,
Thanks so much for you help. You have gone above and beyond pointing me in the right direction! I apologize for posting a very vague issue I was having yet you still seem to know exactly what I was talking about. I successfully edited the compile.sqf and then I hit a brick wall with the objectupdate.sqf because I didnt want to wreck any of the door management or plot management. Now that I have a better understanding of what to edit I will get right to work!

I will try to insert the code as you have outlined. You have no idea how much help you have been. Thanks so much to OpenDayz, FallingSheep, & ShootingBlanks.
 
I apologize for posting a very vague issue I was having yet you still seem to know exactly what I was talking about.
Your welcome.
Post wasnt vague, just makes it quicker and easier if we dont have to search for the original scripts and it would suck hairy goat balls if I went to the trouble of posting a fix and it turned out to be a different script than the version you are using :(
 
Your welcome.
Post wasnt vague, just makes it quicker and easier if we dont have to search for the original scripts and it would suck hairy goat balls if I went to the trouble of posting a fix and it turned out to be a different script than the version you are using :(

So I have added everything that you recommended and correctly pointed the compile preprocess to the directory for the garage script. I also edited the gems to allow me to build "Land_MBG_Garage_Single_A through D". My current problem is that when I go to place the garage within my plot it quickly gives me the message that the building was successful and then the garage disappears. I have added all of the garages to createvehicle.sqf in the battle eye folder thinking that would fix my issue. This is happening for admin and non admin players. Do I need to modify the Anti Hack that is within the 0.16 Repack as well?

Thanks again for your help.
 
yeah, sounds like maybe in infistar-type of issue. I always delete all the battleye filters as they are worthless when it comes to true hackers ... but thats not your problem because they always pop up a messagebox.
I know nothing about the included anti-hack, will look at it now
 
So I have added everything that you recommended and correctly pointed the compile preprocess to the directory for the garage script. I also edited the gems to allow me to build "Land_MBG_Garage_Single_A through D". My current problem is that when I go to place the garage within my plot it quickly gives me the message that the building was successful and then the garage disappears. I have added all of the garages to createvehicle.sqf in the battle eye folder thinking that would fix my issue. This is happening for admin and non admin players. Do I need to modify the Anti Hack that is within the 0.16 Repack as well?

Thanks again for your help.
you need to add Land_MBG_Garage_Single_A -D to the allowed buildings list in fixes\variables

look for dayz_allowedObjects and add your buildings to it
 
you need to add Land_MBG_Garage_Single_A -D to the allowed buildings list in fixes\variables

look for dayz_allowedObjects and add your buildings to it
Alright! I got them added and able to be placed. Thanks so much. Now I can finally see that what I had been working on with ShootingBlanks didnt work! :confused: But trial and error is ok with me. I will keep working on this.

I did notice however that at the bottom of 0verheats github page for the server_monitor.sqf section he uses the term "_intentory". Is that just a typo? Do I need to have "_inventory" instead.

https://github.com/0verHeaT/VehicleGarage

Either way I will modify the 3 instances in the server_monitor.sqf Where I previously added the lines with "_intentory"
 
Back
Top