# Looking for some advice on how tree drop rates work

**URL:** https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120
**Category:** The Lab
**Created:** [August 6, 2018, 2:53pm UTC](https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120 "2018-08-06T14:53:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Nymall1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/nymall1/32/2865_2.png) [@Nymall1](https://discourse.cataclysmdda.org/u/Nymall1)
#### Post date: [August 6, 2018, 2:53pm UTC](https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120/1 "2018-08-06T14:53:21Z")

</div>

So, after doing some research, I found a species of coffee tree that survives in Eastern Canada. Since new england is not that different from Eastern Canada in terms of climate, it seems like it would be a good fit. The variety is the Kent tree(See here: [https://www.greenbarnnursery.ca/products/black-locust](https://www.greenbarnnursery.ca/products/black-locust)) which provides roastable bean pods as well as leaves that can be used to brew tea(here is a sample product: [https://www.wizemonkey.com/pages/coffee-leaf](https://www.wizemonkey.com/pages/coffee-leaf)).

Adding these seems like a fairly straight-forward task, however I can’t quite figure out how to get multiple drops out of a harvest option for a tree. Any advice? I’d perfer not to take the ‘seed’ route, as it is a tree.

Thank you!

---

<div class="post-metadata">

### Author: ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)
#### Post date: [August 6, 2018, 3:12pm UTC](https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120/2 "2018-08-06T15:12:22Z")

</div>

apples trees and blueberry bushes both use harvest\_ter\_nectar as their examine\_action, and t\_shrub\_blueberry defines the harvest as:

```
"harvest_by_season" : [
    {
        "seasons": ["summer"],
        "entries": [
            {
                "drop": "blueberries",
                "base_num": [2, 5],
                "scaled_num": [0, 0.5]
            },
            {
                "drop": "seed_blueberries",
                "base_num": [1, 2],
                "scaled_num": [0, 0.25]
            }
        ]
    }
]

```

it looks like you want a list [] of an object {} with fields “seasons” (which is a list [] of string season names) and “entries”.  
“entries” is a list [] of objects {}, with each object having fields “drop”, “base\_num”, and “scaled\_num”. drop is a string of the item id that the player should get when harvesting the tree.

what are you defining for your harvest\_by\_season?

---

<div class="post-metadata">

### Author: ![Nymall1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/nymall1/32/2865_2.png) [@Nymall1](https://discourse.cataclysmdda.org/u/Nymall1)
#### Post date: [August 12, 2018, 8:04am UTC](https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120/3 "2018-08-12T08:04:35Z")

</div>

So, here is my JSON for the coffee tree:

```
{
    "type" : "terrain",
    "id" : "t_tree_coffee",
    "name": "coffee tree",
    "description": "This is 'gymnocladus dioicus', or the kent coffee tree, which produces roastable coffee pods and brewable leaves in the fall. If you examined the branches more closely, you could probably find a few mature ones. You could also cut it down with the right tools.",
    "symbol": "7",
    "color": ["light_green", "light_green", "light_green_green", "brown"], "//": "barren in winter, fruits in autumn",
    "move_cost": 0,
    "flags": ["FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "TREE", "REDUCE_SCENT"],
    "transforms_into": "t_tree_coffee_harvested",
    "examine_action": "harvest_ter_nectar",
    "harvest_by_season" : [
        { "seasons": ["autumn"], "entries": [{ "drop": "coffee_pod", "base_num": [ 2, 5], "scaled_num": [0, 0.5] } ] }
    ],
    "bash": {
        "str_min": 80, "str_max": 180,
        "sound": "crunch!",
        "sound_fail": "whack!",
        "ter_set": "t_dirt",
        "items": [
            { "item": "stick_long", "count": [3, 10] },
            { "item": "splinter", "count": [10, 25] }
        ]
    }
}

```

I get a guarenteed drop of at least 4 coffee pods, but in all my tests I’m yet to get a drop of tea leaves, and they should be dropping in equal parts. Am I doing something wrong here?

---

<div class="post-metadata">

### Author: ![Nymall1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/nymall1/32/2865_2.png) [@Nymall1](https://discourse.cataclysmdda.org/u/Nymall1)
#### Post date: [August 12, 2018, 8:05am UTC](https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120/4 "2018-08-12T08:05:17Z")

</div>

AAAAAGH. I forgot to save the file in notepad++. Well, that explains that.

---

<div class="post-metadata">

### Author: ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)
#### Post date: [August 12, 2018, 12:15pm UTC](https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120/5 "2018-08-12T12:15:33Z")

</div>

```auto
 "harvest_by_season" : [
        { "seasons": ["autumn"], "entries": [
             { "drop": "coffee_pod", "base_num": [2, 5], "scaled_num": [0, 0.5] }
        ] }
    ],

```

I don’t see tea\_raw in the drop at all. It should be:

```auto
 "harvest_by_season" : [
        { "seasons": ["autumn"], "entries": [
             { "drop": "tea_raw", "base_num": [2, 5], "scaled_num": [0, 0.5] },
             { "drop": "coffee_pod", "base_num": [2, 5], "scaled_num": [0, 0.5] }
        ] }
    ],

```

Also, I have it formatted wrong so it’s easier to see what’s going on, so you’d want to reformat it correctly.  
Finally, I’m evangelizing the new “looks\_like” fields - if you add

```auto
"looks_like": "t_tree_plum",

```

then any tileset that doesn’t have a tile for t\_tree\_coffee will use the tile for t\_tree\_plum to represent the coffee tree. It’s not a perfect solution to the issue of missing tiles, but it’s the reason why all the new dog variants use the dog tile on Chesthole, even though Chesthole hasn’t been updated since long before the dog variants were added.

---

<div class="post-metadata">

### Author: ![Nymall1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/nymall1/32/2865_2.png) [@Nymall1](https://discourse.cataclysmdda.org/u/Nymall1)
#### Post date: [August 13, 2018, 3:25am UTC](https://discourse.cataclysmdda.org/t/looking-for-some-advice-on-how-tree-drop-rates-work/16120/6 "2018-08-13T03:25:28Z")

</div>

Sorry for the slow reply - I have updated the PR. When I made the first save, I had not completed the harvest\_by\_season field - I updated it with tea, merged the commit, and then tested the JSON(Forgetting to save the file). It wasn;t till after I saw it here that I realized the dumb mistake. 😛

Thank you! The PR uses looks\_like on a code review suggestion both for the new seed pod and the trees.
