port vehicles

This commit is contained in:
commy2 2015-01-16 14:20:41 +01:00
parent 287144a691
commit 9219909ec7
15 changed files with 557 additions and 529 deletions

View File

@ -1,467 +0,0 @@
class CfgPatches {
class AGM_Vehicles {
units[] = {};
weapons[] = {};
requiredVersion = 0.60;
requiredAddons[] = {AGM_Core};
version = "0.95";
versionStr = "0.95";
versionAr[] = {0,95,0};
author[] = {"commy2", "KoffeinFlummi"};
authorUrl = "https://github.com/KoffeinFlummi/";
};
};
class CfgFunctions {
class AGM_Vehicles {
class AGM_Vehicles {
file = "AGM_Vehicles\functions";
class speedLimiter;
class startEngine;
};
};
};
class AGM_Core_Default_Keys {
class speedLimiter {
displayName = "$STR_AGM_SpeedLimiter";
condition = "_player == driver _vehicle && {_vehicle isKindOf 'Car' || {_vehicle isKindOf 'Tank'}}";
statement = "[_player, _vehicle] call AGM_Vehicles_fnc_speedLimiter";
key = 211;
shift = 0;
control = 0;
alt = 0;
};
};
class Extended_Engine_EventHandlers {
class Car {
class AGM_EngineStartDelay {
clientEngine = "_this call AGM_Vehicles_fnc_startEngine";
};
};
};
#define FUEL_FACTOR 0.165
// fuel capacity = range in km * FUEL_FACTOR
class CfgVehicles {
class All {
class Turrets {};
};
class AllVehicles: All {
class NewTurret {
class Turrets {};
};
};
class Land: AllVehicles {};
class LandVehicle: Land {
class CommanderOptics: NewTurret {};
};
class Car: LandVehicle {};
class Tank: LandVehicle {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics: NewTurret {};
};
};
};
};
class APC: Tank {
class Turrets: Turrets {
class MainTurret: MainTurret {};
};
};
class Ship: AllVehicles {
class Turrets {
class MainTurret;
};
};
class Tank_F: Tank {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class Car_F: Car {
class Turrets {
class MainTurret: NewTurret {};
};
};
class Wheeled_APC_F: Car_F {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class APC_Tracked_01_base_F: Tank_F {
fuelCapacity = 500 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets {};
};
};
};
class APC_Tracked_02_base_F: Tank_F {
fuelCapacity = 600 * FUEL_FACTOR; // NO FUCKING DATA
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {};
class O_APC_Tracked_02_cannon_F: O_APC_Tracked_02_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_30mm_CTWS","AGM_LMG_coax_MBT_01","missiles_titan"};
magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Green","2000Rnd_762x51_Belt_Green","2Rnd_GAT_missiles"};
};
};
};
class APC_Tracked_03_base_F: Tank_F {
fuelCapacity = 660 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_30mm","AGM_LMG_coax_APC_Tracked_03"};
magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Yellow","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","1000Rnd_762x51_Belt_Yellow","1000Rnd_762x51_Belt_Yellow"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class MBT_03_base_F: Tank_F {
fuelCapacity = 550 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"cannon_120mm_long","AGM_LMG_coax_MBT_01"};
magazines[] = {"28Rnd_120mm_APFSDS_shells_Tracer_Yellow","14Rnd_120mm_HE_shells_Tracer_Yellow","2000Rnd_762x51_Belt_Yellow","2000Rnd_762x51_Belt_Yellow"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class MBT_01_base_F: Tank_F {
fuelCapacity = 500 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"cannon_120mm","AGM_LMG_coax_MBT_01"};
magazines[] = {"32Rnd_120mm_APFSDS_shells_Tracer_Red","16Rnd_120mm_HE_shells_Tracer_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class B_MBT_01_base_F: MBT_01_base_F {};
class B_MBT_01_cannon_F: B_MBT_01_base_F {};
class MBT_02_base_F: Tank_F {
fuelCapacity = 600 * FUEL_FACTOR; // again, couldn't find proper data
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class Ship_F: Ship {};
class Boat_F: Ship_F {};
class Boat_Armed_01_base_F: Boat_F {
class Turrets: Turrets {
class FrontTurret;
class RearTurret: FrontTurret {};
};
};
class Boat_Armed_01_minigun_base_F: Boat_Armed_01_base_F {};
class B_Boat_Armed_01_minigun_F: Boat_Armed_01_minigun_base_F {
class Turrets: Turrets {
class FrontTurret: FrontTurret {};
class RearTurret: RearTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Red"};
};
};
};
class I_Boat_Armed_01_minigun_F: Boat_Armed_01_minigun_base_F {
class Turrets: Turrets {
class FrontTurret: FrontTurret {};
class RearTurret: RearTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Yellow"};
};
};
};
class Truck_F: Car_F {
class Turrets: Turrets {};
};
class MRAP_01_base_F: Car_F {
fuelCapacity = 510 * FUEL_FACTOR;
};
class MRAP_02_base_F: Car_F {
fuelCapacity = 500 * FUEL_FACTOR; // couldn't find any data for the punisher
};
class O_MRAP_02_F: MRAP_02_base_F {
class Turrets {};
};
class Offroad_01_base_F: Car_F {
//fuelCapacity = 45;
};
class MRAP_03_base_F: Car_F {
fuelCapacity = 860 * FUEL_FACTOR;
smokeLauncherGrenadeCount = 3;
smokeLauncherAngle = 80;
class Turrets: Turrets {
class CommanderTurret: MainTurret {
stabilizedInAxes = 3;
};
};
};
class MRAP_03_hmg_base_F: MRAP_03_base_F {
smokeLauncherGrenadeCount = 3;
smokeLauncherAngle = 80;
class Turrets: Turrets {
class MainTurret: MainTurret {};
class CommanderTurret: CommanderTurret {
stabilizedInAxes = 3;
};
};
};
class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F {
smokeLauncherGrenadeCount = 3;
smokeLauncherAngle = 80;
class Turrets: Turrets {
class MainTurret: MainTurret {};
class CommanderTurret: CommanderTurret {
stabilizedInAxes = 3;
};
};
};
class Truck_01_base_F: Truck_F {
fuelCapacity = 644 * FUEL_FACTOR;
class Turrets {};
};
class Truck_02_base_F: Truck_F {
fuelCapacity = 1100 * FUEL_FACTOR;
class Turrets {};
};
class Truck_03_base_F: Truck_F {
fuelCapacity = 900 * FUEL_FACTOR; // NO. FUCKING. DATA.
class Turrets {};
};
class Hatchback_01_base_F: Car_F {
//fuelCapacity = 45;
class Turrets {};
};
class SUV_01_base_F: Car_F {
//fuelCapacity = 45;
class Turrets {};
};
class Van_01_base_F: Truck_F {
//fuelCapacity = 45;
class Turrets {};
};
class APC_Wheeled_01_base_F: Wheeled_APC_F {
fuelCapacity = 800 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {};
class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_40mm_CTWS","AGM_LMG_coax_MBT_01"};
magazines[] = {"60Rnd_40mm_GPR_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","2000Rnd_762x51_Belt_Green"};
};
};
};
class APC_Wheeled_02_base_F: Wheeled_APC_F {
fuelCapacity = 700 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets {};
};
class CommanderOptics: CommanderOptics {};
};
};
class B_MBT_01_TUSK_F: B_MBT_01_cannon_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"cannon_105mm","AGM_LMG_coax_MBT_01"};
magazines[] = {"40Rnd_105mm_APFSDS_T_Red","20Rnd_105mm_HEAT_MP_T_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class APC_Wheeled_03_base_F: Wheeled_APC_F {
fuelCapacity = 700 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {};
class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_30mm_CTWS","AGM_LMG_coax_MBT_01","missiles_titan"};
magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Yellow","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","2000Rnd_762x51_Belt_Yellow","2Rnd_GAT_missiles"};
};
};
};
};
class CfgWeapons {
class MGunCore;
class MGun: MGunCore {};
class LMG_RCWS: MGun {};
class LMG_coax;
class AGM_LMG_coax_MBT_01: LMG_coax {};
class AGM_LMG_coax_APC_Tracked_03: LMG_coax {};
class autocannon_Base_F;
class LMG_Minigun: LMG_RCWS {
magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"};
class manual: MGun {
reloadTime = 0.015;
dispersion = 0.006;
};
class close: manual{};
class short: close{};
class medium: close{};
class far: close{};
};
class HMG_127: LMG_RCWS {
class manual: MGun {};
};
class HMG_01: HMG_127 {
reloadTime = 0.23;
class manual: manual {
reloadTime = 0.23;
};
class close: manual {
reloadTime = 0.23;
};
class short: close {
reloadTime = 0.23;
};
class medium: close {
reloadTime = 0.23;
};
class far: close {
reloadTime = 0.23;
};
};
class autocannon_30mm_CTWS: autocannon_Base_F {
class AP: autocannon_Base_F {
magazines[] = {"60Rnd_30mm_APFSDS_shells","60Rnd_30mm_APFSDS_shells_Tracer_Red","60Rnd_30mm_APFSDS_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","140Rnd_30mm_MP_shells","140Rnd_30mm_MP_shells_Tracer_Red","140Rnd_30mm_MP_shells_Tracer_Green","140Rnd_30mm_MP_shells_Tracer_Yellow"};
magazineReloadTime = 0;
};
muzzles[] = {"AP"};
};
class autocannon_40mm_CTWS: autocannon_Base_F {
class AP: autocannon_Base_F {
magazines[] = {"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells","60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells"};
magazineReloadTime = 0;
};
muzzles[] = {"AP"};
};
// comp RHS
class RHS_weap_M242BC: autocannon_30mm_CTWS {
muzzles[] = {"AP","HE"};
};
};
class CfgAmmo {
class MissileBase;
class M_Mo_120mm_AT: MissileBase {
cost = 400000; // Stop it from aiming at FUCKING RABBITS.
weaponLockSystem = 2;
};
class M_Mo_120mm_AT_LG: M_Mo_120mm_AT {
cost = 400000;
weaponLockSystem = 4;
};
class M_Mo_82mm_AT: MissileBase {
cost = 400000;
weaponLockSystem = 2;
};
class M_Mo_82mm_AT_LG: M_Mo_82mm_AT {
cost = 400000;
weaponLockSystem = 4;
};
};

View File

@ -1,33 +0,0 @@
// by commy2
_this spawn {
_player = _this select 0;
_vehicle = _this select 1;
if (missionNamespace getVariable ["AGM_isSpeedLimiter", false]) exitWith {
[localize "STR_AGM_SpeedLimiter_Off"] call AGM_Core_fnc_displayTextStructured;
playSound "AGM_Sound_Click";
AGM_isSpeedLimiter = false;
};
[localize "STR_AGM_SpeedLimiter_On"] call AGM_Core_fnc_displayTextStructured;
playSound "AGM_Sound_Click";
AGM_isSpeedLimiter = true;
_maxSpeed = speed _vehicle;
if (_maxSpeed < 10) then {_maxSpeed = 10};
waitUntil {
_speed = speed _vehicle;
if (_speed > _maxSpeed) then {
_velocity = velocity _vehicle;
_vehicle setVelocity [
(_velocity select 0) * _maxSpeed / _speed,
(_velocity select 1) * _maxSpeed / _speed,
(_velocity select 2) * _maxSpeed / _speed
];
};
!AGM_isSpeedLimiter || {_player != driver _vehicle}
};
AGM_isSpeedLimiter = false;
};

View File

@ -1,25 +0,0 @@
// by commy2
#define STARTUP_DELAY 1.3
private ["_vehicle", "_isEngineOn", "_player"];
_vehicle = _this select 0;
_isEngineOn = _this select 1;
_player = AGM_player;
if (_isEngineOn && {_player == driver _vehicle} && {speed _vehicle == 0}) then {
[_vehicle] spawn {
_vehicle = _this select 0;
_direction = [vectorDir _vehicle, vectorUp _vehicle];
_time = time + STARTUP_DELAY;
waitUntil {
_vehicle setVelocity [0, 0, 0];
_vehicle setVectorDirAndUp _direction;
time > _time
};
};
};

View File

@ -0,0 +1 @@
z\ace\addons\vehicles

View File

@ -0,0 +1,23 @@
class CfgAmmo {
class MissileBase;
class M_Mo_120mm_AT: MissileBase {
cost = 400000; // Stop it from aiming at FUCKING RABBITS.
weaponLockSystem = 2;
};
class M_Mo_120mm_AT_LG: M_Mo_120mm_AT {
cost = 400000;
weaponLockSystem = 4;
};
class M_Mo_82mm_AT: MissileBase {
cost = 400000;
weaponLockSystem = 2;
};
class M_Mo_82mm_AT_LG: M_Mo_82mm_AT {
cost = 400000;
weaponLockSystem = 4;
};
};

View File

@ -0,0 +1,14 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_Engine_EventHandlers {
class Car {
class ACE_EngineStartDelay {
clientEngine = QUOTE(if (local driver (_this select 0)) then {_this call FUNC(startEngine)};);
};
};
};

View File

@ -0,0 +1,334 @@
class CfgVehicles {
class All {
class Turrets;
};
class AllVehicles: All {
class NewTurret {
class Turrets;
};
};
class Land: AllVehicles {};
class LandVehicle: Land {
class CommanderOptics;//: NewTurret {};
};
class Car: LandVehicle {};
class Tank: LandVehicle {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics;//: NewTurret {};
};
};
};
};
class APC: Tank {
class Turrets: Turrets {
class MainTurret: MainTurret {};
};
};
class Ship: AllVehicles {
class Turrets {
class MainTurret;
};
};
class Tank_F: Tank {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class Car_F: Car {
class Turrets {
class MainTurret: NewTurret {};
};
};
class Wheeled_APC_F: Car_F {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class APC_Tracked_01_base_F: Tank_F {
fuelCapacity = 500 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets;
};
};
};
class APC_Tracked_02_base_F: Tank_F {
fuelCapacity = 600 * FUEL_FACTOR; // NO FUCKING DATA
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {};
class O_APC_Tracked_02_cannon_F: O_APC_Tracked_02_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_30mm_CTWS","ACE_LMG_coax_MBT_01","missiles_titan"};
magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Green","2000Rnd_762x51_Belt_Green","2Rnd_GAT_missiles"};
};
};
};
class APC_Tracked_03_base_F: Tank_F {
fuelCapacity = 660 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_30mm","ACE_LMG_coax_APC_Tracked_03"};
magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Yellow","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","1000Rnd_762x51_Belt_Yellow","1000Rnd_762x51_Belt_Yellow"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class MBT_03_base_F: Tank_F {
fuelCapacity = 550 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"cannon_120mm_long","ACE_LMG_coax_MBT_01"};
magazines[] = {"28Rnd_120mm_APFSDS_shells_Tracer_Yellow","14Rnd_120mm_HE_shells_Tracer_Yellow","2000Rnd_762x51_Belt_Yellow","2000Rnd_762x51_Belt_Yellow"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class MBT_01_base_F: Tank_F {
fuelCapacity = 500 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"cannon_120mm","ACE_LMG_coax_MBT_01"};
magazines[] = {"32Rnd_120mm_APFSDS_shells_Tracer_Red","16Rnd_120mm_HE_shells_Tracer_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class B_MBT_01_base_F: MBT_01_base_F {};
class B_MBT_01_cannon_F: B_MBT_01_base_F {};
class MBT_02_base_F: Tank_F {
fuelCapacity = 600 * FUEL_FACTOR; // again, couldn't find proper data
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class Ship_F: Ship {};
class Boat_F: Ship_F {};
class Boat_Armed_01_base_F: Boat_F {
class Turrets: Turrets {
class FrontTurret;
class RearTurret: FrontTurret {};
};
};
class Boat_Armed_01_minigun_base_F: Boat_Armed_01_base_F {};
class B_Boat_Armed_01_minigun_F: Boat_Armed_01_minigun_base_F {
class Turrets: Turrets {
class FrontTurret: FrontTurret {};
class RearTurret: RearTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Red"};
};
};
};
class I_Boat_Armed_01_minigun_F: Boat_Armed_01_minigun_base_F {
class Turrets: Turrets {
class FrontTurret: FrontTurret {};
class RearTurret: RearTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Yellow"};
};
};
};
class Truck_F: Car_F {
class Turrets: Turrets {};
};
class MRAP_01_base_F: Car_F {
fuelCapacity = 510 * FUEL_FACTOR;
};
class MRAP_02_base_F: Car_F {
fuelCapacity = 500 * FUEL_FACTOR; // couldn't find any data for the punisher
};
class O_MRAP_02_F: MRAP_02_base_F {
class Turrets;
};
class Offroad_01_base_F: Car_F {
//fuelCapacity = 45;
};
class MRAP_03_base_F: Car_F {
fuelCapacity = 860 * FUEL_FACTOR;
smokeLauncherGrenadeCount = 3;
smokeLauncherAngle = 80;
class Turrets: Turrets {
class CommanderTurret: MainTurret {
stabilizedInAxes = 3;
};
};
};
class MRAP_03_hmg_base_F: MRAP_03_base_F {
smokeLauncherGrenadeCount = 3;
smokeLauncherAngle = 80;
class Turrets: Turrets {
class MainTurret: MainTurret {};
class CommanderTurret: CommanderTurret {
stabilizedInAxes = 3;
};
};
};
class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F {
smokeLauncherGrenadeCount = 3;
smokeLauncherAngle = 80;
class Turrets: Turrets {
class MainTurret: MainTurret {};
class CommanderTurret: CommanderTurret {
stabilizedInAxes = 3;
};
};
};
class Truck_01_base_F: Truck_F {
fuelCapacity = 644 * FUEL_FACTOR;
class Turrets;
};
class Truck_02_base_F: Truck_F {
fuelCapacity = 1100 * FUEL_FACTOR;
class Turrets;
};
class Truck_03_base_F: Truck_F {
fuelCapacity = 900 * FUEL_FACTOR; // NO. FUCKING. DATA.
class Turrets;
};
class Hatchback_01_base_F: Car_F {
//fuelCapacity = 45;
class Turrets;
};
class SUV_01_base_F: Car_F {
//fuelCapacity = 45;
class Turrets;
};
class Van_01_base_F: Truck_F {
//fuelCapacity = 45;
class Turrets;
};
class APC_Wheeled_01_base_F: Wheeled_APC_F {
fuelCapacity = 800 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {};
class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_40mm_CTWS","ACE_LMG_coax_MBT_01"};
magazines[] = {"60Rnd_40mm_GPR_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","2000Rnd_762x51_Belt_Green"};
};
};
};
class APC_Wheeled_02_base_F: Wheeled_APC_F {
fuelCapacity = 700 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets;
};
class CommanderOptics: CommanderOptics {};
};
};
class B_MBT_01_TUSK_F: B_MBT_01_cannon_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"cannon_105mm","ACE_LMG_coax_MBT_01"};
magazines[] = {"40Rnd_105mm_APFSDS_T_Red","20Rnd_105mm_HEAT_MP_T_Red","2000Rnd_762x51_Belt_Green","2000Rnd_762x51_Belt_Green"};
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class APC_Wheeled_03_base_F: Wheeled_APC_F {
fuelCapacity = 700 * FUEL_FACTOR;
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};
};
class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {};
class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
weapons[] = {"autocannon_30mm_CTWS","ACE_LMG_coax_MBT_01","missiles_titan"};
magazines[] = {"140Rnd_30mm_MP_shells_Tracer_Yellow","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","2000Rnd_762x51_Belt_Yellow","2Rnd_GAT_missiles"};
};
};
};
};

View File

@ -0,0 +1,65 @@
class CfgWeapons {
class MGunCore;
class MGun: MGunCore {};
class LMG_RCWS: MGun {};
class LMG_coax;
class ACE_LMG_coax_MBT_01: LMG_coax {};
class ACE_LMG_coax_APC_Tracked_03: LMG_coax {};
class LMG_Minigun: LMG_RCWS {
magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"};
class manual: MGun {
reloadTime = 0.015;
dispersion = 0.006;
};
class close: manual {};
class short: close {};
class medium: close {};
class far: close {};
};
class HMG_127: LMG_RCWS {
class manual: MGun {};
};
class HMG_01: HMG_127 {
reloadTime = 0.23;
class manual: manual {
reloadTime = 0.23;
};
class close: manual {
reloadTime = 0.23;
};
class short: close {
reloadTime = 0.23;
};
class medium: close {
reloadTime = 0.23;
};
class far: close {
reloadTime = 0.23;
};
};
class autocannon_Base_F;
class autocannon_30mm_CTWS: autocannon_Base_F {
class AP: autocannon_Base_F {
magazines[] = {"60Rnd_30mm_APFSDS_shells","60Rnd_30mm_APFSDS_shells_Tracer_Red","60Rnd_30mm_APFSDS_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","140Rnd_30mm_MP_shells","140Rnd_30mm_MP_shells_Tracer_Red","140Rnd_30mm_MP_shells_Tracer_Green","140Rnd_30mm_MP_shells_Tracer_Yellow"};
magazineReloadTime = 0;
};
muzzles[] = {"AP"};
};
class autocannon_40mm_CTWS: autocannon_Base_F {
class AP: autocannon_Base_F {
magazines[] = {"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells","60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells"};
magazineReloadTime = 0;
};
muzzles[] = {"AP"};
};
};

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
PREP(speedLimiter);
PREP(startEngine);

View File

@ -0,0 +1,30 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"commy2","KoffeinFlummi"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
class ACE_Default_Keys {
class speedLimiter {
displayName = "$STR_ACE_SpeedLimiter";
condition = QUOTE(_player == driver _vehicle && {_vehicle isKindOf 'Car' || {_vehicle isKindOf 'Tank'}});
statement = QUOTE([ARR_2(_player, _vehicle)] call FUNC(speedLimiter));
key = 211;
shift = 0;
control = 0;
alt = 0;
};
};

View File

@ -0,0 +1,41 @@
// by commy2
#include "script_component.hpp"
private ["_driver", "_vehicle"];
_driver = _this select 0;
_vehicle = _this select 1;
if (GETGVAR(isSpeedLimiter,false)) exitWith {
[localize "STR_ACE_SpeedLimiter_Off"] call EFUNC(common,displayTextStructured);
playSound "ACE_Sound_Click";
GVAR(isSpeedLimiter) = false;
};
[localize "STR_ACE_SpeedLimiter_On"] call EFUNC(common,displayTextStructured);
playSound "ACE_Sound_Click";
GVAR(isSpeedLimiter) = true;
private "_maxSpeed";
_maxSpeed = speed _vehicle max 10;
[{
private ["_driver", "_vehicle", "_maxSpeed"];
_driver = _this select 0 select 0;
_vehicle = _this select 0 select 1;
_maxSpeed = _this select 0 select 2;
if (!GVAR(isSpeedLimiter) || {_driver != driver _vehicle}) exitWith {
GVAR(isSpeedLimiter) = false;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
private "_speed";
_speed = speed _vehicle;
if (_speed > _maxSpeed) then {
_vehicle setVelocity ((velocity _vehicle) vectorMultiply (_maxSpeed / _speed));
};
} , 0, [_driver, _vehicle, _maxSpeed]] call CBA_fnc_addPerFrameHandler;

View File

@ -0,0 +1,25 @@
// by commy2
#include "script_component.hpp"
private ["_vehicle", "_isEngineOn"];
_vehicle = _this select 0;
_isEngineOn = _this select 1;
if (!_isEngineOn || {floor abs speed _vehicle > 0}) exitWith {};
[{
private ["_vehicle", "_time", "_direction"];
_vehicle = _this select 0 select 0;
_time = _this select 0 select 1;
_direction = _this select 0 select 2;
if (time > _time) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
_vehicle setVelocity [0, 0, 0];
_vehicle setVectorDirAndUp _direction;
} , 0, [_vehicle, time + STARTUP_DELAY, [vectorDir _vehicle, vectorUp _vehicle]]] call CBA_fnc_addPerFrameHandler;

View File

@ -0,0 +1 @@
#include "\z\ace\addons\vehicles\script_component.hpp"

View File

@ -0,0 +1,15 @@
#define COMPONENT vehicles
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_VEHICLES
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_ENABLED_VEHICLES
#define DEBUG_SETTINGS DEBUG_ENABLED_VEHICLES
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define FUEL_FACTOR 0.165 // fuel capacity = range in km * FUEL_FACTOR
#define STARTUP_DELAY 1.3

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project name="AGM"> <Project name="ACE">
<Package name="Vehicles"> <Package name="Vehicles">
<Key ID="STR_AGM_SpeedLimiter_On"> <Key ID="STR_ACE_SpeedLimiter_On">
<English>Speed Limiter on</English> <English>Speed Limiter on</English>
<German>Begrenzer an</German> <German>Begrenzer an</German>
<Spanish>Limitador de velocidad activado</Spanish> <Spanish>Limitador de velocidad activado</Spanish>
@ -14,7 +14,7 @@
<Portuguese>Limitador de Velocidade Ativo</Portuguese> <Portuguese>Limitador de Velocidade Ativo</Portuguese>
<Italian>Limitatore Attivo</Italian> <Italian>Limitatore Attivo</Italian>
</Key> </Key>
<Key ID="STR_AGM_SpeedLimiter_Off"> <Key ID="STR_ACE_SpeedLimiter_Off">
<English>Speed Limiter off</English> <English>Speed Limiter off</English>
<German>Begrenzer aus</German> <German>Begrenzer aus</German>
<Spanish>Limitador de velocidad desactivado</Spanish> <Spanish>Limitador de velocidad desactivado</Spanish>
@ -27,7 +27,7 @@
<Italian>Limitatore Non Attivo</Italian> <Italian>Limitatore Non Attivo</Italian>
</Key> </Key>
<Key ID="STR_AGM_SpeedLimiter"> <Key ID="STR_ACE_SpeedLimiter">
<English>Speed Limiter</English> <English>Speed Limiter</English>
<German>Begrenzer</German> <German>Begrenzer</German>
<Spanish>Limitador de velocidad</Spanish> <Spanish>Limitador de velocidad</Spanish>