Skip to main content

Effects and Projectiles

Cube Weapon declares FX, side-effect and projectile asset types. Their fields describe content, but the current ranged shot function leaves projectile spawning, muzzle flash, audio and recoil as placeholders. Referencing an asset is not automatic effect execution.

Source: Public/Data/FX, Public/Data/SideEffects, Public/Data/Projectile and Private/Components/AC_WeaponGameplayComp.cpp.

Weapon FX​

UPDA_WeaponFXBase is abstract. FXByWeaponEvent maps gameplay tags to soft Niagara-system references; AudioByWeaponEvent maps tags to soft USoundBase references.

Concrete classDeclared role
UPDA_WeaponFX_RangeCurrently adds no fields beyond the base
UPDA_WeaponFX_MeleeSwing trails, hit FX/audio, heavy-attack feedback
UPDA_WeaponFX_ThrowableThrow/flight/fuse/explosion feedback and tag-based hit maps

The master references WeaponFX softly. No universal event-to-FX executor is supplied by the current shot pipeline. Your project can bind OnWeaponFired to its own projectile and feedback implementation, with explicit network/role decisions.

UPDA_SideEffectBase​

FieldType or defaultIntended configuration
SideEffectIDFNameRegistered identity
SideEffectTypeFGameplayTagEffect classification
TriggerTagsFGameplayTagContainerTrigger description
TargetTagFGameplayTagTarget description
ConditionFFilterTagsRequired/blocked context
Chancefloat, 1.0Activation chance; editor clamp 0–1
bCanStack / MaxStacksfalse / 1Stacking metadata
Duration / Cooldown0 / 0Timing metadata
Intensityfloat, 1.0Scaling metadata

Masters and parts can reference SideEffects. The source declares these definitions and database caches but does not implement a general evaluator that applies trigger, chance, cooldown, duration and stacking rules. Supply that behavior before treating those fields as active gameplay systems.

Specialized Side Effects​

ClassFields
UPDA_SideEffect_AudioSound, VolumeMultiplier=1, PitchMultiplier=1, bSpatialized=true, MaxDistance=4000
UPDA_SideEffect_CameraCameraShake, ShakeScale=1, FOVOffset=0, FOVBlendTime=0.1, RecoilOffset
UPDA_SideEffect_HapticHapticEffect, HapticScale=1, bLeftController=true, bRightController=true
UPDA_SideEffect_PostProcessPostProcessMaterial, BlendWeight=1, FadeInTime=0.05, FadeOutTime=0.1

These derive from the base and inherit its metadata. CameraShake is TObjectPtr of UCameraShakeBase, not a TSubclassOf field in the current header. Keep project code aligned with the declared property type.

Projectiles​

UPDA_ProjectileMaster, UPDA_ProjectileStats and UPDA_ProjectileFX currently derive from UPrimaryDataAsset and declare no additional fields or execution methods. They do not supply projectile class, velocity, collision, damage or FX configuration in this revision.

Legacy GunActor/GunComponent, BallisticComponent, GrenadeComponent and type-specific stat-component files also exist. Their presence does not connect them to the operation-based shot path. Internal Acquire selects WeaponActorRange/Melee/Throwable; the ranged shot implementation does not instantiate the legacy projectile stack.

Integration Example​

  1. Select a registered, equipped Range actor through Use.
  2. Submit Attack press/release requests.
  3. Bind OnWeaponFired for the role on which your projectile/effect should run.
  4. Implement authoritative damage/projectile behavior and appropriate client visual feedback.
  5. Resolve needed FX/side-effect assets explicitly and implement the desired timing/stacking rules.

The stock fire loop can emit events on several network roles. Decide where a projectile is spawned and where cosmetic effects play to avoid duplicate execution.