>7 starting hearthlings

when I set it to more than 6 it doesn’t work
I get this error after I place the flag
release-864 (x64)[M]
…vices/server/game_creation/game_creation_service.lua:615: attempt to index local ‘location’ (a nil value)
stack traceback:
[C]: ?
…vices/server/game_creation/game_creation_service.lua:615: in function <…vices/server/game_creation/game_creation_service.lua:559>
then the flag thing pops up again at the bottom
and allows me to place more flags




this is my mod
30StartingHearthlings.zip (542 Bytes)

1 Like

i see that you tried with 8 heartlings
with 7 is the same issue?

I assume

i’m checking the lua for the game creation and it only has the starting location for 7 heartlings:
local citizen_locations = {
{x=camp_x-3, y=camp_z-3},
{x=camp_x+0, y=camp_z-3},
{x=camp_x+3, y=camp_z-3},
{x=camp_x-3, y=camp_z+3},
{x=camp_x+3, y=camp_z+3},
{x=camp_x-3, y=camp_z+0},
{x=camp_x+3, y=camp_z+0},
}
so maybe is your 8 one that is causing the issue
for that you may need to override the game_creation_service.lua

1 Like

where is this so I can edit it?

last reply from here has the code line: (the citizen starting location is at line 594)
8 Starting Hearthlings Mod?

file: game_creation_service.lua
stonehearth folder: stonehearth\services\server\game_creation

1 Like

I made the modification and it still not work
release-864 (x64)[M]
…vices/server/game_creation/game_creation_service.lua:615: attempt to index local ‘location’ (a nil value)
stack traceback:
[C]: ?
…vices/server/game_creation/game_creation_service.lua:615: in function <…vices/server/game_creation/game_creation_service.lua:559>

this is the modified verson

30StartingHearthlings.zip (900 Bytes)

as you’re trying to use mixintos to change the lua i’ll quote some of the modding guide :wink:

Mixintos only work for JSON files, we can’t add to nor modify Lua/HTML/Javascript/other types of files with them.

While mixintos allow for many mods to add content to the same files, overrides completely replace that file. This means that if two mods override the same file, only one of them will win, which can cause compatibility problems. Thus, overriding is not recommended for code files, but it can be useful for things like swapping models or images in some cases.

override looks like the only way to change the lua but you will have to check every stonehearth update as they might change that file content

1 Like

so if fixed it I think
30StartingHearthlings.zip (8.1 KB)
but now im having a new problem. the game wont load its stuck on this screen.

1 Like

hmmm… no idea there… tried with f5?

is there an error in my code or something?

ok so I found a way to do it kinda
I had to manually replace game_creation_service.lua with a modified version. because for some reason overriding that file with a mod doesn’t work. unless im doing something wrong

1 Like