How do you really create "Mixins"`?

Hello. I added / edited quite few things in the stoneheart.smod. It works just fine with that but I thought it would be much cooler if I could put them into seperate mods so I dont edit/ruin the original files. Now I heard that there are functions called “mixins” (however you come to such a strange name for things like “replacer” or “overrides” or “expansions” but whatever). I heard that you could replace files from other mods with that but the thing is that I never actually found a thread or sth like that where you can see how it’s build up. For example I dont know how to explain the system that it has to override sth. I dont even know WHAT it’ll override. Will it override a value? A whole folder? a .json file? And what is if multiple mods “mixin” a single file? what will override what? will it add itself so you have 2 values or what? I dont really understand the whole thing. Sorry for that stupid question but I don’t really get it…

Thanks for every helpful reply :slight_smile:


Have you seen this thread?:

With mixintos you can add new content or modify existing content.
Overrides replace entire files (either qb models, json files, lua files, etc). It can be dangerous to override things other than models, so mixintos are always preferred (and there’s a way to remove content with mixintos too).

There are many features in Stonehearth based on an index (for example, recipes for the crafters). You can add your own lines to that index via a mixinto. To reference your new items, you add your own aliases in your manifest and then use them in your mixintos.