package Items
using RTDB, BaseStats

[ notQueryable ]
Base_HMG : Base_Weapon
{
	string friendlyName = "w_militech_hmg";
	displayName = "LocKey#3631";
	quality = "Quality.Random";
	shootingPatternPackages = 
	[
		"ShootingPatterns.MachineGunShootingPackage"
	];
	fk< ConstantStatModifier > price = 
	{
		statType = "BaseStats.Price";
		modifierType = "Additive";
		value = 400;
	} : ConstantStatModifier;
	localizedDescription = "LocKey#3632";
	fk< UIIcon > hudIcon = "HUDWeaponIcons.HMG";
	CName audioName = "wea_set_special_flak_cannon";
	CName entityName = "weapon_root";
	CName[] tags += 
	[
		"Preload", "Weapon", "Unique", "HeavyWeapon", "ForceDismember", "DiscardOnEmpty", "TakeAndEquip", "HideInBackpackUI", "HideAtVendor", "HMG"
	];
	fk< TriggerMode >[] triggerModes = 
	[
		"TriggerMode.FullAuto"
	];
	fk< TriggerMode > primaryTriggerMode = "TriggerMode.FullAuto";
	fk< ItemType > itemType = "ItemType.Wea_HeavyMachineGun";
	triggerEffectName = "te_wea_aim_slow";
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.WeaponRight"
	];
	stateMachineName = "HeavyWeapon";
	fk< ItemBlueprint > blueprint = "Items.Flak_Blueprint";
	fk< EquipmentArea > equipArea = "EquipmentArea.WeaponHeavy";
	fk< Attack >[] attacks += 
	[
		"NPCAttacks.StrongAttackKnockdown", "Attacks.ExplodingBulletProjectile", "Attacks.ExplodingBulletSmallProjectile"
	];
	fk< Crosshair > crosshair = "Crosshairs.Custom_HMG";
	fk< WeaponFxPackage > fxPackage = "WeaponFxPackage.PowerLargeCaliber";
	statModifiers += 
	[
		{
			statType = "BaseStats.EquipDuration";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.UnequipDuration";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HitReactionFactor";
			modifierType = "Multiplier";
			value = 2.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HitWoundsFactor";
			modifierType = "Multiplier";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HitDismembermentFactor";
			modifierType = "Multiplier";
			value = 3.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilAnimation";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAnimation";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		"BaseStats.SlideWhenLeaningOutOfCoverModifier", "BaseStats.BlockLocomotionWhenLeaningOutOfCoverModifier"
	];
	statModifierGroups = 
	[
		"Items.Base_HMG_Technical_Stats", "Items.Base_HMG_Handling_Stats", "Items.Base_HMG_Recoil_Stats", "Items.Base_HMG_Spread_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_HMG_RPG_Stats", "Items.Base_HMG_Damage_Stats", "Items.QualityRandomization", "Items.ItemPlusRandomizer_MaxQuality", "Items.ItemPlusRandomizer_Below_MaxQuality", "Items.Base_Weapon_Damage_Type_Physical", "Items.Base_Weapon_Damage_Type_Min_Max"
	];
	fk< StatPool >[] statPools = 
	[
		"BaseStatPools.WeaponOverheat"
	];
	fk< GameplayLogicPackage >[] OnAttach += 
	[
		"GLP.HoldingHMG", "EquipmentGLP.SlowStaminaRegen", "EquipmentGLP.HeavyStaminaDelay", "EquipmentGLP.HeavyFastFiringWeaponCloseRangeDamageMult"
	];
	fk< ItemDropSettings > dropSettings = "";
	bool IsIKEnabled = false;
	float weaponNearPlane = 28.27f;
	float weaponFarPlane = 51.9f;
	float weaponEdgesSharpness = 0.4958f;
	float weaponVignetteIntensity = 0.1357f;
	float weaponVignetteRadius = 0.6482f;
	float weaponVignetteCircular = 0.0f;
	float weaponBlurIntensity = 1.0f;
	float weaponNearPlane_aim = 28.19f;
	float weaponFarPlane_aim = 50.5f;
	float weaponEdgesSharpness_aim = 0.4958f;
	float weaponVignetteIntensity_aim = 0.1357f;
	float weaponVignetteRadius_aim = 0.6814f;
	float weaponVignetteCircular_aim = 0.1745f;
	float weaponBlurIntensity_aim = 1.f;
	forcedMinHitReaction = 1;
	useForcedTBHZOffset = true;
}

Base_HMG_NPC_Data : Base_NPC_RPG_Data
{
	statModifiers += 
	[
		{
			statType = "BaseStats.CanUseCovers";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		{
			value = 0.333f;
		} : EquipItemTime_GangModifier, 
		{
			value = 1.1f;
		} : EquipAnimationDuration_GangModifier, 
		{
			value = 1.867f;
		} : EquipActionDuration_GangModifier, 
		{
			value = 1.2f;
		} : UnequipItemTime_GangModifier, 
		{
			value = 1.4f;
		} : UnequipAnimationDuration_GangModifier, 
		{
			value = 1.867f;
		} : UnequipDuration_GangModifier, 
		{
			value = 0.5f;
		} : EquipItemTime_CorpoModifier, 
		{
			value = 1.133f;
		} : EquipAnimationDuration_CorpoModifier, 
		{
			value = 1.4f;
		} : EquipActionDuration_CorpoModifier, 
		{
			value = 1.1f;
		} : UnequipItemTime_CorpoModifier, 
		{
			value = 1.333f;
		} : UnequipAnimationDuration_CorpoModifier, 
		{
			value = 1.533f;
		} : UnequipDuration_CorpoModifier
	];
	statModifierGroups += 
	[
		"Items.Base_HMG_NPC_Technical_Stats", "Items.Base_HMG_NPC_RPG_Stats", "Items.Base_HMG_Misc_Stats", "Items.Base_HMG_NPC_Damage_Stats"
	];
}

Base_HMG_RPG_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.Weight";
			modifierType = "Additive";
			value = 10.0f;
		} : ConstantStatModifier, 
		"Character.ScaleToPlayerLevel", {
			statType = "BaseStats.WeaponTypeToStaminaCost";
			modifierType = "Multiplier";
			value = 1000f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.FirePower";
			modifierType = "Multiplier";
			value = 2.1f;
		} : ConstantStatModifier, 
		"AttackModifier.WeaponArmorPenetrationLow", {
			statType = "BaseStats.WeaponVehicleDamagePercentBonus";
			modifierType = "Additive";
			value = 0.9f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.Level";
			modifierType = "Multiplier";
			value = 0.f;
		} : ConstantStatModifier
	];
}

Base_HMG_Damage_Stats : StatModifierGroup
{
	fk< StatModifier >[] statModifiers = 
	[
		{
			statType = "BaseStats.DPS";
			modifierType = "Additive";
			value = 133f;
		} : ConstantStatModifier
	];
}

Base_HMG_NPC_Damage_Stats : StatModifierGroup
{
	fk< StatModifier >[] statModifiers = 
	[
		{
			statType = "BaseStats.DPS";
			modifierType = "Additive";
			value = 75f;
		} : ConstantStatModifier
	];
}

Base_HMG_Technical_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 1.f;
		} : NumShotsToFireModifier, 
		{
			value = 0.15f;
		} : CycleTimeModifier, 
		{
			value = 200.f;
		} : MagazineCapacityModifier, 
		{
			value = 200.0f;
		} : ReloadAmountModifier, 
		{
			value = 1.f;
		} : ProjectilesPerShotModifier, 
		"BaseStats.ProjectilesPerShotCombinedModifier", {
			value = 100.f;
		} : OverheatModifier, 
		{
			value = 50.f;
		} : EffectiveRangeModifier, 
		{
			value = 30.f;
		} : PhysicalImpulseModifier
	];
}

Base_HMG_NPC_Technical_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.CanUseCloseRing";
			modifierType = "Additive";
			value = 1.f;
		} : ConstantStatModifier, 
		{
			value = 1.f;
		} : NumShotsToFireModifier, 
		{
			value = 0.0909f;
		} : CycleTimeModifier, 
		{
			value = 100.f;
		} : MagazineCapacityModifier, 
		{
			value = 100.f;
		} : ReloadAmountModifier, 
		{
			value = 1.f;
		} : ProjectilesPerShotModifier, 
		"BaseStats.ProjectilesPerShotCombinedModifier", {
			value = 100.f;
		} : OverheatModifier, 
		{
			value = 50.f;
		} : EffectiveRangeModifier, 
		{
			value = 30.f;
		} : PhysicalImpulseModifier, 
		{
			value = 3.3f;
		} : ReloadTimeModifier, 
		"AttackModifier.HMGMinTBH", "AttackModifier.HMGMinLineOfSight"
	];
}

Base_HMG_NPC_RPG_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.ClipTimesCycleBase";
			modifierType = "Additive";
			refStat = "BaseStats.MagazineCapacityBase";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.ClipTimesCycleBase";
			modifierType = "Multiplier";
			refStat = "BaseStats.CycleTimeBase";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.ClipTimesCyclePlusReloadBase";
			modifierType = "Additive";
			refStat = "BaseStats.ClipTimesCycleBase";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.ClipTimesCyclePlusReloadBase";
			modifierType = "Additive";
			refStat = "BaseStats.ReloadTimeBase";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.AttacksPerSecondBase";
			modifierType = "Additive";
			refStat = "BaseStats.MagazineCapacityBase";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.AttacksPerSecondBase";
			modifierType = "Multiplier";
			refStat = "BaseStats.ClipTimesCyclePlusReloadBase";
			opSymbol = "inv";
			value = 1f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.AttacksPerSecondBase";
			modifierType = "Multiplier";
			refStat = "BaseStats.ProjectilesPerShot";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier
	];
}

Base_HMG_Handling_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 3.3f;
		} : ReloadTimeModifier, 
		{
			value = 1.2f;
		} : ZoomLevelModifier, 
		{
			value = 0.1f;
		} : AimInTimeModifier, 
		{
			value = 0.2f;
		} : AimOutTimeModifier, 
		{
			value = 150.f;
		} : MaximumRangeModifier
	];
}

Base_HMG_Recoil_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 0.f;
		} : RecoilDirModifier, 
		{
			value = 160.f;
		} : RecoilAngleModifier, 
		{
			value = 0.5f;
		} : RecoilKickMinModifier, 
		{
			value = 0.8f;
		} : RecoilKickMaxModifier, 
		{
			value = 0.06f;
		} : RecoilHoldDurationModifier, 
		{
			value = 40.f;
		} : RecoilSpeedModifier, 
		{
			value = 30.f;
		} : RecoilRecoverySpeedModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearXModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearYModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearXADSModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearYADSModifier
	];
}

Base_HMG_Spread_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 2.0f;
		} : SpreadDefaultXModifier, 
		{
			value = 1.0f;
		} : SpreadDefaultYModifier, 
		{
			value = 0.5f;
		} : SpreadMinXModifier, 
		{
			value = 0.25f;
		} : SpreadMinYModifier, 
		{
			value = 2.0f;
		} : SpreadMaxXModifier, 
		{
			value = 0.5f;
		} : SpreadMaxYModifier, 
		{
			value = 0.0f;
		} : SpreadChangePerShotModifier, 
		{
			value = 1.f;
		} : SpreadUseInAdsModifier, 
		{
			value = 1.5f;
		} : SpreadAdsDefaultXModifier, 
		{
			value = 0.25f;
		} : SpreadAdsDefaultYModifier, 
		{
			value = 0.25f;
		} : SpreadAdsMinXModifier, 
		{
			value = 0.125f;
		} : SpreadAdsMinYModifier, 
		{
			value = 1.0f;
		} : SpreadAdsMaxXModifier, 
		{
			value = 0.5f;
		} : SpreadAdsMaxYModifier, 
		{
			value = 0.0f;
		} : SpreadAdsChangePerShotModifier, 
		{
			value = 1.25f;
		} : SpreadResetSpeedModifier, 
		{
			value = 0.3f;
		} : SpreadResetTimeThresholdModifier, 
		{
			value = 0.f;
		} : SpreadRandomizeOriginPointModifier, 
		{
			value = 1.f;
		} : SpreadUseCircularSpreadModifier
	];
}

Flak_Blueprint : ItemBlueprint
{
	fk< ItemBlueprintElement > rootElement = 
	{
		fk< AttachmentSlot > slot = "AttachmentSlots.Receiver";
	};
}

w_special__militech_HMG__rcv1 : WeaponRifleReceiverBase
{
	string friendlyName = "w_special_heavy_railgun_rcv1";
	CName appearanceResourceName = "w_special__militech_hmg__rcv1";
}

[ notQueryable ]
Preset_HMG_Default : Base_HMG
{
	CName appearanceResourceName = "Preset_HMG_Default";
	fk< RangedAttackPackage > rangedAttacks = "Attacks.ExplodingBulletHMGPackage";
	fk< SlotItemPartPreset >[] slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_special__militech_HMG__rcv1";
		}
	];
	enableNpcRPGData = true;
	visualTags = 
	[
		"Default"
	];
	npcRPGData = 
	{
		statModifiers += 
		[
			{
				statType = "BaseStats.Accuracy";
				modifierType = "Multiplier";
				value = 0.66;
			} : ConstantStatModifier, 
			{
				statType = "BaseStats.NPCWeaponDropRandomizer";
				modifierType = "Multiplier";
				value = 1.3;
			} : ConstantStatModifier
		];
	} : Base_HMG_NPC_Data;
	statModifiers += 
	[
		{
			statType = "BaseStats.NPCWeaponDropRandomizer";
			modifierType = "Multiplier";
			value = 1.3;
		} : ConstantStatModifier
	];
}

[ notQueryable ]
Preset_HMG_Sasquatch : Preset_HMG_Default
{
	npcRPGData = 
	{
		statModifiers += 
		[
			{
				statType = "BaseStats.Accuracy";
				modifierType = "Multiplier";
				value = 0.66;
			} : ConstantStatModifier, 
			"AttackModifier.WeaponArmorPenetrationMedium"
		];
	} : Base_HMG_NPC_Data;
}

[ notQueryable ]
Preset_HMG_Military : Preset_HMG_Default
{
	visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
}

[ notQueryable ]
Preset_HMG_Neon : Preset_HMG_Default
{
	visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
}

[ notQueryable ]
Preset_HMG_Pimp : Preset_HMG_Default
{
	visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
}

[ notQueryable ]
w_special_flak : Preset_HMG_Default
{
	fk< RangedAttackPackage > rangedAttacks = "Attacks.ExplodingBulletPackage";
	enableNpcRPGData = false;
	itemSecondaryAction = "";
	attacks += 
	[
		"Attacks.ExplodingBulletTurretProjectile"
	];
}

[ notQueryable ]
Preset_HMG_Chopper : Preset_HMG_Default
{
	fk< RangedAttackPackage > rangedAttacks = "Attacks.ExplodingBulletPackage";
	enableNpcRPGData = false;
	statModifiers += 
	[
		{
			statType = "BaseStats.MagazineCapacity";
			modifierType = "Additive";
			value = 2700.f;
		} : ConstantStatModifier, 
		"Character.johnny_base_power_level", {
			statType = "BaseStats.PowerLevel";
			modifierType = "Additive";
			refStat = "BaseStats.PowerLevel";
			refObject = "Player";
			opSymbol = "*";
			value = -1.f;
		} : CombinedStatModifier
	];
}

[ notQueryable ]
Preset_HMG_turret_car_attach : Preset_HMG_Default
{
	fk< RangedAttackPackage > rangedAttacks = "Attacks.PhysicalBulletPackage";
	enableNpcRPGData = false;
	statModifiers += 
	[
		{
			statType = "BaseStats.DPS";
			modifierType = "Multiplier";
			value = 0.85f;
		} : ConstantStatModifier
	];
}

Base_HMG_Misc_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			float value = 1.533f;
		} : UnequipDurationModifier, 
		{
			float value = 1.667f;
		} : EquipDurationModifier
	];
}

[ notQueryable ]
Preset_HMG_Invisible : Base_HMG
{
	fk< RangedAttackPackage > rangedAttacks = "Attacks.ExplodingBulletPackage";
	fk< WeaponFxPackage > fxPackage = "WeaponFxPackage.PowerLC_HMG_Invisible";
	attacks += 
	[
		"Attacks.ExplodingBulletTurretProjectile"
	];
	entityName = "blank_weapon";
	enableNpcRPGData = false;
	visualTags = 
	[
		"none"
	];
	npcRPGData = 
	{
		statModifierGroups += 
		[
		];
	} : Base_HMG_NPC_Data;
}

