Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: Ed on September 02, 2019, 06:31:32 PM

Title: Crash when trying to load the ship image, not found?
Post by: Ed on September 02, 2019, 06:31:32 PM
I get a crash when trying to load my mod, looks like the game can't find the ship image in the mod folder, but it is in there!

(https://i.imgur.com/WexHSbD.png)

Code
27170 [Thread-9] ERROR com.fs.graphics.o0oO  - Error loading [graphics/ships/edshipyard_pomeranian_2.png
] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\ED Shipyard,../starfarer.res/res,CLASSPATH]
java.lang.RuntimeException: Error loading [graphics/ships/edshipyard_pomeranian_2.png
] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\ED Shipyard,../starfarer.res/res,CLASSPATH]
at com.fs.util.C.?00000(Unknown Source)
at com.fs.util.C.?00000(Unknown Source)
at com.fs.graphics.o0oO.?00000(Unknown Source)
at com.fs.graphics.o0oO.?00000(Unknown Source)
at com.fs.graphics.o0oO$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
27984 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [graphics/ships/edshipyard_pomeranian_2.png
] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\ED Shipyard,../starfarer.res/res,CLASSPATH]
java.lang.RuntimeException: Error loading [graphics/ships/edshipyard_pomeranian_2.png
] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\ED Shipyard,../starfarer.res/res,CLASSPATH]
at com.fs.util.C.?00000(Unknown Source)
at com.fs.util.C.?00000(Unknown Source)
at com.fs.graphics.TextureLoader.?00000(Unknown Source)
at com.fs.graphics.TextureLoader.o00000(Unknown Source)
at com.fs.graphics.TextureLoader.o00000(Unknown Source)
at com.fs.graphics.TextureLoader.o00000(Unknown Source)
at com.fs.graphics.OooO.super(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$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Title: Re: Crash when trying to load the ship image, not found?
Post by: Apogee_Freak on September 02, 2019, 09:30:43 PM
Look at the file path, it is looking for a "mods" folder in "starsector-core". The mods folder is in the same directory as starsector-core, I believe.
Title: Re: Crash when trying to load the ship image, not found?
Post by: Innominandum on September 03, 2019, 02:49:27 AM
I get a crash when trying to load my mod, looks like the game can't find the ship image in the mod folder, but it is in there!

Code
27170 [Thread-9] ERROR com.fs.graphics.o0oO  - Error loading [graphics/ships/edshipyard_pomeranian_2.png

The game loads Images (at least the ships) last to first ... so edshipyard_pomeranian_2.png is actually the first one to be loaded, taking this into consideration, it is highly probable that the game can't find any of those png. files and that your suffering from some naming/pathing problems ... smthing in the data\hulls folder might give you an answer smthing like "spriteName":

Spoiler
P.s Someone once told me that notepad++ is a great tool esp. with the compare plugin added to it
[close]
Title: Re: Crash when trying to load the ship image, not found?
Post by: Ed on September 03, 2019, 05:10:17 AM
The ship editor was trolling me, the path in the .ship file was

"spriteName": "graphics/ships/edshipyard_pomeranian_2.png/r",

somehow it had "/r" at the end which broke everything

Its working now, gonna do the basic setup for all ships now before working on custom systems and hullmods, thanks for the tips guys.