aliens

Author Topic: [DONE] AoE explosion animation radius  (Read 2361 times)

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9103
    • View Profile
[DONE] AoE explosion animation radius
« on: January 02, 2022, 10:20:33 am »
Small question:
When we use "FixRadius: 1" for super-powerful weapon, the explosion animation still showed over whole screen, not just normal blast. Is it intended?

It's both intended and not. Kinda. Hard to say.

But it is a thing that could use more modding options.
I will add something in the next release... just need to figure out what exactly.
Stay tuned.
« Last Edit: January 02, 2022, 10:39:17 am by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9103
    • View Profile
Re: AoE explosion animation radius
« Reply #1 on: January 02, 2022, 10:37:10 am »
The vanilla area-of-effect explosion animation depends on the weapon's `power`.

1. if power <= 80, small explosion sound is played, if power > 80, large explosion sound is played
(unless modded by `explosionHitSound`)

2. the number of individual explosion animations shown is power divided by 5, rounded down, but minimum of one: `std::max(1, power / 5)`

3. the explosion animation radius (technically it's a square, not a circle) also depends on the power and is equal to half the power voxels, rounded down
For example if the power is 91, then the radius is 45 voxels... which is almost 3 tiles (1 tile = 16 voxels)

------------

Until now, you could limit the effective explosion radius using the `damageAlter.FixRadius` attribute.
This doesn't however affect the explosion animation radius.

------------

To affect the explosion animation radius, I have added a new attribute `powerForAnimation`.
If `powerForAnimation > 0`, it will be used for calculations instead of the `power` attribute.
It impacts all 3 points above: default explosion sound, number of individual explosion animations and the explosion animation radius.

Requires OXCE v7.3.2 or newer.

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Re: [DONE] AoE explosion animation radius
« Reply #2 on: January 02, 2022, 01:20:46 pm »
Great, thanks.
Question: is this "powerForAnimation" applied near "power", or inside "damageAlter"?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9103
    • View Profile
Re: [DONE] AoE explosion animation radius
« Reply #3 on: January 02, 2022, 01:34:03 pm »
near "power"