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: Anubis-class Cruiser (12/20/24)

Pages: 1 [2] 3 4 ... 6

Author Topic: [0.97a] Fleet Journal v1.1.3  (Read 77058 times)

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.2
« Reply #15 on: February 21, 2023, 08:37:51 PM »

Received this fatal exception when trying to use the fleet log.

Spoiler
4332950 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at fleetjour.scripts.panel.EntitySelectorPanel.createSortingButtons(EntitySelectorPanel.kt:183)
   at fleetjour.scripts.panel.WriterPanelAssembly.assemblePanel(WriterPanelAssembly.kt:89)
   at fleetjour.scripts.EntryWriter.createLargeDescription(EntryWriter.kt:97)
   at com.fs.starfarer.campaign.comms.v2.EventsPanel.?00000(Unknown Source)
   at com.fs.starfarer.campaign.comms.v2.EventsPanel.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.OoO0.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.oooO.?00000(Unknown Source)
   at com.fs.starfarer.ui.oooO.processInput(Unknown Source)
   at com.fs.starfarer.ui.OoO0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.e$Oo.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.e.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.campaign.comms.v2.EventsPanel.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.campaign.comms.F.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.o0OO.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.N.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.OO0O.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.processInput(Unknown Source)
   at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.Q.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
[close]

There might be some doubts about what could exactly cause this, but I have a pretty solid guess. Uploaded a fix with 1.0.3 version, try it out, and if the error persists describe what the conditions were: did the error appear after you saved, exited and loaded said save? Might have happened because one of the fields of main writer class was transient and therefore didn't save and became null upon load.
Logged
   

Trinary0

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.2
« Reply #16 on: February 21, 2023, 09:44:52 PM »

There might be some doubts about what could exactly cause this, but I have a pretty solid guess. Uploaded a fix with 1.0.3 version, try it out, and if the error persists describe what the conditions were: did the error appear after you saved, exited and loaded said save? Might have happened because one of the fields of main writer class was transient and therefore didn't save and became null upon load.

Checking it out now. Let's see if I can get you some useful data.
Logged

Trinary0

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.3
« Reply #17 on: February 21, 2023, 09:50:18 PM »

It appears to be working fine now, even after I save and reload. Will keep you posted if it crashes again.
Logged

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.3
« Reply #18 on: February 21, 2023, 09:52:23 PM »

It appears to be working fine now, even after I save and reload. Will keep you posted if it crashes again.

Great to hear! Thanks for your reports.
Logged
   

Jabrolsky

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.3
« Reply #19 on: February 22, 2023, 02:30:30 AM »

This looks so good, trying now thank you!
Logged

Kiith

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.3
« Reply #20 on: February 22, 2023, 04:14:53 AM »

Great idea for a mod. Hate finding unique enemies/fleets while out exploring and then forgetting where they were later in the game.
Logged

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #21 on: February 22, 2023, 10:30:24 AM »

Updated to 1.0.4: save-compatible.
  • Fixed ClassCastException caused by incorrect handling of systems with LocationToken as system center.
Logged
   

power12359

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #22 on: February 22, 2023, 12:21:45 PM »

This is a great mod, it really brings out the inner author in me.
Logged

Cegorach

  • Ensign
  • *
  • Posts: 36
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #23 on: March 03, 2023, 10:39:47 PM »

Hi, just wanted to say thanks for this feature, it's what I've been looking for for about a year now, and I just wrote my first entries so thanks!

A couple of suggestions and comments:
1. Dating feature.  Maybe I missed it, but a feature that clearly labels the date in the entry would be need.  And of course it is God's will that you must include a feature that stamps the date in the Star trek 'Captain's log, stardate xxxxxx.x'.  God wills it.
2. The feature is a little clunky and could do with some refinement.  Having just started using it I got to say that the flow of use is a little off, and some of the labels are not exactly as clear to their function as one might desire.
3. I'm not sure you're aware, but it's quite easy to include a basic word processor in computer programmes.  I don't know how to do it, but I've used many programmes that integrated basic ones into their framework.  So while you appear to have integrated functions from the base game, you might find it easier as well as more effective if you were to find out how to do that.

Again: great.  Very useful, I love it.

Logged

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #24 on: March 04, 2023, 12:15:52 AM »

Thank you for your feedback!

1. Dating feature.  Maybe I missed it, but a feature that clearly labels the date in the entry would be need.  And of course it is God's will that you must include a feature that stamps the date in the Star trek 'Captain's log, stardate xxxxxx.x'.  God wills it.

There's a line in journal entry's intel item that shows how days have passed since writing, but I guess a proper date would indeed be more desirable. I'll keep this in mind when working on the mod.

2. The feature is a little clunky and could do with some refinement.  Having just started using it I got to say that the flow of use is a little off, and some of the labels are not exactly as clear to their function as one might desire.

You are definitely right, the mod indeed is a bit clunky, but I'm not sure where would I start with improving it. Could you provide some specifics as to what parts exactly come off as unsatisfactory?

3. I'm not sure you're aware, but it's quite easy to include a basic word processor in computer programmes.  I don't know how to do it, but I've used many programmes that integrated basic ones into their framework.  So while you appear to have integrated functions from the base game, you might find it easier as well as more effective if you were to find out how to do that.

I'm still very much new to Java, Starsector API and especially Kotlin, so the ways in which I could include a word processor in circumstance of CustomPanelAPI are not entirely clear to me. Could you perhaps help me out a bit by providing specific pointers as to how to do that? I'm afraid my findings at the moment of writing this mod indicated that word processor was something not readily doable given the constraints of API. ;)
Logged
   

tempest420

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #25 on: March 05, 2023, 09:19:55 AM »

Hiya, the game crashes when I try to start a new game with Fleet Journal and Legacy of Arkgneisis installed. I've attached the error message and here is the last bit of the log. I assume this is because of the system the Legacy mod starts you out in.

Quote
RROR com.fs.starfarer.combat.CombatMain  - java.lang.IllegalStateException: targetSystem.star must not be null
java.lang.IllegalStateException: targetSystem.star must not be null
   at fleetjour.scripts.panel.Common.selectDefaultTargetEntity(Common.kt:30)
   at fleetjour.scripts.EntryWriter.<init>(EntryWriter.kt:32)
   at fleetjour.FleetJourModPlugin.onGameLoad(FleetJourModPlugin.kt:19)
   at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(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.impl.K.dismiss(Unknown Source)
   at com.fs.starfarer.campaign.save.if.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.OoO0.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.oooO.Ò00000(Unknown Source)
   at com.fs.starfarer.ui.oooO.processInput(Unknown Source)
   at com.fs.starfarer.ui.V.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)


Logged

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #26 on: March 05, 2023, 08:30:30 PM »

Hiya, the game crashes when I try to start a new game with Fleet Journal and Legacy of Arkgneisis installed. I've attached the error message and here is the last bit of the log. I assume this is because of the system the Legacy mod starts you out in.
Spoiler
Quote
RROR com.fs.starfarer.combat.CombatMain  - java.lang.IllegalStateException: targetSystem.star must not be null
java.lang.IllegalStateException: targetSystem.star must not be null
   at fleetjour.scripts.panel.Common.selectDefaultTargetEntity(Common.kt:30)
   at fleetjour.scripts.EntryWriter.<init>(EntryWriter.kt:32)
   at fleetjour.FleetJourModPlugin.onGameLoad(FleetJourModPlugin.kt:19)
   at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(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.impl.K.dismiss(Unknown Source)
   at com.fs.starfarer.campaign.save.if.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.OoO0.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.oooO.Ò00000(Unknown Source)
   at com.fs.starfarer.ui.oooO.processInput(Unknown Source)
   at com.fs.starfarer.ui.V.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
[close]

Thank you for the bugreport. I'll add double-checks to the method once I have the free time, but honestly, this is more or less a responsibility of a mod author to properly write their starsystems - including setting up a not-null system star even if it does not have a real one, as in accordance with a vanilla nebulas practice.

In other words, will look into it, but not a super-high priority - compatibilities with improperly set up mods are a second-order concern for me, especially because I do not play with Legacy of Arkgneisis myself (not least because I'm unable to even download it in order to look into the causes of issue, thanks to links being Patreon and Nexus).
Logged
   

MrNage

  • Lieutenant
  • **
  • Posts: 53
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #27 on: March 11, 2023, 06:13:31 PM »

Would it be possible to set the target location for the journal to be based on the destination waypoint you set on the Map? You could pretty much set the destination waypoint anywhere you click on empty space so long as you have visited the system where that empty space is located, so I reckon it would be able to have that point be a possible location where the journal could be set on, at least on the Sector map.
Logged

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.4
« Reply #28 on: March 14, 2023, 11:03:11 AM »

Would it be possible to set the target location for the journal to be based on the destination waypoint you set on the Map? You could pretty much set the destination waypoint anywhere you click on empty space so long as you have visited the system where that empty space is located, so I reckon it would be able to have that point be a possible location where the journal could be set on, at least on the Sector map.

That's doable in terms of API, and I considered adding such a feature when making the mod, but decided against it because:
  • It's unclear how to name the SectorEntityToken, since the one returned by getCourseTarget() doesn't have a name by default.
  • It's not clear what's the utility of having target being just empty point in space, since, theoretically, entire point of making custom logs with SectorEntityToken associated is to pin objects of note.
In other words, I think player is better served by selecting entity directly.
Logged
   

Ontheheavens

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: [0.95.1a] Fleet Journal v1.0.5
« Reply #29 on: March 17, 2023, 12:36:56 PM »

Updated to 1.0.5: save-compatible.
  • Gated entries removal feature behind settings file (disabled by default).
  • Hopefully fixed issues with system stars/centers for good.

Hiya, the game crashes when I try to start a new game with Fleet Journal and Legacy of Arkgneisis installed. I've attached the error message and here is the last bit of the log. I assume this is because of the system the Legacy mod starts you out in.
Spoiler
Quote
RROR com.fs.starfarer.combat.CombatMain  - java.lang.IllegalStateException: targetSystem.star must not be null
java.lang.IllegalStateException: targetSystem.star must not be null
   at fleetjour.scripts.panel.Common.selectDefaultTargetEntity(Common.kt:30)
   at fleetjour.scripts.EntryWriter.<init>(EntryWriter.kt:32)
   at fleetjour.FleetJourModPlugin.onGameLoad(FleetJourModPlugin.kt:19)
   at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(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.impl.K.dismiss(Unknown Source)
   at com.fs.starfarer.campaign.save.if.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.OoO0.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.oooO.Ò00000(Unknown Source)
   at com.fs.starfarer.ui.oooO.processInput(Unknown Source)
   at com.fs.starfarer.ui.V.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
[close]

Thank you for the bugreport. I'll add double-checks to the method once I have the free time, but honestly, this is more or less a responsibility of a mod author to properly write their starsystems - including setting up a not-null system star even if it does not have a real one, as in accordance with a vanilla nebulas practice.

Looked into the possible avenues of fixing this; unfortunately, the real culprit in this case is vanilla getEntityById() method which does incorrect casts to BaseCampaignEntity, and therefore throws an exception when fed a LocationToken. The issue was reported and is supposedly fixed by Alex  in the next update:

https://fractalsoftworks.com/forum/index.php?topic=5061.msg389139#msg389139

Spoiler
What basically happens is that I fetch SectorEntityToken ID of the system's center through getCenter(); store this ID in field of my class, and then fetch SectorEntityToken by this ID through public SectorEntityToken getEntityById(String var1).

BUT. If the star system in question is a nebula, it has LocationToken as its center, while getEntityById method has this code:

Code
        if (this.idToEntity.containsKey(var1)) {
            BaseCampaignEntity var2 = (BaseCampaignEntity)this.idToEntity.get(var1);
            if (var2.getContainingLocation() != null && var2.getContainingLocation().getAllEntities().contains(var2)) {
                return var2;
            }
        }

And that is the source of my crash right there, since LocationToken doesn't cast to BaseCampaignEntity. The question is: is this a vanilla implementation shortcoming or am I simply doing it wrong? I'm able to get rid of the crash by retrieving star of the system instead of its center, so it's nothing major - just putting this out there.
[close]

Thank you! This is a vanilla issue; fixed this up.

Initially this bug was discovered with crash from vanilla nebulas, and I thought I got rid of the issue by evading references to LocationTokens by looking for system star (BaseCampaignEntity) instead of its center(LocationToken). But now it has been pointed out to me that several mods have custom star systems without stars and with LocationToken centers - hopefully fixed the related crashes in the update.
Logged
   
Pages: 1 [2] 3 4 ... 6