Getting Started in the Modding World

I’m interested in trying out the “modding” world and see if its something I can do/enjoy. So, I would like to know if Stonehearth is a good place to start.

If so, I would like some tips, from those experienced, on how to get started. (What do I need to learn? What programs are needed? etc.)

If not, What game would be a better place and feel free to still throw some tips out at me

1 Like

I recently started looking into modding for the very first time myself - based on my progress despite my limited experience prior this, I’d say Stonehearth is a good place to start.
(Just in case you’re really curious, my first attempt at modding is found here)

Modding in Stonehearth is performed in JSON-files when it comes to static things like adding a new recipe or a new workbench; things that requires logic is performed in Lua. (Ergo, most of the time you’ll work with JSON)
I’ve never worked with either of these prior creating my first Stonehearth mod - yet I find it somewhat straight forward today. If you have any prior coding experience at all, I’m sure you will find it “easy enough” to be able to make good progress on your own.
And, if you ever get stuck, it seems to me there are some high-skilled, helpful people on these forums :slight_smile:

Adding Models

Do you want to create your own models? If so, you will need some modeling software that can export .qb-files.
Cubicle is what the devs use; it is pay-to-get. MagicaVoxel is what I use; it is 100% free. (These are just two examples - there are more softwares out there)

Basic Modding

When it comes to the act of modding itself, I would suggest you to download the official starter-mod and learn as much as possible from it:


It showcase how to add custom recipes and new entities into the game.
In order to find more examples or even look into more advance stuff, you can learn from what already exist within your copy of Stonehearth:

  • Within \steamapps\common\Stonehearth\mods, create a copy of stonehearth.smod.
  • Rename the copy to stonehearth.zip and unzip it - this will now yeild a folder namned stonehearth.
  • You can freely browse this folder and everything found within regular Stonehearth - it makes an excellent way of learning in my opinion.

Getting Help

As previously stated, there are many talented modders on these forums - browse these categories and surely you will find some help.
https://discourse.stonehearth.net/c/modeling-animation
https://discourse.stonehearth.net/c/modding
If your question is not already out there, posting it on the forums is bound to yeild some help, too :slight_smile:

Coding Software

In order to work with JSON and Lua you will need a text-editing software. I’m sure there are many fancy software out there, but even WordPad will do, really.
Personally, I’m using Notepad++.

Using “my” method, it is not too easy to validate the JSON-files all the time.
So, here’s a link to an online JSON validator, too.

7 Likes

I can relate.
When it comes to understanding the under-the-hood-wiring of modding, KSP (kerbal space program) is going to be an easy one, (everything for a part sits in a folder, delete it and the part is gone, it has a model file, and a config file, the latter of which is basically a giant list of variables (and modules, which you don’t need/can copy for basic stuff) describing all the basics you need to make a part. you only need code for more advanced stuff), however i found it hard to make models for parts, so I think stonehearth is the easier of the two to actually getting stuff in the game.

When I started modding half/three quarters of a year ago, I was still in the KSP mode, and thought that the folder structure was the most important (add a part folder in the right directory, and the game will add that part). That did not work out, cuz in Stonehearth, what is important is that everything is referenced from somewhere. I gave up thinking “I don’t understand all of this :poop:”. I picked up modding about a quarter year ago, and with new attitudes it worked a lot better. So allow me to give some advice.

1. Be investigative

2. … and take it in parts

At the start, you will look at .json files and think “what is all this, all variables I don’t understand”. and that was just one of the .json files that you need for one item, you also need the ghost, the iconic, something in the manifest, multiple .jsons for a recipe, and what does the locales/en.json do?
All this madness might turn you off, but take it in pieces. When I uptook modding again, I took the approach of, today I am going to figure out how to change [small detail], instead of making an entire part, and then trying to fix it in an environment I didn’t understand. This way, I was studying the code I was trying to mod, and it teaches you alot of things.
I took that starter_mod, which comes with a fully functional in-game model, and I started to replace the .qb of that model with my own, effectively putting my model in the game. That is one of these small details I’m talking about. Others might be, changing the mod folder name from startermod to CustomModName without breaking the mod, changing the part name from wooden_piggy_bank to custom_item_name (, again without braking the mod,) or adding a second item (you get the idea). All of these exercises where to morph the startermod to the mod I wanted to make, and also thought me valuable lessons as to where all the references to everything else was, and as to what everything does.

At the very end, I made a document with sections for all the .json files ad all the references in them to other things. I never need the document to look things up in from then on, but it was an exercise to be sure I knew everything there was to know about getting a basic item into the game.

3. You will always be learning new stuffs

Nuff said.

4. Set (preferably small) goals for yourself

Yes, this is tip 2 again.
With modding, you can manipulate every single detail to a feature, and as such, you need to see features in that way. You will have found that out if you used that strategy I gave you in tip 1+2. You will also find out that features look WAAAAAY larger from that perspective. If we are talking about a pelt rack from one of my own mods, then people are inclined to think of it as one thing, how it looks like in the game. But in modding, it is the end result of a lot of details, namely:

  • There needed to be three varieties, because the wolf pelts and varanus skins turned out to have a different value in gold.
  • The assets (iconic model, normal model, png)
  • The scale applied to the model, so that it fit excactly withing the 1x1x1 stonehearth voxel grid, and also the changes to the model required to fix features broken by scaling such as:
  • Stackability, this requires design in the model, and it means the voxels need to touch if you place two models next/on top of one another. Touch, no more (gap), no less (z-fighting).
  • Outlining in the world: On the level of 1x1x1 stonehearth voxels, the player will make that happen, but on smaller scales, the modder will have to the the outlining. Centering an object is a good example, but if you have the two features above it makes things more complicated
  • and so on and so fort.
  • the recipe
  • all the text needs to be in its own file (the en.json in the locales), so it can be translated by other mods
  • And so on.

Because of this size, when I make a mod, I first write down all things I want in it, and then I “design” each item so I know what features each has. Then I take every feature/item as a goal, instead of taking “completing the mod” as a goal. My Peg Planning Mod took at least two weeks to make, my Piles Plus mod is at a month and still counting (and I have vacation, so school is not in the way either). Mods take a long time to make. By defining my goals in terms of features, I feel more like I am making progress. There’d be things you could do 5 minutes, an that just feels nice.

5 Likes

Awesome! Your reply has really inspired me to take that dive! Thank you for being so helpful :slight_smile:

1 Like

Thank you for the tips! I’ll see what I can do with the skills I already have :slight_smile:

My pleasure - can’t wait to see what awesomeness you’ll produce! :slight_smile:
Please keep us posted on your progress; never be afraid to ask questions if you feel stuck.

Best of luck now, @RalfboGamer!

I agree fully with @hamnisu here. Best of luck! :merry: