Cookie Clicker

Cookie Clicker

Cookie Clicker Workshop
Tune your cookie-clicking experience just right with quality-of-life tools, extra player-made content or just dirty dirty hacks.
Learn More
Slime 1 16 Jan, 2022 @ 6:56pm
Image File Directory not working? (MODDING)
Hello,

I am trying to mess around with making a texture pack.

I have all my image/sound files in folders (within my main mod folder) labeled img and snd respectively.

When I use:
Game.Loader.Replace('bankBackground.png',this.dir+'/img/backgroundhentai.png');
or
Sounds["snd/click1.mp3"] = new Audio(this.dir + '/snd/moan13.mp3')

The game doesn't actually load anything and just says the mod failed to load.

(all the images are just placeholders and yes I used hentai)

The game seems to have an issue with something I am doing, and it seems to have started once I moved the files into their own folders. I can upload the files to the workshop if anyone needs better reference, and the code will also be posted in the comments.

Thank you for helping!

(PS I also have the sample language pack in place, but that didn't interfere until everything was moved into folders as stated above)
Last edited by Slime; 16 Jan, 2022 @ 6:58pm
< >
Showing 1-2 of 2 comments
Slime 1 16 Jan, 2022 @ 6:57pm 
This is my main.js file



Game.registerMod("reskinmodyay",{ //this string needs to match the ID provided in your info.txt
init:function(){
//this replaces some images with some random ass ones, to do this yourself just follow this format :)

Game.Loader.Replace('grandma.png',this.dir+'/img/miku.png');
Game.Loader.Replace('farm.png',this.dir+'/img/f2aq9a4c8yc51.jpg');
Game.Loader.Replace('bankBackground.png',this.dir+'/img/backgroundhentai.png');

Sounds["snd/click1.mp3"] = new Audio(this.dir + '/snd/moan13.mp3')

},

});
Last edited by Slime; 16 Jan, 2022 @ 6:57pm
Slime 1 16 Jan, 2022 @ 6:58pm 
This is my info file.

{
"Name": "ReskinAddon",
"ID": "reskinmodyay",
"Author": "Slime Boi",
"Description": "Hopefully this reskins some of the images, idk if itll work tho",
"ModVersion": 1.0,
"GameVersion": 2.043,
"Date": "16/1/2022",
"Dependencies": [],
"LanguagePacks": [//this is needed to be able to read the language pack, which allows you to rename things to be funny names like poop or something
"lang.js"
],
"Disabled": 0,
"AllowSteamAchievs": 1

}
< >
Showing 1-2 of 2 comments
Per page: 1530 50