fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

Add default shockwave damage types functionality.

Open MageKing17 opened this issue 2 years ago • 2 comments

Shockwaves can have a separate damage type from the weapon that created them, but one common footgun related to this is that they only have a damage type if you specify one, rather than inheriting their parent weapon's damage type. I saw it suggested more than once that some sort of automation here would be welcomed, so I tried to make things easier for modders. This includes setting a global default, inheriting from the parent weapon, and/or generating a damage type based on the parent weapon's damage type but with an added suffix. All of these options are also available for dinky shockwaves, with the non-dinky options applying to both by default.

I tried to make applying all the new options simultaneously have meaningful behavior, as well as making the feature as modular-table-friendly as possible by only finalizing shockwave damage types after parsing is over. That being said, if anyone has any ideas to make this functionality even more modder-friendly (IIRC suffixes were @EatThePath's idea), go ahead and comment; if it's not too complex, I should be able to throw it in, and even if it is someone may figure out how to implement it without requiring a full-blown overhaul of the parsing system... and if it does require a full-blown overhaul of the parsing system, it may happen anyway, so you never know.

MageKing17 avatar Aug 07 '22 06:08 MageKing17

I'm generally in favour of defaulting intuitive behavior when targeting the latest version, but I didn't want to do it unilaterally.

MageKing17 avatar Aug 14 '22 06:08 MageKing17

I'd be in favor of it.

Goober5000 avatar Aug 14 '22 18:08 Goober5000

@MageKing17 Do you want to make the change to defaults in this PR or should we leave that for later and merge this one?

EatThePath avatar Sep 06 '22 01:09 EatThePath

Do you want to make the change to defaults in this PR or should we leave that for later and merge this one?

I have no objection to doing it in this PR, since nobody seems to mind this being default-on for mods targeting new versions of FSO. Based on the example of d8987b3de08e6db35dfd65d1a3b2c2e4534150d6, it should be based on whether the mod supports 22.4, as the next stable release; any objections?

MageKing17 avatar Sep 06 '22 19:09 MageKing17

Sounds good to me.

wookieejedi avatar Sep 06 '22 20:09 wookieejedi

Sounds reasonable to me.

EatThePath avatar Sep 06 '22 21:09 EatThePath

Sounds good, and the new commit looks good too

Goober5000 avatar Sep 06 '22 22:09 Goober5000