Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Help with adding clothing as a mod?

A topic by #F4C430 created Jan 21, 2024 Views: 1,511 Replies: 5
Viewing posts 1 to 4
(1 edit)

I don’t have access to Discord so please don’t ask me to put my question there.

How can i make a clothing mod that adds a new clothing piece to the game? I looked at the example_enemy mod in the repo but that doesn’t help with clothes.

I can get the item to be listed in the “Change Outfit” menu items using “AddModel” but there’s no graphic. What am i doing wrong?

init.ks:

'use strict';

AddModel({
    Name: "NewItem",
    TopLevel: true,
    Categories: ["Hats"],
    Folder: "NewItem",
    Layers: ToLayerMap([
        { Name: "NewItem", Layer: "Hat", Pri: 70,
            HideWhenOverridden: true,
            Invariant: true,
        },
    ])
});
new_item.zip/
├─ Models/
│  ├─ NewItem/
│  │  ├─ NewItem.png
├─ init.ks
Developer(+1)

Hi, my apologies, i can put some of the modding tutorials on this community when I get home! It should answer your questions

Developer

From what I see it should work, but you may have to use pixi assets to preload the texture

PIXI.Texture.fromURL(KDModFiles[“Models/” + dataFile], { resourceOptions: { scale: 0.5 // You can change the scale to reduce the size of the file and improve performance } });

(1 edit)

Hey thanks for trying to help but i found the problem. My image was 256x256 so i thought to change it to 1000x1000 just in case. Sure enough it displays in the character window now. Unfortunately the scaling and positioning is all wrong because the top-left corner is offscreen and the bottom-right corner just touches her shoulder. It’s just a placeholder image but that means i need to figure out scaling and offset for it to work.

Developer

https://github.com/Ada18980/KinkiestDungeon/tree/newartwork

Try the Models folder, there are some things you can use as templates!

I’m an idiot! It’s working with the code in my original post and an appropriately-sized image. Now i just need time to do art…