Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 2 [3] 4 5 ... 19

Author Topic: [0.97a] Detailed Combat Results v5.4.0 (2024-02-04)  (Read 267198 times)

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
« Reply #30 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!

xor0

  • Ensign
  • *
  • Posts: 24
    • View Profile
Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
« Reply #31 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.
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.9a] Combat Analytics v3.2 (2018-11-20)
« Reply #32 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)
« Last Edit: February 09, 2019, 03:38:46 PM by Nick XR »
Logged

seewen

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: [0.9a] Combat Analytics v3.3 (2018-11-20)
« Reply #33 on: April 28, 2019, 05:53:04 AM »

Excellet mod. It helped me learn the game.
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.9a] Combat Analytics v3.3 (2018-11-20)
« Reply #34 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

stormbringer951

  • Commander
  • ***
  • Posts: 130
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #35 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.
« Last Edit: May 23, 2019, 02:00:06 AM by stormbringer951 »
Logged
Weapons Group Controls mod - deselect all weapon groups, hold-down hold-fire mode, toggle alternating/linked fire
Captain's Log - throw away your notepad: custom notes, ruins and salvageable reminders
Old Hyperion - for your dose of nostalgia
Adjustable Skill Thresholds - set fleet DP and fighter bay thresholds

stormbringer951

  • Commander
  • ***
  • Posts: 130
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #36 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.
« Last Edit: May 23, 2019, 05:41:32 PM by stormbringer951 »
Logged
Weapons Group Controls mod - deselect all weapon groups, hold-down hold-fire mode, toggle alternating/linked fire
Captain's Log - throw away your notepad: custom notes, ruins and salvageable reminders
Old Hyperion - for your dose of nostalgia
Adjustable Skill Thresholds - set fleet DP and fighter bay thresholds

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #37 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...
« Last Edit: May 23, 2019, 09:38:55 PM by Nick XR »
Logged

Six__Nix

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #38 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?
« Last Edit: May 24, 2019, 09:02:14 AM by Se7ventySix »
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #39 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!

stormbringer951

  • Commander
  • ***
  • Posts: 130
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #40 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 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.
« Last Edit: May 24, 2019, 09:36:51 AM by stormbringer951 »
Logged
Weapons Group Controls mod - deselect all weapon groups, hold-down hold-fire mode, toggle alternating/linked fire
Captain's Log - throw away your notepad: custom notes, ruins and salvageable reminders
Old Hyperion - for your dose of nostalgia
Adjustable Skill Thresholds - set fleet DP and fighter bay thresholds

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #41 on: May 24, 2019, 10:06:46 AM »

There is an API function 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.

Six__Nix

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #42 on: May 24, 2019, 10:28:03 AM »

Thanks for the quick replies!!
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #43 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 for making me realize we have tables now)




*edit*
4.0 is live
« Last Edit: May 24, 2019, 05:04:53 PM by Nick XR »
Logged

TimeDiver

  • Captain
  • ****
  • Posts: 345
    • View Profile
Re: [0.9.1a] Combat Analytics v3.3 (2018-11-20)
« Reply #44 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 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).
Logged
Pages: 1 2 [3] 4 5 ... 19