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)

Pages: [1] 2

Author Topic: Spawning Ships in the Campaign  (Read 5520 times)

Zacher29

  • Ensign
  • *
  • Posts: 8
    • View Profile
Spawning Ships in the Campaign
« on: February 03, 2020, 08:02:08 PM »

So over the past few days ive been working on a ship mod for myself and a few friends. I currently have everything working to the point I can spawn the ships in using console commands. Although past that I cant seem to get them into the campaign or markets.
This is what my default_ship_role.json currently looks like. And as far as I can tell from looking at the base game files and other mods this should be right. Am I missing something simple here that would fix this? Thanks for any help!

   "civilianRandom":{
      "honor_shrike_standard":9999,
      "javelin_Standard":10,
   },
   "combatMedium":{
      "honor_valiant_Standard":10,
   },
   "combatLarge":{
      "honor_starknight_Standard":8,
   },
   "combatCapital":{
      "honor_reliant_Standard":5,
      "honor_bellerophon_Standard":5,
      "honor_gryphon_Standard":4,
   },

   # carriers
   "carrierLarge":{
      "honor_minotaur_standard":5.5,
   },
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #1 on: February 03, 2020, 09:32:14 PM »

What are the blueprint tags you've assigned for the ships? Look in ship_data.csv under the "tags" column (compare yours to vanilla's). The game attaches ships to packages of blueprints and factions then pick ships from those blueprints.
Logged

Zacher29

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #2 on: February 03, 2020, 09:40:23 PM »

What are the blueprint tags you've assigned for the ships?

Ive got them tagged midline_bp and some rare_bp I also tried tagging them base_bp to see if I could build them at a colony.
EDIT: Attached is a copy of the ship_data.csv



[attachment deleted by admin]
« Last Edit: February 03, 2020, 10:35:22 PM by Zacher29 »
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #3 on: February 04, 2020, 12:43:39 AM »

Strange, the ones in the midline blueprint pack should be showing up anywhere other midline ships should. "rare_bp" forces you to specify faction usage on a faction-by-faction basis, just stick with the blueprint "packs" for now (base, lowtech, midline and hightech). Try the base_bp again, do the ships show up in the Custom Ship Production menu?
Logged

Alexzzz

  • Ensign
  • *
  • Posts: 14
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #4 on: February 04, 2020, 06:04:26 AM »

Try the findship console command.  It should tell you which markets sell your ships:

findship honor_shrike
findship honor_valiant
etc

If your ships aren't sold anywhere, update the markets and try again:

forcemarketupdate

If your ships still aren't sold anywhere, give yourself a midline blueprint:

additem midline_package

Mouse over the package in your inventory and make sure that your ships are listed there.  I think that mod ships will be at the top of the list.
« Last Edit: February 04, 2020, 06:10:40 AM by Alexzzz »
Logged

Zacher29

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #5 on: February 04, 2020, 06:32:54 AM »

Try the findship console command.

Try the base_bp again, do the ships show up in the Custom Ship Production menu?

The findship command was not able to find any as of last night. Nor did updating the markets or starting new games. I had also checked custom production with them set as base_bp last night. But I have made changes so I will test both that and spawning in the blueprint package when I am able to get to my computer. I’m thinking that I could just be *really* unlucky and non are being sold, or it’s somehow conflicting with other mods I have installed.
« Last Edit: February 04, 2020, 06:35:11 AM by Zacher29 »
Logged

Zacher29

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #6 on: February 04, 2020, 04:16:16 PM »

Got around to testing it out. The ships are in the midline BP package, and could be built once it is learned. After learning them I attempted to make my factions fleet use them. They refused even if the ships were the only ones selected, and defaulted to normal midline ships.
Logged

Alexzzz

  • Ensign
  • *
  • Posts: 14
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #7 on: February 04, 2020, 04:20:52 PM »

Is your first post literally what you have in your mod?  There might be some typoes.

1) It's "default_ship_roles.json" not "default_ship_role.json"

2) And you need { } around the whole thing.
« Last Edit: February 04, 2020, 04:24:21 PM by Alexzzz »
Logged

Zacher29

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #8 on: February 04, 2020, 04:22:58 PM »

Check your first post.  It's "default_ship_roles.json" not "default_ship_role.json"
I had manually typed it out, it is indeed actually default_ship_roles.json
Logged

Alexzzz

  • Ensign
  • *
  • Posts: 14
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #9 on: February 04, 2020, 04:28:13 PM »

I had manually typed it out, it is indeed actually default_ship_roles.json

And the json file is located at "yourmod/data/world/factions"?

Sorry for all the obvious questions, but it sure sounds like there is something wrong with your default_ship_roles.json file somehow.  If you want to post your mod I can look more.
Logged

Zacher29

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #10 on: February 04, 2020, 04:37:38 PM »


No problem, its literally my first time working with mods and Ive encountered stupid errors before. And it was located at the correct spot. Ill post a link to it here if you want to dig through it.
https://drive.google.com/file/d/1vY8mPoYpS-Wh-WehYI_xJNBufNE_IgfW/view?usp=sharing

Couldnt post the .zip directly as it was too large, so google drive it is!
« Last Edit: February 04, 2020, 05:12:50 PM by Zacher29 »
Logged

Alexzzz

  • Ensign
  • *
  • Posts: 14
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #11 on: February 04, 2020, 07:33:19 PM »

I haven't played it yet, but...

Spoiler
{
   # should be a copy of "combatSmall", minus variants that are annoying to fight in low numbers
   # for example, no Hyperions or fast beam-based kiting loadouts, or ships with damper field,
   },   <--- I'm pretty sure this is causing problems!!!
   "civilianRandom":{
      "honor_shrike_standard":9999,
      "javelin_standard":10,
   },
   "combatMedium":{
      "honor_valiant_standard":10,
   },
   "combatLarge":{
      "honor_starknight_standard":8,
   },
   "combatCapital":{
      "honor_reliant_standard":5,
      "honor_bellerophon_standard":5,
      "honor_gryphon_standard":4,
   },

   # carriers
   "carrierLarge":{
      "honor_minotaur_standard":5.5,
   },
[close]
Logged

Zacher29

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #12 on: February 04, 2020, 07:35:34 PM »

Could be the issue, I had copied it out from the vanilla folder and just disregarded that part. If that ends up being the issue ill laugh. Its always something you overlook.
Logged

Alexzzz

  • Ensign
  • *
  • Posts: 14
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #13 on: February 04, 2020, 10:24:45 PM »

I made some changes to your default_ship_roles.json.  You had several typos.  Your ships are spawning fine with this file:

Spoiler
{
                                                              # removed the extra brace and comments
   "civilianRandom":{
   },
   "combatSmall":{
      "honor_shrike_standard":10,         # moved these two from civilianRandom to combatSmall
      "honor_javelin_standard":10,        # you left off the honor_
   },
   "combatMedium":{
      "honor_valient_standard":10,        # fixed spelling it was valiant here, its valient in the variants folder
   },
   "combatLarge":{
      "honor_starknight_standard":8,
   },
   "combatCapital":{
      "honor_reliant_standard":5,
      "honor_bellerophon_standard":5,
      # "honor_gryphon_standard":4,       # its not in variants folder
   },

   # carriers
   "carrierLarge":{
      # "honor_minotaur_standard":5.5,     # its not in variants folder
   },
}                                                                 # added the final brace                                         
[close]
« Last Edit: February 05, 2020, 12:23:33 AM by Alexzzz »
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Spawning Ships in the Campaign
« Reply #14 on: February 05, 2020, 12:09:06 AM »

I had manually typed it out...

Major modding tip: COPY, PASTE AND EDIT. You'll nip silly spelling mistakes almost in the bud very early on if you do that, and save tons of hassle trying to track bugs like this down. Don't feel you have to write a whole new file, just copy a vanilla one and edit what you want. The game merges most files by default.
Logged
Pages: [1] 2