Thought I had things down, but after making my item file for my broken anamatronics I the debug: error loading data from json: data/mods//anamatronics/melee.json line 1:1: expected object or array but found ’ ’
Mod folder laylout looks like this, if this matters:
Code for the melee.json is:
[
{
"type":"GENERIC",
"id": "broken_animatronic_fox",
"symbol": "%",
"color": "red",
"name": "broken animatronic fox",
"category": "other",
"description": "A broken animatronic fox. Much less threatening now that it won't be calling for backup. Could be gutted for parts.",
"price": 1000,
"material": ["steel", "plastic"],
"weight": 17023,
"volume": 30,
"bashing": 10,
"cutting": 6,
"to_hit": -2
},
{
"type":"GENERIC",
"id": "broken_animatronic_bunny",
"symbol": "%",
"color": "blue",
"name": "broken animatronic bunny",
"category": "other",
"description": "A broken animatronic bunny. Much less threatening now that it won't be calling for backup. Could be gutted for parts.",
"price": 1000,
"material": ["steel", "plastic"],
"weight": 17023,
"volume": 30,
"bashing": 10,
"cutting": 6,
"to_hit": -2
},
{
"type":"GENERIC",
"id": "broken_animatronic_chicken",
"symbol": "%",
"color": "yellow",
"name": "broken animatronic chicken",
"category": "other",
"description": "A broken animatronic chicken. Much less threatening now that it won't be calling for backup. Could be gutted for parts.",
"price": 1000,
"material": ["steel", "plastic"],
"weight": 17023,
"volume": 30,
"bashing": 10,
"cutting": 6,
"to_hit": -2
},
{
"type":"GENERIC",
"id": "broken_animatronic_bunny",
"symbol": "%",
"color": "brown",
"name": "broken animatronic bear",
"category": "other",
"description": "A broken animatronic bear. Much less threatening now that it won't be calling for backup. Could be gutted for parts.",
"price": 1000,
"material": ["steel", "plastic"],
"weight": 17023,
"volume": 30,
"bashing": 10,
"cutting": 6,
"to_hit": -2
You aren’t adding new square brackets to the melee.json file are you?
Just insert the stuff within the curly brackets (curly brackets too) inside the existing structure (make sure you put your commas in the right places).
I just re-read and noticed you’re creating a separate melee.json in your mod directory. I’m not sure how that will interact with the extant main melee.json file. Try renaming the file itself (to something like main.json) and using your original file contents (i.e. your OP).
I originally had it like that, I changed the name to melee when I had the error thinking it needed to have that name to work. At any rate, I just tested that again just in case and got the same error.
I just looked at a item mod from a newer experimental build. The order of “id” and “type” are reversed, could that be it?
Just from looking at the contents of the broken file, I can’t see what would be wrong with it.[/quote]
I can’t figure it out either, but keep getting the: error loading data from json: data/mods//anamatronics/melee.json line 1:1: expected object or array but found ’ ’
Not sure what else to do, I got to get it to work though or else I’ll keep getting that debug pop up when I kill them about not having the broken body defined
Something inherently wrong in the dead_animatronics.json file itself, possibly bad newlines; I made a fresh .json and copied the contents inside and it loaded fine.
Bugs were a duplicated ID (not the root problem though) and some common copy/paste errors.
By the by, what program are you using to edit your .jsons?