Professional coder but 1st time modder--

So, I used to be a professional coder but I’ve never modded a game before. I’m toying with giving it a try
with Stonehearth. Mostly because I’ve been so impressed with Radiant’s slow, steady but high-quality

Is there an ETA on when Radiant will publish an API?

I looked at how to add content like craftables and classes and that looks incredibly easy to the
point of being trivial. Which is great. It was very eye-opening to me. I can see why so many people
dabble in it.

I’m curious how modders make more fundamental changes. And I guess embedded in that quesiton
is: where are the hard limits of what a modder can change? Like for example, if one wanted to add
a social interaction and gossip system to the game… can that be done? Easily? I can sort of imagine
you might be able to fake something like that with invisible equipment that represents information
that gets copied and given between hearthlings. But is it typical for a modding API to allow more
organic ways of pulling something like that off?

What about making changes to the agent’s behaviors? Like if a modder wanted to add AI to the
hearthlings that allowed them to use different tactics in combat… is this kind of thing possible?

To be clear: I’m not so much asking exactly how to do any of those things as I’m asking for a
general overview of what’s likely to be possible or impossible.


:open_mouth:wow,mod API is good!

1 Like

the last statement was you can mod what you want but dont Spoiler if you use codes from them :wink: OK you can Spoiler but you must make it clearly in the Topicname ^^


paging @Froggy, @RepeatPan, @jonzoid, @Relyss, @chessmaster42, @Avairian … and all our modding elite…

care to lend your insight to this budding modder? :smile:


There isn’t and my best estimate would be around 3-6 months after the release of the game. I don’t expect any official API this year.

It’s lua, so you can inject code and monkey patch and all that stuff very easily. You’re hitting boundaries as soon as you try to do out-of-the-engine stuff though, so if you’ve wanted to add, say, Twitter integration, you’re officially out of luck. There are currently ways of circumventing this, but I expect them to be closed in the foreseeable future.

The AI system is an easily extendable state machine that uses priorities and weights; what AI actions/observers/filters are available to an entity is defined as JSON.

Depending on the effort you wish to put into, almost everything. I’ve modded the very first Alpha, back when there wasn’t any real modding support (mods did not have an entry point, mixintos/overrides weren’t a thing yet). I’ve written a JavaScript (which are always executed on game start) which called a game callback which then loaded the mods and called their initialize-functions, therefore creating an entry point for mods (on both server and client).

Lots of work, not pretty, but I’ve basically completed the modding support back then with what I’ve had in a rather creative and in a you’re-not-really-supposed-to-do-that-manner.


edit: Damnit RP ninja’d me.

@RepeatPan has done exceptional coding work with REDACTED.

He has consistently brought to the table all of the features I have asked him to, and these include fundamental changes to how the game feels and operates. Is it easy? You’d have to ask RP.

Adding AI actions and observers to the base_human mixin could probably achieve the changes you intend to implement in combat tactics - however, I say that with the caveat that I am no coder.

It’s worth noting that you don’t need to be programmer in order to mod stonehearth. In the past I’ve managed to Frankenstein together existing Radiant code in order to achieve the results I wanted.


These guys know a lot more about modding than me, so listen to them! :slight_smile:

I will add that I am also a software developer and this is the first time I’ve even thought about getting into modding. SH, even this early on, has a really excellent modding platform that’s easy and a lot of fun to work with. I highly recommend diving in. You’ll find a lot of great support from the community if you ever need help.


Same than me. You just have to dig a bit into the code and look for examples of what you want to modify. @RepeatPan and @chessmaster42 are the ones who know more the limits of what we already have (especially RepeatPan, he can do crazy things sometimes…).

You can also look into the Modding category of the forum. There are lots of little mods hidden there that might give you more hints towards the possibilities. As far as I know, very few people have made highly lua-based mods, which doesn’t mean that you couldn’t give it a try. There’s some documentation about AI in the stonehearth’s smod folder.

I’ve made a spontaneous self combustion mod just the other day to play around a bit with observers, the AI and timers… I do feel kind of bad for that, too. Not entirely sure why.

It does achieve its goal, however, it makes the game horribly more difficult… So I got that going for me, which is nice?



If you’re looking for simple mod experience, I’m looking for a coder to help with a simple mod.