Vehicles maintenance at each restart

facoptere

Member
What it does :
** NEW : UPDATE FOR DAYZ 1.7.6.1 **
- destroy illegal (and out-of-map) objects and vehicles
- create missing vehicles (new location, new loot, new damage, new missing parts)
- spawn all vehicles in a safe place (at the nearest last known position); move boats near shore, where sea depth is between 0.8 and 3 meters; move bicycles near shore
- deals with corrupted data read from hive
- destroy empty tents above an amount of 100, starting by the characters who pitched the more of them


How to install :
** you will need cpbo.exe to unpack and pack dayz_server.pbo **
- unzip zip file : you will find 2 files to merge with those inside dayz_server.pbo.
- un-cpbo dayz_server.pbo
- replace server_monitor.sqf in system/
- put faco_objects.sqf in init/
- cpbo dayz_server.pbo

How to run :
- restart server, logon till your character spawns in Chernarus
- in RPT file, look at lines with "FACO" in it, you will see vehicles GPS coordinates and status.

----
Changelog:
archive.zip: first version
archive2.zip: Commented out DELETE action (handler 306), put damage=1 for object instead
archive3.zip: workaround for vehicle creation with the new Hive security. Item are not deleted but their damage is set to 100%. New log line when a player get in or get out a vehicle.
archive4.zip: Compatible with DayZ version 1.7.5.1. Fixed some bugs too.
archive5.zip: 1.7.6.1 update: remove beartraps, update vehicle list, accept spot with a slope grade of 20% as "safe", extend helicrash area and quantity, crossbow & arrow update.
vehmaintenance.zip: fix few bugs (spawn at different place now, damage parts fixed). Faster placement.
 

Attachments

  • vehmaintenance.zip
    12.7 KB · Views: 8
are you sure?

I get these errors when using this

Code:
2:04:52 Warning Message: Script z\addons\dayz_server\init\server_functions.sqf not found
2:04:52 Warning Message: Script z\addons\dayz_server\system\server_monitor.sqf not found

in my server log, then get stuck at loading.
 
I just pasted ur file in overwriting, then pasted the faco file into the other folder... Cpbo'd it and stuck it on the server
 
The errors you have tell that your pbo misses some files, and deals with basic use of cpbo.exe.
What version do you have ? I have cpbo v2.12 by Kegetys <http://www.kegetys.net>
Do you know how cpbo works ? If you use the mouse, maybe you should rename the root folder so that the new pbo does not overwrite the original one.
Are you sure you use the orginal server pbo from the devteam ? maybe you should check that.
 
using pbo view to package worked and the server is playable and runs fine...
BUT

theirs something weird in the logs

Code:
};
};
} forEach _msgList;>
13:03:59 Error position: <_msgList;>
13:03:59 Error Undefined variable in expression: _msglist
13:03:59 Error in expression <oad, _interval, time]];

Spammed over and over.. making the log useless
 
Fixed by going into server_cleanup.fsm and removing line 81 to 96 which was the following.

Code:
      init = /*%FSM<STATEINIT""">*/"//diag_log ""CLEANUP: Waiting for next task"";" \n
        "private [""_payload"", ""_interval"",""_delay"",""_msgList""];" \n
        "_msgList = msgList;" \n
        "{" \n
        "    _payload = _x select 0;" \n
        "    _interval = _x select 1;" \n
        "    _delay = _x select 2;" \n
        "    if (time - _delay > _interval && _interval != -1) then {" \n
        "        [nil, nil, rSPAWN, [_crier, _payload], { (_this select 0) globalChat (_this select 1) }] call RE;" \n
        "        if (_interval == 0) then {" \n
        "            _msgList set [_forEachIndex, [_payload, -1, time]];" \n
        "        } else {" \n
        "            _msgList set [_forEachIndex, [_payload, _interval, time]];" \n
        "        };" \n
        "    };" \n
        "} forEach _msgList;"/*%FSM</STATEINIT""">*/;

Down and dirty fix, I believe all this did was make a log entry and it somehow could no longer find all the info needed for that entry after applying your fix.
 
Is their a max vehicle snuck in there somewhere? I cant get your script to spawn more than 80 vehicles
 
Is this compatible with Tavi 2.0 i tried use this script installed it and can safely say it worked straight out the box. But vehicles only spawn on the small island apart from 3 tractors and a pbx spawn on the main island :(
 
I think I need to edit the pMain in my functions section of the db.... which I dont currently have thru my host.. so waiting on a reply to my ticket to see if theyll give me access
 
I've been struggling with vehicle spawns scince day 1 with tavi can't seem to increase the max limit anyway i've changed all sorts but end result is always the same.
 
Some problems im having..

1. Vehicles spawn EVERYWHERE... middle of fields, middles of forests... In crazy clumps.. Anyway to make it use the world_vehicle coords first then spawn random when they run out?

2. Vehicles spawn with crazy amounts of ammo in the gear (30 stanags).. what lines to I need to remove to get rid of item spawns in vehicles...

Starting to look like a junky script
 
Back
Top