Modifying Heli Crash loot

so, this carepackage code on this page is for non bliss servers correct?

--lol ill build.pl german to my brain... will be quicker. lol
 
kannst du bitte!

i use bliss. on a hosted server.

been editing the PBO files through the build.pl and then uploading to the server.
 
one server file for you. i have been able to change the loot on the choppers, but when i try and load in the wrecks and carepkgs i get stuck at a loading screen.
 

Attachments

  • dayz_server.pbo
    73.4 KB · Views: 24
Yes, cause carepackages and chopper sites got they own "new" table.
throw an eye on this compile/fnc_carePkgs <-
yeah gimme a hour, i fix it for you.
 
thanks. i got it to work using the default SQF's from the zip file. but i like your new carepkgs and their 3 new sizes. please add that if you can
 
Fix it for you, try it out pls :)
Got no time today, your number 3 today ^^

You sir, please have my beans x 2 !! I managed to get this working last night and I can confirm that they are indeed spawning. I will however still use your .pbo!!

Thanx a million times for your time!
 
Hi guys great thread, I want to try out modifying the loot tables for the chopper crash sites on my server. However I can't see a build.pl file on my host and I don't have the ability to run perl scripts remotely on my server.

Can I rebuild the server locally on another machine and then upload it to my host? If so what files will I need to copy from my server first before running build.pl?
 
I used this code on my server which I found somewhere else. This is not my work, I am only posting the information from the other forum.

  1. Edit server_functions.sqf
  2. Search for spawn_heliCrash = {
  3. Replace that block of code with the code below
  4. Run build.pl and deploy the mission file and server pbo.
  5. Done!
The server now controls the loot at heli spawns. Clients dont need to change a thing.
ZA what did you do to satisfy the new ammo requirements for the weapons you enabled? The RPK and Saiga don't use regular DayZ munitions do they? Did you somehow add those munition types to the helicrash ammo boxes?

Thanks.
 
Hey, so I attempted to edit my server's heli crash loot...however, all I'm getting is the vanilla dayz loot. But still all of the vanilla items that would usually spawn at a chopper (as50, l85 aws) i didn't include in my list of weapons and they don't show. But things like a DMR show up, while a Mk12 SPR don't. Any help? :D

Contents of my server_functions.sqf:
Code:
waituntil {!isnil "bis_fnc_init"};
 
BIS_Effects_Burn =            {};
object_spawnDamVehicle =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_spawnDamVehicle.sqf";
server_playerLogin =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
server_playerSetup =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";
server_updateObject =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";
server_playerDied =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";
server_publishObj =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf";
local_publishObj =            compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_publishObj.sqf";        //Creates the object in DB
local_deleteObj =            compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_deleteObj.sqf";        //Creates the object in DB
local_createObj =            compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_createObj.sqf";        //Creates the object in DB
server_playerSync =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
zombie_findOwner =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
server_updateNearbyObjects =    compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
 
//Get instance name (e.g. dayz_1.chernarus)
fnc_instanceName = {
    "dayz_" + str(dayz_instance) + "." + worldName
};
 
vehicle_handleInteract = {
    private["_object"];
    _object = _this select 0;
    [_object, "all"] call server_updateObject;
};
 
//event Handlers
eh_localCleanup =            {
    private ["_object"];
    _object = _this select 0;
    _object addEventHandler ["local", {
        if(_this select 1) then {
            private["_type","_unit"];
            _unit = _this select 0;
            _type = typeOf _unit;
            deleteVehicle _unit;
            diag_log ("CLEANUP: DELETED A " + str(_type) );
        };
    }];
};
 
server_characterSync = {
    private ["_characterID","_playerPos","_playerGear","_playerBackp","_medical","_currentState","_currentModel","_key"];
    _characterID =    _this select 0;   
    _playerPos =    _this select 1;
    _playerGear =    _this select 2;
    _playerBackp =    _this select 3;
    _medical =        _this select 4;
    _currentState =    _this select 5;
    _currentModel = _this select 6;
   
    _key = format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,0,0,0,0,_currentState,0,0,_currentModel,0];
    //diag_log ("HIVE: WRITE: "+ str(_key) + " / " + _characterID);
    _key call server_hiveWrite;
};
 
//was missing for server
fnc_buildWeightedArray =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf";        //Checks which actions for nearby casualty
 
//onPlayerConnected        "[_uid,_name] spawn server_onPlayerConnect;";
onPlayerDisconnected        "[_uid,_name] call server_onPlayerDisconnect;";
 
server_hiveWrite = {
    private["_data"];
    //diag_log ("ATTEMPT WRITE: " + _this);
    _data = "HiveEXT" callExtension _this;
    diag_log ("WRITE: " + _data);
};
 
server_hiveReadWrite = {
    private["_key","_resultArray","_data"];
    _key = _this select 0;
    //diag_log ("ATTEMPT READ/WRITE: " + _key);
    _data = "HiveEXT" callExtension _key;
    diag_log ("READ/WRITE: " + _data);
    _resultArray = call compile format ["%1;",_data];
    _resultArray;
};
 
spawn_heliCrash = {
    private["_position","_veh","_num","_config","_itemType","_itemChance","_weights","_index","_iArray"];
 
    waitUntil{!isNil "BIS_fnc_selectRandom"};
    if (isDedicated) then {
    _position = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
    diag_log("DEBUG: Spawning a crashed helicopter at " + str(_position));
    _veh = createVehicle ["UH1Wreck_DZ",_position, [], 0, "CAN_COLLIDE"];
    dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_veh];
    _veh setVariable ["ObjectID",1,true];
    dayzFire = [_veh,2,time,false,false];
    publicVariable "dayzFire";
    if (isServer) then {
        nul=dayzFire spawn BIS_Effects_Burn;
    };
    _num = round(random 4) + 3;
    _config =        configFile >> "CfgBuildingLoot" >> "HeliCrash";
    _itemType =        [["M40A3","weapon"], ["G36_C_SD_eotech","weapon"], ["AK_107_GL_kobra","weapon"], ["M4SPR","weapon"], ["MG36","weapon"], ["AKS_GOLD","weapon"], ["M107","weapon"], ["MakarovSD","weapon"], ["G36_C_SD_camo","weapon"], ["FN_FAL","weapon"], ["bizon_silenced","weapon"], ["BAF_LRR_scoped_W","weapon"], ["BAF_L85A2_RIS_Holo","weapon"], ["M14_EP1","weapon"], ["DMR","weapon"], ["Mk_48_DES_EP1","weapon"], ["M249","weapon"], ["Huntingrifle","weapon"], ["","military"], ["","medical"], ["MedBox0","object"], ["NVGoggles","weapon"], ["AmmoBoxSmall_556","object"], ["AmmoBoxSmall_762","object"], ["Skin_Camo1_DZ","magazine"], ["DZ_Backpack_EP1","object"]];
    //diag_log ("DW_DEBUG: _itemType: " + str(_itemType));
    _itemChance =    [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,];
    //diag_log ("DW_DEBUG: _itemChance: " + str(_itemChance));
    //diag_log ("DW_DEBUG: (isnil fnc_buildWeightedArray): " + str(isnil "fnc_buildWeightedArray"));
 
    waituntil {!isnil "fnc_buildWeightedArray"};
 
    _weights = [];
    _weights =        [_itemType,_itemChance] call fnc_buildWeightedArray;
    //diag_log ("DW_DEBUG: _weights: " + str(_weights));
    for "_x" from 1 to _num do {
        //create loot
        _index = _weights call BIS_fnc_selectRandom;
        sleep 1;
        if (count _itemType > _index) then {
            //diag_log ("DW_DEBUG: " + str(count (_itemType)) + " select " + str(_index));
            _iArray = _itemType select _index;
            _iArray set [2,_position];
            _iArray set [3,5];
            _iArray call spawn_loot;
            _nearby = _position nearObjects ["WeaponHolder",20];
            {
                _x setVariable ["permaLoot",true];
            } forEach _nearBy;
        };
    };
    };
};
 
server_getDiff =    {
    private["_variable","_object","_vNew","_vOld","_result"];
    _variable = _this select 0;
    _object =    _this select 1;
    _vNew =    _object getVariable[_variable,0];
    _vOld =    _object getVariable[(_variable + "_CHK"),_vNew];
    _result =    0;
    if (_vNew < _vOld) then {
        //JIP issues
        _vNew = _vNew + _vOld;
        _object getVariable[(_variable + "_CHK"),_vNew];
    } else {
        _result = _vNew - _vOld;
        _object setVariable[(_variable + "_CHK"),_vNew];
    };
    _result
};
 
server_getDiff2 =    {
    private["_variable","_object","_vNew","_vOld","_result"];
    _variable = _this select 0;
    _object =    _this select 1;
    _vNew =    _object getVariable[_variable,0];
    _vOld =    _object getVariable[(_variable + "_CHK"),_vNew];
    _result = _vNew - _vOld;
    _object setVariable[(_variable + "_CHK"),_vNew];
    _result
};
 
dayz_objectUID = {
    private["_position","_dir","_key","_object"];
    _object = _this;
    _position = getPosATL _object;
    _dir = direction _object;
    _key = [_dir,_position] call dayz_objectUID2;
    _key
};
 
dayz_objectUID2 = {
    private["_position","_dir","_key"];
    _dir = _this select 0;
    _key = "";
    _position = _this select 1;
    {
        _x = _x * 10;
        if ( _x < 0 ) then { _x = _x * -10 };
        _key = _key + str(round(_x));
    } forEach _position;
    _key = _key + str(round(_dir));
    _key
};
 
dayz_recordLogin = {
    private["_key"];
    _key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
    diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
};
 
ZA what did you do to satisfy the new ammo requirements for the weapons you enabled? The RPK and Saiga don't use regular DayZ munitions do they? Did you somehow add those munition types to the helicrash ammo boxes?

Thanks.

I removed those out of the script. We had it in for a few days, people ran around with them and just dropped them when ammo was out..
 
Can anyone let me know the process for doing a local rebuild of bliss for a remote hosted server with only ftp access? This information doesn't seem to be readily available online but I have been told you can do it.

Naturally I've read the bliss build instructions but I'm not sure if I need to actually setup a local server and SQL just so I can make my changes, rebuild and then upload the files via FTP to my host. Or can I just copy the files from my host and build it without the hassle of having to set up a local dayz server and db just to build....

Any information at all would be more than welcome this doesn't seem to be very well documented anywhere since the old bliss forum posts all vanished.
 
Can anyone let me know the process for doing a local rebuild of bliss for a remote hosted server with only ftp access? This information doesn't seem to be readily available online but I have been told you can do it.

Naturally I've read the bliss build instructions but I'm not sure if I need to actually setup a local server and SQL just so I can make my changes, rebuild and then upload the files via FTP to my host. Or can I just copy the files from my host and build it without the hassle of having to set up a local dayz server and db just to build....

Any information at all would be more than welcome this doesn't seem to be very well documented anywhere since the old bliss forum posts all vanished.

Two things a) do you have complete FTP access and b) what version of bliss are you on? If there have been changes to the SQL then yes, you do need to figure out another way to host your SQL db but if they haven't you can pop the sever files on there (provided you have full FTP access) and boot up your modified build.
 
Two things a) do you have complete FTP access and b) what version of bliss are you on? If there have been changes to the SQL then yes, you do need to figure out another way to host your SQL db but if they haven't you can pop the sever files on there (provided you have full FTP access) and boot up your modified build.

The ftp access hasn't been put in place yet but its coming soon (day.st) they have said they want to support customer updates to mission files this way though. It's bliss 4.2 I had hoped to just rebuild bliss with the same version my host was running to avoid db changes. I'm pretty proficient with SQL anyway though. If it's just a case of copying the same database locally before I build, and then replicating it on the remote db I should be able to do that.

I will probably have more questions soon, my original host already had FTP access in place so I was ready to try it but we've switched hosts and my old host have terminated my contract early read about it here Survival Servers are a joke - http://dayzmod.com/forum/index.php?/topic/105593-do-not-rent-from-survivalservers/page__st__20

Personally I'd rather be hosting myself on a dedicated box but from what I saw when I looked into it the pricing only worked out if I was hosting multiple servers.
 
Hey, so I attempted to edit my server's heli crash loot...however, all I'm getting is the vanilla dayz loot. But still all of the vanilla items that would usually spawn at a chopper (as50, l85 aws) i didn't include in my list of weapons and they don't show. But things like a DMR show up, while a Mk12 SPR don't. Any help? :D

Did you put that in before running the build, or did you extract the finished PBO after building your Bliss server and then edit it?

I noticed that when I attempted to add the new Heli loot before running build.pl some sort of interaction between the build and the different options (care packages, wrecks etc) seemed to overwrite my custom heli loot changes. I decided it might be better to finish building my Bliss server, then go back with PBOView and extract the finished server.pbo to make the changes.

Worked like a charm after that. First thing I found was a G36K. =)

Now if only I could get the LMG's to not steal backpack slots so I could add in the L110...
 
Back
Top