Taking Questions about Mixintos and Overrides


Ent that the truth! :wink:


amen brother!

knows what’s next on @Froggy’s “to do” list… and is beyond excited!


amen :hamster: :hammer:


Looks at froggy’s thread

What have I missed?!


My play on ‘Aint that the truth’ has nothing to do with my to do list, but rather radiants.


whereas my comment had everything to do with @Froggy’s WIP… :eyes:


Well, I was wondering, is the current way of adding things into the game, ie mixintos, going to be the only way of doing such?

I was imagining (and hoping) to be able to make some sort of lua script with a function that you specify the path to the model and stuff. Is using mixintos to put things in the game just temproary? Or will this be the official way of doing things in the future?


You can already do this but it has to be a json, of course.

Mixintos and overrides are only to be used if you actually want to extend or modify existing content, not to put in new one.


Mixintos and overrides are here to stay, but there are certainly other ways of adding content to the game. If you look at candledark, you’ll see that though our startup order API is still completely hacked together, there is a candledark_server.lua file that, after X in-game seconds, force-spawns a scenario, which in turn creates skeletons etc that are created all new for candledark. You could do anything else lua-related here, like start your own services, etc.


Ok cool. I guess my problem could be solved by using a lua script to generate a manifest.json. dunno if that would work. There is just something about JSON that scares me. I have nightmares. It’s just so organised yuck


Hello there,
strange question, maybe, and not sure if I’m in the right place here…

Don’t fully understand modding in Stonehearth yet, but I tried to make a little, tweak I would say. I got suprised when it only took me like a minute to find and edit the actual code. Basically what I did was deleting a few lines.

I would like to make this into a mod you could turn on or off like others. Even with it being a very small one, because well it makes things easier. And I think other people would like this aswell, so I could share it more easily.

Now question;
I found that modding is very focused on adding or changing existing content. But how about adding a mod which excludes part of the main code?
I’ve been struggling trying to override an entire lua file with the same one except for the few missing lines, without succes.



Hello there, @Nex!

It’s not a strange question, at all - quite the opposite I’d say for someone who’s somewhat new to modding :slight_smile:
If it is the “correct place” or not, however, I do not know.


You will have to create a folder-structure containing your mod; this is, the files you are adding/modifying, and a file called manifest.json.
You can check existing mods to see examples of how this is done :slight_smile:
(in case you are not aware of it already, your current mods .smod-files are nothing else than .zip-files which where renamed from mod_name.zip into mod_name.smod)

The manifest-file is where you probably want to write something like this:

  "info" : {
    "name" : "your_mods_name",
    "display_name": "Mod Name",	  
    "version" : 3
  "overrides" : {
	  "stonehearth/ai/actions/memorialize_death_action.lua" : "file(ai/actions/memorialize_death_action.lua)"

In my example above, the Stonehearth-version of action “memorialize_death_action.lua” will be replaced with my version of the same file.
So, simply tell what file you want to override, and point to your file which should replace it :slight_smile:

I hope this help at least a little bit!


Exactly what I did, created a main folder inside ‘mods’, containing a manifest with your exact example, and a subfolder containing the tweaked script. Correct references and no syntax errors (I am familiar with coding in general).

It works when I edit the original lua file. But not with this mod extension, for some reason…


When you start Stonehearth, in the top-right there is a settings-button.
If you click this and go to the “Mods”-tab, do you see your mod here? If there is no error, does your mod have a tick in the box? :slight_smile:


oops, I forgot to mention that. Yes I am aware of the mod handler I believe it’s called? And I was about to say I turned it on but actually, just right now I notice that every time I quit to main menu, or reboot the game entirely it’s reset to off?
Now that’s weird… as if something is turning it off without giving any errors.


Not too sure what could cause this :thinking:
Try adding "default_enabled": true into the info-section of your Manifest. IIRC it should be “true” if nothing else is stated, but worth a shot I guess.

When manually activating your mod, does it work or are your changes still nowhere to be found?


I actually just tried giving it the ‘required’ statement, so it was forced on. Still no result.
Are you sure that -in this case- by ‘overriding’ a file it gets replaced entirely? Even if the new one has less code?

What do you mean by manually activating? If I edit (remove a few rows) in the original file it all works perfectly.


I ment if you manually “tick the box” that tells Stonehearth it should use your mod :slight_smile:

From my understanding of “overrides”, the file will be replaced no matter if there is less or more code, yes.
I’m not too sure, but there might also be a “replaces” you could try instead of “overrides” in the Manifest.

Perhaps you will have to create a new thread for your mod and share your code there - this way we can continue the conversation without making me feel like we’re “stealing” this thread :sweat_smile:


Not sure if this is the issue here, but the mod manager doesn’t like special characters (like [, ] etc). If these are included in the mod name, each time the manager is accessed from the menu, those mods are disabled.


Created a seperate thread for this one: