Modding villager files


#1

Hello there,

I got the steam version of stoneheart and i was wandering if someone good tell me how to a just the number of starting villagers or how to change the value’s so the are better fighters to start with seeing i almost always start out with a strong goblin boss next door demanding stuff.

I did see a different post about it but it is a bit old, 2014 i believe, but the files mentioned there are not to be found on my computer. Any idea or help is very welcome.


#2

Hey I don’t really know anything about the moddingfiles but you can use console commands to add villagers or change their stats when you have debugtools installed. stonehearth (Gareth Loremaker) · GitHub otherwise the commands won’t work.

click on the villager you want to change stats
command: set stat x
stat = mind, body or spirit x = 1-6
ex : set mind 6

command: add_citizen
will add a villager to your town

you can open the console with shift ctrl c


#3

Hey there @Doc_Brano, welcome to the Discourse! Going to page our amazing modding support @Drotten to help with modifying the game files. @Kagea is correct as far as an in-game option for changing stats and adding Hearthlings.


#4

The script file you’re looking for is located in services/server/game_creation/game_creation_services.lua, in there there is a NUM_STARTING_CITIZENS variable that’s set to 7. This is the one you’d want to modify, though I’m not sure what kind of effect it would have to the embark screen (maybe the extra hearthlings that gets added will appear below the screen so you can’t see them).

I would recommend the way that @Kagea proposed. You could always create a mod that modifies the value some way or another, but as I said, it could have some effect on the embark screen which I don’t know what it would be at the moment.


#5

This is what happens if you change the file

release-524 (x64)…vices/server/game_creation/game_creation_service.lua:305: attempt to index local ‘location’ (a nil value)stack traceback:
[C]: ?
…vices/server/game_creation/game_creation_service.lua:305: in function <…vices/server/game_creation/game_creation_service.lua:256>

It clearly can’t coop with it, or it good just be that 20 is to much hahahah


#6

i’m trying the debug tool but there is no install instruction. When just putting in the map and replace what he wants to replace, the game won’t start anymore


#7

To install debug tools, visit the Stonehearth github GitHub - stonehearth/debugtools: Stonehearth Debug Tools Mod, select Download Zip, and save the compressed folder somewhere on your computer. Inside the zip you should find a folder named debugtools-master. Copy that folder to your mods folder, (located by default at C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\mods), and rename the folder to debugtools. Let me know if this makes sense. You will know if it is installed if you see the following icons in the top right: . If this does not work, let me know!

Edit: Debug tools is included with Stonehearth as of Alpha 19. Simply enable it via the mod manager.


#8

got the icons after i reinstalled stoneheart, somehow i messed something up :frowning:

now to find the usable commands hahahah


#9

I’ve uploaded a simple mod I was using to make everyone start with 6-6-6 stats, so you might find that useful:
http://discourse.stonehearth.net/t/mod-max-citizen-stats/20276/1


#10

so i have it running, but have a question about some kind of tracher i managed to put on one of my peeps. How do i remove it?


#11

well the tracker was gone after reloading. Is the debug tool already updated for the alpha 15 build? Had some issue with it after the update trough steam


#12

Well, recently they have made some changes to the debug tools, so I guess it can’t hurt to update it.


How do I extract/find
#13

Seems you can no longer set the stats via the console. Is there a way to make the hearthlings start with only 1 in all the scores, but still allow for those values to grow? I’m using “MBS Training” mod, and I tried using the “Super Mod X” to set their initial values to 1, but they would never train their stats, because the racial max values were set to 1, as well.


#14

If you select the hearthling and then type set body 3 in the default console(Ctrl+C) and press Enter, does it work?


#15

No. It kicks back “Unknown command”


#16

Same for set_body_3 and set_body 3


#17

If you type help it should show all possible commands


#18

The closest options I see are set_config and spawn_effect. But I can’t get them to work with the arguments set_config body 1 or spawn_effect body 1. In fact, the spawn_effect causes a game crash.


#19

Well I know how you would do it via a mod but that’s a bit much to explain :’) you would hav to change some numbers in the kingdom description to make all of those kingdoms to start with 1/1/1


#20

As long as the stats aren’t locked at 1/1/1, that’s exactly what I want.