Problem with my mod (solved)

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 (jsonlint.com seems to have lost its domain name currently).

2 Likes

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.

3 Likes

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 >.<

2 Likes

YAY!! ty guys works fine now

Agreed, it was (and still is) incredibly confusing and I only stumbled on it by changing all the names from shinyrock_KIND to only shinyrock.

Some renaming there would go a really long way, here’s hoping it happens sooner rather than later.


Glad you got it working, @xmmcxrockx. :blush:

2 Likes