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)

Author Topic: [0.97a] X is now a Core World  (Read 1904 times)

mllhild

  • Commander
  • ***
  • Posts: 108
    • View Profile
[0.97a] X is now a Core World
« on: November 03, 2024, 03:28:23 AM »

X is now a Core World





The mod requires
LunaLib
MagicLib
LazyLib
Nexerelin.


About
A mod to solve two problems:
-modded factions are too far from core, but missions and faction interactions are made for the faction being in the core
-Random Core World start from Nexrelin breaks a lot of missions



What does it do:
- gives 3 options to re-arrange the systems in the sector
1. Move all Systems with inhabited worlds to the core in a donut shaped area
2. Take all inhabited systems of the sector and randomize their position in a donut shaped area
3. Randomize the position of every system in the sector (Expect a number of worlds to collapse due to low access)
4. Enables to add bonus access to all systems so that the colonies dont all die when randomized.

You can set the external and internal size of the donut shaped area. The suggested values are for up to 10 modded systems. If you have more, you might want to slightly increase the external radius.





Planned content:
1. Add List of Sytems that shouldnt be moved

2. remove all not inhabited planets from inhabited systems and add a random amount of new planets to each
     (I need to know all not inhabited planets that have missions associated to them to prevent them from being deleted)
     step 1. do it for the core worlds
     step 2. generalize it for the modded systems

3. give the game a feeling of increasing despair and rush to obtain the last remains of tech
     step 1. sector wide overtime increasing decay of production/access/fleet quality
     step 2. make it in function of the total population size of each alliance.
        (if you dont have enough people to cover all needed job specializations, you will start losing know how)
     step 3. increase aggression of factions that dont have colony items towards those that have more.



Credits
Special thanks to the members of the Galatia Academy Discord who repeatedly helped me with the code:
Lukas04
Kayssar
Ruddygreat
and whoever wrote that hyperspace clean up function. (I think it was from Nexerelin or UAF code)



Notes
Since Im using this to learn Java and how to work inside of a larger program, feel free to





« Last Edit: December 13, 2024, 02:16:58 PM by mllhild »
Logged

mllhild

  • Commander
  • ***
  • Posts: 108
    • View Profile
Re: [0.97a] X is now a Core World
« Reply #1 on: November 03, 2024, 03:28:35 AM »

Reserved
Logged

TheHZDev

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.97a] X is now a Core World
« Reply #2 on: November 18, 2024, 05:22:29 AM »

So interesting...maybe this can solve the problem of overlapping starsystem positions.
Logged

PFleur

  • Ensign
  • *
  • Posts: 30
    • View Profile
Re: [0.97a] X is now a Core World
« Reply #3 on: November 27, 2024, 08:27:46 AM »

First, you should add the mod dependencies into the mod_info.json file, it looks to be lazy lib (for lunaLib), lunaLib (for mod configuration), and magicLib (hyperspaceCleanup() function (although just quickly going through the code I didn't see magicLib's hyperspace cleanup function called)) especially since those three are just commented out.
This solves the major issue with Nex's random core worlds but leaves me wishing there was a way to randomize planet type of the core/inhabited worlds.
Logged

mrpras

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: [0.97a] X is now a Core World
« Reply #4 on: December 08, 2024, 03:07:06 PM »

Nice mod, maybe if spreading out across the sector you could add a balance adjustment to the impact of colony access so that systems don't collapse from being too remote.
Logged

mllhild

  • Commander
  • ***
  • Posts: 108
    • View Profile
Re: [0.97a] X is now a Core World
« Reply #5 on: December 13, 2024, 03:39:27 AM »

So interesting...maybe this can solve the problem of overlapping starsystem positions.
Yeah I should add a check to prevent RNG from piling up starsystems.

First, you should add the mod dependencies into the mod_info.json file,...  especially since those three are just commented out.
Ups, getting right to it.

This solves the major issue with Nex's random core worlds but leaves me wishing there was a way to randomize planet type of the core/inhabited worlds.
For the uninhabited planets this would be viable.
For the inhabited planets the code would need to check if there is any industry that needs that resource, which would then cause problems with mods that add industries, so changing inhabited planet resources isnt a good idea, at most a few conditions can be added or removed.

Nice mod, maybe if spreading out across the sector you could add a balance adjustment to the impact of colony access so that systems don't collapse from being too remote.
I would need to add separate planetary conditions for increased access +10% .... +70% and then add them to the inhabited planets. Or I could add it to all planets and essentially disable the distance to core mechanic, reducing it to only be affected by nearby colonies.
Logged

mllhild

  • Commander
  • ***
  • Posts: 108
    • View Profile
Re: [0.97a] X is now a Core World
« Reply #6 on: December 13, 2024, 02:22:50 PM »

Version 1.1 released
Added:
  • Access bonus in function of distance to core. (effectively disables the relevance of your distance to the core)
    This may need some fine tuning, since I gave rather generous bonuses
    Placeholder icon, since I have no idea what to do there and I dont think I can add an invisible icon.
    Enable in Mod Setting
  • Minimum distance between adjacent systems. Set to your desired level in Mod Settings. Code will try 10 times for each system before giving up and going to the next one.
Logged