Editing Hearthling stats


#1

I’m trying to make a mod to set custom stats for each Hearthling
my first idea was to make a lua file that looked something like this
radiant.entities.set_attribute(Hearthling name here, “mind”, 6)
radiant.entities.set_attribute(Hearthling name here, “body”, 1)
radiant.entities.set_attribute(Hearthling name here, “spirit”, 3)
but then I realized how am I going to have the game run this lua file

so then I wondered if I could just edit the Hearthlings in the save game files. but there isn’t much in the save game file. is the hearthling data in the server_state.bin? and how would I read that file?


#2

You don’t even have to go that far. Just CTRL+C to bring up console and then Shift-Click (hold down your shift key while left clicking on a hearthling with your mouse) and you can modify all of that right there.


#3

well i was thinking it would be cool if i could name my Hearthling “Knight” and he would get 6 body or something like that


#4

Like a sort of Easter egg?


#5

more like a just for fun. or i could name him “Hulk” and he would get 1000 body, and maybe turn green and grow larger. LOL


#6

You can change a hearthling’s name by going into their Character Info and clicking on their name (you should see text that says ‘Click to Edit’ when you mouse over it.

You can change the body to 6, if you want, by following the instructions I posted earlier.


#7

You don’t understand. I’m aware I can make all these changes to Hearthlings manually in game. but that’s the point of the mod I want to make. with the mod installed i want to be able to name a Hearthling “Hulk” and he would automatically grow larger turn green and gain 1000 body.


#8

https://stonehearth.github.io/modding_guide/modding_guide/index.html
https://stonehearth.gamepedia.com/Modding


#9

It sounds like you need to maybe make a Hulk “trait” similar to Kai’s Goblin trait. Then roll until you get it (for now…) and adjust the stats with the new Beam mod. I know they are working on making the traits selectable from the character creation screen also. That would mean you just need to make traits for “Hulk”, “Knight”, “Thief” etc.


#10

That might work.

can you give me a link to that?


#11

https://steamcommunity.com/sharedfiles/filedetails/?id=1410871392


#12

That is indeed the link. Take a look at what she/he done, as well as
https://steamcommunity.com/sharedfiles/filedetails/?id=1617895793
That is the stat selector mod already in progress. They plan on adding trait selection also. Then you could just mixin your traits as a mod super easy! I am currently working on making “enchanted” clothes that add buffs and stats. That would be another way for you to “Hulk out”. Make a hulk buff and apply it to an entity (ripped up pants, maybe) and when they equip it the buff would be applied…