Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

[Minor] Randomized anims for several behaviors

Open Coronia opened this issue 1 year ago • 3 comments

Allow several Phobos anim logic to display one of the random anims in the list, instead of one fixed anim.

In rulesmd.ini:

[SOMESHIELDTYPE]                            ; ShieldType name
BreakAnim=                                  ; list of Animation
HitAnim=                                    ; list of Animation

[SOMEWARHEAD]                               ; WarheadType
Shield.BreakAnim=                           ; list of Animation
Shield.HitAnim=                             ; list of Animation

[SOMETECHNO]                                   ; TechnoType
PassengerDeletion.Anim=                        ; list of Animation
AutoDeath.VanishAnimation=                     ; list of Animation
Spawner.RecycleAnim=                           ; list of Animation
WarpOut=                ; list of Animation (played when Techno warping out), default to [General] WarpOut
WarpIn=                 ; list of Animation (played when Techno warping in), default to [General] WarpIn
WarpAway=               ; list of Animation (played when Techno chronowarped by chronosphere), default to [General] 

[SOMEANIM]                             ; AnimationType
WakeAnim=                              ; list of Animation
CreateUnit.SpawnAnim=                  ; list of Animation

[SOMETERRAINTYPE]  ; TerrainType
DestroyAnim=       ; list of Animation

Coronia avatar Sep 16 '24 06:09 Coronia

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Sep 16 '24 06:09 github-actions[bot]

Add a function to create random anim from std::vector<AnimTypeClass*> in AnimExt or something instead of copypasting the same thing across the place.

Starkku avatar Sep 16 '24 12:09 Starkku

remove those duplicated 'Anims' tags, despite it might be a bit weird to not using plural for a list, it should remain backward compatibility and clearness. Also add random anim support for WakeAnim and Spawner.RecycleAnim

Coronia avatar Apr 07 '25 09:04 Coronia

The definition of customizable WarpAway in Phobos seems to be wrong, as it should be the anim that the techno is erased by Temporal warheads rather than the anim used by Chronoshift, which should still use WarpIn and WarpOut. But here it hooks out Chronoshift's WarpOut anim and make it become the customize WarpAway.

Not sure if these tag definitions should be changed now that they might be made use by mods already, and I'm thinking if the WarpIn/Out of Chronoshift still deserves a customization. As of now I might keep them as they are while adding the random anim feature for them, but if there's an idea about how to sort out these tags then I could also try to implement them in this pull request

Coronia avatar Aug 24 '25 08:08 Coronia

The definition of customizable WarpAway in Phobos seems to be wrong, as it should be the anim that the techno is erased by Temporal warheads rather than the anim used by Chronoshift, which should still use WarpIn and WarpOut. But here it hooks out Chronoshift's WarpOut anim and make it become the customize WarpAway.

Not sure if these tag definitions should be changed now that they might be made use by mods already, and I'm thinking if the WarpIn/Out of Chronoshift still deserves a customization. As of now I might keep them as they are while adding the random anim feature for them, but if there's an idea about how to sort out these tags then I could also try to implement them in this pull request

Fixed this in this PR already

Coronia avatar Sep 06 '25 04:09 Coronia