Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Misc. additions / improvements

Open Starkku opened this issue 3 years ago • 6 comments

Spawner spawn delay customization

  • Spawner.DelayFrames can be used to set the minimum number of game frames in between each spawn ejecting from the spawner. By default this is 9 frames for missiles and 20 for everything else.

In rulesmd.ini:

[SOMETECHNO]          ; TechnoType
Spawner.DelayFrames=  ; integer, game frames

Cluster scatter distance customization

  • ClusterScatter.Min and ClusterScatter.Max can be used to set minimum and maximum distance, respectively, in cells from the original detonation coordinate any additional detonations if Cluster is set to value higher than 1 can appear at.

In rulesmd.ini:

[SOMEPROJECTILE]         ; Projectile
ClusterScatter.Min=1.0  ; float, distance in cells
ClusterScatter.Max=2.0  ; float, distance in cells

FlakScatter distance customization

  • By default FlakScatter=true makes Inviso=true projectiles scatter by random distance (in cells) from 0 to [CombatDamage] -> BallisticScatter. This distance range can now be customized by setting BallisticScatter.Min & BallisticScatter.Max on the projectile. If not set, the default values are used.

In rulesmd.ini:

[SOMEPROJECTILE]      ; Projectile
BallisticScatter.Min= ; float, distance in cells
BallisticScatter.Max= ; float, distance in cells

Customizable debris & meteor impact and warhead detonation behaviour

  • ExplodeOnWater can be set to true to make the animation explode on impact with water. ExpireAnim will be played and Warhead is detonated or used to deal damage / generate light flash.
  • Warhead.Detonate, if set to true, makes the Warhead fully detonate instead of simply being used to deal damage and generate light flash if it has Bright=true.
  • SplashAnims contains list of animations used if ExplodeOnWater is not set and the animation impacts with water. Defaults to [CombatDamage] -> SplashList if IsMeteor is set, otherwise to a single animation specified in [General] -> Wake.
    • If SplashAnims.PickRandom is set to true, picks a random animation from SplashAnims to use on each impact with water. Otherwise last listed animation from SplashAnims is used.

In artmd.ini:

[SOMEANIM]                    ; AnimationType
ExplodeOnWater=false          ; boolean
Warhead.Detonate=false        ; boolean
SplashAnims=                  ; list of animations
SplashAnims.PickRandom=false  ; boolean

Also available for VoxelAnims, behaviour and INI keys are identical other than the need to list them in the rulesmd.ini entry rather than artmd.ini.

Custom debris animations and additional debris spawn settings

  • You can now use DebrisAnims to specify a list of debris animations to spawn instead of animations from [General] -> MetallicDebris when Warhead with MaxDebris > 0 and no DebrisTypes (VoxelAnims) listed is detonated.
  • Debris.Conventional, if set to true, makes DebrisTypes or DebrisAnims only spawn if Warhead is fired on non-water cell.

In rulesmd.ini:

[SOMEWARHEAD]              ; WarheadType
DebrisAnims=               ; List of animations
Debris.Conventional=false  ; boolean

Some technical notes regarding these:

  • Spawner (SpawnManagerClass) logic is by default tied to 10 frame timer. Nothing related to it gets processed in faster intervals than that. To allow faster spawn delay than this, the timer is set to Spawner.DelayFrames instead of 10 when the spawner is spawning aircraft. This shouldn't cause any unusual behaviour but I figured I'd mention it just in case.
  • BallisticScatter.Min / BallisticScatter.Max use same key names as Ares does, but none of the other logic besides the FlakScatter=true case (which Ares does not implement) is handled on Phobos' side.
  • The debris impact behaviour change also includes a minor change that makes the Warhead.Detonate use Bright setting from Warhead to determine if it generates lighting flash. This change also affects Crit.Warhead. Previously it would never generate flash.
  • Warhead DebrisAnims/Conventional fix also makes MaxDebris on warhead work as expected, previously it would use MaxDebris-1 to calculate the debris count, meaning that configurations like MinDebris=0 & MaxDebris=1 would never spawn any debris.

Closes #574

Starkku avatar May 03 '22 21:05 Starkku

Nightly build for this pull request:

github-actions[bot] avatar May 03 '22 21:05 github-actions[bot]

Spawner spawn delay customization

Tested spawning 10 hornets with Spawner.DelayFrames=0 and all of them were deployed at same time rather than individually taking off so working as expected.

Cluster scatter distance customization

Cluster.Scatter.Min and Cluster.Scatter.Max worked as expected

Setting values to 0 overrides the Cluster.Scatter behavior as expected

FlakScatter distance customization

BallisticScatter.Min= & BallisticScatter.Max= worked as expected

Setting values to 0 overrides the BallisticScatter behavior as expected

Customizable debris & meteor impact and warhead detonation behaviour

ExplodeOnWater= and Warhead.Detonate= worked as expected with the latter working with Ares tag Ripple.Radius and normal Particle=

SplashAnims= and SplashAnims.PickRandom= worked as expected when ExplodeOnWater=yes was omitted

Custom debris animations and additional debris spawn settings

DebrisAnims= and Debris.Conventional=false worked as expected. This also worked with debris animation warheads to spawn debris upon impact.

AlliedG avatar May 06 '22 22:05 AlliedG

Tested everything except DebrisAnims, it worked fine. However, i noticed that if ExplodeOnWater and Warhead.Detonate are both set to true, then both ExpireAnim and warhead's AnimList appear on hit. Is that intended?

mevitar avatar Jun 16 '22 21:06 mevitar

Tested everything except DebrisAnims, it worked fine. However, i noticed that if ExplodeOnWater and Warhead.Detonate are both set to true, then both ExpireAnim and warhead's AnimList appear on hit. Is that intended?

Warhead.Detonate will properly detonate the warhead if the debris explodes instead of simply dealing damage, this includes displaying AnimList/SplashList. ExpireAnim will still play regardless of this so yes, it is intended in a manner of speaking.

Starkku avatar Jun 17 '22 09:06 Starkku

Fixed remaining issues and renamed Cluster.Scatter.X to ClusterScatter.X.

Starkku avatar Jun 17 '22 09:06 Starkku

Fixed the hooks.

Starkku avatar Jul 02 '22 10:07 Starkku