Modding/looking into Alpha 1

Its inevitable that people are going to be modding alpha 1 now that its here and so here is where you can share what you have found and achieved in terms of modding alpha 1.

I have had a chance to have a quick look around the files and the first thing that is very obvious is that there are a number of files here for things that aren’t actually in the alpha yet as well as some interesting little properties and actions that we haven’t seen before for example I came across this in the wolf.json file.

It seems that as well as health and speed there is also a property called ferocity what exactly this affects who knows yet.

Also there is an action called “fear fire” so it also appears that maybe certain enemies will have specific fears that the player can use to keep enemies at bay.

Also a toy ball that is a cube great work Team Radiant


Well I created one of the ugliest wooden statues you ever did see and added it in so now the workers of stonehearth have someone to watch over them while they eat. :smile:


Has anyone figured out what the X_Y_Z means ?

If it’s an argument then it’s from the decompiler and has no name correlation with the original code.

Im talking about stuff like this

function(l_1_0, l_1_1)

I believe @voxel_pirate did some videos on modding the graphics test, some of the things from there will apply in the Alpha and he is bound to do a series of Let’s Mod Stonehearth

You can find his youtube over here

1 Like

That’s just made by the decompiler. It’s just because that’s not known by the luac files so it creates placeholders to deal with it.

I updated my old script and ran the new stonehearth.smod file through unluac and have good news and bad news. The good news is that it also pulled up argument names so we won’t have things like l_1_0 appearing anymore. The bad news is that it failed somewhere unknown so you can’t just chuck it in as it crashes on launch.

I found out I just copied it into the zip wrong, the decompiled lua works!

1 Like

Great to hear! been busy all day so I haven’t been able to unluac yet but now it’s my first priority after hearing it works so well!

the first is a letter–a lowercase “L”. Not entirely sure what that stands for… but after that it gets pretty basic to understand. the next one is the method number and then the one after that is the argument number. As traditional to programming it’s zero based.

Once I got java installed and working - you need the sdk to use it through command prompt - I used the following batch script to quickly convert everything. It just converts all .luac files to .lua files with unluac in the directory it’s placed in and all sub directories.

FOR /R %%f IN (*.luac) DO (
	java -jar C:\Users\Xavion\Desktop\unluac.jar %%f > %%f_lua
	del "%%f"
	rename "%%f_lua" *.lua

An example of a function decompiled with unluac and it’s getting of the argument names somehow.

function CombatService:apply_damage(source_entity, target_entity, damage)
  radiant.entities.set_attribute(target_entity, "speed", 30)
  local health = radiant.entities.get_attribute(target_entity, "health")
  health = health - damage
  if health <= 0 then
    radiant.entities.set_attribute(target_entity, health)

very handy saved me a lot of time. Currently was just backtracking some professions one by one

Take a look into the Modding section @ StonehearthGuru

i replaced the beery bushes with the rabbit mod_prefix similar what @Xavion had suggested
but i still cant mange to bring in the mammoth



The Mammoth Slug


Seems that the mammoth is not complete as of yet or im doing something horribly wrong (they are too big i know)

if anyone has the qubicle home edtion could the tell me if the mammoth has a head and if so then im gonna have to buy it also to separate them for now

@Xavion if you want to take a shot at it, id be greatful. Having someone who moght know what he is doing not relying in “blind luck/faith”


ugh… what is that aberration? The mammoth model does have a head, but in its folder there’s a strange swap file that any of the other models has. It’s weird given all the included models have their json files correctly.

1 Like

yes that is what i was wondering the problem is most likely on my end tough, i am just tinkering since my knowledge is limited, but some feature of both the wolf and mammoth seem yet to be implemented

I can tell you what you did wrong. You exchanged the bush models or something else with the mammoth model? So now you have a problem with the coordinate system. Look into your qubiccle file and check if the mammoth is standing correctly on XYZ!


well then i will have to get the qubicle home edtion finally a good reason! :stuck_out_tongue: so i would match the XYZ in the mammoth file, i had no problem with the bunny is that on the correct XYZ axis :smiley:

Thanks for the help @Alesfatalis

1 Like

seems that your right the problems would seem to occur in the mammoth file …
since the place berry bushes function does not even look at the z-axis

Ultimatlely @SquareGabe they’re just two entirely different entities. Bushes are put in the world differently which would account for the awkward slug look (bushes are have a density algorithm as well so you I believe there’s a lot of mammoths mashed together). The JSON file for the Mammoth also implies double scaling so the mammoths come out really large (making them harder to see). You probably could just put the scaling at .5 or lower and see if you can start seeing individual mammoths.
The mammoth JSON file is also incomplete so before trying to put the critter into the world you would probably have to fix that as well if your looking for more than an immovable stuffed toy…

i was a quick check since i don’t know how to properly implement a critter entity i did scale them down on the second pic and i tired modifying the mammoth file the problem seems to come from the ,qb file :smiley:

Do you know how to legitematly add a entity ? :smiley:

the bunnies had no problem