Custom Crate LootSolved

Hey!
How exactly do I set the custom loot tables for every crate? I used to have custom loot tables before the big update came, but now the crates have the default contents. 

I assume I can list some items in

"create loot items": []​

but I don't know the syntax and how to format it.

It works like this on my server:

"create loot items": [
{
"DisplayName": null,
"Shortname": "wood",
"SkinID": 0,
"MinAmount": 1250,
"MaxAmount": 2500
}

  ]

whatch out for the commas after each entry except the last.
in each entry you only set up shortname, minamount and maxamount... maybe skin, but i didn't fiddle with that so far.

if you have only one typo, the complete datafile will reset, so make backups

I don't have typos or anything, I just copied the entries from my data file I had so far:

{
   "Shortname": "pistol.semiauto",
   "MinAmount": 1,
   "MaxAmount": 1
},​

But that seems to be outdated too now. Thanks 👍

 



Merged post

Nevermind, it still doesn't work... Although I think I did everything right.
It doesn't reset the data file at least, because all the other stuff I added in there is working, like the NPC health, event names, hack timer, etc... It's just the loot tables for the crates that don't get applied ingame.

One loot table looks like this:

"create loot items": [
	{
	  "DisplayName": null,
	  "Shortname": "smg.mp5",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "ammo.pistol",
	  "SkinID": 0,
	  "MinAmount": 150,
	  "MaxAmount": 200
	},
	{
	  "DisplayName": null,
	  "Shortname": "rifle.ak",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 2
	},
	{
	  "DisplayName": null,
	  "Shortname": "ammo.rifle",
	  "SkinID": 0,
	  "MinAmount": 150,
	  "MaxAmount": 200
	},
	{
	  "DisplayName": null,
	  "Shortname": "jacket.snow",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "metal.facemask",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "metal.plate.torso",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "scrap",
	  "SkinID": 0,
	  "MinAmount": 500,
	  "MaxAmount": 750
	},
	{
	  "DisplayName": null,
	  "Shortname": "grenade.f1",
	  "SkinID": 0,
	  "MinAmount": 2,
	  "MaxAmount": 5
	},
	{
	  "DisplayName": null,
	  "Shortname": "guntrap",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "flameturret",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "supply.signal",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "supertea",
	  "SkinID": 0,
	  "MinAmount": 1,
	  "MaxAmount": 1
	},
	{
	  "DisplayName": null,
	  "Shortname": "metal.refined",
	  "SkinID": 0,
	  "MinAmount": 75,
	  "MaxAmount": 100
	},
	{
	  "DisplayName": null,
	  "Shortname": "metal.fragments",
	  "SkinID": 0,
	  "MinAmount": 800,
	  "MaxAmount": 1000
	},
	{
	  "DisplayName": null,
	  "Shortname": "diesel_barrel",
	  "SkinID": 0,
	  "MinAmount": 5,
	  "MaxAmount": 10
	}
	  ]​

I have four difficulties and every loot table looks like this (except other items of course). Is there an error in there? Because I can't find any.

Just checked my data config and the only difference i can see is my loot tables end with

"DisplayName": null,
"Shortname": "flamethrower",
"SkinID": 0,
"MinAmount": 1,
"MaxAmount": 1
}
]
},
{
"event display name)": "Hard",

I am not sure if it will make a difference but it works for me

"It doesn't reset the data file at least"

that sounds like there is no typo.... did you set  > "enable loot table": true,< ?

omg it was false. I'm stupid.
Thanks!

no problem, have fun :)

Locked automatically