{
"type" : "item_group",
"id" : "jacket_stack",
"subtype": "collection",
"groups":[
["jackets", 30],
["jackets", 30],
["jackets", 30]
]
}
“jackets” is a core item group. I expected 0 to 3 jackets to appear on each “z” in my map, but I got as many as 20. Changing the chance to 100 in my terrain json makes it work as I expected. Also, if I do the same sort of thing with a distribution, everything works correctly.
Finally if I remove the chance from my declaration it behaves as though I gave it a 0 chance. Seems like it should be 100 by default.
I’m posting here instead of the github because it’s possible it’s mearly my understanding collections that is buggy.
On further digging, I’ve discovered that declaring item placement via the map characters always goes sideways if the chance isn’t 100%. I didn’t get any feedback here, but I’m fully confident this is a bug now, so I’ll be posting it on the github.
Thanks mugling. There are so many ways to write the same thing, and I’ve tried a lot of them. I avoided “place_loot” because “loot” didn’t sound like official terminology to me.
Maybe “loot” is the best term. The usage of “item” and “group” is haphazard. In the example above, “item” expects a group, and I couldn’t figure out how to actually declare an item in that format.
What syntax are you using to get place_loot to work?
"place_loot": {
"z": { "item": "jacket_stack", "chance": 80 }
}
Doesn’t work and I haven’t seen an existing json use it WITHOUT defining x,y coordinates…
So that’s what’s happening! Thanks for clearing up my confusion! That is extremely counter-intuitive. Essentially probability (“chance”) and quantity (“repeat”) have been combined into a single number. It’s usable but dangerous. A chance of 50 would typically give 0 to 2 items, but there’s a slim chance for much higher quantities.
@mugling: Any plans to deprecate old methods? I’m particularly fond of placing loot with a map key, but I’m not fond of making stuff that will stop working or cause problems.