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?

It is rather easy to add a custom item into the Alpha which will be craftable by the carpenter (as it is the only profession in the game at the moment). Get prepared: Unzip the "stonehearth.smod"-file Create a .png-file which represents the...

Right. So let's get down to business. The game differentiates between the object itself (a placed chair) and so called proxies (now called "icons".. iconic things are icons right?). Tʜᴇ ᴘᴀsᴛ The previous system therefore based on two entity...

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 organisedyuck

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.

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

Anywho…

Nex:

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.

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.

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
(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:

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

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…

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?

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.

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

Nex:

Are you sure that -in this case- by ‘overriding’ a file it gets replaced entirely? Even if the new one has less code?

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

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 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.

Okay so instead of adding or replacing content I had my reasons to get rid of some! :slight_smile:
I never did any modding in Stonehearth but I decided to dive into the files anyways, suprisingly it only took me a minute to accomplish what I wanted. Basically I just had to delete a few lines of code…
But then I thought, what if I turn this into a ‘mod’ so I could easily turn it on or off, or share it with everyone? And so I set up this folder structure inside the /mods folder:
/temp/
/manif…