Black Market 2

by djmango

Sell and buy items/fluids/energy on the black market using trading chests/tanks/accumulators, choosing the frequency of exchanges and related fees. You can now sell your overproduction and buy things that you don't want to craft by yourself. You can also use these trading units as a paying shipment system.

10 days ago
0.17 - 2.1
26.2K

b 2.2.23 Sprite Crash

10 days ago
(updated 10 days ago)

Two sprites, energy.png and but-main.png, are causing crashes even without any mods or dlc loaded.
I upsized the sprites myself manually and that works, but that seems to cause the mod button at the top left, the but-main.png icon, to appear larger than the rest of the buttons (See Edit), so they probably just need their reference code to look for the correct size of the png rather than an upsize.

Here is the crash log entry for but-main.png before I upscaled it, energy.png is the same except 48x48 instead of 45x45

12.001 Error ParallelSpriteLoader.cpp:67: Parallel sprite loading failed, falling back to normal sprite loading. The given sprite rectangle (left_top=0x0, right_bottom=45x45) is outside the actual sprite size (left_top=0x0, right_bottom=30x30).
See the log file for more information.: BlackMarket2/graphics/but-main.png
RAM: 19719/130939 MB, page: 21997/139131 MB, virtual: 7715/134217727 MB, extended virtual: 0 MB
12.097 Error AtlasBuilder.cpp:1378: The given sprite rectangle (left_top=0x0, right_bottom=45x45) is outside the actual sprite size (left_top=0x0, right_bottom=30x30).
See the log file for more information.: BlackMarket2/graphics/but-main.png; mods: BlackMarket2
Prototypes using the sprite:
data.raw["sprite"]["default"]

Edit: Found the GUI Scale setting and set it to 1, and that seems to mostly fix any weirdness compared to other mod icons, so just resizing the sprites should be ok.

10 days ago

Fixed in 2.2.24. The log lines matched the cause.

Both sprites told the game to read a rectangle scaled by the GUI scale setting. At the default of 1.5 that was 45 x 45 from the 30 x 30 but-main.png and 48 x 48 from the 32 x 32 energy.png, which the game refuses. They now use the real file size and the setting goes into the sprite scale, so the icons draw the same size as before at any GUI scale from 0.5 to 3.0. If you resized the PNG files by hand, the update replaces them with the originals.

To check: update to 2.2.24, set GUI scale back to 1.5, start the game with the mod alone. It should reach the main menu with no "sprite rectangle is outside the actual sprite size" error, and the top bar button should match the other mod buttons.

I tested the sprite sizes the game computes at scales 0.5, 1.0, 1.5 and 3.0 in the headless game, but I could not run the graphical client. If the button looks the wrong size on your screen, tell me and say which GUI scale you use.

9 days ago

Works great now, thank you!

New response