[Starsector Mods][0.95a] Fleet Action History v1.0.8 – battle logs, ship kill counts and more

  • Post category:Mods
  • Post comments:0 Comments

Do you like statistics?
Would you like to know exactly how many enemy fleets you’ve personally blown up in your entire playthrough?
Or how many of your ships fell in glorious battle against the accursed ?
If so, this mod may be for you! Please enjoy it:
Download
Fleet Action History v1.0.8 – 2022-04-29
Safe to add to existing savegames, and easily removable too


Spoiler: click to expand
Individual battle histories for each of your ships and officers

Officer level ups and new skills are tracked too

Spoiler: click to expand
Detailed logs for every battle you fight


Spoiler: click to expand
Tested with unreasonably huge battle sizes and every faction mod I could find – no crashes or slowdown
I pray for the souls of all the poor crewmen who were incinerated for my testing


Spoiler: click to expand
In-game configuration, no fiddling with settings.json ever! Also includes built-in “clear data” function for safe removal from savefiles


Spoiler: click to expand
For fellow modders
Integration ideas are welcome. If you’d like to experiment, add fleethistory.jar as a library in your IDE and try out these methods:

Code
U.getOfficerLogFor(PersonAPI.getId())
Code
U.getShipLogFor(FleetMemberAPI.getId())

Spoiler: click to expand
Known issues and limitations
• Only battles you fight personally are tracked – autoresolve not handled
• Kills of fighters, dorito crumbs, and any other ships dynamically spawned on the field can’t be recorded
• If you transfer command during battle, only the stats of the last ship commanded are credited to you
• Battlestation kills sometimes behave oddly (more than one ship gets the kill; fleet point value assigned is greater than actual value)

Spoiler: click to expand
Future plans
• Battle recap / timeline
• Log of post-battle loot?
• Suggestions welcome

Spoiler: click to expand
Thanks to…
• The adepts of #advanced_scripting_sanctum on Discord, every one of you is a gentleman and a scholar
• Nick XR, whose


Spoiler: click to expand
Change log
v1.0.8 (2022-04-29)
– Minor fix to prevent a crash of unknown cause (

v1.0.7 (2021-11-14)
– Minor fix to prevent occasional crash when playing with Vayra’s Sector unofficial update (

v1.0.6 (2021-06-29)
– Fixed savefile-corrupting bug (instructions for repairing affected saves can be found here:

v1.0.5 (2021-06-28)
– Fixed some minor text bugs (thanks to saya39)

v1.0.4 (2021-06-27)
– Will no longer add story points when mousing over lost player ships in battle report. ????
– Added translation support for fossic friends

v1.0.0 – v1.0.3 (2021-06-08)
– Various post-release crash fixes


Oh.
OH!

This is outright amazing! I will definetly slap this into my mod folder as soon as I’m able to tonight. I’ll be able to provide actual feedback then!


Dude! I didn’t know it before but I was looking for this all my (Starsector-) life!

I-I assume you used God Mode for that 9v3315 ships fight :o? I mean fair enough if you did, that was most definitely a conclusive performance test, but still…just how long did that fight take?

I-I assume you used God Mode for that 9v3315 ships fight :o? I mean fair enough if you did, that was most definitely a conclusive performance test, but still…just how long did that fight take?

Yup, god mode for most of that playthrough (that’s why the next screenshot shows I’m undefeated)

Took about an hour I think, left it on in the background while working… the limiting factor was how quickly enemy reinforcements deployed


If I press E to enter the Intel the game crash. Last log see attachment. I couldn’t copy and paste. Maybe because of special symbols.


If I press E to enter the Intel the game crash. Last log see attachment. I couldn’t copy and paste. Maybe because of special symbols.

Oops, sorry about that… fixed, please re-download using the existing link (https://github.com/briansd9/starsector-fleethistory/releases/latest/download/fleethistory.zip)


  • In-game configuration, no fiddling with settings.json ever! Also includes built-in “clear data” function for safe removal from savefiles
  • Integration ideas are welcome.
  • Suggestions welcome

I’ll go ahead and ask : would you be kind enough to make the settings.json editor open copyright? There are tons of mods that already use settings.json files and might find it useful to integrate that particular feature in their own.


Oops, sorry about that… fixed, please re-download using the existing link…

Thx for the fix. Now it works.
Cool! Very interesting stats. So now I will hunt for lazy captains :D


I’ll go ahead and ask : would you be kind enough to make the settings.json editor open copyright? There are tons of mods that already use settings.json files and might find it useful to integrate that particular feature in their own.

Hmm, this mod doesn’t use settings.json at all, the settings are stored in the savefile (campaign.xml) instead.

Would a general framework for this kind of configuration be of interest? I suppose it’s theoretically possible… but any changes made would be limited to that savefile, so you’d have to input them all over again for every new game. (Also, programming UI elements in Starsector is rather tough)


Hmm, this mod doesn’t use settings.json at all, the settings are stored in the savefile (campaign.xml) instead.

Okay. I misunderstood where the settings were.

Would a general framework for this kind of configuration be of interest? I suppose it’s theoretically possible… but any changes made would be limited to that savefile, so you’d have to input them all over again for every new game. (Also, programming UI elements in Starsector is rather tough)

I still believe that modders would find uses for this! Its like having a new tool on a toolbench. The tool is designed for a purpose but creativity allows alternative uses that could surprise you.

Spoiler: click to expand
Spoiler

Would a general framework for this kind of configuration be of interest? I suppose it’s theoretically possible… but any changes made would be limited to that savefile, so you’d have to input them all over again for every new game. (Also, programming UI elements in Starsector is rather tough)

There’s actually a way, check out:

Code
Global.getSettings().writeTextFileToCommon();
Global.getSettings().readTextFileFromCommon();

I think there’s an IO limit of 1MB, but if you limit to read on startup and write on save and you don’t write much, you should be fine.

But this is cool, especially the configuration.  You should ask one of the maintainers of a lib if the configuration stuff could go in there.


I’m getting a crash with this

Code
449766 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
        java.lang.NullPointerException
at fleethistory.BattleLogger.getParent(BattleLogger.java:87)
at fleethistory.BattleLogger.advance(BattleLogger.java:59)
at com.fs.starfarer.title.Object.L$Oo.super(Unknown Source)
at com.fs.starfarer.combat.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.B.super(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
at com.fs.starfarer.combat.CombatState.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.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Image

notepad++


I’m getting a crash with this

Code
449766 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
        java.lang.NullPointerException
at fleethistory.BattleLogger.getParent(BattleLogger.java:87)
at fleethistory.BattleLogger.advance(BattleLogger.java:59)
at com.fs.starfarer.title.Object.L$Oo.super(Unknown Source)

Sorry about that – should be fixed in v1.0.2


Sorry about that – should be fixed in v1.0.2

Can you take a look to this crash? (modversion 1.02)
After I join the battle and click to auto resolve (second in command) the game crashed. I had a save before the battle and try to repeat the same procedure but suddenly… no crash :D strange…

Spoiler: click to expand
Spoiler
1612505 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  – java.lang.NullPointerException
java.lang.NullPointerException
   at fleethistory.types.BattleRecord.setCaptains(BattleRecord.java:154)
   at fleethistory.types.BattleRecord.setPlayerFleetStrength(BattleRecord.java:141)
   at fleethistory.listeners.BattleListener.logPlayerFleetOutcome(BattleListener.java:130)
   at fleethistory.listeners.BattleListener.logCombatResults(BattleListener.java:61)
   at fleethistory.listeners.BattleListener.reportPlayerEngagement(BattleListener.java:52)
   at com.fs.starfarer.campaign.CampaignEngine.reportPlayerEngagement(Unknown Source)
   at com.fs.starfarer.api.impl.campaign.FleetEncounterContext.processEngagementResults(FleetEncounterContext.java:247)
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEngagement(FleetInteractionDialogPluginImpl.java:590)
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.backFromEngagement(NexFleetInteractionDialogPluginImpl.java:90)
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl$1.pickedFleetMembers(FleetInteractionDialogPluginImpl.java:1385)
   at com.fs.starfarer.ui.newui.oOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.advance(Unknown Source)
   at com.fs.starfarer.ui.v.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.Oo0O.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.Stringsuper.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.advance(Unknown Source)
   at com.fs.starfarer.ui.v.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Leave a Reply