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: Simulator Enhancements (03/13/24)

Author Topic: Adding a Single Ship from a Mod  (Read 1922 times)

Omega_Pi_X

  • Ensign
  • *
  • Posts: 5
    • View Profile
Adding a Single Ship from a Mod
« on: October 23, 2020, 02:39:11 AM »

Greetings, fellow starfarers and commanders!

I've been playing this game on and off for a while now, and now I'm looking into some mods. Wanting to ease myself into the modding pool, I've already successfully installed a few QoL mods (all three Libs, Combat Chatter and Alarm Sounds, Trailer Moments, etc.) but now I'm wanting to add new ships. However, I want to start with only one ship from DarkRenevant's Ship and Weapon Pack (first person to guess which ship in particular gets 30 units of My Respect), as I want to try it out on its own before making the foray into having every other ship in the pack spawning in wild NPC fleets. Same goes for the weapons and hullmods: I only wish to add the one ship and the few weapons/hullmods that it's designed to bear.

Is there an easy way to do this, like altering a config file? Do I have to pick the mod apart to get to the one ship? Any assistance would be much appreciated.

 - Commander Vince Ayar of the ISS DoM's Rebuttal
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile
Re: Adding a Single Ship from a Mod
« Reply #1 on: October 23, 2020, 03:15:52 AM »

My guess would be Liberator, because pocket battleships are fun. Or perhaps Victory, if you are into full-fledged battleships.

The way I'd approach this is the following:
  • Create new mod (folder), add mod_info.json
  • Copy graphics for the given ship
  • Copy row of that ship from "ship_hulls.csv"
  • If you want this ship to spawn in the wild, also include entries for it from "default_ship_roles.json"
The easy way:
  • Create new variant (or multiple variants) yourself using vanilla assets
  • Change special system to something from vanilla (if it uses custom)
  • Change hullmods to vanilla
The hard way:
  • Copy variants
  • Migrate weapons (and fighters if relevant) as well
  • Copy special systems script (need to understand Java to know which files to copy, and what the dependencies are; possibly modifying scripts to avoid pulling too many scripts just for sake of compilation)
  • Copy hullmod scripts (same as above)
The best way (extra work but it will save you time in long run as you will want to migrate "just one more" sooner or later):
  • Write the script that automates that for you (trivial to copy ship, variants, create rows in ship_hulls.csv and entries in default_ship_roles.json)
  • Tinker with the script until you end up with a fully working ship (should be doable if you're defaulting to vanilla assets)
  • If not possible, get the script to automate as much trivial work as possible, and just use manual process to finalize it (my guess is that the scripts section for hullmods and systems will need to be fixed manually)
Logged

Omega_Pi_X

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Adding a Single Ship from a Mod
« Reply #2 on: October 23, 2020, 07:05:47 AM »

The way I'd approach this is the following:

Yeah, that looks promising. I think I'd do it this way.

he best way (extra work but it will save you time in long run as you will want to migrate "just one more" sooner or later):

Well, now I wished to learn how to code. Don't know if there'd be much demand for someone who could extract a select number of ships from a mod for others who merely want those ships, not all of them, but it'd be handy for myself to be able to do that on the fly.

Either way, thank you very much, will keep you posted on how this turns out.
Logged

Omega_Pi_X

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Adding a Single Ship from a Mod
« Reply #3 on: October 23, 2020, 09:29:32 AM »

In my haste to crank out a mod in one night, I botched it. Now the game spits out a big wall of error on startup - something about missing a script or something inside of every other mod I have installed.

It's late, I'm tired, and I have work tomorrow. Leaving this here for now.

Edit: In my exhaustion and exasperation, temporarily forgot about the doublepost rule. Apologies.
Logged