Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3 ... 7

Author Topic: [0.97a] Customizable Star Systems (v2.1.0)  (Read 51858 times)

Tranquility

  • Commander
  • ***
  • Posts: 165
    • View Profile
[0.97a] Customizable Star Systems (v2.1.0)
« on: August 07, 2023, 02:46:20 PM »


Customizable Star Systems



Includes LunaLib and Console Commands support
Safe to add to existing saves, and safe to remove from existing saves (though already-generated systems will remain in place)

(If any issues occur with the download zip above, click below and download the source code zip or tar.gz for the latest release instead)






Mod Details

This utility mod adds the ability to create customized star systems upon creating a new game. These custom star systems are configured via a JSON file in this mod's config folder, offering a simpler, code-free way of creating your ideal star system.

By default, this mod generates a randomly-placed custom star system with remarkable planets and system objectives, which, with some luck, serves as an ideal place for a well-defended player colony system. For those looking to make their own star systems, it also provides a basic template upon which to expand with personal edits. With either Console Commands or LunaLib installed alongside this mod, additional custom star systems can be spawned into existing saves via commands or LunaSnippets.

Both a reference guide and a list of preset custom star systems are included with this mod, providing additional assistance for learning how to work with the mod's JSON configs and offering some interesting star systems to play with in a new game.



Brief Guide to Editing/Making Custom Star Systems
Familiarity with JSON (more specifically, Hjson, which is most similar to Starsector's custom JSON) and its formatting/syntax is highly recommended when working with Customizable Star System's JSON files. In addition, a JSON validator like https://jsonlint.com/ can provide additonal support and assistance when modifying customStarSystems.json. That said, if you want any chance of technical support with this mod, you will need to include your starsector.log, your customStarSystems.json, and your modlist (preferably through your enabled_mods.json file).

To start modifying or making your own custom star systems:
  • Open customStarSystems.json, located in the data/config directory of the Customizable Star Systems mod folder
  • Inside customStarSystems.json, edit the default custom star system or make a new custom star system entry.
  • To see what options are available and what they do, open referenceStarSystem.json, which is located in the same folder as customStarSystems.json
  • If editing an existing star system is desired, copy-and-paste one or more preset custom star systems from presetStarSystems.json, also located in the same folder as customStarSystems.json
The customStarSystems.json file can be edited while your Starsector application is still running, allowing for adjustments to be made and seen with each new game. Be warned, however, that any mistakes in modifying customStarSystems.json may result in your game crashing either upon starting a new game, or, even worse, upon visiting the affected star system or planet in-game. I recommend using either Console Commands or LunaLib's LunaSnippets to quickly test your custom star systems, visiting those systems and their planets to make sure nothing is wrong with them. Disabling all non-essential mods may help by decreasing load times if you expect to crash frequently during testing.
[close]

Important Note for Mod Support
If a mod adds their own custom planets, conditions, industries, etc., those should also work with the custom star system functionality in this mod's customStarSystems.json, as long as you know what IDs the other mod uses for their custom assets. However, I cannot guarantee support for these types of modded content, so use them at your own risk.

Also, other mods can create custom star systems by implementing their own customStarSystems.json in their data/config folder, which will be merged with the main customStarSystems.json. For the more crafty users, this allows a personal-use mod to make their own custom star systems without worrying about losing the configs due to mod updates. For mod authors, this mod provides a way to make or test custom mod content without requiring additional code (although, if you are a mod author reading this, I would highly recommend making your modded star systems with actual code anyways, as such systems would be infinitely more flexible than those made using this mod).
[close]

Latest Changelogs
v2.1.0
  • Added "teleportUponGeneration" option for custom star systems
    - Generating a custom star system with this option enabled will also teleport the player to the newly-created star system
  • Added "systemTags" option for custom star systems
    - Option allows additional tags - used to influence how the game treats a given system - to be applied to custom star systems
  • Added "memoryKeys" option for all entity types in the "entities" list
    - Meant for advanced users, this allows custom memory keys to be added to an entity's memory
    - Only supports Boolean values for now
  • Reduced the orbit radius for the Domain-era Cyrosleeper added through the "addDomainCryosleeper" option
    - Now 1000 units away from the orbit of the furthest jump-point/planet/star, from 4000 units
  • Major code refactors
v2.0.0 (Update for Starsector 0.97)
  • Updated to Starsector 0.97
v1.0.4
  • Fixed the LunaLib soft dependency
        - This means this mod no longer requires either LunaLib or Java 8 to run
  • Added "orbitClockwise" option for most entities
      - If set to false, the entity will orbit counter-clockwise instead
  • Added more info for error messages
  • "isCoreWorldSystem" option now forcibly applies the THEME_CORE tags, instead of relying on those tags being automatically applied by the game
  • All custom colonies now always have the "population" (Population & Infrastructure) industry, even if it's not explicitly specified in an "industries" list
        - This avoids situations where removing or not having this industry causes colonies to not work properly
  • Minor code refactors
v1.0.3
  • Fixed a bug where custom star systems with comm relays or similar entities were erroneously marked as though they contained a Coronal Hypershunt
    - This also fixes "isCoreWorldSystem" tags being overridden due to this same bug
  • Fixed logging for generating custom star systems during new game creation
  • "SpawnCustomStarSystems" command and the related LunaSnippet now print the exception messages for generation and syntax errors, respectively
  • Minor code refactors
v1.0.2
  • "marketSize" option now supports numbers greater than 10 if bigger population conditions exists due to other mods
    - If no such conditions exist (or their IDs do not match the "population_##" string), "marketSize" will continue to cap population size at 10, as before.
  • Added "systemLightColor" option for custom star systems
  • Added "orbitRadius" support for "accretion_disk" entities
    - Also scaled the default, randomly-generated orbit radius to fix it being smaller than typical proc-gen accretion disks
  • Custom star systems with a center black hole no longer auto-generate an accretion disk entity
  • Added "orbitDays" support for "ring" and "asteroid_belt" entities
  • Fixed an outdated error message
  • "ListCustomStarSystems" and "SpawnCustomStarSystems" commands now print the exception message when syntax errors in customStarSystems.json are found
v1.0.1
  • Changed "setLocation" Core World centroid point to the actual centroid point of all vanilla Core systems.
    - Affects custom star systems with a "setLocation" by changing which constellations are considered closest to Core.
  • Added a check to ensure that the "entities" list has at least 1 entry in it.
  • Version Checker now points to the right forum thread
v1.0.0
  • Split off from Adversary mod
    - Now considered a utility mod that can be safely removed from existing saves (although already-generated systems will still remain)
    - Changes from the previous, un-split version are mentioned below
  • Revamped the customStarSystem.json format
    - Each custom star system must now have a unique ID.
    - Merged "starsInSystemCenter","orbitingBodies", and "systemFeatures" into a combined "entities" list!
    - Each entry in the "entities" list must have an "entity" option, which determines what entity to make
    - Added "empty_location" entity, which, when placed 1st in "entities" list, also provides similar functionality to the previous "starsInSystemCenter"
    - Removed "setLocationOverride" option; "setLocation" now also supports this functionality
    - Removed "fringeJumpPoint" option; system radius is now determined by the furthest star/planet/jump-point in the system.
    - Star systems with no "jump_point" entities now auto-generate a Fringe Jump-point.
    - Removed "entitiesAtStablePoints" option; "focus" option now also supports this functionality
    - Too many other changes to other entries and options to list all of them here; see the updated referenceStarSystem.json for help with the new format
  • Updated referenceStarSystem.json and presetStarSystems.json with the updated format
  • Added "SpawnCustomStarSystems" and "ListCustomStarSystems" commands
    - Requires the Console Commands mod to run these commands
    - Intended to allow for spawning custom star systems in an ongoing save; backing up your save beforehand is recommended
    - Also ideal for testing custom star systems, as instant game crashes are less likely when ran in an ongoing save
  • Added a LunaSnippet for spawning in custom star systems
    - Requires the LunaLib library mod to use
    - Basically a UI version of the above CC commands
  • Updated source code and package names
[close]



Credits
Audax - For the inspiration in Suitable Star Systems and for granting permission to use code from said mod
Starsector Forums - For the helpful modding tutorials and information
Unofficial Starsector Discord - For the helpful modding information and tips
Alex and the Fractal Softworks team - For the amazing game that is Starsector!

« Last Edit: March 16, 2024, 12:27:06 PM by Tranquility »
Logged

Tranquility

  • Commander
  • ***
  • Posts: 165
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #1 on: August 10, 2023, 09:52:58 PM »

Minor patch v1.0.1 is out, mostly just changing a few values here. It is save-compatible.

v1.0.1
  • Changed "setLocation" Core World centroid point to the actual centroid point of all vanilla Core systems.
    - Affects custom star systems with a "setLocation" by changing which constellations are considered closest to Core.
  • Added a check to ensure that the "entities" list has at least 1 entry in it.
  • Version Checker now points to the right forum thread

Depra

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #2 on: August 15, 2023, 08:06:25 PM »

is it possible to create a rogue planet system, similar to the Alpha Site?
Logged

chriswilliams115

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #3 on: August 18, 2023, 09:03:50 PM »

I've been having some good fun building a system so far and have finally been able to get nearly everything sorted out and correct to what I want.

However the system seems to randomly spawn luddic bases on game start, is it possible to force it to be empty.
Apologies if I've missed this in the instructions
Logged

Jakened

  • Ensign
  • *
  • Posts: 23
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #4 on: August 18, 2023, 09:23:35 PM »

so i spawned the custom star system using the console command "spawncustomstarsystems" but using the jump console command it only comes up with "no system found with the name css_default"
Logged

Jazuke Taizago

  • Ensign
  • *
  • Posts: 42
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #5 on: August 22, 2023, 10:21:54 AM »

Could someone please help me with a problem. I can't seem to find my Custom Star System in the ListCustomStarSystems, which would make spawning it eligible.

Not sure WHAT i'm doing wrong with the customstarsystems.json file. Would like to know what i'm missing.
« Last Edit: August 23, 2023, 12:31:52 AM by Jazuke Taizago »
Logged

TheSAguy

  • Lieutenant
  • **
  • Posts: 64
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #6 on: August 26, 2023, 12:51:06 PM »

Thanks for this mod.

Could you please add some more documentation, maybe even a sample on moons? (Planets orbiting around other planets)
I'm having a bit of a hard time doing that.

Also, is there a way to just do a totally random planet? Where anything could spawn. Let's say I want a system with two sculpted planets and 3 totally random bodies.

Thanks.
Logged

OldPayphone

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #7 on: September 06, 2023, 05:20:18 PM »

I'm loving this mod but it seems we can't add music to our system if it comes from a mod? Trying to have the UAF theme play for my system but upon entering the system my game crashes everytime.
« Last Edit: September 06, 2023, 11:51:18 PM by OldPayphone »
Logged

Eziky

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #8 on: October 03, 2023, 12:51:42 PM »

How exactly do you set custom location ? i found coordinates of star system nearby z="407945">-38946.0|-19240.0     if i try to add them after "setLocation":z="407945">-38946.0|-19240.0   dosnt work :)
Logged

zero the big boy

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #9 on: October 14, 2023, 01:53:47 PM »

How exactly do you set custom location ? i found coordinates of star system nearby z="407945">-38946.0|-19240.0     if i try to add them after "setLocation":z="407945">-38946.0|-19240.0   dosnt work :)

I used console commands and the `showloc` command in hyperspace to get an X and a Y coordinate, which you then input into the setLocation span like `"setLocation":[X,Y]`. Seemed to work for me.

Also, setting orbitDays on things like dust fields and asteroid belts doesn't seem to actually do anything, when I think using a text editor to edit maps manually doing so actually causes them to spin slower.
Lastly, is there a way to color things like dust fields and asteroid belts? I want some pretty colored rocks in my system but there doesn't seem to be a way to tint them like how you can with planets.
Logged

PANOPTES

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #10 on: October 23, 2023, 06:10:34 AM »

Star Sector is crashing when trying to launch this MOD.

I get this in the Log. anyone have any idea how to resolve this?

143197 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: lunalib/lunaDebug/LunaSnippet
java.lang.NoClassDefFoundError: lunalib/lunaDebug/LunaSnippet
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at com.fs.starfarer.loading.scripts.ScriptStore.Ó00000(Unknown Source)
   at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(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)
Caused by: java.lang.ClassNotFoundException: lunalib.lunaDebug.LunaSnippet
   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)
   ... 10 more
Logged

Tranquility

  • Commander
  • ***
  • Posts: 165
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #11 on: October 23, 2023, 09:21:45 AM »

Star Sector is crashing when trying to launch this MOD.

I get this in the Log. anyone have any idea how to resolve this?

143197 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: lunalib/lunaDebug/LunaSnippet
java.lang.NoClassDefFoundError: lunalib/lunaDebug/LunaSnippet
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at com.fs.starfarer.loading.scripts.ScriptStore.Ó00000(Unknown Source)
   at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(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)
Caused by: java.lang.ClassNotFoundException: lunalib.lunaDebug.LunaSnippet
   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)
   ... 10 more

Thank you for the crash log! Do you have either LunaLib or Java 8 installed alongside this mod? I've seen similar issues before, where, for whatever reason, Starsector's default Java 7 causes this kind of dependency crash, despite LunaLib being intended to be a soft dependency (a.k.a. supported, but not required) for this mod. So, for now, I recommend you upgrade your Starsector's Java version to Java 8 at minimum, as it also has other benefits for your game as well. If that doesn't work out for you for any reason, installing LunaLib as a dependency is fine as well.

...

Also, setting orbitDays on things like dust fields and asteroid belts doesn't seem to actually do anything, when I think using a text editor to edit maps manually doing so actually causes them to spin slower.
Lastly, is there a way to color things like dust fields and asteroid belts? I want some pretty colored rocks in my system but there doesn't seem to be a way to tint them like how you can with planets.

I don't think I added "orbitDays" support for ring bands and asteroid belts yet, but I can look into supporting it in a future update. However, I'm not sure if being able to give them color can be as easily implemented, but again that's something I possibly look into (no promises, though!).
« Last Edit: October 23, 2023, 09:31:29 AM by Tranquility »
Logged

rawkhawklives

  • Ensign
  • *
  • Posts: 32
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #12 on: October 23, 2023, 10:17:53 AM »

Used this mod to make a single system with a water world and a barren planet. Using Grand Colonies, console commands, and some other colony mods in tandem with this, I can always make the exact colony I want if no better systems spawn, giving me a solid colony fallback choice if rng isn't very fun. Plus, this is great since I have no intention of making my own fully fleshed out faction with the same system for regular playthroughs, I get the same system each time but my empire is different.
Logged

PANOPTES

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #13 on: October 23, 2023, 03:47:30 PM »

Star Sector is crashing when trying to launch this MOD.

I get this in the Log. anyone have any idea how to resolve this?

143197 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: lunalib/lunaDebug/LunaSnippet
java.lang.NoClassDefFoundError: lunalib/lunaDebug/LunaSnippet
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at com.fs.starfarer.loading.scripts.ScriptStore.Ó00000(Unknown Source)
   at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(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)
Caused by: java.lang.ClassNotFoundException: lunalib.lunaDebug.LunaSnippet
   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)
   ... 10 more

Thank you for the crash log! Do you have either LunaLib or Java 8 installed alongside this mod? I've seen similar issues before, where, for whatever reason, Starsector's default Java 7 causes this kind of dependency crash, despite LunaLib being intended to be a soft dependency (a.k.a. supported, but not required) for this mod. So, for now, I recommend you upgrade your Starsector's Java version to Java 8 at minimum, as it also has other benefits for your game as well. If that doesn't work out for you for any reason, installing LunaLib as a dependency is fine as well.

...

Also, setting orbitDays on things like dust fields and asteroid belts doesn't seem to actually do anything, when I think using a text editor to edit maps manually doing so actually causes them to spin slower.
Lastly, is there a way to color things like dust fields and asteroid belts? I want some pretty colored rocks in my system but there doesn't seem to be a way to tint them like how you can with planets.

I don't think I added "orbitDays" support for ring bands and asteroid belts yet, but I can look into supporting it in a future update. However, I'm not sure if being able to give them color can be as easily implemented, but again that's something I possibly look into (no promises, though!).


Luna Lib worked, I was running without it, my Game is starting to the menu now without crashing, I will definitely post on this thread again if there is any similar problem, thank you for your help.
Logged

Usernamehere53

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.96a-RC10] Customizable Star Systems (v1.0.1)
« Reply #14 on: October 26, 2023, 02:26:59 AM »

is there any way to force change the name of the constellation that you specify your system to spawn in at the moment?
If not custom constellations when?
Logged
Pages: [1] 2 3 ... 7