Problem with my mod (solved)

yeah like i said the game still runs with mods and yeah it doesnt appear when i take the resource mod out

sorry for the confusion, but i meant what kind of mod did you make?

i took the tutorial resource mod and made a resource and add it

1 Like

do you get the error even without your mod?

no i didn’t. and it doesnt stop the mod and or the game from running

i took this and made my own resource

okay, then its most likely your mod thats causing the error, so i’ll let drotten handle this, as i know next to nothing about code

im in the same boat i mean maybe if it wasnt luac files but yeah

its actually .json files :wink:

also, put this in “other reports” as its not a bug with the game itself.

but the error says

tonehearth/services/server/mining/ore_generator.luac:10: in function ‘createmother_lode’
…tonehearth/services/server/mining/ore_generator.luac:5: in function ‘create_ore_network’
…onehearth/services/server/mining/mining_service.luac:111: in function ‘create_ore_network’
.luac:3: in function ‘initialize’
…/server/static_scenario/static_scenario_service.luac:69: in function ‘activatescenario’
:34: in function ‘fn’
…nehearth/services/server/world_generation/timer.luac:6: in function ‘measure’
…/server/static_scenario/static_scenario_service**.lua**c:34: in function ‘reveal_region’

that means that they are more likely in the luac files right?


looking at that error again, it looks like the problem is coming from the ore vein files, could you perhaps upload the mod so i could take a quick peak at it and see if i can find anything out of place? (10.1 KB)

1 Like

i can’t seem to find anything wrong, but that might be because i’m tired, so now i’ll let drotten handle this. :wink:

are you saying u added to your stonehearth and u didnt get the error

no i got the error, i just couldn’t find the cause of the error because of my limited code knowledge.

ok so i has to be the resource mod then hhmmm…

1 Like

It looks like I have introduced some error into the resource_mod example files when I wrote them up. They are based on an example which absolutely does work, so now I just have to figure out what I did that makes this version not work >.>

Note: It’s the same error as I had once when I was first learning how to do this, caused by a typo. Sometimes typos are not easy to find >.>
Edit: All the files still validate as correct on JSON Lint ( seems to have lost its domain name currently).


The error lies within shinyrock_vein.json, basically just change "shinyrock_KIND" to "shinyrock".
I’m not exactly sure why it would give an error there, but I’m guessing that the "kind" value has to match what’s available in "block_types" within terrain_block.json. (Maybe that’s the same kind of error you got before, @Tuhalu?)

I just want to mention something concerning the discussion about getting errors from lua code.

Since the lua scripts are reading from the json files, they are then expecting to get a kind of value from a specific key. And so if the key doesn’t exist or it does but it has the wrong kind of value, then the lua file will give an error saying that something went wrong.

The json files don’t actually know themselves what sort of keys or values they are supposed to contain, so they can’t give out any errors themselves. They can only tell you if the syntax for json is correct.

So, in short, even if the error logs come from lua scripts, the error itself might originate from a json file that they are reading from.


That’s obnoxious!

I suspect this happened because the block_type and kind defined for all of Radiant’s veins is the same. So how would anyone know what is what?

Edit: It turns out that the biomes file uses the block_type name instead of the kind as well. Go figure. Anyway, I updated the tutorial with a working RESOURCE_MOD file.

Edit2: Thanks for finding that btw Drotten. I was not going to find something so counterintuitive >.<