Fractal Softworks Forum

Starsector => Mods => Topic started by: Nick XR on January 10, 2017, 10:50:29 PM

Title: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Nick XR on January 10, 2017, 10:50:29 PM
Detailed Combat Results v5.1.2
-=Download=- (https://bitbucket.org/NickWWest/starsectorcombatanalytics/downloads/DetailedCombatResults.5.1.2.zip)

Ever wonder how many ships you've killed?  Or how a new ship load-out you've created is performing in combat?  Or how useless a cautious officer is in an Onslaught?
No more guessing, now you can know for sure!

Features:



In Game Images:
(https://i.imgur.com/5GyrqKjl.png) (https://imgur.com/5GyrqKj.png)
(http://i.imgur.com/subgjKbl.png) (https://imgur.com/subgjKb.png)

-=Download=- (https://bitbucket.org/NickWWest/starsectorcombatanalytics/downloads/DetailedCombatResults.5.1.2.zip)

How to use:

 1. If you haven't already, ensure you've increased your max memory (if you haven't, your game will be slooooow with mods): https://fractalsoftworks.com/forum/index.php?topic=8726.0   
 2. Download & install this mod
 3. Make sure this mod is enabled
 4. Fight at least one battle
 5. View the generated intel event using the 'e' key OR
 6. Press the 'L' key (configurable in mod's settings.json) when in the campaign UI


Mod compatibility:

Known Issues/Limitations:

To remove this mod
Spoiler
  • Set the property 'MaxCombatResultCount' to 0 in DetailedCombatResults.json
  • Start StarSector and load your save
  • Advance game time by two days
  • Save Game
[close]


Using this mod in other mods:
This mod is covered by the MIT license, you can do what ever you want with this, no need to ask.  Just be nice and mention that this mod exists and where you got it from :)


Change Log:
Spoiler
v5.1.2
 Fixed issue with explosions and looking too deeply inside core objects. Thanks Photonsynthesis
 Better explosion damage detection

v5.1.1
 Add caching layer to prevent perf issues if IntelCombatReport.isValid() is called repeatedly (by mods)
 Data is now stored in a compressed format
 Now includes Chinese (locale=zh) translation (thanks saya39!): https://www.fossic.org/forum.php?mod=viewthread&tid=1667

v5.1
 Campaign Simulation Battles now create "simulation" combat results that last for a day
 Changed Flux Dmg -> EMP Dmg
 Localization fixes (some strings were omitted)
 Issue with Motes not always being properly identified

v5.0
 Updated to support StarSector .95
 Can now be localized, current localization is English
 Uses StarSector .95 damage listener system to give much more accurate values for damage.
 Now properly tracks (didn't before):
  • plasma cannons
  • Flak weapons
  • Doom Mines
  • Mines generally
  • storyline "things"
  • collision damage
  • on-hit effects
Beam weapons that use multiple beams (like Seeker's kaleidoscope) now have damage computed correctly
 Removed SaveDetailedCombatData
 Renamed mod to show scope and goal (not general analytics, just detailed combat results)

v4.6.1
 Fix issue with failing to parse a saved combat for which there was no damage dealt
 Minor perf improvements relating to loading saved data

v4.6
 Fix all projectile weapons dealing double damage

v4.5
 Another attempt at getting submunition damage correct
 Fancy new Icon thanks to Nia Tahl! 

v4.4
 Try again to get MIRVs to calculate damage correctly without breaking anything else

v4.3
 Fully compatible with prior version
 MIRV warheads should now calculate their damage properly (Thanks MesoTroniK)
 Defend against NULL in a place it shouldn't be possible but apparently is.

v4.2
 New save data format to enable new functionality
  • This won't break anything.
  • But your old combat data will be automatically deleted.
  • Your save game is fine.
No longer displaying kills based on killing blows, we now display Solo Kills (> 80% of hull damage) and Assists (> 20% hull dmg)
 DP destroyed based on pro-rated armor/hull damage
 Much more accurate damage calculations.  Not perfect, but much better.
 More accurate tracking of what ships were killed.
 Fighters are now treated as a singular weapon system, since that is often the most useful way of thinking about them
 Ships details "kill" grid removed, replaced with sprites:
  • now render sprites for ships that were solo-killed
  • render ship sprites that were kill-assisted (along with a damage overlay)
New enemy fleet status summary area
 Player ships are shown as Disabled/Destroyed/Retreated in ship list
 Added % hull remaining after combat, color coded
 Can now aggregate data based on history and generate a "Merged combat result"

v4.1
 Proper fighter kill count for TOTAL rows
 Denser data format for detailed combat data (to try and avoid 1MB limit)
 No longer using "ship list" functionality, now using rendered sprite images in list
 If SaveDetailedCombatData is set to true, save detailed results when main menu missions are played (saved on completion)
 Images scaled slightly by hull class
 Use 7 zip command line to build archive to hopefully work around archive slash issues

v4.0
 Added new intel window for post combat detailed results (press 'e')
 Weapons can now properly compute how many fighters they've killed (rewrote aggregation)
 Various bug fixes around things done in mods that aren't done in Vanilla (big thanks stormbringer951)
 If SaveDetailedCombatData is on, files will be written after each battle in the folder /saves/common/combatanalytics/

3.3
 Defend against key not being specified in JSON

3.2
 Handle possible exception (should only happen on some mods)
 Sort results by damage dealt desc

3.1
 Updated to starsector .9a
 
3.0
 Updated to Starsector .8.1a
 Fighters are tracked as weapon systems

2.0
 Data is persisted as strings so disabling the mod wont break saves
 Better exception trapping in case something unexpected happens

1.0 - Released
[close]

Forum: http://fractalsoftworks.com/forum/index.php?topic=11551.0
Source: https://bitbucket.org/NickWWest/starsectorcombatanalytics
License: MIT License (Do what ever you want, creators not liable)
Title: Re: [0.7.2a] Combat Analytics (2017-01-10)
Post by: Midnight Kitsune on January 10, 2017, 10:58:41 PM
One issue I think I can already see is that the K key is used by Common Radar to turn the radar on and off
Title: Re: [0.7.2a] Combat Analytics (2017-01-10)
Post by: Nick XR on January 10, 2017, 11:06:54 PM
OhSnap.gif


There will probably be a few other issues I'll solve at the same time before issuing a new version. 

Thanks!
Title: Re: [0.7.2a] Combat Analytics (2017-01-10)
Post by: nomadic_leader on January 22, 2017, 05:42:06 AM
Nice. Really like the mods experimenting with new features.

Any possibility of adding a running and per battle tally of friendly/enemy crew kills/losses?
Title: Re: [0.7.2a] Combat Analytics (2017-01-10)
Post by: JohnDoe on January 22, 2017, 07:39:26 AM
I really want something like raid dps meter
Title: Re: [0.7.2a] Combat Analytics (2017-01-10)
Post by: Nick XR on January 22, 2017, 09:26:34 PM
What sort of functionality does raid dps meter have that you would want?

for SS v.8  I'll see about having optional totals that display during combat.
Title: Re: [0.7.2a] Combat Analytics v.1 (2017-01-10)
Post by: stormbringer951 on February 09, 2017, 09:25:02 AM
There's a crash to desktop bug whenever you exit the combat analytics menu, which after some testing enabling/disabling mods from my modlist seems to be caused by an interaction with Nexerelin.

The stack trace from the Starsector log:

Code
123629 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.campaign.CampaignState.dialogDismissed(Unknown Source)
at com.fs.starfarer.ui.M.dismiss(Unknown Source)
at com.fs.starfarer.ui.newui.o0oO.dismiss(Unknown Source)
at com.fs.starfarer.ui.newui.T.dismiss(Unknown Source)
at com.fs.starfarer.ui.M.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.newui.T.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.O00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source)
at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.O00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Minimal set of mods to replicate the crash:
Title: Re: [0.7.2a] Combat Analytics v.1 (2017-01-10)
Post by: Nick XR on February 09, 2017, 09:57:43 AM
Thanks, I'll check it out today.
Title: Re: [0.7.2a] Combat Analytics v.1 (2017-01-10)
Post by: Nick XR on February 09, 2017, 10:36:52 PM
There's a crash to desktop bug whenever you exit the combat analytics menu, which after some testing enabling/disabling mods from my modlist seems to be caused by an interaction with Nexerelin.

The stack trace from the Starsector log:

Code
123629 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.campaign.CampaignState.dialogDismissed(Unknown Source)
at com.fs.starfarer.ui.M.dismiss(Unknown Source)
at com.fs.starfarer.ui.newui.o0oO.dismiss(Unknown Source)
at com.fs.starfarer.ui.newui.T.dismiss(Unknown Source)
at com.fs.starfarer.ui.M.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.newui.T.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.O00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source)
at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.O00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Minimal set of mods to replicate the crash:
  • Combat Analytics .1
  • LazyLib 2.1
  • Nexerelin 0.7.6d

Got it fixed, new DL link is up.  Thanks for the easy repro steps with the mod list.

Root problem was, the dialogue init was looking for a sector entity token that doesn't exist in non vanilla games (Jangala system)
Title: Re: [0.7.2a] Combat Analytics v.1 (2017-01-10)
Post by: stormbringer951 on February 10, 2017, 02:21:43 AM
There's a crash to desktop bug whenever you exit the combat analytics menu, which after some testing enabling/disabling mods from my modlist seems to be caused by an interaction with Nexerelin.

The stack trace from the Starsector log:

Code
123629 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.campaign.CampaignState.dialogDismissed(Unknown Source)
at com.fs.starfarer.ui.M.dismiss(Unknown Source)
at com.fs.starfarer.ui.newui.o0oO.dismiss(Unknown Source)
at com.fs.starfarer.ui.newui.T.dismiss(Unknown Source)
at com.fs.starfarer.ui.M.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.newui.T.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.O00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source)
at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.O00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInput(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Minimal set of mods to replicate the crash:
  • Combat Analytics .1
  • LazyLib 2.1
  • Nexerelin 0.7.6d

Got it fixed, new DL link is up.  Thanks for the easy repro steps with the mod list.

Root problem was, the dialogue init was looking for a sector entity token that doesn't exist in non vanilla games (Jangala system)

No problem. Thanks for the blazing fast turnaround time on the hotfix :)
Title: Re: [0.7.2a] Combat Analytics v.1.1 (2017-02-09)
Post by: Weltall on February 10, 2017, 06:58:32 PM
A cautious officer in an onslaught  :o I definitely do not need a mod to know ow useless they will be! 100%  ::)

Holy.. I remember talks about a mod like this, but I never thought I would see it. Thanks a lot Nick XR. How many times I would feel someone in team is doing nothing but flying around. This is great =)
Title: Re: [0.7.2a] Combat Analytics v.1.1 (2017-02-09)
Post by: Pegart on February 13, 2017, 06:45:32 AM
Quote
Disabling mod will render your save broken (but it can be fixed with a text editor)

What needs to be edited in the save file when turning the mod off to fix it?
Title: Re: [0.7.2a] Combat Analytics v.1.1 (2017-02-09)
Post by: Nick XR on February 13, 2017, 09:44:20 AM
I'm not sure off the top of my head, I'll let you know inside the day.  The core issues is CombatAnalytics classes are serialized with the persisted data.  The gist is to fix your save, you just need to safely remove all the elements where CombatAnalytics is referenced.

There shouldn't be any issues with leaving the mod enabled to keep it from breaking your save (if you are having issues, please let me know). 

In the next release disabling the mod won't break your saves, but I'm waiting for SS.8 to release it.
Title: Re: [0.7.2a] Combat Analytics v.1.1 (2017-02-09)
Post by: Pegart on February 13, 2017, 10:42:36 AM
OK, sure will if I'll have any problems. Was just postponing using it because I didn't want to risk breaking my game and potentially not being able to revert back but if you say it's pretty simple if it needs to be done I'll use it.
Title: Re: [0.7.2a] Combat Analytics v.1.1 (2017-02-09)
Post by: stormbringer951 on April 03, 2018, 02:55:27 PM
Any chance this mod will see an update for 0.8.1?
Title: Re: [0.8.1a] Combat Analytics v.3 (2018-06-29)
Post by: Nick XR on June 29, 2018, 08:35:15 PM
Updated to .3

- Now supports Starsector 8.1a
- Fighters are now tracked as weapon systems
Title: Re: [0.8.1a] Combat Analytics v.3 (2018-06-29)
Post by: atreg on June 29, 2018, 09:52:19 PM
Got a fatal null error involving this mod after my third fleet encounter.
Spoiler
1039936 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.combatanalytics.data.WeaponDamage.compareTo(WeaponDamage.java:110)
   at data.scripts.combatanalytics.data.WeaponDamage.compareTo(WeaponDamage.java:9)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.legacyMergeSort(Unknown Source)
   at java.util.Arrays.sort(Unknown Source)
   at data.scripts.combatanalytics.data.CombatResult.buildShipCombatResults(CombatResult.java:132)
   at data.scripts.combatanalytics.data.CombatResult.<init>(CombatResult.java:70)
   at data.scripts.combatanalytics.CombatAnalyticsManager.completeCombat(CombatAnalyticsManager.java:29)
   at data.scripts.combatanalytics.CombatAnalyticsModPlugin$1.reportPlayerEngagement(CombatAnalyticsModPlugin.java:43)
   at com.fs.starfarer.campaign.CampaignEngine.reportPlayerEngagement(Unknown Source)
   at com.fs.starfarer.api.impl.campaign.FleetEncounterContext.processEngagementResul ts(FleetEncounterContext.java:235)
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEng agement(FleetInteractionDialogPluginImpl.java:426)
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.backFromEngagement(NexFleetInteractionDialogPluginImpl.java:65)
   at com.fs.starfarer.campaign.CampaignState.prepare(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]
Title: Re: [0.8.1a] Combat Analytics v.3 (2018-06-29)
Post by: Nick XR on June 29, 2018, 11:30:59 PM
Got a fatal null error involving this mod after my third fleet encounter.
Spoiler
1039936 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.combatanalytics.data.WeaponDamage.compareTo(WeaponDamage.java:110)
   at data.scripts.combatanalytics.data.WeaponDamage.compareTo(WeaponDamage.java:9)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.legacyMergeSort(Unknown Source)
   at java.util.Arrays.sort(Unknown Source)
   at data.scripts.combatanalytics.data.CombatResult.buildShipCombatResults(CombatResult.java:132)
   at data.scripts.combatanalytics.data.CombatResult.<init>(CombatResult.java:70)
   at data.scripts.combatanalytics.CombatAnalyticsManager.completeCombat(CombatAnalyticsManager.java:29)
   at data.scripts.combatanalytics.CombatAnalyticsModPlugin$1.reportPlayerEngagement(CombatAnalyticsModPlugin.java:43)
   at com.fs.starfarer.campaign.CampaignEngine.reportPlayerEngagement(Unknown Source)
   at com.fs.starfarer.api.impl.campaign.FleetEncounterContext.processEngagementResul ts(FleetEncounterContext.java:235)
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEng agement(FleetInteractionDialogPluginImpl.java:426)
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.backFromEngagement(NexFleetInteractionDialogPluginImpl.java:65)
   at com.fs.starfarer.campaign.CampaignState.prepare(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]



Sorry about that, I'll check it out. 
Title: Re: [0.8.1a] Combat Analytics v.3 (2018-06-29)
Post by: Nick XR on June 29, 2018, 11:48:32 PM
@atreg Try the latest version that's posted.  Looks like a Ship had a name of NULL which isn't very nice, but perhaps possible with mods.  Let me know if that works/doesn't work.

Thanks!
Title: Re: [0.8.1a] Combat Analytics v.3 (2018-06-29)
Post by: atreg on June 30, 2018, 04:23:12 AM
I went through a bunch of fights and didn't crash, so it seems like whatever you did worked.
The only other thing I noticed is that Tritach Corporation is spelled as "Torporation," but otherwise thanks for the quick fix.
Title: Re: [0.8.1a] Combat Analytics v.3 (2018-06-29)
Post by: Nick XR on June 30, 2018, 08:54:38 AM
I went through a bunch of fights and didn't crash, so it seems like whatever you did worked.
The only other thing I noticed is that Tritach Corporation is spelled as "Torporation," but otherwise thanks for the quick fix.

Ah good catch.  Was using index 0 to uppercase a letter instead of index i, so it was always getting the first character.  Fixed.
Title: Re: [0.9a] Combat Analytics v3.1 (2018-11-18)
Post by: Nick XR on November 18, 2018, 04:46:40 PM
3.1 Release
* Updated for .9a
Title: Re: [0.9a] Combat Analytics v3.1 (2018-11-18)
Post by: Thaago on November 18, 2018, 06:36:38 PM
Thanks for updating! This is always a fun mod. Any way to expand functionality to damage done by type and/or with reductions? Or is it just not supported by the API at present?
Title: Re: [0.9a] Combat Analytics v3.1 (2018-11-18)
Post by: Nick XR on November 18, 2018, 11:46:05 PM
Thanks for updating! This is always a fun mod. Any way to expand functionality to damage done by type and/or with reductions? Or is it just not supported by the API at present?

I have plans to add a bit more detail and better presentation, but not to that level.  It's quite difficult to tell how much damage was done to armor/hull, even with shields it's sort-of hard with damage types and efficiency. Unfortunately there's no damage-event that can be subscribed to so a lot of stuff is inferred.  I had thought about going down that route of trying to figure out damage at a greater detail, but then I realized what's there more or less seems to meet the needs of determining what ships and weapons are actually doing anything in combat, and being off by 25% or even more probably wouldn't change any actual conclusions. 

Thanks for using the mod!
Title: Re: [0.9a] Combat Analytics v3.1 (2018-11-18)
Post by: Thaago on November 19, 2018, 12:31:40 AM
Thats kind of what I thought, there's some complex interactions happening there. Thanks for making the mod!
Title: Re: [0.9a] Combat Analytics v3.1 (2018-11-18)
Post by: Gaudium on November 19, 2018, 11:30:39 PM
Hello i am getting this:
33327 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33344 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33512 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33533 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33553 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33621 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33641 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33846 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33868 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33949 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
33970 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
34141 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
34177 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
34260 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
34476 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
34709 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
34728 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
34988 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35008 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35035 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35064 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35268 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35288 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35324 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35340 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35601 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
35616 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Error processing damage detection
java.lang.NullPointerException
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleProjectile(EveryFrameDamageDetector.java:272)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.handleFrame(EveryFrameDamageDetector.java:138)
   at data.scripts.combatanalytics.EveryFrameDamageDetector.detectDamage(EveryFrameDamageDetector.java:34)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
   at com.fs.starfarer.title.C.o0oO$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Title: Re: [0.9a] Combat Analytics v3.1 (2018-11-18)
Post by: Gaudium on November 19, 2018, 11:38:45 PM
And then this:
901504 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.api.impl.campaign.fleets.DefaultFleetInflater.inflate(DefaultFleetInflater.java:258)
   at com.fs.starfarer.campaign.fleet.CampaignFleet.inflateIfNeeded(Unknown Source)
   at com.fs.starfarer.ui.impl.StandardTooltipV2.createFleetTooltip(Unknown Source)
   at com.fs.starfarer.campaign.ooOO.o00000(Unknown Source)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Not sure if this is from the same mod since last night everything was working fine but i updated a few mods this morning since they were patched.
Title: Re: [0.9a] Combat Analytics v3.1 (2018-11-18)
Post by: Nick XR on November 20, 2018, 12:14:07 AM
Thanks for the stacks.  I'll get it sorted out.
Title: Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
Post by: Nick XR on November 20, 2018, 09:21:56 AM
Version 3.2 uploaded.

Fix for exception (I think).  I wasn't able to repro it locally so I think it's mod related.  The issue was around assuming that if a firing ship was a fighter that it must also have a fighter wing it belongs to.

Also sorted the ships in the dialogue list by total damage dealt, descending.
Title: Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
Post by: ChrisKvn on February 03, 2019, 12:54:43 PM
I get the following backtrace when starting a new game with this mod, this is after remapping WASD to ESDF keyboard layouts, maybe it does not like that:


412843 [Thread-5] INFO  com.fs.starfarer.api.impl.campaign.intel.AnalyzeEntityMissionIntel  - Created AnalyzeEntityMissionIntel: Domain-era Probe, faction: pirates
412844 [Thread-5] INFO  com.fs.starfarer.api.impl.campaign.intel.SurveyPlanetMissionIntel  - Created SurveyPlanetMissionIntel: Alpha New Biscay II, faction: independent
412845 [Thread-5] INFO  com.fs.starfarer.api.impl.campaign.intel.SystemBountyIntel  - Starting bounty at market [Jangala], 1650 credits per frigate
412854 [Thread-9] INFO  sound.O  - Cleaning up music with id [miscallenous_main_menu.ogg]
412906 [Thread-5] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: org.json.JSONException: JSONObject["CombatAnalyzeKey"] not found.
java.lang.RuntimeException: org.json.JSONException: JSONObject["CombatAnalyzeKey"] not found.
        at com.fs.starfarer.settings.StarfarerSettings.class(Unknown Source)
        at com.fs.starfarer.settings.StarfarerSettings$1.getString(Unknown Source)
        at data.scripts.combatanalytics.CombatAnalyticsModPlugin.onGameLoad(CombatAnalyticsModPlugin.java:41)
        at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
        at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
        at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
        at com.fs.starfarer.ui.N.dismiss(Unknown Source)
        at com.fs.starfarer.ui.newui.float.dismiss(Unknown Source)
        at com.fs.starfarer.ui.newui.Objectsuper.advanceImpl(Unknown Source)
        at com.fs.starfarer.ui.Q.advance(Unknown Source)
        at com.fs.starfarer.ui.v.advanceImpl(Unknown Source)
        at com.fs.starfarer.ui.Q.advance(Unknown Source)
        at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
        at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
        at com.fs.state.AppDriver.begin(Unknown Source)
        at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
        at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.json.JSONException: JSONObject["CombatAnalyzeKey"] not found.
        at org.json.JSONObject.get(JSONObject.java:406)
        at org.json.JSONObject.getString(JSONObject.java:577)
        ... 18 more
413016 [Thread-11] INFO  sound.O  - Creating streaming player for music with id [miscallenous_main_menu.ogg]
413016 [Thread-11] INFO  sound.OooO  - Playing music with id [miscallenous_main_menu.ogg]

Title: Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
Post by: Nick XR on February 03, 2019, 07:02:02 PM
Yeah, it looks like there isn't a key assigned to the combat analytics.  I'll try your repro steps, thanks!
Title: Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
Post by: xor0 on February 04, 2019, 09:23:13 AM
ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: org.json.JSONException: JSONObject["CombatAnalyzeKey"] not found.

I got the same error when using peazip to unzip. For some reason it can't access a couple of files. Just grabbing the files from windows works fine.
Title: Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
Post by: Nick XR on February 09, 2019, 02:55:57 PM
Is Peazip safe to use?  It claims to be open source, but it's git repo is for its website not the product, it's presence on SourceForge is limited to things to download, and it's OSDN repo is empty (https://osdn.net/projects/peazip/scm/svn/).  It's as though it's trying really hard to look like opensource, without being opensource.

I'm not saying it's a scam, but I will say if I was to run a scam pretending to be open source it would look a LOT like this.

I use a build script that uses the powershell command 'Compress-Archive' (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.archive/compress-archive?view=powershell-6)

New 3.3 Build is up, adds error handling when the configuration can't be located (which might be a clue that there's a bigger problem, but at least if it's only config it'll still load)
Title: Re: [0.9a] Combat Analytics v3.3 (2018-11-20)
Post by: seewen on April 28, 2019, 05:53:04 AM
Excellet mod. It helped me learn the game.
Title: Re: [0.9a] Combat Analytics v3.3 (2018-11-20)
Post by: Nick XR on May 10, 2019, 11:49:59 PM
Excellet mod. It helped me learn the game.

Great to hear!

Mod is verified to work without issue on 9.1a
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: stormbringer951 on May 22, 2019, 09:22:24 AM
Some bugs to report / features to request:

1. From code-diving, when Combat Analytics tries to load invalid data, the exception aborts loading the entire dataset and pressing [L] only tells you no battles have been fought. Corrupted data is not communicated to the player in gameplay, only in the starsector.log which is very verbose and most players don't read.

It should notify the player (perhaps via Global.getSector().getCampaignUI().addMessage()?) that there may be a a problem parsing corrupted combat records when the exception is thrown / when opening the interaction dialogue.

2. Damage records can be created by the EveryFrame plugin which is not accepted by SerialisationManager, which will cause an exception to be thrown at data read time. Namely, it does not check for empty string weaponNames at creation time, but does at read time.

Repro steps:

- download the Karlsson Heirloom mod from the #mod_updates channel in the Discord server.
- addship kh_commitment frigate using console commands.
- fight a battle. When it uses its ramming shipsystem and hits another ship, it create a damage record where weaponName is an empty string.
- press [L], it should say that there is no battle data, because it has just tried to load the invalid Damage records. Checking the message in the stacktrace confirms that weaponName is empty.

3. Modular ships create a ship entry for each module. These are ugly because each module only have ship IDs and not names, and some modules are hidden and not meant to be player-visible (e.g. the undershield module on Arsenal Expansion's Flourish frigate). Some mod ships have modules that have a significant proportion of the overall ship's firepower or contribute a significant amount of armour/hull, so these entries should be merged into a single entry (simplest solution is using ship.getParentStation() to check if it is a module and get the parent ShipAPI and then the id; being able to have tabulated comparative data for each module inside the parent ship's entry might be cool, but complexity...).

Easiest repro steps:

- download a mod where modules can have weapons or take damage. I used a Karlsson Heirloom mod ship, the Rationale, but other ships from other mods such as the Cathedral Hubship from Ship Weapon Pack should also repro this nicely.
- fight battle
- battle report has separate entries for each module

4. There is a display error when there are ships with a hyphen in the name (e.g. Seeker's "High-tide" ship). Due to how Combat Analytics cleans up ship's full designations, it truncates the name in the Ship record to "High".

Repro steps:

- download the Seeker modpack from #mod_updates from Starsector Discord #mod_updates
- fight battle with High-tide deployed
- the ship class in the combat analytics Ship record will be truncated to "High"

5. Please update your Bitbucket with the latest version :)

EDIT:

6. Killing blow stats counter should ideally discriminate between ships and fighters, and probably exclude modules.
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: stormbringer951 on May 23, 2019, 05:38:36 PM
4b. Looking at full designations from several mods, there are some other tricky designations from mods (i.e. "Elder Orb class Custom Mod-Destroyer") but matching substring " class" or "-class" instead of '-' should catch all the cases I checked.

7. Fighters from ships with drone launcher systems are not recorded as weapons. Despite now being mostly retired from vanilla, drone launchers are still used in a surprising number of mods - DME, LoA, JP/PACK/ASP, Seeker, SCY, SWP, Underworld, and some of these drones have weapons it would be nice to track.

The code should check firingShip.isDrone(), and resolve the owning ship with with firingShip = firingShip.getDroneSource().

I assume the exception caused by chaining the call to firingShip.getWing.getSourceShip() is the bug fixed in 3.2 (which is still needed for some mod fighters I think, like Tyrador's drones).

8. Rarely, enemy ships can appear in the player's ship list because it is not tracked prior to being destroyed, and is registered with the owner value of 100 (destroyed). The code to detect a ship's owner should use getOriginalOwner() instead of getOwner(), which is designed to get the owner of a ship before it was destroyed.

In the interaction dialog plugin, it should probably also test if (scr.ship.owner == 0) or rather if (scr.ship.owner != 1), to clean up combat data from old saves.

9. Do you take pull requests? I've already tested most of this stuff on a local copy, and I'd make a patch to save you the bother if you push a later version of the code to the Bitbucket repo.
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: Nick XR on May 23, 2019, 06:26:25 PM
@stormbringer951  That's a great list! I appreciate the time you've spent on it. 

A patch file would be best as I'm not too familiar with bitbucket's PR system.  If you could PM me the patch file that would be great.

Thanks!

*Edit*
Also the general approach of the mod was one of mild paranoia in that I didn't want any malfunctions of my mod to go crashing anyone's game (especially right after a combat!)  And I haven't played with any faction ships since I played way too much Nexerlin in 7.2 and burnt out for a year or so. But one thing I've learned the hard way is a lot of mods/factions manage to set stuff to NULL and empty string that doesn't happen in Vanilla...
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: Se7ventySix on May 24, 2019, 08:53:51 AM
Thanks for this great mod!!

I love being able to try new weapons on ships and see how well they perform!

Just curious though, how do I go about using an analytics tool with Combat Analytics?  I downloaded Tableau Public but can't find the files I need to load?

Also, I would be interested to know if it's possible to purge all the data and start fresh?
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: Nick XR on May 24, 2019, 09:20:15 AM
Thanks for this great mod!!

I love being able to try new weapons on ships and see how well they perform!
Great!
Just curious though, how do I go about using an analytics tool with Combat Analytics?  I downloaded Tableau Public but can't find the files I need to load?
You'll have to enable detailed logging first, it will cause the save file size to balloon up to be huge. Once you fight a combat, save, then edit your save file and track down the entry for the raw data.  You'll then have to copy out the data into separate files manually.  This workflow sucks, but it's the best that can be done as I can't write the data to other files (since you wouldn't want any old random mod writing data all over your drive).  I think the readme in the mod folder describes how to do this? (can't check now)

Also, I would be interested to know if it's possible to purge all the data and start fresh?
Good idea! Working on that now for a new release!
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: stormbringer951 on May 24, 2019, 09:30:00 AM
A patch file would be best as I'm not too familiar with bitbucket's PR system.  If you could PM me the patch file that would be great.

Sent. The in-dev features I peeked at while testing the patch look fantastic, by the way :)

You'll have to enable detailed logging first, it will cause the save file size to balloon up to be huge. Once you fight a combat, save, then edit your save file and track down the entry for the raw data.  You'll then have to copy out the data into separate files manually.  This workflow sucks, but it's the best that can be done as I can't write the data to other files

There is an API function (http://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/SettingsAPI.html#writeTextFileToCommon(java.lang.String,%20java.lang.String)) to write files now,

Code: java
void writeTextFileToCommon(java.lang.String filename,  java.lang.String data) throws java.io.IOException

From patch notes:

The size limit stated in patch notes conflicts with the API docs, but whatever the limitations it seems like a command to dumping the data tables from a save using that (whether saveDetailedData or not) in the interaction dialog would be quite useful.
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: Nick XR on May 24, 2019, 10:06:46 AM
There is an API function (http://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/SettingsAPI.html#writeTextFileToCommon(java.lang.String,%20java.lang.String)) to write files now,

Code: java
void writeTextFileToCommon(java.lang.String filename,  java.lang.String data) throws java.io.IOException

From patch notes:
  • Load/save text data from the <installdir>/saves/common/ folder
  • Limited to 1MB per file, 50MB total files per session

The size limit stated in patch notes conflicts with the API docs, but whatever the limitations it seems like a command to dumping the data tables from a save using that (whether saveDetailedData or not) in the interaction dialog would be quite useful.

Oh my...

I'll probably stick to TSV files unless anyone has strong opinions otherwise.
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: Se7ventySix on May 24, 2019, 10:28:03 AM
Thanks for the quick replies!!
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: Nick XR on May 24, 2019, 04:14:50 PM
Validating the 4.0 version now, here is a preview of the new intel report  (Thanks to Sundog's Starship Legends (http://fractalsoftworks.com/forum/index.php?topic=15321.0) for making me realize we have tables now)

(https://i.imgur.com/8HuJJNh.png)


*edit*
4.0 is live
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: TimeDiver on May 24, 2019, 04:44:01 PM
Validating the 4.0 version now, here is a preview of the new intel report  (Thanks to Sundog's Starship Legends (http://fractalsoftworks.com/forum/index.php?topic=15321.0) for making me realize we have tables now)
Will v4.0 be backwards-compatible with saves made with v3.3, or require a new start?

Either way, I'm starting a new campaign once 0.91 RC9 shows up (bug reports are still coming in, after all).
Title: Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
Post by: Nick XR on May 24, 2019, 05:04:18 PM
Will v4.0 be backwards-compatible with saves made with v3.3, or require a new start?

Either way, I'm starting a new campaign once 0.91 RC9 shows up (bug reports are still coming in, after all).
Yes!  It's backwards compatible.  It uses an internal save format that is disassociated from the code itself (which is why the mod can also be disabled without breaking anything)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Se7ventySix on May 24, 2019, 08:34:47 PM
AWESOME!! Downloading now!! Can't Wait!!  ;D
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Se7ventySix on May 24, 2019, 09:55:29 PM
Found a small bug.  Not sure how it's matching HullClass with HullImage but..

Spoiler
(https://i.imgur.com/lFa1sEy.png)
[close]

The Wolf [P][D] is the correct ship, it's just using the wrong graphic.  I do have a Paragon in my fleet if that helps the troubleshooting.

Let me know if u need any other info!

Thanks for the GREAT mod!!

Edit:
Interestingly enough, that is the only occurrence.  I have another wolf in my fleet that was deployed as well and it showed up fine.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Nick XR on May 24, 2019, 10:04:44 PM
Found a small bug.  Not sure how it's matching HullClass with HullImage but..

Spoiler
(https://i.imgur.com/lFa1sEy.png)
[close]

The Wolf [P][D] is the correct ship, it's just using the wrong graphic.  I do have a Paragon in my fleet if that helps the troubleshooting.

Let me know if u need any other info!

Thanks for the GREAT mod!!

Edit:
Interestingly enough, that is the only occurrence.  I have another wolf in my fleet that was deployed as well and it showed up fine.

If you still have the save, or you see it again, would you PM me the save?

Thanks!

Also let me know if you try the raw data analytics :)

*edit*

Actually I think I see how it can happen. I'll fix it up.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Se7ventySix on May 24, 2019, 10:14:24 PM
If you still have the save, or you see it again, would you PM me the save?

Sure thing, I may have saved over the original save once or twice but i'll see which one is the closest.  I tend to use save copy a lot so I may have a good one.  I'll send it as soon as I get done with this combat session.

Also, I just noticed that the wolf in question was destroyed in combat so that may have something to do with it.

Also let me know if you try the raw data analytics :)

I've been playing around with it a little bit.  I'm new to Tableau so it's a learning curve but it's going to be sweet to have all that data available for working on builds!!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Se7ventySix on May 24, 2019, 10:15:41 PM
Just saw your edit!  Do u still need the save file?

Edit:
I sent it anyway just in case!  ;D
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Nick XR on May 24, 2019, 10:45:49 PM
New build is up.  There was an issue with guessing which FleetMemberAPI to use when one couldn't be located (for reasons).  We now simply don't render the image if we can't figure out what it should be. (If anyone has any idea how to get a ships sprite image from hull type or something like that, let me know!)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Nick XR on May 24, 2019, 10:46:11 PM
Just saw your edit!  Do u still need the save file?

Edit:
I sent it anyway just in case!  ;D

Got it, thanks!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Se7ventySix on May 26, 2019, 11:54:29 AM
Not sure what's up but new version of Combat Analytics saved the files in \saves\common\combatanalytics the first 2 times I saved after the mod update but hasn't since.

I've tried re-downloading and re-installing the mod, disable / enable the mod and renaming the folder but not sure why it won't save anymore?

After re-installing the mod I did make sure to set \CombatAnalytics\data\config\settings.json > "SaveDetailedCombatData":true

Its not a big deal because it's still saving the raw data to the save file, it's just not writing the files to the save folder anymore.

Here's the list of files that it wrote after my first 2 saves before it quit working.
Spoiler
(https://i.imgur.com/7bUDIfR.png)
[close]
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Nick XR on May 26, 2019, 02:49:19 PM
Not sure what's up but new version of Combat Analytics saved the files in \saves\common\combatanalytics the first 2 times I saved after the mod update but hasn't since.

I've tried re-downloading and re-installing the mod, disable / enable the mod and renaming the folder but not sure why it won't save anymore?

After re-installing the mod I did make sure to set \CombatAnalytics\data\config\settings.json > "SaveDetailedCombatData":true

Its not a big deal because it's still saving the raw data to the save file, it's just not writing the files to the save folder anymore.

Here's the list of files that it wrote after my first 2 saves before it quit working.
Spoiler
(https://i.imgur.com/7bUDIfR.png)
[close]

It should write those after each combat.  There's a write limit of 50MB imposed by the game, but I don't think that's what you're bumping into here.
The raw data shouldn't be in the save file anymore (there still some aggregate data stored in there however).

Are there any exceptions in the log?

Thanks!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: ike on May 27, 2019, 06:28:17 PM
Hi, first of all thanks for the great mod!

Just one thing I've noticed:
Your .zip uses backslashes as path separators when it should not, and this causes problems for many unarchivers.

This is known to happen when you use archivers that depend on certain old Windows frameworks or some other independently-made engines that don't precisely follow the standard.
What program did you use to create this zip? Can you use another program?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Nick XR on May 27, 2019, 09:23:43 PM
Hi, first of all thanks for the great mod!

Just one thing I've noticed:
Your .zip uses backslashes as path separators when it should not, and this causes problems for many unarchivers.

This is known to happen when you use archivers that depend on certain old Windows frameworks or some other independently-made engines that don't precisely follow the standard.
What program did you use to create this zip? Can you use another program?

Hmmm, I use the PowerShell Compress-Archive command:  https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.archive/compress-archive?view=powershell-6   
Which program are you using that is giving you trouble?  I'll test options on my end and see what I can do to get thing sorted.

*edit*

Does this look like the issue you're running into:  https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/11   ?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Se7ventySix on May 28, 2019, 05:45:06 PM
Are there any exceptions in the log?

Not sure if this is what you are looking for but I did find this in the log. (Scroll to the bottom.)

Spoiler
1341331 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Combat Duration: 398.35886
1341331 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - total time in EveryFrameDamageDetector: 1754ms  FrameCount: 92062 Mean Time Per Frame: 0.019052377745432426ms
1341357 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - ArchAngel - CRUISER - Apogee - Player did 68,270dmg to 15 ships
1341357 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - BioDome - CAPITAL_SHIP - Paragon - Player did 114,755dmg to 22 ships
1341357 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Black Hawk - DESTROYER - Hammerhead (D) - Player did 36,376dmg to 8 ships
1341357 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Black Pearl - CRUISER - Doom - Player did 63,433dmg to 17 ships
1341357 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Calypso - DESTROYER - Shrike (P) (D) - Player did 35,203dmg to 16 ships
1341357 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - ISS Away Our Fear - DESTROYER - Hammerhead - Player did 3,427dmg to 4 ships
1341357 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - ISS Muses - DESTROYER - Drover - Player did 57,950dmg to 18 ships
1341358 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Orden Amphithea - CRUISER - Aurora - Player did 29,629dmg to 10 ships
1341358 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Orden Fortuitous Voyager - DESTROYER - Drover - Player did 57,800dmg to 19 ships
1341358 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Orden Pan - CRUISER - Eagle - Player did 21,838dmg to 11 ships
1341358 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Orden Waning Day - CRUISER - Dominator - Player did 99,405dmg to 14 ships
1341358 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Roc - CRUISER - Heron - Player did 4,089dmg to 24 ships
1341358 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Valkyrie - CRUISER - Falcon (P) - Player did 94,901dmg to 8 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Wombat - DESTROYER - Enforcer (P) (D) - Player did 52,600dmg to 4 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Bergelmir - CRUISER - Colossus Mk.III (D) - Computer did 7,075dmg to 5 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Coeurl - CRUISER - Venture - Computer did 1,115dmg to 3 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Ehecatl - CRUISER - Colossus Mk.III (D) - Computer did 6,600dmg to 5 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Fenris - FRIGATE - Kite (P) (D) - Computer did 1,625dmg to 1 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Gorgon - CAPITAL_SHIP - Atlas Mk.II (D) - Computer did 86,550dmg to 8 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Griffin - CAPITAL_SHIP - Atlas Mk.II - Computer did 9,750dmg to 4 ships
1341359 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - His Timelense - CAPITAL_SHIP - Atlas Mk.II (D) - Computer did 38,345dmg to 9 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Honir - CAPITAL_SHIP - Atlas Mk.II (D) - Computer did 62,475dmg to 9 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - In Duty - FRIGATE - Cerberus (P) (D) - Computer did 505dmg to 2 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Inghean - CRUISER - Colossus Mk.III (D) - Computer did 4,150dmg to 5 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Lugh - CRUISER - Falcon (P) (D) - Computer did 5,410dmg to 4 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Meteor - FRIGATE - Shepherd (D) - Computer did 262dmg to 4 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Mextli - DESTROYER - Enforcer (P) (D) - Computer did 5,010dmg to 3 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Mixcoatl - CRUISER - Colossus Mk.III - Computer did 6,775dmg to 6 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Nechtan - DESTROYER - Shrike (P) - Computer did 7,348dmg to 4 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Nidhogg - DESTROYER - Mule (P) (D) - Computer did 1,624dmg to 3 ships
1341360 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Njord - CRUISER - Colossus Mk.III (D) - Computer did 1,765dmg to 5 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Onward Me China - CRUISER - Venture (D) - Computer did 2,473dmg to 2 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Psilone - FRIGATE - Shepherd (D) - Computer did 126dmg to 4 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Sorceptor - CRUISER - Falcon (P) (D) - Computer did 13,950dmg to 5 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Space Raptor - CRUISER - Venture (D) - Computer did 1,090dmg to 3 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Thor - CRUISER - Colossus Mk.III (D) - Computer did 3,200dmg to 2 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - To Goddard With Apologies - CRUISER - Falcon (P) (D) - Computer did 34,557dmg to 7 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Vent Flux Here - CAPITAL_SHIP - Atlas Mk.II (D) - Computer did 56,135dmg to 10 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Wyrm - CRUISER - Colossus Mk.III (D) - Computer did 5,250dmg to 4 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Xiuhcoatl - DESTROYER - Enforcer (P) (D) - Computer did 9,195dmg to 6 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Yacatecuhtli - CRUISER - Colossus Mk.III (D) - Computer did 16,720dmg to 6 ships
1341361 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Zodiacal Light - CRUISER - Colossus Mk.III - Computer did 3,180dmg to 3 ships
1341427 [Thread-4] ERROR data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Unable to saveRawCombatData
java.lang.RuntimeException: Max text file string length: 1048576, string length: 5183691

   at com.fs.starfarer.settings.StarfarerSettings$1.writeTextFileToCommon(Unknown Source)
   at data.scripts.combatanalytics.SerializationManager.saveRawCombatData(SerializationManager.java:173)
   at data.scripts.combatanalytics.CombatAnalyticsCampaignEventListener.reportPlayerE ngagement(CombatAnalyticsCampaignEventListener.java:41)
   at com.fs.starfarer.campaign.CampaignEngine.reportPlayerEngagement(Unknown Source)
   at com.fs.starfarer.api.impl.campaign.FleetEncounterContext.processEngagementResul ts(FleetEncounterContext.java:237)
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEng agement(FleetInteractionDialogPluginImpl.java:531)
   at com.fs.starfarer.campaign.CampaignState.prepare(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
1342443 [Thread-8] INFO  sound.oo0O  - Cleaning up music with id [Condottiere.ogg]
[close]

Edit:
I also found this:
Spoiler
471501 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 30
471501 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 31
471502 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 32
471502 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 33
471591 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Keyboard key 'L' will open combat analysis dialogue
471591 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - SaveDetailedCombatData: true
471631 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Found 50 prior battle results
471631 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - MaxCombatResultCount: 50
471690 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 34
471690 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 35
471708 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 36
471708 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 37
471708 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 38
[close]

Thanks!!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.1 (2019-05-28)
Post by: Nick XR on May 28, 2019, 09:07:14 PM
Version 4.1 is released (see original post)
Minor fixes, 100% past version compatible.

Fixes:
 Proper fighter kill count for TOTAL rows
 Denser data format for detailed combat data (to try and avoid 1MB limit, thanks Se7ventySix)
 No longer using "ship list" functionality, now using rendered sprite images in list to enable more accurate historical data display
 If SaveDetailedCombatData is set to true, save detailed results results when main menu missions are played (saved on completion)
 Images scaled slightly by hull class
 Use 7 zip command line to build archive to hopefully work around archive slash issues (thanks ike)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Nick XR on May 28, 2019, 09:11:35 PM
Are there any exceptions in the log?

Not sure if this is what you are looking for but I did find this in the log. (Scroll to the bottom.)

That's good!  I think I've made the issue better in the latest release (4.1).  There's a limit of writing a 1MB string at a time to the "common" area.  So I've cut down on the data being exported (grouped on the data by second, normalized weapons out into their own table, don't export ints as factions).  Hopefully that'll get you under the cutoff.  If not, let me know and I'll break up the data even more.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: ike on May 29, 2019, 10:21:22 AM
Does this look like the issue you're running into:  https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/11   ?
Yes exactly, and your new archive just works. Thanks!
Now I don't have to apply the workaround you can see in this stackex :P
https://unix.stackexchange.com/questions/166159/convert-a-windows-created-zip-to-linux-internal-paths-issue
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: stormbringer951 on June 04, 2019, 09:11:35 AM
If anyone has any idea how to get a ships sprite image from hull type or something like that, let me know!

Code: java
ShipVariantAPI variant = Global.getSettings().getVariant("someVariantId");
String spriteName = variant.getHullSpec().getSpriteName();

EDIT:

Also, a better way to get ship names without "-class" or " class" without needing to get substrings:

Code: java
variant.getHullSpec().getHullName()
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.0 (2019-05-24)
Post by: Nick XR on June 04, 2019, 03:15:17 PM
If anyone has any idea how to get a ships sprite image from hull type or something like that, let me know!

Code: java
ShipVariantAPI variant = Global.getSettings().getVariant("someVariantId");
String spriteName = variant.getHullSpec().getSpriteName();

EDIT:

Also, a better way to get ship names without "-class" or " class" without needing to get substrings:

Code: java
variant.getHullSpec().getHullName()

Thanks, I got something working!  In the 4.0 version I was using the shiplist functionality, that requires a FleetMemberAPI object which can either be gotten from your current fleet (which doesn't work if that ship is dead or not in your fleet), or you can save the FleetMemberAPI object from the battle and hope you're not dragging around a dump-truck of state that was never intended to be persisted.  So instead I'm just now faking something that looks like the ship list and only has to save a few strings.  It's not elegant, but it works and is pretty safe for an upgrade path (although the smart thing is to just do multiple versions of intel plugins, but that's it's own PITA to deal with).

I have a few more combat results todos around:
* Try to be more accurate with damage actually dealth
* Fighter subtotals (since we're mostly concerned with is fighter X more effective than fighter Y) when evaluating these things.  Or at least I am.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.1 (2019-05-28)
Post by: vorpal+5 on June 16, 2019, 09:07:54 PM
Hi,

The damages done by the Tactical Laser are definitively under-reported. This is systematic.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.1 (2019-05-28)
Post by: Nick XR on June 17, 2019, 08:48:21 AM
I'll check it out, thanks!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.1 (2019-05-28)
Post by: vorpal+5 on June 17, 2019, 12:13:52 PM
Please tell me what you find, because I have suspicions on others weapons.

And that's a great mod and tool you did, congrats!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.1 (2019-05-28)
Post by: stormbringer951 on June 19, 2019, 01:42:14 PM
Hi,

The damages done by the Tactical Laser are definitively under-reported. This is systematic.

As mentioned in the OP, damage is raw damage, doesn't take reductions from armour/shield efficiency into account, which is why some weapon types report what seems to be much higher amounts of damage done compared to other weapons (very high dps, very low damage per shot frag is most conspicuous, although comparing how much similar KE and HE weapons have done to armour+hull/shield is also pretty noticeable).

Would that account for what you've seen?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.1 (2019-05-28)
Post by: Nick XR on June 19, 2019, 05:31:29 PM
Hi,

The damages done by the Tactical Laser are definitively under-reported. This is systematic.

As mentioned in the OP, damage is raw damage, doesn't take reductions from armour/shield efficiency into account, which is why some weapon types report what seems to be much higher amounts of damage done compared to other weapons (very high dps, very low damage per shot frag is most conspicuous, although comparing how much similar KE and HE weapons have done to armour+hull/shield is also pretty noticeable).

Would that account for what you've seen?

I just looked at it a bit ago in a debugger (shout out to Ava_N for details on how to do that), there was indeed a problem with beam weapons and how their damage was determined.   The method
Code
BeamAPI.didDamageThisFrame()
appears to be misbehaving, or I'm using it incorrectly.  But when I stop using it, and instead just process beam damages the delta I saw in testing went from 500% -> 10% (with that 10% probably being from shield efficiency).

I'm working on a bunch of changes and fixes, hopefully they'll be ready by the weekend!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.2 (2019-06-21)
Post by: Nick XR on June 21, 2019, 11:35:55 AM
New version is out, check the main post for download. 
Changes:
v4.2
 New save data format to enable new functionality
 * this won't break anything
 * but your old combat data will be automatically deleted.
 * Your save game is fine.
 No longer displaying kills based on killing blows, we now display Solo Kills (> 80% of hull damage) and Assists (> 20% hull dmg)
 DP destroyed based on pro-rated armor/hull damage
 Much more accurate damage calculations.  Not perfect, much but better.
 More accurate tracking of what ships were killed.
 Fighters are now treated as a singular weapon system, since that is often the most useful way of thinking about them
 Ships details "kill" grid removed, replaced with sprites:
 * now render sprites for ships that were solo-killed
 * render ship sprites that were kill-assisted (along with a damage overlay)
 New enemy fleet status summary area
 Player ships are shown as Disabled/Destroyed/Retreated in ship list
 Added % hull remaining after combat, color coded
 Can now aggregate data based on history and generate a "Merged combat result"



(https://i.imgur.com/5GyrqKj.png)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.2 (2019-06-21)
Post by: stormbringer951 on June 21, 2019, 11:47:42 AM
That ... is very cool.

 :D
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.2 (2019-06-21)
Post by: Nick XR on June 21, 2019, 02:26:29 PM
Minor update to 4.2 to deal with Infinities and NaNs (Apparently NumberFormat can write a number it can't read. Super).  If you've managed to grab it before this post, please re-download!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.2 (2019-06-21)
Post by: TimeDiver on June 28, 2019, 12:02:56 AM
Got a downright bizarre issue with a Paragon mounting two Plasma Cannon in any of the large energy mounts; they display 0 damage dealt in the AAR, even though in-battle they did a metric ****-ton of the total DPS.

One possible culprit is that I am using an older 0.9 RC10 save (Nexerelin) loaded into 0.9.1 RC8; spawning in another Paragon via Console Commands and giving that one the Plasma Cannon(s) had the same result.

EDIT: Then again, my mod list, while not exactly small, is a tad more so than average, AND I have two personal use-only mods that may be messing around with the results:

Code
{"enabledMods": [
  "custom_test",
  "example2",
  "automatic-orders",
  "blackrock_driveyards",
  "CombatAnalytics",
  "chatter",
  "lw_radar",
  "lw_console",
  "istl_dam",
  "diableavionics",
  "gs",
  "Imperium",
  "junk_pirates_release",
  "lw_lazylib",
  "leadingPip",
  "MagicLib",
  "Neutrino",
  "nexerelin",
  "sun_ruthless_sector",
  "SEEKER",
  "shadow_ships",
  "swp",
  "speedUp",
  "sun_starship_legends",
  "underworld",
  "vesperon",
  "shaderLib"
]}
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.2 (2019-06-21)
Post by: Nick XR on June 29, 2019, 06:43:17 PM
Got a downright bizarre issue with a Paragon mounting two Plasma Cannon in any of the large energy mounts; they display 0 damage dealt in the AAR, even though in-battle they did a metric ****-ton of the total DPS.

One possible culprit is that I am using an older 0.9 RC10 save (Nexerelin) loaded into 0.9.1 RC8; spawning in another Paragon via Console Commands and giving that one the Plasma Cannon(s) had the same result.

EDIT: Then again, my mod list, while not exactly small, is a tad more so than average, AND I have two personal use-only mods that may be messing around with the results:

I was able to repro the issue with my unmodded testing version.  I *think* the issue is the damage delivered is an AoE effect which we can't determine which weapon originated it and then properly attribute damage.
All of this will be fixed in the next release of SS by piggy backing off of some work Alex is doing.  Other weapons like flak cannons also suffer from this.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.2 (2019-06-21)
Post by: TimeDiver on June 29, 2019, 07:07:18 PM
I was able to repro the issue with my unmodded testing version.  I *think* the issue is the damage delivered is an AoE effect which we can't determine which weapon originated it and then properly attribute damage.
All of this will be fixed in the next release of SS by piggy backing off of some work Alex is doing.  Other weapons like flak cannons also suffer from this.
Huh. So that's why I also got surprisingly low numbers for Single/Dual Flak setups on my Conquest(s) and Onslaught(s)...

Okay, so it's an core game/engine-side issue that's kinda-difficult-to-downright-impossible to resolve. Fair enough.

While I'm here, is it working-as-designed when some (mod-created) fighter weapons are listed separately from the (condensed) fighter entries?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.3 (2019-06-21)
Post by: TimeDiver on August 02, 2019, 02:57:46 AM
v4.3
 Fully compatible with prior version
 MIRV warheads should now calculate their damage properly (Thanks MesoTroniK)
 Defend against NULL in a place it shouldn't be possible but apparently is.
Rather delayed bug report (took a break from StarSector to play through stuff from the Steam Summer Sale):

Upgrading from v4.2 to v4.3 made the following vanilla weapons report zero shield/ship damage (but flux values weren't zero'd):

Ion Pulser, Mjolnir Cannon, Sabot SRM Pod, and Hypervelocity Driver.

The issue also cropped up with several mod-specific weapons (too many to list, really).

Extracting the StarSectorCombatAnalytics.jar from v4.2 and replacing v4.3's with the older one fixed the issue.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.3 (2019-06-21)
Post by: Nick XR on August 03, 2019, 09:23:53 AM
Gah!  I think I know what the issue is.  There are some complexities in determining child vs parent dmg that's useful for MIRVs that is interfering here.  I'll sort it out today.  Thanks!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.3 (2019-06-21)
Post by: Thaago on August 14, 2019, 06:01:17 PM
Hello there! I have a question and a bug report:

The question is, what is the "flux" damage in the battle report? Is that supposed to be soft flux dealt from beams? EMP damage?

The bug report, is that the damage being done by High Velocity Drivers is entirely reported in the "flux" column, which is very weird as I've seen it impacting both shields and hull.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.3 (2019-08-18)
Post by: Nick XR on August 18, 2019, 09:11:08 PM
New version is up (4.4), should fix issues caused by 4.3 trying to calculate MIRV damage.

Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: dorgus on August 22, 2019, 05:41:06 PM
Is it not possible to track the damage of Doom's mine? I think there are a few other ship mechanics that this mod doesn't track.

Even though this mod is amazing. Thank you for developing it. It changed the game for me.

EDIT: it seems the mod does track mine damage. Just noticed my overall damage on the summary is different from the sum of the damage dealt by all my weapons. It just doesn't show the mine damage separately.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: writeru on August 26, 2019, 07:44:02 PM
Hey Nick, I hope Im not being a bother, but I've registered here just to ask if your mod can also do something. I was searching for a mod that allow me to see how much of the dead crew after a battle were pilots. In fact there was some discussion on reddit and other people seemed excited for something like this. For me just a flat division of dead crew between pilots and normal crew would be enough, but I think it could be even better if we could see how many crew died each way, by hull damange, piloting, explosion of ship, etc




Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: sotanaht on August 31, 2019, 07:54:19 PM
My Paragon's plasma cannons are showing 0 damage in the analytics no matter what.  I usually fly it myself so I know they are getting use/doing damage.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Nick XR on September 02, 2019, 09:06:25 PM
Is it not possible to track the damage of Doom's mine? I think there are a few other ship mechanics that this mod doesn't track.

Even though this mod is amazing. Thank you for developing it. It changed the game for me.

EDIT: it seems the mod does track mine damage. Just noticed my overall damage on the summary is different from the sum of the damage dealt by all my weapons. It just doesn't show the mine damage separately.
My Paragon's plasma cannons are showing 0 damage in the analytics no matter what.  I usually fly it myself so I know they are getting use/doing damage.
Both probably related to to general issue of not being able to track explosion damage, I'll make a note to double check that both of these work when we get the new damage event model in the next release!

Hey Nick, I hope Im not being a bother, but I've registered here just to ask if your mod can also do something. I was searching for a mod that allow me to see how much of the dead crew after a battle were pilots. In fact there was some discussion on reddit and other people seemed excited for something like this. For me just a flat division of dead crew between pilots and normal crew would be enough, but I think it could be even better if we could see how many crew died each way, by hull damange, piloting, explosion of ship, etc

I track crew killed, by the player, but don't surface it anywhere as I thought it was too grim and seeing a body-count that makes the player a monster was a bit jarring :P

But tracking crew lost from fighters should be possible (and losses in general).  I'll add a note to do it in the next major release!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Orion03 on September 03, 2019, 04:58:10 PM
This is amazing, thank you very much.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Electrum on September 04, 2019, 06:16:24 AM
Hello. Love the mod. Question: What is "Pro Rata DP"? Is it a measure of how much damage the ship did relative to it's own deployment cost?

Thanks.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Nick XR on September 04, 2019, 09:48:46 AM
Hello. Love the mod. Question: What is "Pro Rata DP"? Is it a measure of how much damage the ship did relative to it's own deployment cost?

Thanks.

It's the pro-rated amount of Deployment Points that ship is responsible for destroying.  For example, if ship A did 75% of the total damage to a destroyed 40 DP ship (ship B), ship A's Pro Rata DP against ship B would be 30.  And in the top grid, this is the sum of all that ships pro rata DP.

So it's a high level measure of just how useful a ship was, damage wise, in combat.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.3 (2019-06-21)
Post by: Nick XR on September 04, 2019, 09:54:31 AM

The question is, what is the "flux" damage in the battle report? Is that supposed to be soft flux dealt from beams? EMP damage?


Sorry missed this earlier, the Flux stat is the amount of EMP damage that a weapon specifically delivers.  EMP isn't included in most damage totals since it's usually close to an order of magnitude larger than everything else.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: aikixd on September 04, 2019, 11:08:26 AM
Can you please add a few additional stats: Flux overflow count, Damage when zapped, Damage when venting, Damage while shields are up (to know if the ship is flanked a lot), Mean time between ventings.

Very helpful mod, thanx.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Nick XR on September 04, 2019, 02:18:12 PM
Can you please add a few additional stats: Flux overflow count, Damage when zapped, Damage when venting, Damage while shields are up (to know if the ship is flanked a lot), Mean time between ventings.

Very helpful mod, thanx.

Glad you like it! 

I think your request probably getting a bit too far into the weeds for what the mods main goal is, which is to help you determine if a ship & weapon load-out is performing as you would expect.  The things you mention would certainly be interesting, personally I'd like to know what % of damage is caused when a ship is overloaded.  But knowing those things probably wouldn't help me make any better decisions about the things I can change (captain/ship/mods/weapons). 

Let me note these things and I'll look at them again when I do the next major release!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: aikixd on September 05, 2019, 01:52:03 AM
Can you please add a few additional stats: Flux overflow count, Damage when zapped, Damage when venting, Damage while shields are up (to know if the ship is flanked a lot), Mean time between ventings.

Very helpful mod, thanx.
I think your request probably getting a bit too far into the weeds for what the mods main goal is, which is to help you determine if a ship & weapon load-out is performing as you would expect.  The things you mention would certainly be interesting, personally I'd like to know what % of damage is caused when a ship is overloaded.  But knowing those things probably wouldn't help me make any better decisions about the things I can change (captain/ship/mods/weapons).

I want to know whether the shields and their configuration are performing well. If I need to change flux configuration or mod the shields. Right now all I can know is whether my weapons are performing well.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: DornoDiosMio on October 22, 2019, 04:02:21 PM
Thanks so much for this mod. It has so much useful information and is really great. It is hard to imagine playing without it now.

Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Captain Trek on November 20, 2019, 04:21:53 PM
I noticed a curious bug - damage dealt by the heavy pulsar cannon weapon from Interstellar Imperium is not kept track of, reading as zero even though I quite specifically watched my ship blaze away at the enemy station with it.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Nick XR on November 20, 2019, 08:04:30 PM
I noticed a curious bug - damage dealt by the heavy pulsar cannon weapon from Interstellar Imperium is not kept track of, reading as zero even though I quite specifically watched my ship blaze away at the enemy station with it.
Thanks for the report!  Unfortunately I can't fix this until the next version of starsector because of how onhit things work in this version.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Haalon on December 12, 2019, 12:17:48 PM
I noticed that Invocation from ORA shows up much more damage than it has actually done.
That may be due to the main projectile splitting into several lighter ones.

I think same happens with Vindicator's siege cannon from SWP.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Nick XR on December 12, 2019, 08:17:41 PM
Testing a fix for it, being a little cautious since last time I tried to fix this I broke other stuff.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.4 (2019-08-18)
Post by: Nick XR on December 15, 2019, 10:05:04 AM
I noticed that Invocation from ORA shows up much more damage than it has actually done.
That may be due to the main projectile splitting into several lighter ones.

I think same happens with Vindicator's siege cannon from SWP.

Fix for this is live in Version 4.5
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: intrinsic_parity on December 22, 2019, 11:04:21 PM
I've noticed that damage done by the plasma cannons on my odyssey is not being counted. Is this a known bug?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Nick XR on December 23, 2019, 09:56:04 AM
I've noticed that damage done by the plasma cannons on my odyssey is not being counted. Is this a known bug?

Yeah, known issue.  The root of the problem is some weapons do damage based on an explosion that doesn't have a source so there's no way to trace back to which weapon & ship actually did the damage :/   In the next version of StarSector this should be fixable based on some work that Alex has done with an event driven damage model.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Avanitia on January 09, 2020, 03:52:03 PM
Hey, 4.5 version of Combat Analytics somehow doubles damage dealt by weapons - it affect all weapons from quick testing.

Spoiler
(https://i.imgur.com/NsEf4cz.png)
[close]

Left shot is from Hypervelocity Driver.
It should deal... 275 base x 2.0 x 1.4 (target's shield) = 770 on shield, while it deals 1540 on screenshot.
Right shot is from Heavy Mauler.
It should deal... 200 base x 0.5 x 1.4 = 140 on shield, while it deals 280 on screenshot.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Nick XR on January 09, 2020, 10:09:42 PM
Hey, 4.5 version of Combat Analytics somehow doubles damage dealt by weapons - it affect all weapons from quick testing.

Spoiler
(https://i.imgur.com/NsEf4cz.png)
[close]

Left shot is from Hypervelocity Driver.
It should deal... 275 base x 2.0 x 1.4 (target's shield) = 770 on shield, while it deals 1540 on screenshot.
Right shot is from Heavy Mauler.
It should deal... 200 base x 0.5 x 1.4 = 140 on shield, while it deals 280 on screenshot.

Interesting, thanks for the solid repro, I'll check it out!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Vayra on January 10, 2020, 01:00:54 PM
It's this call, line 338 of EveryFrameDamageDetector.java in version 4.5 and later:

Code: java
        ret.setMultiplier(1); // default multiple is 0 :shrug:

For some reason, that multiplier is additive I guess. Tested by confirming 4.3 and 4.4 do not double damage while 4.5 does, pulling the 4.5 source, and rebuilding with that line commented out - which resolves the issue.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Nick XR on January 10, 2020, 02:59:09 PM
It's this call, line 338 of EveryFrameDamageDetector.java in version 4.5 and later:

Code: java
        ret.setMultiplier(1); // default multiple is 0 :shrug:

For some reason, that multiplier is additive I guess. Tested by confirming 4.3 and 4.4 do not double damage while 4.5 does, pulling the 4.5 source, and rebuilding with that line commented out - which resolves the issue.

Thanks for tracking it down explicitly Vayra.
Hmmm, but that was the change that fixed the issue with some weapons dealing the incorrect amount of damage (sub munitions vs parent munitions).

This is like shoveling frogs into a bucket. :'(
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Rasip on January 15, 2020, 07:34:38 PM
Thanks. This will make figuring out why some ships seem to perform much better/worse than expected easier.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Donahue on January 22, 2020, 07:43:45 AM
Is there a way for me to get rid of old combat reports cluttering up the pirates section of the intelligence UI?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Nick XR on January 22, 2020, 10:06:34 AM
Is there a way for me to get rid of old combat reports cluttering up the pirates section of the intelligence UI?

The entries by default age out after 730 days, if you'd like them to age out faster you can edit the file 'CombatAnalyticsSettings.ini' in the root of the CombatAnalytics mod folder.  But there's no "X" to dismiss/close them I'm afraid.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.5 (2019-12-15)
Post by: Vayra on January 30, 2020, 08:04:57 PM
Any chance of an update soon, even a reversion? I think doubling actual damage dealt is a slightly bigger issue than inaccurate submunition analytics... unless that also affected actual damage? :-[
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Nick XR on March 07, 2020, 12:07:48 PM
v4.6 is out:
 Fix all projectile weapons dealing double damage

Thanks for the repros and what not. As always, I'll take PRs too; But I know that's a lot of work.

Sorry for the delay, personal issues.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: The Last Roman on March 07, 2020, 03:13:12 PM
I get an error message every time I click either of your download links

"An error occurred during a connection to bbuseruploads.s3.amazonaws.com. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG"
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Nick XR on March 07, 2020, 03:58:02 PM
I get an error message every time I click either of your download links

"An error occurred during a connection to bbuseruploads.s3.amazonaws.com. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG"

Looks like it's working now, maybe some AWS edge-network issue or general interweb sillyness.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Reavenant on May 18, 2020, 09:17:11 AM
Hello Nick,

Any idea why my post battle screen looks different to the screenshot from your OP? By different I mean very simplistic, for example I don't have the lower part with ship's details and weapon damage data even thou I've set it in the settings file :/

Also, I've noticed that after battles my starts to slow down and stutter slightly. This is especially noticeable after big battles. Anyway I can reduce that effect other then restarting the game?

Best regards
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Nick XR on May 18, 2020, 11:35:31 AM
Hello Nick,

Any idea why my post battle screen looks different to the screenshot from your OP? By different I mean very simplistic, for example I don't have the lower part with ship's details and weapon damage data even thou I've set it in the settings file :/

Also, I've noticed that after battles my starts to slow down and stutter slightly. This is especially noticeable after big battles. Anyway I can reduce that effect other then restarting the game?

Best regards

For the visualizations, are you sure you've got the right mod?  I think the Legends mod also has a combat summary.  There's nothing to configure with this mod (or you shouldn't ever have to).  Just go into your intel tab and select "Combat" at the bottom of the screen.  If you can't figure it out, post a screenshot please.

If your game is going slow after a battle, make sure you've upped your max memory, check out this post for details:
https://fractalsoftworks.com/forum/index.php?topic=8726.0
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Reavenant on May 18, 2020, 12:12:37 PM
Ok, disregard my message please. I don't know why but for a couple of battles the view was limited in info but then it randomly switched to the one from your screenshot. It could be a conflict with other mod I need to test.
On the other hand many many thanks for that link, I don't know why I haven't seen that thread before!  :'(
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Algester on May 23, 2020, 02:27:59 AM
I'm getting a failed to load combat summary report but I do not know where in the log its posted
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Nick XR on May 23, 2020, 10:54:44 AM
I'm getting a failed to load combat summary report but I do not know where in the log its posted

It's the file 'starsector.log' located in 'starsector-core' under your install location.  If  you quit the game after the message, and open the file above, there should be a series of error messages with details at the bottom of the file.  Thanks!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Algester on May 23, 2020, 08:32:01 PM
ok I found where in the log the issue was it was throwing an NPE
Code
199943 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Keyboard key 'L' will open combat analysis dialogue
199943 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - SaveDetailedCombatData: false
200016 [Thread-4] ERROR data.scripts.combatanalytics.data.CombatResult  - Error deserializing line (Column Count: 6): '0e96da03' 'Hegemony' 'Bounty Hunter' '1590205252830' '32.880146' 'BATTLE'
java.lang.NullPointerException
at data.scripts.combatanalytics.data.CombatResult.<init>(CombatResult.java:41)
at data.scripts.combatanalytics.SerializationManager.getSavedCombatResults(SerializationManager.java:130)
at data.scripts.combatanalytics.CombatAnalyticsModPlugin.onGameLoad(CombatAnalyticsModPlugin.java:83)
at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source)
at com.fs.starfarer.title.Object.actionPerformed(Unknown Source)
at com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source)
at com.fs.starfarer.ui.I.?00000(Unknown Source)
at com.fs.starfarer.ui.I.processInput(Unknown Source)
at com.fs.starfarer.ui.O0Oo.o00000(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
200016 [Thread-4] ERROR data.scripts.combatanalytics.SerializationManager  - Unable to load SavedCombatResults
java.lang.NullPointerException
at data.scripts.combatanalytics.data.CombatResult.<init>(CombatResult.java:41)
at data.scripts.combatanalytics.SerializationManager.getSavedCombatResults(SerializationManager.java:130)
at data.scripts.combatanalytics.CombatAnalyticsModPlugin.onGameLoad(CombatAnalyticsModPlugin.java:83)
at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source)
at com.fs.starfarer.title.Object.actionPerformed(Unknown Source)
at com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source)
at com.fs.starfarer.ui.I.?00000(Unknown Source)
at com.fs.starfarer.ui.I.processInput(Unknown Source)
at com.fs.starfarer.ui.O0Oo.o00000(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
200017 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - Found 0 prior battle results
200017 [Thread-4] INFO  data.scripts.combatanalytics.CombatAnalyticsModPlugin  - MaxCombatResultCount: 50

https://www.mediafire.com/file/xebe3o38nbmb99h/starsector_error_log.7z/file
here's the log file
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6 (2020-03-07)
Post by: Nick XR on May 24, 2020, 12:58:16 PM
Perfect, thanks for this.  I'll have a fix up in a day or so!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on May 25, 2020, 12:41:56 PM
v4.6.1
 Save compatible
 Fix issue with failing to parse a saved combat for which there was no damage dealt
 Minor perf improvements relating to loading saved data

Thanks for the information with tracking down this issue @Algester!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Laxard on June 14, 2020, 04:19:39 AM
Great mod, but performance degradation in big battles are too noticeable. Especially if I use it with SpeedUp mod.
Is there a way to have "lite" version which only track the kill-count of individual ships?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Wispborne on June 17, 2020, 12:36:38 AM
Over on the Discord, we just had a case where an user with a LOT of mods was getting a reduced framerate that started after a battle ended and persisted until the game was restarted.
They fixed it by removing only Combat Analytics.

Here's the direct link to the resolution: https://discordapp.com/channels/187635036525166592/619635013201428481/722710987571986543

Taking a shot in the dark, is there logic that's looping over combat results every tick after the first battle happens for the session? Like a report in intel that's being calculated every tick or something?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Laxard on June 17, 2020, 03:24:49 AM
Taking a shot in the dark, is there logic that's looping over combat results every tick after the first battle happens for the session? Like a report in intel that's being calculated every tick or something?

I don't think so, I only had problems in battles themselves. This stuff keeps track of too many things. Althought having battle history too long (and it is too long by default, 50 battles if I remember right) makes saving ridiculously long.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on June 17, 2020, 11:13:49 AM
Over on the Discord, we just had a case where an user with a LOT of mods was getting a reduced framerate that started after a battle ended and persisted until the game was restarted.

I too am trying to figure out what's going on when this perf issues happens, but so far I've seen no indication that it's CA.  That the problem resolved itself after removing the mod and restarting has everything to do with restarting and not the mod.
My personal experience with the mod is that the battle perf impact is negligible, you can verify this by looking at the timing information that is logged if you search for the string `total time in EveryFrameDamageDetector` in the log.  The timing information should be pretty accurate since it uses wall-clock time at the start and end of the "advance" method, which is where all the work happens.

Regarding the size of tracked data outside of battle, it might be large (usually ~10MB), but it's all in a single string so there's not a huge amount of reflection calls to serialize a complex object hierarchy like you have with other objects.  I'll test it, but I really doubt it's the problem.

Over on the Discord, we just had a case where an user with a LOT of mods was getting a reduced framerate that started after a battle ended and persisted until the game was restarted.
They fixed it by removing only Combat Analytics.

Here's the direct link to the resolution: https://discordapp.com/channels/187635036525166592/619635013201428481/722710987571986543

Taking a shot in the dark, is there logic that's looping over combat results every tick after the first battle happens for the session? Like a report in intel that's being calculated every tick or something?

From what I can tell from profiling when this is happening, there's something happening with economy scripts where it's thrashing around, but it's hard to tell with all the obfuscation and not running in a "true" profiler (since it's just attaching to a process).
CombatResults are created once when
Code
reportPlayerEngagement()
is called at the end of battle. 

So in short, from the data I have and my personal experience playing the game with lots of mods, CA isn't the culprit.  At some level I would love for it to be the problem, because then I could fix my own play-throughs :P
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: saya39 on July 14, 2020, 01:54:01 AM
Hi! Your mod is fantastic and useful! May I translate it into Chinese and post it on a Chinese Starsector forum? Of course with the credit.
Waiting for your reply, thanks!

Here is the address: https://www.fossic.org/forum.php (https://www.fossic.org/forum.php)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on July 14, 2020, 10:30:26 PM
Hi! Your mod is fantastic and useful! May I translate it into Chinese and post it on a Chinese Starsector forum? Of course with the credit.
Waiting for your reply, thanks!

Here is the address: https://www.fossic.org/forum.php (https://www.fossic.org/forum.php)

Great!  I'm impressed people are willing to deal with language issues to use it.

If you can wait a week or two, I'll modify the code to support multiple languages.  I18N was already on my list of "todo" items.  Since there's interest I'll move it to the top.  Fortunately as far as mods go there's not much text so it should be easy to translate.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: saya39 on July 15, 2020, 03:00:44 AM
If you can wait a week or two, I'll modify the code to support multiple languages.  I18N was already on my list of "todo" items.  Since there's interest I'll move it to the top.  Fortunately as far as mods go there's not much text so it should be easy to translate.

Thanks for the permission, and the I18N!
Even though I've already finished the translation XD

As you said, it's easy to translate and didn't spend much time. I'll put this translated version on the Chinese forum first, and replace when you finish the I18N one. So don't worry about me and no need to mess up your plans :)

And I'll put the link here later.

edit: And now here we are https://www.fossic.org/thread-1667-1-1.html (https://www.fossic.org/thread-1667-1-1.html)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on July 15, 2020, 09:56:07 AM
If you can wait a week or two, I'll modify the code to support multiple languages.  I18N was already on my list of "todo" items.  Since there's interest I'll move it to the top.  Fortunately as far as mods go there's not much text so it should be easy to translate.
As you said, it's easy to translate and didn't spend much time. I'll put this translated version on the Chinese forum first, and replace when you finish the I18N one. So don't worry about me and no need to mess up your plans :)

Nice work getting it translated!  Could you make a pull request against the code base?  I'll use the the PR to generate a language file.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: saya39 on July 26, 2020, 09:52:13 AM
Nice work getting it translated!  Could you make a pull request against the code base?  I'll use the the PR to generate a language file.

First I must apologize for that I frogot to check the reply until today. It's totally my fault.

And, I don't actually understand what you want me to offer. I didn't get any trouble when I was translating. Hmm, or, only one point, I was sometimes worry about wether what I translated is an ID for something or not. But that's not a trouble neither. So, maybe it's OK to just take the text out to the strings.json or any other place.

And again, really sorry about the late reply. I won't miss the reply again.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Titann on July 30, 2020, 11:38:41 AM
very nice mod, would be nice if we can see how much damage enemy ships took. Like hostile enforcer took 20.000 damage to armor and 10.000 damage to shield. something like that.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on July 30, 2020, 12:00:49 PM
very nice mod, would be nice if we can see how much damage enemy ships took. Like hostile enforcer took 20.000 damage to armor and 10.000 damage to shield. something like that.

Late game Nexerlin battles you're probably killing 5+ ships for everyone ship you deploy, maybe 10 or 20 in some scenarios so displaying enemy ships by default in the ship list would really clutter the UI (and slow it down).  I'd be all for it if it were possible to surface display controls that would real-time modify the presentation but the API just doesn't support that.

Stepping back from the nice-to-haves, the main goal of this mod is to help the player determine how their ships and their load-outs are performing; not to get into the nitty-gritty.  But if you *really* want the nitty-gritty you can export the data to your favorite visualization tool.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Neitronus on September 23, 2020, 08:15:04 AM
Is it possible to update to fix version checker issue? There's an issue with version file being unreacheble on bitbucket after recent bitbucket change AFAIK.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: SaberCherry on September 23, 2020, 11:17:50 AM
First off, I love this mod!  I was going to put something like this in suggestions (after playing "Airships: Conquer the Skies" which has something similar integrated) but then I found this.

Bug report:  Sometimes some of the weapons on a ship don't show up.  I have not been able to figure out when or why.  But for example I have an Astral with 6 different types of fighters, and Spark routinely (literally, every single time) gets left off the damage report, even if I move it to a different slot.  All other fighters are there, and all normal weapons (including the ones which did 0 damage).  It's not just fighters, I've seen it with normal weapons too, though I can't remember the specifics.  It's rare though.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on September 23, 2020, 02:19:03 PM
First off, I love this mod!  I was going to put something like this in suggestions (after playing "Airships: Conquer the Skies" which has something similar integrated) but then I found this.

Bug report:  Sometimes some of the weapons on a ship don't show up.  I have not been able to figure out when or why.  But for example I have an Astral with 6 different types of fighters, and Spark routinely (literally, every single time) gets left off the damage report, even if I move it to a different slot.  All other fighters are there, and all normal weapons (including the ones which did 0 damage).  It's not just fighters, I've seen it with normal weapons too, though I can't remember the specifics.  It's rare though.

Glad you like it (And I'm even more glad you played "Airships: Conquer the Skies", that game is a treasure)!

The missing weapons has to do with weapons that deal damage via a blast radius.  In that case it's not possible (within reason), to determine where the damage came from.  This will however be a solvable problem in the next release of StarSector.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: SaberCherry on September 23, 2020, 10:11:00 PM
Glad you like it (And I'm even more glad you played "Airships: Conquer the Skies", that game is a treasure)!

The missing weapons has to do with weapons that deal damage via a blast radius.  In that case it's not possible (within reason), to determine where the damage came from.  This will however be a solvable problem in the next release of StarSector.
Good to know, that may explain some of the missing weapons.  But Spark fighters specifically are just armed with Burst PD Lasers, so there should be no blast radius.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: SaberCherry on October 03, 2020, 12:17:03 PM
Ah!  I see what's going on.  Sparks are listed as "Burst PD Laser" rather than "Spark Fighter", which was very confusing because my Astral also had Burst PD Lasers installed.  On other ships with no energy slots Spark is still listed as Burst PD Laser.

Another modded ship, "Wraith Drone Fighter" (Shadowyards), is listed twice - as Wraith Drone Fighter and as Crawler Beam.  It has 2 weapons, Mini Flak and Crawler Beam.

Those are the only fighters I've noticed as showing up incorrectly.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on October 04, 2020, 01:02:01 PM
Do you have the option:  `FighterWeaponBreakout` set to `true` by chance?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: SaberCherry on October 04, 2020, 05:08:13 PM
Do you have the option:  `FighterWeaponBreakout` set to `true` by chance?
Nope.  I had not touched the .ini file, but I opened it just to check and it's set at false.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on October 05, 2020, 09:46:11 AM
Do you have the option:  `FighterWeaponBreakout` set to `true` by chance?
Nope.  I had not touched the .ini file, but I opened it just to check and it's set at false.

Thanks for checking.  Sounds like a more run-of-the-mill bug.  I'll check it out!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Graploos on April 03, 2021, 06:34:34 AM
I really like this mod. I hope it gets updated for 0.9.5.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on April 03, 2021, 03:34:44 PM
Yes!  I'm working on it, but first finishing the game in a vanilla play-through so I don't have to avoid spoilers :)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: WeiTuLo on April 03, 2021, 06:36:48 PM
It seems to mostly work in 0.95a RC9 to RC12, but seems to track plasma cannon damage incorrectly (always zero). Thanks for creating this mod by the way, it was great in 0.91a, and is still great in 0.95.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on April 04, 2021, 01:39:26 PM
In theory thanks to the new API it'll be possible to have perfect data, which is pretty exciting.  But I haven't tried it yet.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Haalon on April 06, 2021, 08:19:54 AM
As a data-obsessed guy, who spends 95% of playtime min-maxing ships, I am very happy to hear about new API features)
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: briansd9 on April 12, 2021, 05:58:33 AM
Hi Nick, thanks for your mod - I'm using it as a reference for creating a project of my own. Looking forward to the update :)

Question about an issue I'm running into:

- Enemy ship A retreats from battle after being reduced to half health by player ship B
- Player fleet pursues; new battle starts
- Enemy ship A is finished off by player ship C

Is this handled properly (B and C both credited with an assist, instead of C getting the solo kill for dealing 100% of damage in the last reported player engagement)?

From this previous post (https://fractalsoftworks.com/forum/index.php?topic=11551.msg252076#msg252076) it seems the answer is yes, but couldn't find where exactly in the code it's handled.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on April 12, 2021, 09:30:21 AM
Question about an issue I'm running into:

- Enemy ship A retreats from battle after being reduced to half health by player ship B
- Player fleet pursues; new battle starts
- Enemy ship A is finished off by player ship C

Is this handled properly (B and C both credited with an assist, instead of C getting the solo kill for dealing 100% of damage in the last reported player engagement)?

"properly" is relative :)   There should be two combat results created, one for the initial battle, one for the pursuit action.  This also assumes the player participated in both.  In the first result, 'A' will shown as retreated at half health, for the second result it will show C getting a solo kill with not much damage.

There might be times it's reasonable to combine the two results, but there are probably equally as many times you would want them separate.  Ideally there would be some aggregate "encounter result" then multiple sub results.  But that's probably going a bit far down the rabbit hole for something that's good enough currently and that the UI doesn't support well (a visualization hierarchy).


Glad you're liking it!  I'm adding support for localization currently. 
On the bad-news front, there isn't a way to use the new damage listener interface to track damage back to the original weapon so we'll have to stick to the current mildly janky way of computing damage which can't handle things like plasma and flak :(
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: WeiTuLo on April 13, 2021, 09:45:31 AM
Does that mean I can splash/slaughter allies with plasma/flak without getting any reputation losses?

I think I saw the system properly give credit when I killed 2 ships with one Reaper in the past.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on April 13, 2021, 02:45:03 PM
Does that mean I can splash/slaughter allies with plasma/flak without getting any reputation losses?

I think I saw the system properly give credit when I killed 2 ships with one Reaper in the past.

Unfortunately the Plasma/Flak AoE issue isn't easily fixable yet;  I'll probably take a look at it soon.  With the use of the new listener paradigm we can compute the actual damage dealt much more accurately about 50% of the time.  So it's a net improvement over the old version, just not what I'd hoped.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: captinjoehenry on April 15, 2021, 04:05:43 PM
Oh my!  Super looking forward to this mod getting updated :D  Always love all the stats and I'm eager to dig into all the juicy details on my ships performaces :D
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: WeiTuLo on April 16, 2021, 09:21:38 AM
I did see some instances where the mod recorded flak damage. On another note, does Combat Analytics take into account the boosted damage from skills and abilities (like the Tempest's high energy focus, or energy weapon mastery (+0.5% damage to energy per 1% flux)?
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on April 16, 2021, 04:41:22 PM
Oh my!  Super looking forward to this mod getting updated :D  Always love all the stats and I'm eager to dig into all the juicy details on my ships performaces :D

As am I!

I did see some instances where the mod recorded flak damage. On another note, does Combat Analytics take into account the boosted damage from skills and abilities (like the Tempest's high energy focus, or energy weapon mastery (+0.5% damage to energy per 1% flux)?

Occasionally a projectile like Flak or Plasma will identify that it has in fact done damage, 99% of the time they don't and I have no idea why.  Flak doesn't identify that it has done damage like any of the other projectiles in that it doesn't track its target.

Regarding skills affecting damage numbers for beams, not currently.  But I'm going to try and see if I can get beams to work. 

On the good news front, I've gotten plasma cannons to work finally (!!!!).  The code to figure all of this out is a frightening amount of procedural whack-a-mole but its pretty robust for most stuff, so damage accuracy will be much better this version. 
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: WeiTuLo on April 21, 2021, 02:42:46 PM
Very nice! I look forward to it!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: captinjoehenry on April 21, 2021, 06:53:46 PM
Oh my!  Super looking forward to this mod getting updated :D  Always love all the stats and I'm eager to dig into all the juicy details on my ships performaces :D

As am I!

I did see some instances where the mod recorded flak damage. On another note, does Combat Analytics take into account the boosted damage from skills and abilities (like the Tempest's high energy focus, or energy weapon mastery (+0.5% damage to energy per 1% flux)?

Occasionally a projectile like Flak or Plasma will identify that it has in fact done damage, 99% of the time they don't and I have no idea why.  Flak doesn't identify that it has done damage like any of the other projectiles in that it doesn't track its target.

Regarding skills affecting damage numbers for beams, not currently.  But I'm going to try and see if I can get beams to work. 

On the good news front, I've gotten plasma cannons to work finally (!!!!).  The code to figure all of this out is a frightening amount of procedural whack-a-mole but its pretty robust for most stuff, so damage accuracy will be much better this version.
Heck yeah!  More accurate numbers are even more fun!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: gogis on April 22, 2021, 07:09:32 AM
I noticed that Kaleidoscope(from Seeker) records way too much damage versus singular target. I think it's special perk of 5-way beam split multiplies damage by 5 even if the target is singular. I have no idea if you support mods and how hazardous code/scripting is but just merely reporting. Don't shoot the messenger
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Nick XR on April 22, 2021, 11:00:33 AM
Kaleidoscope is pretty powerful though! I'll look into that specifically and see how we dealing with damage in that case (particularly how we fetch the damage that a single beam is doing), vs how much damage the whole thing is doing.

Weapons that have on-hit effects like causing extra damage on hits is difficult to take into account and not really possible to capture with the current available APIs, but I'll look and see if there might be another way.

Thanks for the report!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Luck0318 on April 22, 2021, 11:27:47 AM
Is it safe to used with the 9.5a? I'm a sucker for statistics :p
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: WeiTuLo on April 22, 2021, 04:50:02 PM
I've been using it in 0.95a since RC9, it works. No new issues so far. Nick might have plasma cannon improvements in the next one.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: oooh_senpai on April 22, 2021, 05:38:49 PM
So, is there a way to remove mod from save without breaking it? I tried it on 0.95 rc14
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: WeiTuLo on April 23, 2021, 07:10:18 PM
Set this to zero in CombatAnalyticsSettings.ini:

      "MaxCombatResultCount":0, #max number to allow in our save

Go in game, wait a day, save, and then exit the game. This should clear out any saved data and it should run without the mod enabled after that.
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: oooh_senpai on April 23, 2021, 09:42:57 PM
Set this to zero in CombatAnalyticsSettings.ini:

      "MaxCombatResultCount":0, #max number to allow in our save

Go in game, wait a day, save, and then exit the game. This should clear out any saved data and it should run without the mod enabled after that.
It worked, thanks!
Title: Re: [0.9.1a] Combat Analytics & Detailed Combat Results v4.6.1 (2020-05-25)
Post by: Arcagnello on April 24, 2021, 12:15:44 PM
Just passing by to let you know I've stapled this mod onto my ongoing game and it works like a charm. Thank you again for making hours of nearly endless minmaxing many times more satisfying opon checking the cold hard data of your new ships designs perfoming better!

I'm dying to see if my XIV Hegecrabbo with just two Mk9 Autocannons and 3 Breach SRMS with Expanded Missile Racks&ECM does more or less damage than the other, purely ballistic based one now...
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2024-04-25)
Post by: Nick XR on April 25, 2021, 12:13:32 PM
v5.0
 SAVE COMPATIBLE.  Probably, but not tested.
 Updated to support StarSector .95
 Can now be localized, current localization is English
 Uses StarSector .95 damage listener system to give much more accurate values for damage.
 Now properly tracks (didn't before):
Beam weapons that use multiple beams (like Seeker's kaleidoscope) now have damage computed correctly
 Removed SaveDetailedCombatData
 Renamed mod to show scope and goal (not general analytics, just detailed combat results)
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2024-04-25)
Post by: Arcagnello on April 25, 2021, 12:58:09 PM
v5.0
 SAVE COMPATIBLE.  Probably, but not tested.
 Updated to support StarSector .95
 Can now be localized, current localization is English
 Uses StarSector .95 damage listener system to give much more accurate values for damage.
 Now properly tracks (didn't before):
  • plasma cannons
  • Flak weapons
  • Doom Mines
  • Mines generally
  • storyline "things"
  • collision damage
  • on-hit effects
Beam weapons that use multiple beams (like Seeker's kaleidoscope) now have damage computed correctly
 Removed SaveDetailedCombatData
 Renamed mod to show scope and goal (not general analytics, just detailed combat results)

Nice! I'm just finishing off dinner so I'll be able to install the mod without having to break my session!

P.S: Have you also added tracking for damage caused by the Breach SRM? I'm actually curious on how hard it was (or is gonna be) for you to correctly implement the damage values it deals due to its effect upon hitting armor!
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2024-04-25)
Post by: Sundog on April 25, 2021, 01:05:15 PM
\o/  Time to find out just how OP my Doom is  ;D
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2024-04-25)
Post by: JohnDoe on April 25, 2021, 01:07:22 PM
Quote
2024
:o
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2024-04-25)
Post by: Nick XR on April 25, 2021, 01:09:44 PM
Nice! I'm just finishing off dinner so I'll be able to install the mod without having to break my session!

P.S: Have you also added tracking for damage caused by the Breach SRM? I'm actually curious on how hard it was (or is gonna be) for you to correctly implement the damage values it deals due to its effect upon hitting armor!

On-hit effects should be listed as "Unknown - DamageType", since there's no good way to tie it back to a weapon.  Generally speaking there's a lot of contortions in code that have to be done to figure out damages that the listeners report (which only has ship level resolution), to what weapon actually did the damage.

Quote
2024
:o
Hah, thanks. :P
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2024-04-25)
Post by: Arcagnello on April 25, 2021, 01:20:27 PM
\o/  Time to find out just how OP my Doom is  ;D

This mod truly has everything, but I must ask: does it estimate the amount of hair that gets pulled out every time an Officered Harbinger with systems expertise disrupts the enemy flagship 4 times in a row?

Now you know why most Luddites are bald.

@Nick_XR
Very interesting!
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2021-04-25)
Post by: WeiTuLo on April 25, 2021, 02:00:13 PM
Very nice!
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2021-04-25)
Post by: MyrSire on April 25, 2021, 04:50:36 PM
Made an account just to say how excited I am that the mod got updated, playing without this mod just doesn't feel the same. Thanks for all the work!
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2024-04-25)
Post by: gogis on April 26, 2021, 05:06:01 AM
v5.0
 SAVE COMPATIBLE.  Probably, but not tested.
 Updated to support StarSector .95
 Can now be localized, current localization is English
 Uses StarSector .95 damage listener system to give much more accurate values for damage.
 Now properly tracks (didn't before):
  • plasma cannons
  • Flak weapons
  • Doom Mines
  • Mines generally
  • storyline "things"
  • collision damage
  • on-hit effects
Beam weapons that use multiple beams (like Seeker's kaleidoscope) now have damage computed correctly
 Removed SaveDetailedCombatData
 Renamed mod to show scope and goal (not general analytics, just detailed combat results)

You my man! It was pain to track multi beam weapons and understand when analytics lied to me, but no longer. Praise! Going to report if find something sketchy
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2021-04-25)
Post by: WeiTuLo on April 26, 2021, 05:07:47 PM
Can this version be disabled by setting the number of saved combat reports to zero and waiting a day in game before saving, like before? Just in case a save file is needed for a bug report.
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2021-04-25)
Post by: Nick XR on April 26, 2021, 07:25:41 PM
Yeah, it should.  I haven't tried it but the save/load code is unchanged from the prior versions.  If it doesn't let me know and I'll get it fixed ASAP.
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Nick XR on April 27, 2021, 03:17:22 PM
v5.1 release
 Save compatible
 Campaign Simulation Battles now create "simulation" combat results that last for a day
 Changed Flux Dmg -> EMP Dmg
 Localization fixes (some strings were omitted)
 Issue with Motes not always being properly identified
Title: Re: [0.95a] Detailed Combat Results v5.0.0 (2021-04-25)
Post by: WeiTuLo on April 27, 2021, 07:38:45 PM
Yeah, it should.  I haven't tried it but the save/load code is unchanged from the prior versions.  If it doesn't let me know and I'll get it fixed ASAP.

For version 5, I tried waiting a day and it crashed, but when I waited 3 days, the save could be used without the mod enabled.
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: pponmypupu on April 27, 2021, 11:16:46 PM
Is there a growing log file(s) somewhere that could potentially get extremely large if unchecked? Just wondering, don't know much about this, thanks for the mod!
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Nick XR on April 28, 2021, 09:16:44 AM
Is there a growing log file(s) somewhere that could potentially get extremely large if unchecked? Just wondering, don't know much about this, thanks for the mod!

No.  There's not much extra data logged to the log (just a few lines post combat where performance and accuracy stats are emitted), and even if there was the log is at max, 4 rolling 50MB chunks.  There is extra data in your save, but it's capped at 30 battles at which point it ejects the oldest combat data first.  That limit is configurable if it's not to your liking.

Cheers!
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Thaago on April 28, 2021, 04:04:27 PM
I'm really excited to see this updated! Just FYI its game version is set to RC12, so it throws a warning on enabled. Not a huge deal though.
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: WeiTuLo on April 28, 2021, 07:22:51 PM
It's working great on RC15.
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Thaago on April 28, 2021, 11:21:31 PM
It is! Though something a bit funky must be going on because one of my ships apparently did negative shield damage... not sure whats up there. Does it count friendly fire as negative? I have some screenshots and a save copy a few days after if it helps.
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Nick XR on April 29, 2021, 01:26:01 PM
It is! Though something a bit funky must be going on because one of my ships apparently did negative shield damage... not sure whats up there. Does it count friendly fire as negative? I have some screenshots and a save copy a few days after if it helps.

Negative damage?  That's a new one :)  If you could put the save up somewhere and PM me the location along with the list of mods you're using I'll take a look at it.

Thanks!
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Celepito on May 01, 2021, 05:08:13 PM
When using the Outer Rim Alliance mod (https://fractalsoftworks.com/forum/index.php?topic=11646.0), specifically the Invocation Launcher (large Energy weapon), there is something funky going on in my reports. The weapon is supposed to do EMP damage, however it is always listed as doing zero EMP.

Its description lists EMP damage, and from my admittedly likely amateurish testing, it seems to actually do the EMP damage as well. So I am assuming the bug lies somewhere here. But I dont know where exactly the problem is.

My first assumption was that, due to the way the weapon deals damage (two stage projectile, with the second stage doing the damage, and doing so in a cone, not sure on the exact mechanics), there would lay the issue. However, the other damage to shields, armor and hull are listed, so I kinda doubt that.

The other possibility would be that it actually doesnt do any EMP damage, and my testing was only the actual Energy damage disabling the weapons. I dont know if there is a way to tell the difference between an EMP disabled weapon and one disabled by other damage, to me they look the same. That is the reason why I left a comment over on the ORA mod as well.

Of course, there are a million other things that could be going wrong as well, especially considering my large mod list, but this is as much as I know how to do. (If you want my mod list, I can post it as well.)

I hope this helps fix something, and sorry if this wasnt the mod causing issues.
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Nick XR on May 01, 2021, 07:54:57 PM
When using the Outer Rim Alliance mod (https://fractalsoftworks.com/forum/index.php?topic=11646.0), specifically the Invocation Launcher (large Energy weapon), there is something funky going on in my reports. The weapon is supposed to do EMP damage, however it is always listed as doing zero EMP.

Its description lists EMP damage, and from my admittedly likely amateurish testing, it seems to actually do the EMP damage as well. So I am assuming the bug lies somewhere here. But I dont know where exactly the problem is.

My first assumption was that, due to the way the weapon deals damage (two stage projectile, with the second stage doing the damage, and doing so in a cone, not sure on the exact mechanics), there would lay the issue. However, the other damage to shields, armor and hull are listed, so I kinda doubt that.

The other possibility would be that it actually doesnt do any EMP damage, and my testing was only the actual Energy damage disabling the weapons. I dont know if there is a way to tell the difference between an EMP disabled weapon and one disabled by other damage, to me they look the same. That is the reason why I left a comment over on the ORA mod as well.

Of course, there are a million other things that could be going wrong as well, especially considering my large mod list, but this is as much as I know how to do. (If you want my mod list, I can post it as well.)

I hope this helps fix something, and sorry if this wasnt the mod causing issues.

Thanks for the report, I'll check it out.  It should at least report it as "Unknown Energy" and be in the EMP column.

Edit:
Just put it in the debugger, there is no EMP damage being reported at all to the damage listeners via the in game Combat Engine.  So one of two possibilities:
* Invocation Launcher doesn't actually do EMP
* Game Engine doesn't report the EMP damage that the IL is doing. 
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: WeiTuLo on May 01, 2021, 08:32:02 PM
So for the negative damage, I was fighting Remnants, and one of my Wolves logged a -301 shield damage for Sabot SRM with the following statistics:

Total: 508
Shield: -301
Armor: 212
Hull: 597
EMP: 7576
Hits: 24
% Damage: 2
Fighter: 0

Hope it helps!
Title: Re: [0.95a] Detailed Combat Results v5.1.0 (2021-04-27)
Post by: Celepito on May 01, 2021, 08:53:47 PM
-snip-

Thanks for the report, I'll check it out.  It should at least report it as "Unknown Energy" and be in the EMP column.

Edit:
Just put it in the debugger, there is no EMP damage being reported at all to the damage listeners via the in game Combat Engine.  So one of two possibilities:
* Invocation Launcher doesn't actually do EMP
* Game Engine doesn't report the EMP damage that the IL is doing.

Thanks for checking, I put that over in the other thread!
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Nick XR on May 04, 2021, 04:39:14 PM
v5.1.1 is released
 Add caching layer to prevent perf issues if IntelCombatReport.isValid() is called repeatedly (by mods)
 Data is now stored in a compressed format
 Now includes Chinese (locale=zh) translation (thanks saya39!): https://www.fossic.org/forum.php?mod=viewthread&tid=1667
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Celepito on May 05, 2021, 09:50:02 AM
Well, I found and fixed the problem, its basically a typo in weapon_data.csv from ORA.

Thanks to your mod acting as bug finder there.
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Madskills on May 06, 2021, 05:14:49 AM
this looks like the best mod to have ever been created. i'm so installing it right now, you wont even believe
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Photonsynthesis on May 17, 2021, 06:10:25 AM
Getting this error in logs (not a crash):

Spoiler
java.lang.NoSuchMethodError: com.fs.starfarer.combat.entities.DamagingExplosion.getDamage()Lcom/fs/starfarer/combat/E/return;
   at data.scripts.combatanalytics.damagedetection.FrameProcessorUnclaimed.processExp losions(FrameProcessorUnclaimed.java:186)
   at data.scripts.combatanalytics.damagedetection.FrameProcessorUnclaimed.getWeaponN ame(FrameProcessorUnclaimed.java:144)
   at data.scripts.combatanalytics.damagedetection.FrameProcessorUnclaimed.processFra me(FrameProcessorUnclaimed.java:73)
   at data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector.handleFra me(EveryFrameDamageDetector.java:108)
   at data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector.detectDam age(EveryFrameDamageDetector.java:32)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
[close]

Error occurred 1556 times over 90 minutes, so it may cause a fair portion of damage to be untracked.

Game version 0.95a-RC15, mod version 5.1.1.

Edit: Recompiling without any further modification fixes the error.
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Nick XR on May 18, 2021, 10:50:19 AM
Getting this error in logs (not a crash):

Spoiler
java.lang.NoSuchMethodError: com.fs.starfarer.combat.entities.DamagingExplosion.getDamage()Lcom/fs/starfarer/combat/E/return;
   at data.scripts.combatanalytics.damagedetection.FrameProcessorUnclaimed.processExp losions(FrameProcessorUnclaimed.java:186)
   at data.scripts.combatanalytics.damagedetection.FrameProcessorUnclaimed.getWeaponN ame(FrameProcessorUnclaimed.java:144)
   at data.scripts.combatanalytics.damagedetection.FrameProcessorUnclaimed.processFra me(FrameProcessorUnclaimed.java:73)
   at data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector.handleFra me(EveryFrameDamageDetector.java:108)
   at data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector.detectDam age(EveryFrameDamageDetector.java:32)
   at data.scripts.plugins.DamageDetectionEveryFrameCombatPlugin.advance(DamageDetectionEveryFrameCombatPlugin.java:20)
[close]

Error occurred 1556 times over 90 minutes, so it may cause a fair portion of damage to be untracked.

Game version 0.95a-RC15, mod version 5.1.1.

Are you running any mods or do you have any idea which weapon might be causing this?  I can certainly defend against it, but looking at the starfarer DLLs I don't see how this is happening even though the stack trace is clearly inside of the DLL :/

Thanks for the report!


Edit: Recompiling without any further modification fixes the error.

I'm not sure I follow, what do you mean/did you recompile?
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Photonsynthesis on May 19, 2021, 11:32:02 AM
Are you running any mods or do you have any idea which weapon might be causing this?  I can certainly defend against it, but looking at the starfarer DLLs I don't see how this is happening even though the stack trace is clearly inside of the DLL :/

Thanks for the report!
I have many mods installed but I don't think this error relates to any other mods directly.

I'm not sure I follow, what do you mean/did you recompile?
I recompiled this mod against 0.95a-RC15.

The return type of the method changed. https://i.imgur.com/7p77SfY.png

If you cast the explosion to DamagingProjectileAPI like this:
Code
            float baseDamage = ((DamagingProjectileAPI) explosion).getDamage().getBaseDamage();
then the resulting bytecode doesn't depend on the implementation class and won't need to be recompiled after each update.
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Nick XR on May 19, 2021, 02:21:24 PM
I recompiled this mod against 0.95a-RC15.

The return type of the method changed. https://i.imgur.com/7p77SfY.png

If you cast the explosion to DamagingProjectileAPI like this:
Code
            float baseDamage = ((DamagingProjectileAPI) explosion).getDamage().getBaseDamage();
then the resulting bytecode doesn't depend on the implementation class and won't need to be recompiled after each update.

Ahhh, OK.  I wasn't sure if you recompiled some .91a ship pack or something and that made it work.  Thanks for the detailed write-up, I really appreciate it! I'll try to get a new build out in a day or so.
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Thaago on May 20, 2021, 11:05:01 PM
I was wondering, is there an easy way to have this show both the pre and post armor mitigated damage that a ship receives? IE an incoming round is rated at X damage, but does Y, and records the sum of all X's and Y's as their own categories. Probably also X1 and Y1 for hull as well. I've been doing quite a bit of low tech testing recently, but its hard to do good comparisons between armor and shields... shields are easy as they have constant reduction, but how much damage was actually stopped by "6000 armor damage" or similar is a very open question.
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Nick XR on May 21, 2021, 09:12:01 AM
I was wondering, is there an easy way to have this show both the pre and post armor mitigated damage that a ship receives? IE an incoming round is rated at X damage, but does Y, and records the sum of all X's and Y's as their own categories. Probably also X1 and Y1 for hull as well. I've been doing quite a bit of low tech testing recently, but its hard to do good comparisons between armor and shields... shields are easy as they have constant reduction, but how much damage was actually stopped by "6000 armor damage" or similar is a very open question.

Maybe?  I agree, the "damage mitigated by armor" is a pretty interesting stat to know as it clues you into how effective your armor actually is. From the damage listeners we have the amount of damage actually done, and we usually can figure out which weapon did it, so we could compute the delta between the two values.  It might get tricky when the damage is done partially to the hull also, but it could probably be done.  Beam weapons in general are harder because they're actually pretty difficult to figure out which weapon is actually doing damage :/

  I'm taking a bit of a break for a while from new functionality, but I'll add this to the list and get to it at some point :)
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: captinjoehenry on May 25, 2021, 06:32:18 PM
Out of curiosity does the Detailed Combat Result log only count damage VS ships?  Or does it also count damage VS fighter into the damage pile? 

As I'm trying to judge between different fighter load outs.  And some of them shoot down a lot more fighters and their damage numbers are also higher.  But I don't know if their damage numbers are so high because they killed a ton of fighters or if the fighters damage result is only vs the enemy warships
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Nick XR on May 25, 2021, 11:33:18 PM
Out of curiosity does the Detailed Combat Result log only count damage VS ships?  Or does it also count damage VS fighter into the damage pile? 

As I'm trying to judge between different fighter load outs.  And some of them shoot down a lot more fighters and their damage numbers are also higher.  But I don't know if their damage numbers are so high because they killed a ton of fighters or if the fighters damage result is only vs the enemy warships

Damage to fighters and missiles is ignored (basically only ships/stations) for calculations involving raw damage numbers.  Damage to fighters is only ever looked at when calculating number of kills against.  This is because generally the fighter kills count is good enough to tell what's going on, and if you include the fighter damage totals in the ship damage totals it's hard to tell how well weapons are actually performing.

Or that's the thought behind it anyway...
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: captinjoehenry on May 26, 2021, 12:54:04 PM
Out of curiosity does the Detailed Combat Result log only count damage VS ships?  Or does it also count damage VS fighter into the damage pile? 

As I'm trying to judge between different fighter load outs.  And some of them shoot down a lot more fighters and their damage numbers are also higher.  But I don't know if their damage numbers are so high because they killed a ton of fighters or if the fighters damage result is only vs the enemy warships

Damage to fighters and missiles is ignored (basically only ships/stations) for calculations involving raw damage numbers.  Damage to fighters is only ever looked at when calculating number of kills against.  This is because generally the fighter kills count is good enough to tell what's going on, and if you include the fighter damage totals in the ship damage totals it's hard to tell how well weapons are actually performing.

Or that's the thought behind it anyway...
Perfect!  That's exactly what I wanted to hear!  Just wanted to get it clarified
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Thaago on May 26, 2021, 12:59:05 PM
I was wondering, is there an easy way to have this show both the pre and post armor mitigated damage that a ship receives? IE an incoming round is rated at X damage, but does Y, and records the sum of all X's and Y's as their own categories. Probably also X1 and Y1 for hull as well. I've been doing quite a bit of low tech testing recently, but its hard to do good comparisons between armor and shields... shields are easy as they have constant reduction, but how much damage was actually stopped by "6000 armor damage" or similar is a very open question.

Maybe?  I agree, the "damage mitigated by armor" is a pretty interesting stat to know as it clues you into how effective your armor actually is. From the damage listeners we have the amount of damage actually done, and we usually can figure out which weapon did it, so we could compute the delta between the two values.  It might get tricky when the damage is done partially to the hull also, but it could probably be done.  Beam weapons in general are harder because they're actually pretty difficult to figure out which weapon is actually doing damage :/

  I'm taking a bit of a break for a while from new functionality, but I'll add this to the list and get to it at some point :)

Cool, glad to hear its mostly possible, and no rush at all. I suppose the code would also need to be able to compute the damage bonuses on the ship at the moment of firing and multiply by the weapon's base damage.
Title: Re: [0.95a] Detailed Combat Results v5.1.1 (2021-05-04)
Post by: Nick XR on May 26, 2021, 11:18:57 PM
Cool, glad to hear its mostly possible, and no rush at all. I suppose the code would also need to be able to compute the damage bonuses on the ship at the moment of firing and multiply by the weapon's base damage.

It already does that! It's a PITA but I've gotten the damage down to within about a 5% margin of error based on looking at what the damage probably should have been at the time of firing.  At least when armor isn't involved.  But this is a bit simpler since we know the base damage we can get the scalar for the damage:
https://bitbucket.org/NickWWest/starsectorcombatanalytics/src/111a23d71e8e48b682a26af0a1e8263cdcdfc3c3/CombatAnalyticsMod/src/data/scripts/combatanalytics/util/Helpers.java#lines-202
Then just figure out what the damage should have been, less the adjusted hull bleed through damage.

Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Nick XR on May 26, 2021, 11:21:00 PM
v5.1.2 is released
 Fixed issue with explosions and looking too deeply inside core objects. Thanks Photonsynthesis
 Better explosion damage detection
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Madskills on May 27, 2021, 02:03:20 AM
I noticed that with this mod certain weapons (like the [redacted] rift laser and doom's mines) sometimes show ridiculously high damage values listed in "mines" section. i'm assuming it can be due to the fact that damage dealt against multiple blocks is added together?

is that intended behaviour?

also sometimes damage of certain ships or weapons is listed as exactly 0 (even though it should not be the case), but I have a heavily modded game so this aspect is going to be hard to track because it does not repro every time.
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Nick XR on May 27, 2021, 09:18:27 AM
I noticed that with this mod certain weapons (like the [redacted] rift laser and doom's mines) sometimes show ridiculously high damage values listed in "mines" section. i'm assuming it can be due to the fact that damage dealt against multiple blocks is added together?

is that intended behaviour?
Yeah, that's how much damage that weapon has reported as doing. And we report the sum of all damages done to all real ships (not fighters). The explosion part identifies itself internally as a 'mine', hence the name.


also sometimes damage of certain ships or weapons is listed as exactly 0 (even though it should not be the case), but I have a heavily modded game so this aspect is going to be hard to track because it does not repro every time.

Not sure on that one, we don't show weapon damages if it's less than 25 AND hasn't killed any fighters.
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: halloween20 on May 27, 2021, 11:57:08 AM
as i was "browsing" my latest battle report i thought that one thing might help as a QoL improvement.
that is, if it is possible to add though...

would it be possible to (lightly) highligt a row in the table showing what weapon did what in the fight once you hover with the mouse over it?

Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Nick XR on May 27, 2021, 01:24:30 PM
as i was "browsing" my latest battle report i thought that one thing might help as a QoL improvement.
that is, if it is possible to add though...

would it be possible to (lightly) highligt a row in the table showing what weapon did what in the fight once you hover with the mouse over it?


That's a good idea!  But I don't think it's possible with the built-in UX controls. 

I might be able to alternate the row colors slightly.  Maybe.    I'll add it to the list of things to investigate. Thanks!
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: halloween20 on May 28, 2021, 06:12:34 AM
it should be possible somehow (if not, that would be something for alex to implement :P )

on other ingame screens these mechanismus is working...
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: briansd9 on July 16, 2021, 07:52:48 AM
as i was "browsing" my latest battle report i thought that one thing might help as a QoL improvement.
that is, if it is possible to add though...

would it be possible to (lightly) highligt a row in the table showing what weapon did what in the fight once you hover with the mouse over it?
That's a good idea!  But I don't think it's possible with the built-in UX controls. 

I might be able to alternate the row colors slightly.  Maybe.    I'll add it to the list of things to investigate. Thanks!

You can place an area checkbox (TooltipMakerAPI.addAreaCheckbox()) under each row so that it lights up when moused over.

Not sure if it will work with built-in tables, but here's how it looks in mine (https://i.imgur.com/xLwgQ4B.png)
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Nick XR on July 16, 2021, 11:07:51 AM
as i was "browsing" my latest battle report i thought that one thing might help as a QoL improvement.
that is, if it is possible to add though...

would it be possible to (lightly) highligt a row in the table showing what weapon did what in the fight once you hover with the mouse over it?
That's a good idea!  But I don't think it's possible with the built-in UX controls. 

I might be able to alternate the row colors slightly.  Maybe.    I'll add it to the list of things to investigate. Thanks!

You can place an area checkbox (TooltipMakerAPI.addAreaCheckbox()) under each row so that it lights up when moused over.

Not sure if it will work with built-in tables, but here's how it looks in mine (https://i.imgur.com/xLwgQ4B.png)

Ooo!  That's cool!  I'll try this.  Thanks!
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Yunru on September 19, 2021, 03:14:14 PM
It's not working for me.
More specifically, pressing L on the campaign map gives me the option of all battles, or back. Selecting all battles just kicks me back to the campaign map.
Title: Re: [0.95a] Detailed Combat Results v5.1.2 (2021-05-26)
Post by: Nick XR on September 21, 2021, 09:41:15 AM
It's not working for me.
More specifically, pressing L on the campaign map gives me the option of all battles, or back. Selecting all battles just kicks me back to the campaign map.

You've fought at least one battle?  When you select an option for how many battles to use to "analyze", it'll create a new Intel entry (press 'e').  That intel entry lasts for a few days.

Does that make sense?