Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Trouble Shot! CSV editors break hull_mods: Reinforced Bulkheads  (Read 922 times)

SDhn2a

  • Ensign
  • *
  • Posts: 1
    • View Profile

On Windows, after editing the hull_mods CSV file in certain editors, the game will no longer load, instead giving the following error: "Fatal: Error loading [ ship almost always recoverable if lost.] resource, not found in [../starfarer/res,CLASSPATH]."

If you are having this issue, open the hull_mods file in a text editor, and put quotations around the short description of Reinforced Bulkheads: "Increases hull integrity; ship almost always recoverable if lost." (The semicolon will likely have been replaced with a comma, but you don't need to revert it.) This should fix the error and allow the game to load.

I believe this error is caused because, unlike the descriptions with commas, the Reinforced Bulkheads short description does not have quotations around it, and many CSV/spreadsheet editors will turn the semicolon into a separator by default. This converts it to a comma upon saving, pushing " ship almost always recoverable if lost." into the column for sprites. This is a very minor fix, but patching it in the next update will make modding the game just that much more approachable.

I have not seen this error on Mac OS, and I have not tested it on Linux.

Cheers!
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Trouble Shot! CSV editors break hull_mods: Reinforced Bulkheads
« Reply #1 on: March 31, 2020, 04:01:36 PM »

Be warned: This can also happen to you when editing descriptions.csv and the added separator can be hidden (even when viewing the saved file from the editor in notepad for some insane reason) preventing you from changing it and rendering the file corrupted for Starsector. (Or at least I've never discovered a solution when it happens. Everything seems good but it crashes upon startup)

Be very, very careful when editing that file. I just always use notepad instead of a csv editor. For files like ship_data.csv, using an editor like open office calc is safe for everything but multiple hints and tags. If you have to wrap it in a quote it can be dangerous.

Iirc, however, I don't think it's an issue with Starsector. It's an issue with the editor.
Logged

NinjaSiren

  • Lieutenant
  • **
  • Posts: 94
    • View Profile
Re: Trouble Shot! CSV editors break hull_mods: Reinforced Bulkheads
« Reply #2 on: March 31, 2020, 11:59:05 PM »

On Windows, after editing the hull_mods CSV file in certain editors, the game will no longer load, instead giving the following error: "Fatal: Error loading [ ship almost always recoverable if lost.] resource, not found in [../starfarer/res,CLASSPATH]."

If you are having this issue, open the hull_mods file in a text editor, and put quotations around the short description of Reinforced Bulkheads: "Increases hull integrity; ship almost always recoverable if lost." (The semicolon will likely have been replaced with a comma, but you don't need to revert it.) This should fix the error and allow the game to load.

I believe this error is caused because, unlike the descriptions with commas, the Reinforced Bulkheads short description does not have quotations around it, and many CSV/spreadsheet editors will turn the semicolon into a separator by default. This converts it to a comma upon saving, pushing " ship almost always recoverable if lost." into the column for sprites. This is a very minor fix, but patching it in the next update will make modding the game just that much more approachable.

I have not seen this error on Mac OS, and I have not tested it on Linux.

Cheers!

As much as possible, use an spreadsheet software when editing CSVs. I either use MS Excel or OpenOffice. And set the separators as commas when opening it on Excel.
« Last Edit: April 01, 2020, 12:03:58 AM by NinjaSiren »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24109
    • View Profile
Re: Trouble Shot! CSV editors break hull_mods: Reinforced Bulkheads
« Reply #3 on: April 01, 2020, 10:04:42 AM »

(Btw - I use google sheets, and the csvs are generated with the File -> Download -> .csv option.)
Logged

NinjaSiren

  • Lieutenant
  • **
  • Posts: 94
    • View Profile
Re: Trouble Shot! CSV editors break hull_mods: Reinforced Bulkheads
« Reply #4 on: April 01, 2020, 10:53:18 AM »

(Btw - I use google sheets, and the csvs are generated with the File -> Download -> .csv option.)

hey, google sheets. its ok. ;D I got free Office 365 because of university. Not flexing or anything. But will try that so the .csv has an online backup other than github.
« Last Edit: April 01, 2020, 10:55:09 AM by NinjaSiren »
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Trouble Shot! CSV editors break hull_mods: Reinforced Bulkheads
« Reply #5 on: April 01, 2020, 10:58:00 AM »

If you're on windows, I'd highly recommend using notepad++ instead of any microsoft program.  OpenOffice should work too.  (I, at least, have had issues with microsoft excel adding extra non-printing characters and breaking csv files.  And the less said about notepad the better.)
Logged
Wyvern is 100% correct about the math.

NinjaSiren

  • Lieutenant
  • **
  • Posts: 94
    • View Profile
Re: Trouble Shot! CSV editors break hull_mods: Reinforced Bulkheads
« Reply #6 on: April 01, 2020, 11:00:54 AM »

If you're on windows, I'd highly recommend using notepad++ instead of any microsoft program.  OpenOffice should work too.  (I, at least, have had issues with microsoft excel adding extra non-printing characters and breaking csv files.  And the less said about notepad the better.)

welp, thanks for the advice.
Logged