8 Starting Hearthlings Mod?

I dont know anything about modding, but I would think this would be a simple mod. Anyway to create a Mod that you start with 8 instead of the typical 7? I’m sort of OCD to see that empty space in the 8th slot lol



I’d be all for this as well, just as a default option.

This is actually relatively easy - I’ve done it already, but by hacking the game’s Lua files directly and not as a usable/separate mod (I’m just too lazy to figure out how to use the “mixinto” stuff).

Somewhere in “stonehearth.smod” (I’ve forgotten where/which files) you need 2 changes in 2 places. One is a simple single line change to a variable (e.g. like “number of hearthings = 7” changed to “number of hearthings = 8”) that determines how many hearthlings there are when choosing them in the “roll for new hearthlings” embark screen.

The other change is in the code that places hearthlings in the world after the player does the “Place your town banner in the world” thing. There’s a piece of data (in Lua) that determines where hearthlings spawn relative to the town banner, and when you have more than 7 hearthlings there’s no data for the location of the 8th (or 9th or…) hearthling so the game crashes with a “nil value for location for this hearthling” problem. To fix this you just need to add a “relative location for 8th (or 9th or…) hearthling” and it’s all good.

Notes: For 9 or 10 hearthlings; on the screen where you do the “roll for new citizens” they extras don’t fit on the screen properly and “overflow” at the bottom of the screen, which looks messy, but it still works despite this. You can probably change the way hearthlings stats, etc are displayed in that “roll for new citizens” screen to fix this (make each hearthlings “stats box” take up less screen height), but I didn’t try. I also didn’t test “more than 10 hearthlings” (but wouldn’t be too surprised if that worked without any complications, if you fix the “roll for new citizens” screen graphics to handle the extras).

1 Like

I can do it if you guys want.


I looked through the .smod file. Looked at past posts and wasn’t able to find where to edit the number of Hearthlings.

It is at the services/server/game_creation/game_creation_service.lua at line 12 and line 300.
Those are the places to edit.

Line 12 states how many hearthlings should be, so just change it to 8.

Line 300 are the positions of each one. You need to add and extra entry there for the 8th hearthling, somethign like {x=camp_x+0, y=camp_z+5}, will work



line 14?
I guessing what ever text editor you are using doesn’t include blank spaces.
14- 2 blank spaces = 12
can you tell me what line 300 starts with so I can just search it so I don’t have to count all the blank spaces and then add that to 300. because that would take a wile.

Hi @Kodi4444
that was 2 years ago… now they changed it to data stored in constants (just a value in other file and under other name)
line 14 now has “constants.game_creation.num_starting_citizens” wich is in stonehearth/data/constants.json
line 221 of that file:
“game_creation”: {
“num_starting_citizens”: 5

about the line 300 if i find something i’ll be editting this reply

I tried that here

but nothing happened so I thought I must be missing something

tried with a mixinto/override to that file? (the json…)

this is the mod I made if you want to look at it
1366825971.zip (512 Bytes)

try with this in you manifest
“mixintos” : {
“stonehearth:data:constants”: “file(constants.json)”
(just using the constant alias to path the right file)
not tested

1 Like

I feel super stupid now.
I saw this

then I thought what does does it look like in my mod?
this is what It looks like
then I noticed
I forgot to add constants.json
like this
I tried it and it works now.
I cant tell you how embraced I am now.

how can I call myself a Modder anymore when I made a stupid mistake like this.

holy #$#" the citizen starting location is at line 594 now :no_mouth:
it still has the code for 7 heartling in the following pattern: