Vehicle Shooting
Description This mod allows you to shoot while driving a vehicle. You can use a pistol, a rifle, or a crossbow. You can disable the driver's ability to shoot using the config file, which can be found in the profiles folder. How it works When you are inside a vehicle, shooting is activated automatically. You can also ADS and reload your weapon. Further Info No repacks allowed. Don't ask. Repacking is cancer of DayZ… (more)
Description This mod allows you to shoot while driving a vehicle. You can use a pistol, a rifle, or a crossbow. You can disable the driver's ability to shoot using the config file, which can be found in the profiles folder. How it works When you are inside a vehicle, shooting is activated automatically. You can also ADS and reload your weapon. Further Info No repacks allowed. Don't ask. Repacking is cancer of DayZ community. You are allowed to look into mod for learning purposes or if you want know how it works. Discord: https://discord.gg/49FvN7rRpF Any feedback welcome! -Hunterz- Credits Admiral - brainstorming help Sajid_Alfa - discord nitro sponsor MarioE - general animation lessons Mrtea101 - lot of hints in Blender and anims
Patterns that can stall a single frame regardless of the load figure — see below.
1 chain break on base classes or persisted data.
0.015% of each server frame at 100 players (0.150 ms/s). Counts hook dispatch and timers only, not what the hooks do inside. Methodology.
Structural load of the 348 scripted mods analyzed, lightest on the left. This mod's bar is lit; 40 others share it. Ranked list.
Per-player hooks carry 99% of this mod's structural load. 0.150 ms/s in all.
2 hooks · 0.15 ms/s
5 hooks · 0.00099 ms/s
1 hook · 0.000002 ms/s
| Per-player hooksrun about 30 times a second for each player | 2 hooks | 0.15 ms/s | 99% | DayZPlayerImplement.HandleWeapons, PlayerBase.CommandHandler |
| Event hooksrun when something happens: an inventory move, a hit, an action | 5 hooks | 0.00099 ms/s | 0.7% | ActionCarDoors.ActionCondition, ActionGetOutTransport.ActionCondition, ActionSwitchSeats.ActionCondition and 2 more |
| Lifecycle hooksrun when an entity is created, loaded or deleted | 1 hook | 0.000002 ms/s | <0.1% | PlayerBase.EEInit |
Counts how often each hook is dispatched and how many timers stay alive, not what the code inside does. Some rates are order-of-magnitude estimates; the methodology lists which.
Chain breaks, by consequence
1 override that skip super(), ranked by how much they can affect. On any server a break replaces vanilla's behaviour on that method and silences every earlier-loaded mod hooking it.
PlayerBase.OnCommandVehicleStart
Vanilla's work on this method, and any earlier-loaded mod's, never runs for any PlayerBase.
VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:544Where this mod runs often
Hooks on per-frame and high-rate surfaces, with what their bodies call. Body work, not the hook itself, is what costs frame time.
Other findings
super() only on some paths · 10 · warning
- DayZPlayerImplement.AimingModel returns true without consulting super.AimingModel() on some paths — vanilla's conditions and every earlier-loaded mod's vetoes are bypassed there.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:618 - PlayerBase.IsRaised calls super.IsRaised() only on some paths — on the others the chain below this mod is dropped.
VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:287 - ActionBase.Can vetoes early (returns false) on some paths and defers to super.Can() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:3 - ActionBase.SetupAction vetoes early (returns false) on some paths and defers to super.SetupAction() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:15 - ActionSwitchSeats.ActionCondition vetoes early (returns false) on some paths and defers to super.ActionCondition() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:54 - DayZPlayerImplement.IsShootingFromCamera vetoes early (returns false) on some paths and defers to super.IsShootingFromCamera() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:651 - FirearmActionBase.ActionCondition vetoes early (returns false) on some paths and defers to super.ActionCondition() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:8 - GesturesMenu.CanOpenMenu vetoes early (returns false) on some paths and defers to super.CanOpenMenu() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\5_Mission\VehicleShootingGesturesMenu.c:3 - PlayerBase.CanReceiveItemIntoHands vetoes early (returns false) on some paths and defers to super.CanReceiveItemIntoHands() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:486 - WeaponManager.StartAction vetoes early (returns false) on some paths and defers to super.StartAction() otherwise — composes safely with vanilla's and earlier mods' conditions.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:81
- DayZPlayerImplement.AimingModel returns true without consulting super.AimingModel() on some paths — vanilla's conditions and every earlier-loaded mod's vetoes are bypassed there.
Checks answered without super() · 3 · warning
- ActionGetOutTransport.UseMainItem returns its own answer without consulting super.UseMainItem() — vanilla's conditions on this check, and those of every earlier-loaded mod, no longer apply. Intended when a mod owns the rule outright; otherwise it is how another mod's restriction quietly stops working.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:28 - ActionSwitchSeats.UseMainItem returns its own answer without consulting super.UseMainItem() — vanilla's conditions on this check, and those of every earlier-loaded mod, no longer apply. Intended when a mod owns the rule outright; otherwise it is how another mod's restriction quietly stops working.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:49 - FirearmActionBase.CanBeUsedInVehicle returns its own answer without consulting super.CanBeUsedInVehicle() — vanilla's conditions on this check, and those of every earlier-loaded mod, no longer apply. Intended when a mod owns the rule outright; otherwise it is how another mod's restriction quietly stops working.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:3
- ActionGetOutTransport.UseMainItem returns its own answer without consulting super.UseMainItem() — vanilla's conditions on this check, and those of every earlier-loaded mod, no longer apply. Intended when a mod owns the rule outright; otherwise it is how another mod's restriction quietly stops working.
Per-player-per-frame hooks · 2 · warning
- DayZPlayerImplement.HandleWeapons runs once per player per tick (~30 Hz/player): cost scales with population on the hottest per-player surface.
VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:70 - PlayerBase.CommandHandler runs once per player per tick (~30 Hz/player): cost scales with population on the hottest per-player surface.
VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:47
- DayZPlayerImplement.HandleWeapons runs once per player per tick (~30 Hz/player): cost scales with population on the hottest per-player surface.
Which vanilla methods the mod hooks, which of them drop the chain, how often each hook fires, and which risky calls sit inside hot hooks.
How long hook bodies take, network cost, or engine-side load. Measured across live fleets, most server lag comes from the engine and world state, not mod script chains — a light footprint does not clear a mod of lag, and a heavy one does not convict it. Methodology.
Everything else
All 37 overrides
Surface is the dispatch tier the rubric can price (— = unpriced); server is whether the override exists on a dedicated server; super() shows whether the vanilla chain is preserved on a server.
| method | surface | server | super() | where |
|---|---|---|---|---|
ActionBase.Can |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:3 |
ActionBase.SetupAction |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:15 |
ActionCarDoors.ActionCondition |
T2 | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:41 |
ActionConstructor.RegisterActions |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\ActionConstructor.c:3 |
ActionGetOutTransport.UseMainItem |
— | yes | ✗ none | VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:28 |
ActionGetOutTransport.ActionCondition |
T2 | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:33 |
ActionSwitchSeats.UseMainItem |
— | yes | ✗ none | VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:49 |
ActionSwitchSeats.ActionCondition |
T2 | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingActions.c:54 |
CarScript.OnInput |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:708 |
DayZPlayerCamera3rdPersonVehicle.OnActivate |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriverCamera.c:227 |
DayZPlayerCamera3rdPersonVehicleMotorbike.OnActivate |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriverCamera.c:247 |
DayZPlayerCameraBase.UpdateLRAngleUnlocked |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriverCamera.c:10 |
DayZPlayerCameraBase.UpdateUDAngleUnlocked |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriverCamera.c:100 |
DayZPlayerImplement.HandleWeapons |
T1 | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:70 |
DayZPlayerImplement.AimingModel |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:618 |
DayZPlayerImplement.IsShootingFromCamera |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:651 |
DayZPlayerImplement.CameraHandler |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:660 |
EmoteManager.CanPlayEmote |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingEmotes.c:3 |
FirearmActionBase.CanBeUsedInVehicle |
— | yes | ✗ none | VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:3 |
FirearmActionBase.ActionCondition |
T2 | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:8 |
GesturesMenu.CanOpenMenu |
— | yes | conditional | VehicleShooting.pbo::Scripts\5_Mission\VehicleShootingGesturesMenu.c:3 |
MotorbikeScript.OnInput |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDriver.c:730 |
PlayerBase.EEInit |
T3 | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:34 |
PlayerBase.CommandHandler |
T1 | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:47 |
PlayerBase.SetSAWeaponInHands |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:180 |
PlayerBase.IsRaised |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:287 |
PlayerBase.CanReceiveItemIntoHands |
T2 | yes | conditional | VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:486 |
PlayerBase.OnCommandVehicleStart |
— | yes | ✗ none | VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:544 |
PlayerBase.OnCommandVehicleFinish |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\PlayerBase.c:575 |
PluginManager.Init |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDiag.c:4 |
Weapon_Base.OnFire |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDiag.c:17 |
Weapon_Base.ProcessWeaponEvent |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDiag.c:56 |
Weapon_Base.ProcessWeaponAbortEvent |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingDiag.c:63 |
WeaponManager.StartPendingAction |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:33 |
WeaponManager.Update |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:47 |
WeaponManager.StartAction |
— | yes | conditional | VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:81 |
WeaponManager.OnInputUserDataProcess |
— | yes | ✓ | VehicleShooting.pbo::Scripts\4_World\VehicleShootingWeaponActions.c:90 |
Dispatch surfaces and timers the grade prices
| surface | tier | rate (Hz) | rate source | ms/s |
|---|---|---|---|---|
PlayerBase.CommandHandler | T1 | 3000.0 | measured | 0.0744 |
DayZPlayerImplement.HandleWeapons | T1 | 3000.0 | measured | 0.0744 |
PlayerBase.CanReceiveItemIntoHands | T2 | 8.0 | placeholder | 0.0002 |
ActionGetOutTransport.ActionCondition | T2 | 8.0 | placeholder | 0.0002 |
ActionCarDoors.ActionCondition | T2 | 8.0 | placeholder | 0.0002 |
ActionSwitchSeats.ActionCondition | T2 | 8.0 | placeholder | 0.0002 |
FirearmActionBase.ActionCondition | T2 | 8.0 | placeholder | 0.0002 |
PlayerBase.EEInit | T3 | 0.1 | placeholder | 0.0000 |
Includes 0.001 ms/s from placeholder-rated surfaces.
Load-order constraints (CfgPatches)
What each PBO declares: its addon identity and the addons it requires to be loaded first (requiredAddons). A partial load-order signal from the mod's own metadata.
VehicleShooting.pbo
VehicleShootingrequiredVersion 0.1 — requiresDZ_Data,DZ_Scripts,SurvivorAnims
census 1.1 · findings 1.1 · hash 9079fe154889bbe4