• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Loot table parser

evilC

New member
I found one of these on GitHub, but it has not been touched in >5 years, and no longer did anyrhing useful.

So I spent an evening writing my own

There's no GUI yet, all it does is build two lists:

  1. ContainerItems: For each Container, which items could it possibly contain
    eg
    "oven": [
    "toolCookingPot",
    "toolCookingGrill",
    "resourceCoal",
    "foodRottingFlesh",
    "foodCharredMeat",
    "foodCanChicken",
    "foodCanMiso",
    "foodCanSoup",
    "foodCanPears",
    "foodCornMeal",
    "foodCanCatfood",
    "foodShamSandwich",
    "foodCanBeef",
    "foodCanChili",
    "foodCanDogfood",
    "foodCanSham",
    "foodCanLamb",
    "foodCanPasta",
    "foodCanPeas",
    "foodCanSalmon",
    "foodCanStock",
    "foodCanTuna",
    "resourceCropCoffeeBeans",
    "resourceCropGoldenrodPlant",
    "resourceCropChrysanthemumPlant",
    "foodCropBlueberries"
    ],


  2. ItemContainers: For each Item, which Container could it possibly spawn in
    eg
    Code:
      "foodCropBlueberries": [
        "cntBackpack",
        "oven",
        "cupboard",
        "cooler",
        "shamwayCrate",
        "foodPileSmall",
        "foodPileMed",
        "foodPileLarge"
      ],



No probabilities are calculated, I have not worked out how to decypher it. If anyone understands how to do this, then feel free to chip in

Here are the two files that it currently spits out (As of A20 b238) :

https://filebin.net/ma9dueaqfxv6xc9z

Source code

https://github.com/evilC/7DTD-Loot-Viewer

 
I have been doing more work on this project, and have a branch where I process loot.xml and built a tree of all the containers / lootgroups / items in it, along with the associated probability entries.

Again, still no UI, but if you are familiar with Visual Studio .NET apps, you can navigate the loot table tree using the de@%$#

The tree is built in such a way that you can traverse it in either direction (From a container down to an item, or from an item back up to the container) - here you can see me inspecting the ratchet - it is in two loot groups, and I have navigated up to the first one - groupToolsT2

image.png

I currently have nothing which actually calculates the probability of something dropping, but this at least paves the way to being able to process the data very quickly without having to touch the XML for each operation.

The branch is here if anyone wishes to have a play

Next task is to try and get it to at least gather all the data for a specific item given a specific loot level, so that I can later have a stab at trying to calculate probabilities

 
Last edited by a moderator:
The initial driver is for players to be able to answer the question "I really need item X - what is the best place to focus my efforts?"

ie it is intended to tell you which containers you need to be looking in to have the best chance of finding a certain item.

 
It's taken a bunch of work, but I finally think I am in a position to start trying to actually calculate probabilities

I have another thread going here where I am asking about how to calculate the probabilities - if anyone is interested in helping, please feel free to chime in

 
Really like the look of this, gonna check out the source code and see if I can get it running too.

I've dropped a question on the repo since it looks like you aren't too active here any more. Will chat here instead if you are though!

 
Back
Top