Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Planet Search Overhaul (07/13/24)

Author Topic: DEMs missing certain damage modifiers  (Read 211 times)

Lukas04

  • Admiral
  • *****
  • Posts: 537
    • View Profile
DEMs missing certain damage modifiers
« on: April 21, 2024, 07:01:47 AM »

DEMs currently adjust for the stat changes to ballistic/energy/missile mods, but the "damageToX", X being the hullsize, stats are not currently being applied to DEMs.

This means that if a hullmod adjusts this stat, it does not apply to the DEMs damage.
This can make DEMs both much worse or much better on certain types of ships that adjust for these stats. This also means that skills like Wolfpack tactics have no effect on DEM damage.
« Last Edit: April 21, 2024, 07:32:36 AM by Lukas04 »
Logged
My Mods

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24690
    • View Profile
Re: DEMs missing certain damage modifiers
« Reply #1 on: April 21, 2024, 08:18:27 AM »

Nice catch, thank you! Fixed this up. It was also affecting things like "damage to target engines" and "damage to target shields" and so on.

(If you're curious btw, the fix is copying a bunch of these stats over to the fake DEM drone that actually fires the beam weapon. It was already doing that for energy/ballistic/missile damage modifiers but I guess all these other ones just didn't occur to me at the time! Going to have to remember to modify this when/if I add any more stats like this to the game.)

Spoiler
After line 282 in DEMScript:
demDrone.getMutableStats().getDamageToCapital().applyMods(ship.getMutableStats().getDamageToCapital());
demDrone.getMutableStats().getDamageToCruisers().applyMods(ship.getMutableStats().getDamageToCruisers());
demDrone.getMutableStats().getDamageToDestroyers().applyMods(ship.getMutableStats().getDamageToDestroyers());
demDrone.getMutableStats().getDamageToFrigates().applyMods(ship.getMutableStats().getDamageToFrigates());
demDrone.getMutableStats().getDamageToFighters().applyMods(ship.getMutableStats().getDamageToFighters());
demDrone.getMutableStats().getDamageToMissiles().applyMods(ship.getMutableStats().getDamageToMissiles());
demDrone.getMutableStats().getDamageToTargetEnginesMult().applyMods(ship.getMutableStats().getDamageToTargetEnginesMult());
demDrone.getMutableStats().getDamageToTargetHullMult().applyMods(ship.getMutableStats().getDamageToTargetHullMult());
demDrone.getMutableStats().getDamageToTargetShieldsMult().applyMods(ship.getMutableStats().getDamageToTargetShieldsMult());
demDrone.getMutableStats().getDamageToTargetWeaponsMult().applyMods(ship.getMutableStats().getDamageToTargetWeaponsMult());
[close]
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 537
    • View Profile
Re: DEMs missing certain damage modifiers
« Reply #2 on: April 21, 2024, 08:45:47 AM »

Nice catch, thank you! Fixed this up. It was also affecting things like "damage to target engines" and "damage to target shields" and so on.

(If you're curious btw, the fix is copying a bunch of these stats over to the fake DEM drone that actually fires the beam weapon. It was already doing that for energy/ballistic/missile damage modifiers but I guess all these other ones just didn't occur to me at the time! Going to have to remember to modify this when/if I add any more stats like this to the game.)

Spoiler
After line 282 in DEMScript:
demDrone.getMutableStats().getDamageToCapital().applyMods(ship.getMutableStats().getDamageToCapital());
demDrone.getMutableStats().getDamageToCruisers().applyMods(ship.getMutableStats().getDamageToCruisers());
demDrone.getMutableStats().getDamageToDestroyers().applyMods(ship.getMutableStats().getDamageToDestroyers());
demDrone.getMutableStats().getDamageToFrigates().applyMods(ship.getMutableStats().getDamageToFrigates());
demDrone.getMutableStats().getDamageToFighters().applyMods(ship.getMutableStats().getDamageToFighters());
demDrone.getMutableStats().getDamageToMissiles().applyMods(ship.getMutableStats().getDamageToMissiles());
demDrone.getMutableStats().getDamageToTargetEnginesMult().applyMods(ship.getMutableStats().getDamageToTargetEnginesMult());
demDrone.getMutableStats().getDamageToTargetHullMult().applyMods(ship.getMutableStats().getDamageToTargetHullMult());
demDrone.getMutableStats().getDamageToTargetShieldsMult().applyMods(ship.getMutableStats().getDamageToTargetShieldsMult());
demDrone.getMutableStats().getDamageToTargetWeaponsMult().applyMods(ship.getMutableStats().getDamageToTargetWeaponsMult());
[close]

Yeah i found the issue by a user refering to an issue within my mod where a ship that has decreased damage but other benefits, appears to not have the damage reduced on DEMs, went to check the DEMScript code and noticed that it just wasnt applying the stats i modified. Funnily enough i have looked at the DEMScript multiple times before for other reasons and havent noticed the issue either so i really cant blame you on this one haha.
Logged
My Mods