Sunless Sea

Sunless Sea

查看统计:
Kou12am 2016 年 10 月 20 日 上午 2:01
Simple image modding
It's possible right? Because I haven't found answers anywhere...

I've read the Modding guidelines and followed them so many times I've lost count and still couldn't get it right. The fact that it's so simple makes it even more frustrating when I can't figure out the problem. Here's everything I've tried so far..

I've tried folder pathing to both
...\MODNAME\images\sn\icons\image.png

and
...\MODNAME\images\icons\image.png

but neither would load npc images, or player portraits.

Another thing I've tried is directly replacing the files in the actual icons folder,
but they all get overwritten once the game starts up and loads in.

The custom images were at first all made from scratch, and scaled to the correct resolution and didn't work. I later tried to paste the modded image over the original file to keep the same sort of ID on it, but that didn't work either.

I've also tried finding the image filename in the events json (at least the ones that were even listed) and changed them to image1.png like in the guidelines,
but all it did was replace the portrait with a green Sunless Sea icon.
Most of the json files in the entities folder didn't even contain any reference to the avatar images. I'm at complete loss on what to do here.


So the question is, how can one mod the avatars(portraits), npcs, or even just image files in general?
< >
正在显示第 1 - 5 条,共 5 条留言
Dowly 2016 年 10 月 20 日 上午 2:07 
The easiest and dirties way I have found that works for replacing for example officer icons is to directly overwrite the image and then right-click->properties and check "read-only".

By making the image 'read-only', it doesn't get overwritten on game start.
Kou12am 2016 年 10 月 20 日 上午 2:22 
I just tried that and it seems to work for all the images as well. Thanks for the reply!

Until a real method shows up, I guess I'll be doing it the dirty way too.
jtq 2016 年 10 月 20 日 下午 4:24 
引用自 Kimo
I've tried folder pathing to both
...\MODNAME\images\sn\icons\image.png

and
...\MODNAME\images\icons\image.png

but neither would load npc images, or player portraits.

IIRC this isn't possible - you can add/override JSON config by putting JSON files into the `addon\MODNAME\entities` folder, but there's no way to do the same thing with images - the game only loads images from the main "images\sn\icons" folder, so if you want your images to appear at all, you have to mix them up with the main game's images instead of segregating them in your mod-folder.

This is a crappy bit of design that makes the addons functionality a lot less useful than it could be, but I've already previously contacted Failbetter about it and they've indicated they have no interest in fixing it.

If you're still interested in using custom artwork in your mod, it should be as easy as putting a new .png file in the "images/sn/icons" folder and then referring to it from inside your mod's game JSON.

If you overwrite existing image or JSON files, however, that may be a lot harder - at the very least they're liable to be overwritten again sooner or later (eg, by future content updates to the game from Failbetter), and I'm not sure how to go about modding stock game images (referred-to by stock game JSON config files) without editing the original files.

-----

Edit: Just a random thought: have you tried finding the stock game objects (Qualities, Events, etc) that refer to a specific image you want to mod (say, an officer's portrait, a particular event's image, etc) in the game JSON, duplicating it/them into your mod folder, and then editing the filename those objects refer to inside your copy of the JSON?

Eg, if the stock game has a Quality with ID 1234 which refers to "stock_image.png", try copying the JSON code for that Quality into your own addon\MODNAME\entities\qualities.json file, change "stock_image.png" to "my_custom_image.png" and then place your custom image into "images\sn\icons\my_custom_image.png".

IIRC the modified copy of the Quality in your mod folder should override the stock version with the same ID, and as long as you keep everything else the same (including IDs, etc) the game should load it in place of the original, and the custom image it specifies instead of the stock image the stock JSON object specifies.

Of course if you want to distribute your mod anywhere you still have the problems of talking your user through installing your custom artwork into the game-images folder and the fact you can't legally distribute a copied and minimally-modified JSON file full of Failbetter's copyrighted content, but that's a whole other set of problems even after you get it working...
最后由 jtq 编辑于; 2016 年 10 月 20 日 下午 4:35
Inspector_Balloonicorn 2023 年 10 月 9 日 下午 8:25 
Has anyone actually found a solution for this yet? Not a work around but an actual solution? I am trying to do the same thing 7 years later and encountering the same roadblock with the same odd silence.
Inspector_Balloonicorn 2023 年 10 月 10 日 上午 7:54 
To anyone who finds themselves here 7 years later like I have, I have found a solution. Custom area.json edits for custom images requires not 1, not 2, but 3 images to be present. The naming and sizes of all three images have to match.

As an example... for a custom port with a custom image named "image" you want to add whenever you make port, you will need to make 3 images based on the one image you want to add:

image_port - size 177 x 230
image_portgaz - size 340x442
image_portsmall - size 40x52

In your area.json file, you must reference "image_port" for the ImageName property. In game - It needs the image_port to exist, but I guess when you open the gazette it calls portgaz to display and the small triggers for your achievements or feats.
最后由 Inspector_Balloonicorn 编辑于; 2023 年 10 月 10 日 上午 7:55
< >
正在显示第 1 - 5 条,共 5 条留言
每页显示数: 1530 50

发帖日期: 2016 年 10 月 20 日 上午 2:01
回复数: 5