Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Hostile Activity (09/01/22)

Pages: 1 ... 3 4 [5]

Author Topic: [0.95.1a] Persean Chronicles, a quest mod (updated 2021-10-07)  (Read 71467 times)

Terethall

  • Commander
  • ***
  • Posts: 153
    • View Profile
Re: [0.95.1a] Persean Chronicles, a quest mod (updated 2021-10-07)
« Reply #60 on: January 03, 2022, 06:39:26 PM »

I can confirm the Karengo and Riley content works fine in .95.1aRC6. Haven't gotten the other quests yet, but from reading the thread they sound less important, and also, like they might naturally take forever to trigger. (Red Planet took like 15 cycles to trigger for me in the new patch, cf.)

Although the Depths riddles are very fun and I want more like that, I like the long term potential world-building impacts in the Riley storyline the most. It's just so personal and touching by comparison to vanilla; in a game where Crew is a commodity and the main plotline is certified weapons-grade High-Concept Sci-Fi Rigmarole, having some human emotion and natural-feeling backstory is like opening a window in an abattoir.

Also, I wanted to ask, how does the Depths quest choose a target world? It happened to pick a Decivilized Subpopulation Terran world in literally the best system in the sector (tons of planets, nearly all the right market conditions represented), so the text made enough sense talking about the locals. Same system had a research station with a Biofactory Embryo. Free Port enabled. Part of me is wondering if the mod alters the system, or if it has criteria that helps it pick a really good one naturally?
Logged

Wispborne

  • Commander
  • ***
  • Posts: 226
  • Discord: Wisp#0302
    • View Profile
Re: [0.95.1a] Persean Chronicles, a quest mod (updated 2021-10-07)
« Reply #61 on: January 03, 2022, 09:38:41 PM »

I can confirm the Karengo and Riley content works fine in .95.1aRC6. Haven't gotten the other quests yet, but from reading the thread they sound less important, and also, like they might naturally take forever to trigger. (Red Planet took like 15 cycles to trigger for me in the new patch, cf.)

Thank you for confirming! And yeah, with how common bar events are now, it might take a while for the others to randomly show up.

Although the Depths riddles are very fun and I want more like that, I like the long term potential world-building impacts in the Riley storyline the most. It's just so personal and touching by comparison to vanilla; in a game where Crew is a commodity and the main plotline is certified weapons-grade High-Concept Sci-Fi Rigmarole, having some human emotion and natural-feeling backstory is like opening a window in an abattoir.

That is a large part of what I was going for, so that's great to hear. Makes the sector feel a bit more like it has people in it, not just Population.

Also, I wanted to ask, how does the Depths quest choose a target world? It happened to pick a Decivilized Subpopulation Terran world in literally the best system in the sector (tons of planets, nearly all the right market conditions represented), so the text made enough sense talking about the locals. Same system had a research station with a Biofactory Embryo. Free Port enabled. Part of me is wondering if the mod alters the system, or if it has criteria that helps it pick a really good one naturally?

No alteration, you just got lucky! All it does is look for specific planet types and prioritize decivved, then uncolonized planets.

Here's the actual code...it's somewhat readable? Maybe?

Code
            
val DEPTHS_PLANET_TYPES = listOf(
        "terran",
        "terran-eccentric",
        "water",
        "US_water", // Unknown Skies
        "US_waterB", // Unknown Skies
        "US_continent" // Unknown Skies
    )

              game.sector.starSystemsAllowedForQuests // Avoid blacklisted systems
                .filter { it.id != playersCurrentStarSystem?.id }
                .filter { system -> system.solidPlanets.any { planet -> planet.typeId in DEPTHS_PLANET_TYPES } }
                .prefer { it.distanceFromPlayerInHyperspace > minimumDistanceFromPlayerInLightYearsToPlaceDepthsPlanet }
                .sortedBy { it.distanceFromCenterOfSector }
                .flatMap { it.solidPlanets }
                .prefer { it.faction.id == Factions.NEUTRAL } // Uncolonized planets
                .filter { planet -> planet.typeId in DEPTHS_PLANET_TYPES }
                .toList()
                .run {
                    // Take all planets from the top half of the list,
                    // which is sorted by proximity to the center.
                    val possibles = this.take((this.size / 2).coerceAtLeast(1))

                    WeightedRandomPicker<PlanetAPI>().apply {
                        possibles.forEach { planet ->
                            when {
                                planet.market?.hasCondition(Conditions.DECIVILIZED) == true -> {
                                    game.logger.i { "Adding decivved planet ${planet.fullName} in ${planet.starSystem.baseName} to Depths candidate list" }
                                    add(planet, 3f)
                                }
                                planet.market?.size == 0 -> {
                                    game.logger.i { "Adding uninhabited planet ${planet.fullName} in ${planet.starSystem.baseName} to Depths candidate list" }
                                    add(planet, 2f)
                                }
                                else -> {
                                    game.logger.i { "Adding planet ${planet.fullName} in ${planet.starSystem.baseName} to Depths candidate list" }
                                    add(planet, 1f)
                                }
                            }
                        }
                    }
                        .pick()!!
                }
Logged

Maelstrom

  • Commander
  • ***
  • Posts: 237
    • View Profile
Re: [0.95.1a] Persean Chronicles, a quest mod (updated 2021-10-07)
« Reply #62 on: March 24, 2022, 09:45:56 PM »

1065312 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.access$100(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at org.wisp.stories.dangerousGames.pt1_dragons.Dragons_Stage1_BarEvent.<init>(Dragons_Stage1_BarEvent.kt:61)
   at org.wisp.stories.dangerousGames.pt1_dragons.DragonsPart1_BarEventCreator.create BarEvent(Dragons_Stage1_BarEvent.kt:91)
   at com.fs.starfarer.api.impl.campaign.intel.bar.events.BarEventManager.advance(BarEventManager.java:257)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

I am assuming this mod is the cause
Logged

Wispborne

  • Commander
  • ***
  • Posts: 226
  • Discord: Wisp#0302
    • View Profile
Re: [0.95.1a] Persean Chronicles, a quest mod (updated 2021-10-07)
« Reply #63 on: March 24, 2022, 11:25:34 PM »

It is not the cause, but here is the fix:

Crash: "PermGen space"
This is unrelated to how much system memory you have or how much memory you've allocated via vmparams.

Basically, every time a piece of code is loaded by the game, information about that piece of code goes into a reserved part of memory called PermGen.
Only a small amount of space is reserved for this, by default.
So, if you have enough mods, you'll load so many pieces of code that it'll run out of space to store information about the code.

Your options are to either:
A) Tell it to reserve more PermGen space.
B) Use Java 8, which fixes the issue. Java 8 has other performance benefits that are good, too, such as preventing the post-battle slowdown.

For option A, add/set  -XX:PermSize=512m -XX:MaxPermSize=512m to your vmparams file, near to the existing Xmx values. Exact position doesn't matter.
For option B, look for the pinned guide in #modded_gameplay on updating to JRE 8.
https://discord.com/channels/187635036525166592/512356777451323393/894702930987466852
Logged

Maelstrom

  • Commander
  • ***
  • Posts: 237
    • View Profile
Re: [0.95.1a] Persean Chronicles, a quest mod (updated 2021-10-07)
« Reply #64 on: March 25, 2022, 11:23:46 AM »

It is not the cause, but here is the fix:

Crash: "PermGen space"
This is unrelated to how much system memory you have or how much memory you've allocated via vmparams.

Basically, every time a piece of code is loaded by the game, information about that piece of code goes into a reserved part of memory called PermGen.
Only a small amount of space is reserved for this, by default.
So, if you have enough mods, you'll load so many pieces of code that it'll run out of space to store information about the code.

Your options are to either:
A) Tell it to reserve more PermGen space.
B) Use Java 8, which fixes the issue. Java 8 has other performance benefits that are good, too, such as preventing the post-battle slowdown.

For option A, add/set  -XX:PermSize=512m -XX:MaxPermSize=512m to your vmparams file, near to the existing Xmx values. Exact position doesn't matter.
For option B, look for the pinned guide in #modded_gameplay on updating to JRE 8.
https://discord.com/channels/187635036525166592/512356777451323393/894702930987466852

Ah, my bad, forgot to do this after I updated to 0.95.1a xD
thx!
Logged
Pages: 1 ... 3 4 [5]