Cargo Ships


Adds massive cargo ships to the game, that function similarly to trains. Also adds deep sea oil, oil platforms, tanker ships, train bridges and other water based content.

Content
21 days ago
0.16 - 2.0
219K
Transportation Logistics Trains Mining Fluids Power

g Errors

4 years ago

Im getting some errors after updating my mods today. This is a example
53.117 Warning! Sprite at {0,0; 64x64} from cargo-ships/graphics/icons/boat.png is defined with 4 mipmap levels, but level 1 is expected to be at {64,0; 32x32} which is out of bounds of the source image.

I use many mods so could be conflict. But thank you for the mod by the way! Its awesome.

4 years ago

These are no errors, but warnings. It just means that the game expects the icons to have 4 mipmaps, while they really have only 1. Adding "icon_mipmaps = 1" or "icon_mipmaps = 0" to the definitions would get rid of the warnings. But there's really nothing to worry about -- the warnings are just a nuisance because of log spam, beyond that everything will run normally.

4 years ago

Ah ok makes sense. Which Lua file would that be? Im not too good at LUA yet

4 years ago
(updated 4 years ago)

This happens in the data stage. So, generally, you should look if there are any prototype definitions in data.lua, data-updates.lua, and data-final-fixes.lua. Bigger mods that define many prototypes usually keep some order by moving the definitions to other files; in that case you'll see lines like

require("prototypes.item")
require("prototypes/item.lua")

in the data*.lua files. Both lines mean the same thing: look for "item.lua" in the directory "prototypes".

Cargo ships has about a dozen files in "prototypes/". So I would unpack the mod, search all files for "icon\s*=" ("\s*" meaning there may be spaces before "="), and add "icon_mipmaps = 1" after it. (A comma may be required at the end of the line -- just check how it's done in the other lines). If you really want to play it safe, you should take a look at the actual icon graphics and check that there's really only one picture in them. Mipmaps will have 4 versions of the same icon in different sizes arranged from left to right (64x64, 32x32, 16x16, 8x8) -- you'll know them when you see them. In Cargo ships, they do have only one version, so you can skip the test in this case.

I guess it's not really worth the trouble to fix this yourself, though. This is something that should be done by the mod author -- otherwise, your changes could be overwritten next time the mod is updated. So I'd recommend you don't do this unless these warnings really bother you or you want to start creating mods yourself and consider this a project for practicing. In this case, you should definitely read the Modding tutorial and, of course, the guide to the Factorio API.

New response