FixVehiclePositions
Social distancing (from ground) for DayZ vehicles!
So your heli or car is glitching through terrain/buildings or randomly flipping? No more! Works with official and 3rd-party Expansion helis and should work with any cars (vanilla/modded).
This should be used as a server-side mod (-servermod=@FixVehiclePositions), no need for clients to have it.
NOTE if you are using the latest version of Expansion and not using On-The-Fly unflipping, then you DO NOT need this mod, the basic functionality is included in Expansion.
I highly recommend using this mod in conjunction with a mod that prevents collision damage at server startup, e.g. NoCollisionDamageIfEngineOff.
To prevent randomly exploding Expansion helis, you may want to look at NoExplodingHelis.
Configurable via FixVehiclePositions.json in your server profile directory (will be created automatically, do not edit while server is running). Old configuration in server CFG will be converted automatically (if present), but should be removed from server CFG afterwards. Note that changing configuration is not required and entirely optional.
OnTheFly
Fix vehicle glitching out on-the-fly as well instead of only at server start. Recommend leaving this enabled.
1 = Enabled (default), 0 = disabled
OnTheFly_UnFlip
If on-the-fly unglitching is enabled, also unflip the vehicle if it topples over but doesn’t glitch into the ground.
1 = Enabled, 0 = disabled (default)
Log
Log any actions done by FixVehiclePositions (useful for debugging).
1 = Enabled (warning, can cause quite some script.log spam!), 0 = disabled (default)
VehicleConfig
Array of vehicle configurations. Entries will be added automatically, so you should only edit this while the server is not running. Each entry has the following settings:
Name
Vehicle class name. Case sensitive!
VerticalAdjustment
Distance of model zero point from ground the vehicle is standing on in meters. If set to -1, it will be automatically calculated from the vehicle’s collision box.
NOTE in case the automatic calculation is too inaccurate for unknown vehicles, you can also measure it manually using any admin tool that has ESP functionality and can show object position (e.g. Community Online Tools). To do that, go to a place with flat ground (a road will do, but a runway, pier or similar is better). Spawn a small and/or very flat object, e.g. a paper, on ground. Then spawn the vehicle to be measured at the same position (with wheels!). Now enable ESP for vehicles and unknown items, and subtract the paper position Y coordinate from the vehicle position Y coordinate. The difference, rounded to two digits, is the value that needs to be used as VerticalAdjustment.
Clearance
Vertical clearance required to fit the vehicle, measured in meters from ground level the vehicle is standing on. Should be AT LEAST vehicle height. Set to 0 to disable clearance check, set to -1 to automatically calculate from collision box.