Cyber Engine Tweaks
Modding
Dictionary
Other
External docs
Other Wikis
Powered By GitBook
DamageSystem
Documents the DamageSystem class and its functions.
NOT DOCUMENTED We currently don't have information on how these functions work. They are being documented here for visibility.

Invoking DamageSystem

To invoke the damage system, use the following Global function:
1
ds = Game.GetDamageSystem()
Copied!

Sub-functions

ApplyStatusEffectByApplicationRate

ApplyStatusEffectByApplicationRate
Info & Usage
1
ApplyStatusEffectByApplicationRate(hitEvent : ref:gameHitEvent, statType : gamedataStatType, effect : TweakDBID);
Copied!

CacheLocalVars

CacheLocalVars
Info & Usage
1
CacheLocalVars(hitEvent : ref:gameHitEvent, cache : ref:CacheData);
Copied!

CalculateDamageVariants

CalculateDamageVariants
Info & Usage
1
CalculateDamageVariants(hitEvent : ref:gameHitEvent);
Copied!

CalculateGlobalModifiers

CalculateGlobalModifiers
Info & Usage
1
CalculateGlobalModifiers(hitEvent : ref:gameHitEvent, cache : ref:CacheData);
Copied!

CalculateSourceModifiers

CalculateSourceModifiers
Info & Usage
1
CalculateSourceModifiers(hitEvent : ref:gameHitEvent);
Copied!

CalculateSourceVsTargetModifiers

CalculateSourceVsTargetModifiers
Info & Usage
1
CalculateSourceVsTargetModifiers(hitEvent : ref:gameHitEvent);
Copied!

CalculateTargetModifiers

CalculateTargetModifiers
Info & Usage
1
CalculateTargetModifiers(hitEvent : ref:gameHitEvent);
Copied!

CanTriggerMeleeLeapFinisher

CanTriggerMeleeLeapFinisher
Info & Usage
1
CanTriggerMeleeLeapFinisher(attackData : ref:AttackData, hitEvent : ref:gameHitEvent) : Bool;
Copied!

CheckForQuickExit

CheckForQuickExit
Info & Usage
1
CheckForQuickExit(hitEvent : ref:gameHitEvent, cache : ref:CacheData) : Bool;
Copied!

CheckProjectionPipelineTargetConditions

CheckProjectionPipelineTargetConditions
Info & Usage
1
CheckProjectionPipelineTargetConditions(hitEvent : ref:gameProjectedHitEvent) : Bool;
Copied!

ClearPreviewTargetStruct

ClearPreviewTargetStruct
Info & Usage
1
ClearPreviewTargetStruct();
Copied!

ConvertDPSToHitDamage

ConvertDPSToHitDamage
Info & Usage
1
ConvertDPSToHitDamage(hitEvent : ref:gameHitEvent);
Copied!

ConvertHitDataToDamageInfo

ConvertHitDataToDamageInfo
Info & Usage
1
ConvertHitDataToDamageInfo(hitEvent : ref:gameHitEvent) : array:DamageInfo;
Copied!

DealDamages

DealDamages
Info & Usage
1
DealDamages(hitEvent : ref:gameHitEvent);
Copied!

DeathCheck

DeathCheck
Info & Usage
1
DeathCheck(hitEvent : ref:gameHitEvent);
Copied!

FillInDamageBlackboard

FillInDamageBlackboard
Info & Usage
1
FillInDamageBlackboard(hitEvent : ref:gameHitEvent);
Copied!

GatherDebugData

GatherDebugData
Info & Usage
1
GatherDebugData(hitEvent : ref:gameHitEvent, cache : ref:CacheData, out hitDebugData : ref:HitDebugData);
Copied!

GatherServerData

GatherServerData
Info & Usage
1
GatherServerData(hitEvent : ref:gameHitEvent, cache : ref:CacheData, out serverHitData : ref:ServerHitData);
Copied!

GetDamageModFromCurve

GetDamageModFromCurve
Info & Usage
1
GetDamageModFromCurve(curve : CName, value : Float) : Float;
Copied!

GetEffectiveRangeModifierForWeapon

GetEffectiveRangeModifierForWeapon
Info & Usage
1
GetEffectiveRangeModifierForWeapon(attackData : ref:AttackData, hitPosition : Vector4) : Float;
Copied!

GetFinisherNameBasedOnWeapon

GetFinisherNameBasedOnWeapon
Info & Usage
1
GetFinisherNameBasedOnWeapon(hitEvent : ref:gameHitEvent, hasFromFront : Bool, hasFromBack : Bool, out finisherName : CName) : Bool;
Copied!

GetHitReactionZone

GetHitReactionZone
Info & Usage
1
GetHitReactionZone(hitEvent : ref:gameProjectedHitEvent) : EHitReactionZone;
Copied!

ImmortalityCheck

ImmortalityCheck
Info & Usage
1
ImmortalityCheck(hitEvent : ref:gameHitEvent, cache : ref:CacheData);
Copied!

InvulnerabilityCheck

InvulnerabilityCheck
Info & Usage
1
InvulnerabilityCheck(hitEvent : ref:gameHitEvent, cache : ref:CacheData);
Copied!

IsImmune

IsImmune
Info & Usage
1
IsImmune(target : ref:GameObject, statusEffectID : TweakDBID) : Bool;
Copied!

IsPowerLevelDifferentialAcceptable

IsPowerLevelDifferentialAcceptable
Info & Usage
1
IsPowerLevelDifferentialAcceptable(hitEvent : ref:gameHitEvent) : Bool;
Copied!

IsTargetImmortal

IsTargetImmortal
Info & Usage
1
IsTargetImmortal(cache : ref:CacheData) : Bool;
Copied!

IsTargetInvulnerable

IsTargetInvulnerable
Info & Usage
1
IsTargetInvulnerable(cache : ref:CacheData) : Bool;
Copied!

ModifyHitData

ModifyHitData
Info & Usage
1
ModifyHitData(hitEvent : ref:gameHitEvent);
Copied!

ModifyHitFlagsForPlayer

ModifyHitFlagsForPlayer
Info & Usage
1
ModifyHitFlagsForPlayer(hitEvent : ref:gameHitEvent, cache : ref:CacheData);
Copied!

PlayFinisherGameEffect

PlayFinisherGameEffect
Info & Usage
1
PlayFinisherGameEffect(hitEvent : ref:gameHitEvent, hasFromFront : Bool, hasFromBack : Bool) : Bool;
Copied!

PostProcess

PostProcess
Info & Usage
1
PostProcess(hitEvent : ref:gameHitEvent);
Copied!

PreProcess

PreProcess
Info & Usage
1
PreProcess(hitEvent : ref:gameHitEvent, cache : ref:CacheData) : Bool;
Copied!

Process

Process
Info & Usage
1
Process(hitEvent : ref:gameHitEvent, cache : ref:CacheData);
Copied!

ProcessArmor

ProcessArmor
Info & Usage
1
ProcessArmor(hitEvent : ref:gameHitEvent);
Copied!

ProcessBlockAndDeflect

ProcessBlockAndDeflect
Info & Usage
1
ProcessBlockAndDeflect(hitEvent : ref:gameHitEvent);
Copied!

ProcessChargeAttack

ProcessChargeAttack
Info & Usage
1
ProcessChargeAttack(hitEvent : ref:gameHitEvent);
Copied!

ProcessClientHit

ProcessClientHit
Info & Usage
1
ProcessClientHit(serverHitData : ref:ServerHitData);
Copied!

ProcessClientKill

ProcessClientKill
Info & Usage
1
ProcessClientKill(serverKillData : ref:ServerKillData);
Copied!

ProcessCriticalHit

ProcessCriticalHit
Info & Usage
1
ProcessCriticalHit(hitEvent : ref:gameHitEvent);
Copied!

ProcessCrowdTarget

ProcessCrowdTarget
Info & Usage
1
ProcessCrowdTarget(hitEvent : ref:gameHitEvent);
Copied!

ProcessDamageReduction

ProcessDamageReduction
Info & Usage
1
ProcessDamageReduction(hitEvent : ref:gameHitEvent);
Copied!

ProcessDeviceTarget

ProcessDeviceTarget
Info & Usage
1
ProcessDeviceTarget(hitEvent : ref:gameHitEvent);
Copied!

ProcessDodge

ProcessDodge
Info & Usage
1
ProcessDodge(hitEvent : ref:gameHitEvent);
Copied!

ProcessEffectiveRange

ProcessEffectiveRange
Info & Usage
1
ProcessEffectiveRange(hitEvent : ref:gameHitEvent);
Copied!

ProcessFinisher

ProcessFinisher
Info & Usage
1
ProcessFinisher(hitEvent : ref:gameHitEvent);
Copied!

ProcessHitReaction

ProcessHitReaction
Info & Usage
1
ProcessHitReaction(hitEvent : ref:gameHitEvent);
Copied!

ProcessInstantKill

ProcessInstantKill
Info & Usage
1
ProcessInstantKill(hitEvent : ref:gameHitEvent);
Copied!

ProcessLevelDifference

ProcessLevelDifference
Info & Usage
1
ProcessLevelDifference(hitEvent : ref:gameHitEvent);
Copied!

ProcessLocalizedDamage

ProcessLocalizedDamage
Info & Usage
1
ProcessLocalizedDamage(hitEvent : ref:gameHitEvent);
Copied!

ProcessOneShotProtection

ProcessOneShotProtection
Info & Usage
1
ProcessOneShotProtection(hitEvent : ref:gameHitEvent);
Copied!

ProcessPipeline

ProcessPipeline
Info & Usage
1
ProcessPipeline(hitEvent : ref:gameHitEvent, cache : ref:CacheData);
Copied!

ProcessPlayerIncomingDamageMultiplier

ProcessPlayerIncomingDamageMultiplier
Info & Usage
1
ProcessPlayerIncomingDamageMultiplier(hitEvent : ref:gameHitEvent);
Copied!

ProcessProjectionPipeline

ProcessProjectionPipeline
Info & Usage
1
ProcessProjectionPipeline(hitEvent : ref:gameProjectedHitEvent, cache : ref:CacheData);
Copied!

ProcessQuickHackModifiers

ProcessQuickHackModifiers
Info & Usage
1
ProcessQuickHackModifiers(hitEvent : ref:gameHitEvent);
Copied!

ProcessRagdollHit

ProcessRagdollHit
Info & Usage
1
ProcessRagdollHit(hitEvent : ref:gameHitEvent);
Copied!

ProcessResistances

ProcessResistances
Info & Usage
1
ProcessResistances(hitEvent : ref:gameHitEvent);
Copied!

ProcessReturnedDamage

ProcessReturnedDamage
Info & Usage
1
ProcessReturnedDamage(hitEvent : ref:gameHitEvent);
Copied!

ProcessRicochetBonus

ProcessRicochetBonus
Info & Usage
1
ProcessRicochetBonus(hitEvent : ref:gameHitEvent);
Copied!

ProcessStatusEffectApplicationStats

ProcessStatusEffectApplicationStats
Info & Usage
1
ProcessStatusEffectApplicationStats(hitEvent : ref:gameHitEvent);
Copied!

ProcessStatusEffects

ProcessStatusEffects
Info & Usage
1
ProcessStatusEffects(hitEvent : ref:gameHitEvent);
Copied!

ProcessStealthAttack

ProcessStealthAttack
Info & Usage
1
ProcessStealthAttack(hitEvent : ref:gameHitEvent);
Copied!

ProcessSyncStageCallbacks

ProcessSyncStageCallbacks
Info & Usage
1
ProcessSyncStageCallbacks(stage : gameDamagePipelineStage, hitEvent : ref:gameHitEvent, damagePipelineType : DMGPipelineType);
Copied!

ProcessTurretAttack

ProcessTurretAttack
Info & Usage
1
ProcessTurretAttack(hitEvent : ref:gameHitEvent);
Copied!

ProcessVehicleHit

ProcessVehicleHit
Info & Usage
1
ProcessVehicleHit(hitEvent : ref:gameHitEvent);
Copied!

ProcessVehicleTarget

ProcessVehicleTarget
Info & Usage
1
ProcessVehicleTarget(hitEvent : ref:gameHitEvent);
Copied!

RegisterListener

RegisterListener
Info & Usage
1
RegisterListener(damageListener : ref:ScriptedDamageSystemListener, registereeID : EntityID, callbackType : gameDamageCallbackType, optional damagePipelineType : DMGPipelineType);
Copied!

RegisterSyncListener

RegisterSyncListener
Info & Usage
1
RegisterSyncListener(damageListener : ref:ScriptedDamageSystemListener, registereeID : EntityID, callbackType : gameDamageCallbackType, stage : gameDamagePipelineStage, optional damagePipelineType : DMGPipelineType);
Copied!

ScalePlayerDamage

ScalePlayerDamage
Info & Usage
1
ScalePlayerDamage(hitEvent : ref:gameHitEvent);
Copied!

SendDamageEvents

SendDamageEvents
Info & Usage
1
SendDamageEvents(hitEvent : ref:gameHitEvent, resourcesLost : array:SDamageDealt);
Copied!

SetPreviewLock

SetPreviewLock
Info & Usage
1
SetPreviewLock(newState : Bool);
Copied!

SetPreviewTargetStruct

SetPreviewTargetStruct
Info & Usage
1
SetPreviewTargetStruct(trackedTarget : wref:GameObject, bodyPart : EHitReactionZone);
Copied!

SetTutorialFact

SetTutorialFact
Info & Usage
1
SetTutorialFact(factName : CName);
Copied!

StartPipeline

StartPipeline
Info & Usage
1
StartPipeline(evt : ref:gameHitEvent);
Copied!

StartProjectionPipeline

StartProjectionPipeline
Info & Usage
1
StartProjectionPipeline(evt : ref:gameProjectedHitEvent);
Copied!

TutorialAddIllegalActionFact

TutorialAddIllegalActionFact
Info & Usage
1
TutorialAddIllegalActionFact(targetPuppet : ref:NPCPuppet);
Copied!

UnregisterListener

UnregisterListener
Info & Usage
1
UnregisterListener(damageListener : ref:ScriptedDamageSystemListener, registereeID : EntityID, callbackType : gameDamageCallbackType, optional damagePipelineType : DMGPipelineType);
Copied!

UnregisterSyncListener

UnregisterSyncListener
Info & Usage
1
UnregisterSyncListener(damageListener : ref:ScriptedDamageSystemListener, registereeID : EntityID, callbackType : gameDamageCallbackType, stage : gameDamagePipelineStage, optional damagePipelineType : DMGPipelineType);
Copied!
Last modified 8mo ago
Export as PDF
Copy link
Contents
Invoking DamageSystem
Sub-functions
ApplyStatusEffectByApplicationRate
CacheLocalVars
CalculateDamageVariants
CalculateGlobalModifiers
CalculateSourceModifiers
CalculateSourceVsTargetModifiers
CalculateTargetModifiers
CanTriggerMeleeLeapFinisher
CheckForQuickExit
CheckProjectionPipelineTargetConditions
ClearPreviewTargetStruct
ConvertDPSToHitDamage
ConvertHitDataToDamageInfo
DealDamages
DeathCheck
FillInDamageBlackboard
GatherDebugData
GatherServerData
GetDamageModFromCurve
GetEffectiveRangeModifierForWeapon
GetFinisherNameBasedOnWeapon
GetHitReactionZone
ImmortalityCheck
InvulnerabilityCheck
IsImmune
IsPowerLevelDifferentialAcceptable
IsTargetImmortal
IsTargetInvulnerable
ModifyHitData
ModifyHitFlagsForPlayer
PlayFinisherGameEffect
PostProcess
PreProcess
Process
ProcessArmor
ProcessBlockAndDeflect
ProcessChargeAttack
ProcessClientHit
ProcessClientKill
ProcessCriticalHit
ProcessCrowdTarget
ProcessDamageReduction
ProcessDeviceTarget
ProcessDodge
ProcessEffectiveRange
ProcessFinisher
ProcessHitReaction
ProcessInstantKill
ProcessLevelDifference
ProcessLocalizedDamage
ProcessOneShotProtection
ProcessPipeline
ProcessPlayerIncomingDamageMultiplier
ProcessProjectionPipeline
ProcessQuickHackModifiers
ProcessRagdollHit
ProcessResistances
ProcessReturnedDamage
ProcessRicochetBonus
ProcessStatusEffectApplicationStats
ProcessStatusEffects
ProcessStealthAttack
ProcessSyncStageCallbacks
ProcessTurretAttack
ProcessVehicleHit
ProcessVehicleTarget
RegisterListener
RegisterSyncListener
ScalePlayerDamage
SendDamageEvents
SetPreviewLock
SetPreviewTargetStruct
SetTutorialFact
StartPipeline
StartProjectionPipeline
TutorialAddIllegalActionFact
UnregisterListener
UnregisterSyncListener