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 class | Declared role |
|---|---|
| UPDA_WeaponFX_Range | Currently adds no fields beyond the base |
| UPDA_WeaponFX_Melee | Swing trails, hit FX/audio, heavy-attack feedback |
| UPDA_WeaponFX_Throwable | Throw/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
| Field | Type or default | Intended configuration |
|---|---|---|
| SideEffectID | FName | Registered identity |
| SideEffectType | FGameplayTag | Effect classification |
| TriggerTags | FGameplayTagContainer | Trigger description |
| TargetTag | FGameplayTag | Target description |
| Condition | FFilterTags | Required/blocked context |
| Chance | float, 1.0 | Activation chance; editor clamp 0–1 |
| bCanStack / MaxStacks | false / 1 | Stacking metadata |
| Duration / Cooldown | 0 / 0 | Timing metadata |
| Intensity | float, 1.0 | Scaling 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
| Class | Fields |
|---|---|
| UPDA_SideEffect_Audio | Sound, VolumeMultiplier=1, PitchMultiplier=1, bSpatialized=true, MaxDistance=4000 |
| UPDA_SideEffect_Camera | CameraShake, ShakeScale=1, FOVOffset=0, FOVBlendTime=0.1, RecoilOffset |
| UPDA_SideEffect_Haptic | HapticEffect, HapticScale=1, bLeftController=true, bRightController=true |
| UPDA_SideEffect_PostProcess | PostProcessMaterial, 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
- Select a registered, equipped Range actor through Use.
- Submit Attack press/release requests.
- Bind OnWeaponFired for the role on which your projectile/effect should run.
- Implement authoritative damage/projectile behavior and appropriate client visual feedback.
- 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.