How to import Topic Icons in Mod?

I edited topics.js in Enhancement Mod.
but I could not check the icon image in game.
What’s wrong? teach me plz.

GDT.addTopics([
{
id: “Parkour”,
name: “sendbox”.localize(“game topic”),
iconUri: EnhancementMod_Elscrux.modPath + “/images/sendbox.png”,
genreWeightings: [ 0.9, 1, 0.8, 0.8, 0.7, 0.8 ],
audienceWeightings: [ 1, 1, 0.9 ]
}
]);

and I created an image folder in the mode folder and inserted a picture file.
The picture file name is sendbox.png.

I found a way.
iconUri: EnhancementMod_Elscrux.modPath + “/images/sendbox.png”,
to
iconUrl: EnhancementMod_Elscrux.modPath + “./images/sendbox.png”,

I missed the . mark. and it’s working.

modAPI Links

1 Like