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); In-development patch notes for Starsector 0.98a (2/8/25)

Pages: 1 ... 49 50 [51] 52 53 54

Author Topic: [0.97a] Random Assortment of Things  (Read 457542 times)

FinLynx

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #750 on: December 02, 2024, 12:56:50 AM »

Hey, I managed to have a total game freeze when fighting the... super secret encounter in the Sea of Serpents. No big deal, probably a Java RAM issue. However, when reloading my save I made just before the battle, I encountered an error that prevented loading; the game was calling an invalid class. This error was apparently caused by Nexerelin; turning off (and later on again) the experimental strategic AI fixed the issue! Sadly I didn't think to save a copy of the log, to check exactly what was causing the error; thought I'd give a shoutout regardless, in case anyone else runs into the same problem.
Logged

JohnVicres

  • Lieutenant
  • **
  • Posts: 75
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #751 on: December 09, 2024, 10:45:32 AM »

All them ULTRA-REDACTED ship systems are cluttering the codex. Wouldn't it be better to use the "restricted" tag on all of them?
Logged

GodAmongstUs

  • Ensign
  • *
  • Posts: 12
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #752 on: December 10, 2024, 02:46:11 PM »

It has been almost a year since I originally tried to summon(cheat) in extra RAT special stations, specifically the domain refurbishment one, and the construction station as well. I failed to figure it out last time, gave up. Tried again, and can summon said stations, but interacting with them only has a "Leave" option, so they are still useless X)

runcode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "rat_refurbishment_station", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }

that will spawn one in, (and give you discovery exp) but it is unusable. Anyone with any ideas on why it doesn't work? I'm sorry if it is something really simple and I'm overlooking it, but my coding knowledge is functionally none (this was code I copied from people figuring stuff out in the console commands replies, and finding the custom entities names in the RAT mod folders)
Logged

Bozogan

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #753 on: December 12, 2024, 12:48:59 AM »

does this mod enable me to remove hyperspace and storms?
Logged

EnigmaniteZ

  • Commander
  • ***
  • Posts: 161
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #754 on: December 12, 2024, 01:13:25 AM »

no, but I believe nex allows that as part of the new game process.
Logged
Also known as: Khe, Kherae. Pros: tend to be an optimizer and a fixer. Cons: ADD (Is that a squirrel over there?) and severe memory issues (as in: I'm the last 10+ years)

Dear fellow coders: please use more null checks...

Lukas04

  • Admiral
  • *****
  • Posts: 645
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #755 on: December 12, 2024, 03:09:41 AM »

does this mod enable me to remove hyperspace and storms?

In the mods Lunalib Configs go to the Procgen settings, i forgot if i capped it or not, but should be able to either remove them entirely or reduce them to the very least with the slider there.
Logged

TokyoVAL

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #756 on: December 12, 2024, 10:41:59 PM »

Does this mod contain other mods that can be downloaded separately? Because I noticed in the mod files there's a folder 'secondinCommand', which is another mod. Because I'm concerned if when using this mod I'm using duplicates of mods which could maybe cause problems
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 645
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #757 on: December 12, 2024, 10:56:25 PM »

Does this mod contain other mods that can be downloaded separately? Because I noticed in the mod files there's a folder 'secondinCommand', which is another mod. Because I'm concerned if when using this mod I'm using duplicates of mods which could maybe cause problems

Those are files only loaded together with Second-in-Command, as there is crossover content.
Logged

float

  • Captain
  • ****
  • Posts: 361
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #758 on: December 17, 2024, 07:49:33 PM »

Spoiler
107711 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException: Cannot invoke "com.fs.starfarer.api.combat.CombatEngineAPI.addLayeredRenderingPlugin(com.fs.starfarer.api.combat.CombatLayeredRenderingPlugin)" because the return value of "com.fs.starfarer.api.Global.getCombatEngine()" is null
java.lang.NullPointerException: Cannot invoke "com.fs.starfarer.api.combat.CombatEngineAPI.addLayeredRenderingPlugin(com.fs.starfarer.api.combat.CombatLayeredRenderingPlugin)" because the return value of "com.fs.starfarer.api.Global.getCombatEngine()" is null
   at assortment_of_things.abyss.skills.AbyssalRequiem.apply(AbyssalRequiem.kt:56) ~[?:?]
   at com.fs.starfarer.campaign.CharacterStats.applyPersonalToStats(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.CharacterStats.applyPersonalToShip(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.combat.entities.Ship.setCaptain(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.combat.entities.Ship.<init>(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.loading.specs.oooo.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.super.updateFromCurrentVariant(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.super.setFleetMember(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.V.setFleetMember(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.dialogDismissed(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.showMember(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.Ó00000(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.setPlugin(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.newui.L$4.actionPerformed(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o0O0.buttonPressed(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.int.Ò00000(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.int.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o0O0.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.dispatchEventsToChildren(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.dispatchEventsToChildren(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.O.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.newui.L.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.dispatchEventsToChildren(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source) ~[port_obf.jar:?]
   at com.fs.state.AppDriver.begin(Unknown Source) ~[port.common_obf.jar:?]
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]
[close]
Getting a crash when opening the refit screen right after loading.
Can happen when a Global.getCombatEngine() call is queued before loading is finished, but sometimes happens after that too.
Never mind, seems to be a rare unlucky instance where no combat engine exists upon loading into the game -- it's no longer reproducible after saving over the affected save file.
Should be pretty easy to resolve with a null check or using CombatEngine.getInstance() instead, which creates the combat engine if it doesn't exist.
« Last Edit: December 17, 2024, 07:55:29 PM by float »
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 645
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #759 on: December 18, 2024, 12:06:13 AM »

Spoiler
107711 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException: Cannot invoke "com.fs.starfarer.api.combat.CombatEngineAPI.addLayeredRenderingPlugin(com.fs.starfarer.api.combat.CombatLayeredRenderingPlugin)" because the return value of "com.fs.starfarer.api.Global.getCombatEngine()" is null
java.lang.NullPointerException: Cannot invoke "com.fs.starfarer.api.combat.CombatEngineAPI.addLayeredRenderingPlugin(com.fs.starfarer.api.combat.CombatLayeredRenderingPlugin)" because the return value of "com.fs.starfarer.api.Global.getCombatEngine()" is null
   at assortment_of_things.abyss.skills.AbyssalRequiem.apply(AbyssalRequiem.kt:56) ~[?:?]
   at com.fs.starfarer.campaign.CharacterStats.applyPersonalToStats(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.CharacterStats.applyPersonalToShip(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.combat.entities.Ship.setCaptain(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.combat.entities.Ship.<init>(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.loading.specs.oooo.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.super.updateFromCurrentVariant(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.super.setFleetMember(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.V.setFleetMember(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.dialogDismissed(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.showMember(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.Ó00000(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.coreui.refit.return.setPlugin(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.newui.L$4.actionPerformed(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o0O0.buttonPressed(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.int.Ò00000(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.int.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o0O0.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.dispatchEventsToChildren(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.dispatchEventsToChildren(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.O.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.newui.L.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.dispatchEventsToChildren(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.o000.processInputImpl(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source) ~[port_obf.jar:?]
   at com.fs.state.AppDriver.begin(Unknown Source) ~[port.common_obf.jar:?]
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]
[close]
Getting a crash when opening the refit screen right after loading.
Can happen when a Global.getCombatEngine() call is queued before loading is finished, but sometimes happens after that too.
Never mind, seems to be a rare unlucky instance where no combat engine exists upon loading into the game -- it's no longer reproducible after saving over the affected save file.
Should be pretty easy to resolve with a null check or using CombatEngine.getInstance() instead, which creates the combat engine if it doesn't exist.

Its a rather annoying issue that rarely pops up, im pretty sure it has to be caused by some mod but ive got no clue which one it would be. And since it so rarely happens i keep forgetting to Nullcheck for the engine since generaly its simply supposed to work in the places im using it (why is a afterShipCreation/advanceInCombat being called without a combat engine?, or rather in this case why is there a ShipAPI with no Combat instance anywhere). Il nullcheck it next patch, id rather not use getInstance since i would not want to create a new engine whenever this happens.
Logged

float

  • Captain
  • ****
  • Posts: 361
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #760 on: December 29, 2024, 02:17:47 PM »

Hmm, there seems to be some interplay between this mod and Sephira Conclave that causes the game to freeze up for a few seconds every time a market is opened:



In particular, RATControllerHullmod is calling getMembersListCopy in a applyEffectsBeforeShipCreation, but there's a sneaky syncIfNeeded call inside getMembersListCopy that's causing possibly multiple syncs to happen in a row. I'm not sure about the specifics, but if the fleet needs to be synced then every hullmod's applyEffectsBeforeShipCreation will need to be called again, which can lead to some unwanted pseudo-looping. So for that reason I'd recommend avoiding using getMembersListCopy inside applyEffectsBeforeShipCreation; there are a number of alternatives such as using FleetData.getMembersNoSync (but be aware that includes "null" placeholders when a ship is dragged around), setting and unsetting forceNoSync in between the getMembersListCopy call, or even iterating through the officers list and using getMemberWithCaptain for RATControllerHullmod's specific use case (nevermind, this also causes syncing).

Not sure how much Sephira Conclave is to blame, it seems the jar for that mod doesn't even match the source code as there is no SephiranSpecterCheck in the source code of that mod...
« Last Edit: December 29, 2024, 02:24:15 PM by float »
Logged

TimeDiver

  • Captain
  • ****
  • Posts: 417
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #761 on: December 29, 2024, 03:35:11 PM »

Hmm, there seems to be some interplay between this mod and Sephira Conclave that causes the game to freeze up for a few seconds every time a market is opened:
Huh; been wondering what combination of mods could have been responsible for this inevitable slowdown in opening ANY market's menu after a certain amount of in-game time; for me, it's not even a year before it takes upwards of 5-10 seconds for the menu to appear, while at campaign start the delay is ~1-2 seconds.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 645
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #762 on: December 29, 2024, 04:44:12 PM »

Hmm, there seems to be some interplay between this mod and Sephira Conclave that causes the game to freeze up for a few seconds every time a market is opened:



In particular, RATControllerHullmod is calling getMembersListCopy in a applyEffectsBeforeShipCreation, but there's a sneaky syncIfNeeded call inside getMembersListCopy that's causing possibly multiple syncs to happen in a row. I'm not sure about the specifics, but if the fleet needs to be synced then every hullmod's applyEffectsBeforeShipCreation will need to be called again, which can lead to some unwanted pseudo-looping. So for that reason I'd recommend avoiding using getMembersListCopy inside applyEffectsBeforeShipCreation; there are a number of alternatives such as using FleetData.getMembersNoSync (but be aware that includes "null" placeholders when a ship is dragged around), setting and unsetting forceNoSync in between the getMembersListCopy call, or even iterating through the officers list and using getMemberWithCaptain for RATControllerHullmod's specific use case (nevermind, this also causes syncing).

Not sure how much Sephira Conclave is to blame, it seems the jar for that mod doesn't even match the source code as there is no SephiranSpecterCheck in the source code of that mod...

Theres no such method called "getMembersNoSync", but i can give the other options you named a try. I do think its worth mentioning that hullmods being called repeatedly is pretty normal as far as i am aware, its something that im quite sure even happens in the vanilla enviroment. If you just use the debugger on a custom hullmod and then enter refit, the method can be called a few times right after eachother. I think the true issue is that as i just noticed, i did a pretty dumb thing where it has to iterate over each ship in the fleet to find a person for every automated ship in the fleet, though this should also mean that you dont really get any of this issue if you dont have any automated ships.
« Last Edit: December 29, 2024, 04:45:45 PM by Lukas04 »
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 645
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #763 on: December 29, 2024, 04:54:25 PM »

Uh, just gave it a try, and it appears that using the forceNoSync methods will actually just cause syncs when used, causing an actual Stackoverflow crash. So dont think thats the solution either.
Logged

float

  • Captain
  • ****
  • Posts: 361
    • View Profile
Re: [0.97a] Random Assortment of Things
« Reply #764 on: December 29, 2024, 05:46:25 PM »

Huh, that's odd. I only recognized this issue because it's something I had to contend with at some point, making (part of) a hullmod that reduced a ship's DP cost if it was the only ship of that hull spec in your fleet. I noticed that calling getMembersListCopy would result in a lot of unnecessary fleet syncing calls, which would inevitably lead to even that specific applyEffectsBeforeShipCreation being called many times for just one ship. I think the tell was that it was being called many times with the same call stack and from the same source, whereas the repeated hullmod application calls in other scenarios would all come with distinct call stacks.

The vanilla getMembersNoSync is in FleetData, not FleetDataAPI, but thankfully it's not obfuscated. Though I ended up not using it as it would crash the game when I tried to reorder ships in my fleet... turns out it includes random spacer elements with no data just for the sake of not collapsing the fleet menu.

The second method is what I settled on, via this code:

Code
public static List<FleetMember> getMembersNoSync(FleetDataAPI fleetData) {
        if (fleetData == null) return new ArrayList<>();
        boolean wasNoSync = fleetData.isForceNoSync();
        fleetData.setForceNoSync(true);
        List<FleetMember> members = ((FleetData) fleetData).getMembers();
        fleetData.setForceNoSync(wasNoSync);
        return members == null ? new ArrayList<FleetMember>() : members;
}

I'm surprised it's crashing for you, as I don't seem to have had any issues with it.

Edit: good point with the code only being called if you have automated ships in your fleet. Just did a test where I scuttled every automated ship and the freeze time went from ~4 seconds to ~1 second, so the RAT hullmod is definitely a major contributor here but it seems it isn't the entire story.

Edit 2: here's what it looks like after scuttling all my automated ships:


Looks like Sephira Conclave's also calling getMembersListCopy a bunch, though that's in a reportPlayerOpenedMarket. I guess fleet syncing just takes a while, or maybe it's the repeated updateStats call in that same method that's causing a bunch of additional syncs, not sure. Kind of surprising that syncing would take so long as without the automated ships I only had 15 or so ships in my fleet.
« Last Edit: December 29, 2024, 06:07:53 PM by float »
Logged
Pages: 1 ... 49 50 [51] 52 53 54