How To Properly Add Custom Images For Platforms?

Hello again Threads, yes I do have another question. Even though I’ve gotten most of my mod to function properly, one thing still eludes me: How does one correctly add custom-made images for custom platforms? I keep cross-checking with the GDT API and other mods (for reference only of course) and can’t see anything wrong with the code, but for whatever reason all images I’m using for my platforms are all showing up as small reference pictures with a green slash through it. I know I’m referring to the correct image files without any misspellings, yet it’s still not working.

Example code for one of my platforms:

(function () {
var icon6 = GDT.getRelativePath() + ‘/images/platforms/Dox Dimensions 1.png’;
GDT.addPlatform(
{
id: ‘DoxDimensions’,
name: ‘DoxDimensions’,
company: ‘Cryptic Entertainment’,
startAmount: 0.05,
unitsSold: 0.06,
licencePrize: 30000,
published: ‘20/1/1’,
platformRetireDate: ‘25/1/1’,
developmentCosts: 20000,
genreWeightings: [0.9, 1, 0.8, 0.7, 0.8, 0.9],
audienceWeightings: [0.9, 1, 0.8],
techLevel: 3,
iconUri: icon6,
events: null
});
})();

Any help would be greatly appreciated. It has been so far with my earlier thread topics.

I believe you have to enter the path.
Example:


It doesn’t have to be a .bmp file, actually, I don’t know if a .bmp file will work lol
EDIT: What is interesting here is this line:

Now, first of all, it should be iconUrl I believe(correct me if I am wrong) and second, I could man that I was correct. Now, what I remember is that when entering a path, you type it with ’ '(idk what they are called).

Stop messing with @Haxor. And stay on-topic!

Uhhhh, he asked how to add custom images for platforms…?

But not with this ‘C:\haxor\is\kill\hmmm.bmp’!

It was an example…?
Seriously though, calm down.

I always put ‘!’ on the last character of the sentence because i like to do that :smirk:

tbh you’re the one steering this conversation off topic

1 Like

but that’s not funny!!!
@CrumpDev Agreed. Want some :cake: ?

sure. like the new icon by the way.

Since the Steam Workshop integration, this is no longer possible (source).

1 Like

this looks correct to me. Where do you put your image inside your mod folder?

Don’t try bmp. It may work for you but on my format i use img. Obviously.

This is the entire path to the image being referenced in my mod folder omitting everything at “My Documents” and before:

\TEST_Bit_Of_Everything_RECODED\images\platforms\Dox Dimensions 1

I guess I could try IconUrl, but judging from every other segment I’ve seen from the API and other sources, it is IconUri. Also the image is in .png format even though I’d much rather enter it as a JPG, even checked the properties to be sure. Come to think of it I might want to add underscores to the image name as well for formatting reasons.

not sure why it would be under My Documents. This should sit with the rest of your mod files in your mod folder inside .mods/

Sorry, thought you were referring to the location of the source code. If you meant for the exported material that was copied to the mods_ws folder, it’s: \72428655_TEST_Bit_Of_Everything_RECODED\images\platforms\Dox Dimensions 1.

ending with .png, right?

Maybe try not using spaces in your file name.

Next, I’d suggest you use the debugger to see what folder this resolves to. More info on debugging:

You should then easily be able to select the HTML element and see what the actual path should be.

Make sure you insert your mod’s name in the path instead of “ModName.”

Just something that works for me. I’m a JS novice, so don’t expect much.

Yes! Changed the icons in the way you described and moved a copy of the mod into my /mods folder and now the pictures are working again. Seriously guys, thank you all. I can’t say I’m quite ready to release my mod to the public just yet, afterall this was a recoding of an already-made mod I published with UME back in the days where it still worked and it wouldn’t be fair if I just published a rehash of the same things. So instead I’m going to take some time to add some new features and make the workshop file look a little less bland.

Also, I really wish the API supported making custom achievements, or at the very least contracts. Had a whole set of unused code that’s now garbage for a variety of new contracts.