Reworked Item Groups:
I wanted to make things easier for myself by creating some generic item groups for new maptiles. That way I wouldn’t have to make huge lists of items for every maptile. But I ended up reworking the item_groups.json and making way way more work for myself, and spending more time, than I’ll ever save in the future. So that sucked. But hopefully it will at least help other people.
>First, the weights have been (kinda) regularized:
Distributions are now in a 1-100 range. 1= very rare. 50=average item. 100=very common. Some really common items/groups are set above 100 to make them show up with the right frequency; I generally put those at the top of the lists for visibility.
That should help modders, because when you add new items to existing item groups, you will know more or less what to expect. You should still look at the item groups, however, and keep in mind that the size of the group affects frequency. Like if you set an item to 10 hoping it won’t show often, but it’s on a list with only two other items set at 50, then it won’t be as rare as you might expect. A 1-100 range should also help rare items stay rare. Before items set to 1 were often on lists with a ranges of like 1-5 or 1-7, making them show up fairly often.
>Second, item_groups.json is split into three files.
The first and second files are for categories of items, the third for is specific locations. The specific lists can/should pull from the categorical lists. There are two benefits to this. First, if you add a new item, you can just add it to the primary lists and not worry about the secondary ones. If you add new type of submachine gun, just add it to ‘smg’ and that’s it. You won’t have to scour the dozens of groups and add it in every possible place you want your new gun to show up. Conversely, if you add a new location, any items people make later on will automatically show up there without the need to update those item groups.
The second benefit is that it lets you tailor item groups for locations without making a huge ass, mostly redundant, list. For example, this is the item group for ‘kitchen’:
{
"type" : "item_group",
"id" : "kitchen",
"subtype": "distribution",
"entries" : [
{ "group": "kitchen_tools", "prob": 200 },
{ "group": "lighting_tools", "prob": 20 },
{ "group": "dining_tools", "prob": 100 },
{ "group": "fire_tools", "prob": 20 },
{ "group": "alcohol_wine", "prob": 25 },
{ "group": "alcohol_beer", "prob": 25 },
{ "group": "cleaning", "prob": 50 },
{ "group": "fruit", "prob": 40 },
{ "group": "vegetables", "prob": 60 },
{ "group": "irradiated_fruit", "prob": 5 },
{ "group": "irradiated_vegetables", "prob": 5 },
{ "group": "perishable_food", "prob": 30 },
{ "group": "imperishable_food", "prob": 100 },
{ "group": "canned_food", "prob": 100 },
{ "group": "condiments_spices", "prob": 50 },
{ "group": "cookbooks", "prob": 50 },
{ "item": "dogfood", "prob": 5 },
{ "item": "catfood", "prob": 5 }
]
}
If you wanted to make an alternate kitchen for trailer parks, you could modify it like this:
{
"type" : "item_group",
"id" : "kitchen_lowclass",
"subtype": "distribution",
"entries" : [
{ "group": "kitchen_tools", "prob": 200 },
{ "group": "lighting_tools", "prob": 20 },
{ "group": "dining_tools", "prob": 100 },
{ "group": "fire_tools", "prob": 20 },
{ "group": "alcohol_hobo", "prob": 45 },
{ "group": "cleaning", "prob": 30 },
{ "group": "local_fruit", "prob": 20 },
{ "group": "junkfood", "prob": 80 },
{ "group": "candy", "prob": 30 },
{ "group": "vegetables", "prob": 20 },
{ "group": "perishable_food", "prob": 30 },
{ "group": "imperishable_food", "prob": 80 },
{ "group": "canned_food", "prob": 80 },
{ "group": "condiments_spices", "prob": 50 },
{ "group": "legal_drugs", "prob": 45 },
{ "item": "dogfood", "prob": 5 },
{ "item": "catfood", "prob": 5 }
]
}
And for mansion kitchens:
{
"type" : "item_group",
"id" : "kitchen_highclass",
"subtype": "distribution",
"entries" : [
{ "group": "kitchen_tools", "prob": 200 },
{ "group": "lighting_tools", "prob": 35 },
{ "group": "dining_tools", "prob": 100 },
{ "group": "fire_tools", "prob": 20 },
{ "group": "alcohol_wine", "prob": 85 },
{ "group": "alcohol_hard", "prob": 45 },
{ "group": "cleaning", "prob": 50 },
{ "group": "fruit", "prob": 60 },
{ "group": "vegetables", "prob": 70 },
{ "group": "irradiated_fruit", "prob": 5 },
{ "group": "irradiated_vegetables", "prob": 5 },
{ "group": "perishable_food", "prob": 80 },
{ "group": "imperishable_food", "prob": 70 },
{ "group": "canned_food", "prob": 50 },
{ "group": "pasta", "prob": 60 },
{ "group": "condiments_spices", "prob": 70 },
{ "group": "cookbooks", "prob": 80 },
{ "item": "atomic_lamp", "prob": 10 },
{ "item": "atomic_coffeepot", "prob": 10 },
{ "item": "multicooker", "prob": 2 },
{ "item": "hat_chef", "prob": 10 },
{ "item": "jacket_chef", "prob": 10 },
{ "item": "veggy_salad", "prob": 35 },
{ "item": "brioche", "prob": 15 },
{ "item": "lutefisk", "prob": 5 }
]
}
That’s a lot easier than making a whole new list with literally hundreds of items on it.
>Third, used some of the new functionality.
Some cool new functionality has been added to the game, but a lot of the older item groups don’t reflect that. So I made a few changes, like applying damage to motors you find on the side of the road. You’ll still find V-6’s lying around, but now they’ll be old and rusty. Not a big deal, but kinda fun.
(This isn’t a normal mod, and it doesn’t go in the mod folder. Instead you have to remove item_groups.json , monster_drops.json , and map_extra_items.json from your json folder and replace them with these files. Inconvenient, but that was the simplest way to do it.)
https://mega.co.nz/#F!OYFwhZSS!dngSzgxAXfimGA5v3YeZpg
My main concern is that, since scavenging stuff is one of the core elements of the game, changing the loot tables will have far more of an affect on the game than intended. I really just sort of eyeballed the lists and made rough estimates, so if people want to adjust the distribution weights or probabilities later on, that would be fine by me.
lemme know what you think. I’ll clean it up and PR it later if people think it’s worth it.