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: My modded ship is done, but I'm having trouble adding it to the game.  (Read 5004 times)

Pax_Empyrean

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

Hi. I'm new here. I made a ship, called it the Lightning. Visually it's a Brawler with a bunch of bodywork done on it:



I've got my lightning.ship file in my mods/modname/data/hulls folder, and a lightning_Attack.variant file in my mods/modname/data/variants folder. It's got a unique entry in ship_data.csv, both the id ("lightning") and the hull number (215). Images are done, including the glow stuff since I gave it a phase cloak.

My problem is that I'm having trouble actually adding it to the game itself, either in station lists or the fleets of other factions. It shows up in the in-game codex, both the hull and the one variant I made for it, so I don't think there are any problems on that front, but when I try to add it to anything else I get error messages when I start up the game, as follows:

I tried adding it to one of the pirate fleets in pirates.faction, but upon launching the game (right after hitting "Play Starsector") I get an error: "Fatal: Ship hull variant or fighter wing with id: [lightning_Attack] not found! Check starsector.log for more info."

The log reads as follows:

Quote
12385 [Thread-5] ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.RuntimeException: Ship hull variant or fighter wing with id: [lightning_Attack] not found!
java.lang.RuntimeException: Ship hull variant or fighter wing with id: [lightning_Attack] not found!
   at com.fs.starfarer.loading.FleetCreationSpec.o00000(Unknown Source)
   at com.fs.starfarer.loading.SpecStore.?0000(Unknown Source)
   at com.fs.starfarer.loading.SpecStore.new(Unknown Source)
   at com.fs.starfarer.loading.OooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.o00000(Unknown Source)
   at com.fs.oOOO.A.?0000(Unknown Source)
   at com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

I've been modding for more than a decade, but I'm not a programmer and I don't know java. What do I need to do to get this ship showing up in the game? Ideally, at stations someplace. I usually also run LazyLib 1.8c, Respec 2.1, and Restock2.6a, although I get the same error even with those mods disabled.

Thanks for reading this. I look forward to modding this game a lot.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

Look at your Variant file.  The following lines should get checked:

"hullId": "lightning",

"variantId": "lightning_Attack",

If that's not what those lines say, then it'll crash.  You can access / fix all that stuff in SSEd, both in the Hull Editor and the Variant Editor page, by selecting the main menu for either mode (press 1 or 2, respectively, on your keyboard) and then hit T to see the base-level data entries for your vessel.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Pax_Empyrean

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

Thanks for the quick reply. Those lines are correct in my variant file.

Quote
{
  "displayName": "Attack",
  "fluxCapacitors": 0,
  "fluxVents": 0,
  "hullId": "lightning",
  "hullMods": [],
  "variantId": "lightning_Attack",
  "weaponGroups": [
    {
      "autofire": false,
      "mode": "LINKED",
      "weapons": {
        "WS0001": "heavymg",
        "WS0002": "taclaser",
        "WS0003": "taclaser",
        "WS0004": "harpoon",
        "WS0005": "harpoon"
      }
    }
  ]
}
Logged

Pax_Empyrean

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

Huh. Looks like the hullId in the .ship file is case sensitive. I thought I had already checked that, but evidently I missed it. Time to see if I can get it to show up in stores. I really want to fly this thing. :)
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

And you've added the ship to the CSV, and it has a valid .ship entry?

I think that we need to see both entries; when the game crashes for this reason, usually it's either a missing / wrong .variant definition, .ship definition, or a missing / wrong CSV line (perhaps you didn't edit it with Google Docs or Excel or OpenOffice, to preserve the columns properly, or didn't save it in the correct format).

What you should have, roughly:

CSV:

Code
Lightning,lightning,,,,2000,500,500,0,200,,500,250,250,180,360,5,NONE,,0,0,0,,,0,0,,,,,,,,15,0.25,50,1,1,,0,0

.ship:

Code
  "hullId": "lightning",
  "hullName": "Lightning",

.variant:

Code
"hullId": "lightning",
"variantId": "lightning_Attack",

.faction:

Code
"lightning_Attack":[0, 6],

...if any of that is borked, you're going to get an error when it looks for it.  Double-check everything.

Ah, and yes... everything is case-sensitive... and don't use caps in file-names and Ids (proper names / hullNames are OK), that can cause issues for Linux users.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Pax_Empyrean

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

Yeah, the issue was a capitalized hullId in the .ship file. I'm not running Linux; seems like this can cause problems for Windows users as well. It's working now.

I use Open Office Calc to edit the .csv files, but I know how to do it without messing up the formatting. I already did a balance pass on every weapon in the game without any problems. It was the capitalization thing that screwed me up here. Thanks again for the help.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile

and don't use caps in file-names and Ids (proper names / hullNames are OK), that can cause issues for Linux users.
Damned... Got some unanticipated work to do then...
Logged
 

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

You can use any capitalization you want.  However, on Windows, the files are NOT case-sensitive, while on Linux, they ARE case-sensitive.  Make sure you keep it consistent at all times!
Logged

Pax_Empyrean

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

You can use any capitalization you want.  However, on Windows, the files are NOT case-sensitive, while on Linux, they ARE case-sensitive.  Make sure you keep it consistent at all times!

The only thing I changed was the hullId capitalization in my .ship file. Not sure how that fixed it since I'm running Windows, but there it is.
Logged

Xalendi

  • Commander
  • ***
  • Posts: 198
    • View Profile

They're case sensitive on my computer too, running Windows XP sp3.
Logged

Pax_Empyrean

  • Lieutenant
  • **
  • Posts: 73
    • View Profile
Re: My modded ship is done, but I'm having trouble adding it to the game.
« Reply #10 on: June 15, 2014, 08:24:33 AM »

Windows 7, here. To anyone who hasn't had problems with case sensitivity, what version of Windows are you running?
Logged