# Harvest an pile get its resources in a certain order

**URL:** <https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435>\
**Category:** Modding\
**Created:** [October 24, 2018, 10:07am UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435 "2018-10-24T10:07:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Minofuri](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/minofuri/32/61795_2.png) [@Minofuri](https://discourse.stonehearth.net/u/Minofuri)\
**Post date:** [October 24, 2018, 10:07am UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435/1 "2018-10-24T10:07:00Z")

</div>

I want to know if it is possible that by harvesting an object I can define in which order the items will appear.

For example I want to harvest a stone pile and the first 5 resources that will fall from is stone and the last 1 log.

-----FR-----  
j’aimerais savoir si c’est possible quand on récolter un tas de bois qu’on puisse définir l’ordre dans lequel les ressources son extrait.

Par exemple : j’ai un tas de bois et j’aimerais que les 5 premiers items, soient extrait soit du bois mais que le 6e soit du fer et le 7e de l’or. Après cela le tas de bois disparaît, comme pour les arbres.

---

<div class="post-metadata">

**Author:** ![BrunoSupremo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/brunosupremo/32/54819_2.png) [@BrunoSupremo](https://discourse.stonehearth.net/u/BrunoSupremo)\
**Post date:** [October 25, 2018, 12:51pm UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435/2 "2018-10-25T12:51:47Z")

</div>

I think the closest you can get to this is to add both a resource\_node and a loot\_drops components. The resource node will be the first items to drop while the worker is harvesting it, and when it finishes, the lootdrop will drop the other item.

---

<div class="post-metadata">

**Author:** ![Relyss](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/relyss/32/41785_2.png) [@Relyss](https://discourse.stonehearth.net/u/Relyss)\
**Post date:** [October 25, 2018, 2:05pm UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435/3 "2018-10-25T14:05:55Z")

</div>

I think you can also use a “resource\_loot\_table” inside the resource\_node / renewable\_resource\_node component (which would be just like any other Loot table):

```auto
"stonehearth:renewable_resource_node": {
   "resource": "silent_woods:resources:biolumin_essence:essence",
   "category": "harvest",
   "renewal_time": "22h+2h",
   "unripe_description": "i18n(silent_woods:entities.nightdew.unripe_description)",
   "harvest_overlay_effect": "stonehearth:effects:harvest_plant_overlay_effect",
   "resource_loot_table": {
      "entries": {
         "first_entry": {
            "num_rolls": {
               "min": 1,
               "max": 1
            },
            "items": {
               "an_extra_item": {
                  "uri": "stonehearth:resources:herb:brightbell",
                  "weight": 1
               }
            }
         },
         "second_entry": {
            "num_rolls": {
               "min": 3,
               "max": 3
            },
            "items": {
               "seed": {
                  "uri": "silentwood:plants:nightdew:seed",
                  "weight": 1
               }
            }
         }
      }
   }
}

```

---

<div class="post-metadata">

**Author:** ![DaniAngione](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/daniangione/32/63425_2.png) [@DaniAngione](https://discourse.stonehearth.net/u/DaniAngione)\
**Post date:** [October 25, 2018, 11:52pm UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435/4 "2018-10-25T23:52:42Z")

</div>

That however will make those loots drop alongside/randomly with the resource node collection, no? For example, for trees, every chop has also a chance to drop a seed.  
Bruno’s suggestion is interesting because it allows the item to follow some sort of order although not really complex (just a certain item after the resources themselves have been collected 😛 and the item disappears)

Since it is basically loot from death/destruction, however, it would only work with non renewable resources.

For the very specific purpose of the OP - several different resources in a specific order - I’m afraid it would require a new component ☹

---

<div class="post-metadata">

**Author:** ![Relyss](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/relyss/32/41785_2.png) [@Relyss](https://discourse.stonehearth.net/u/Relyss)\
**Post date:** [October 26, 2018, 4:24pm UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435/5 "2018-10-26T16:24:04Z")

</div>

You’re right, that was with every chop 🤔  
It can be done that the chance is 100% but that would drop them all at the same time, not every resource in a specific order.

---

<div class="post-metadata">

**Author:** ![Minofuri](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/minofuri/32/61795_2.png) [@Minofuri](https://discourse.stonehearth.net/u/Minofuri)\
**Post date:** [October 26, 2018, 4:53pm UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435/6 "2018-10-26T16:53:41Z")

</div>

ok I’ll experiment on my side and I’ll tell you if it worked

---

<div class="post-metadata">

**Author:** ![Minofuri](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/minofuri/32/61795_2.png) [@Minofuri](https://discourse.stonehearth.net/u/Minofuri)\
**Post date:** [October 26, 2018, 7:42pm UTC](https://discourse.stonehearth.net/t/harvest-an-pile-get-its-resources-in-a-certain-order/38435/7 "2018-10-26T19:42:11Z")

</div>

after what try I can not do like BrunoSupremo  
said. where I was wrong, I can not find

when I do it’s only giving me one of each. and not 18 of one and 1 of the other

```
"stonehearth:resource_node": {
     "task_group_name": "stonehearth:task_group:harvest",
     "resource": "stonehearth:refined:cloth_bolt",
     "harvest_overlay_effect": "stonehearth:effects:mine_overlay_effect",
     "harvester_effect": "mine",
     "description": "chop_tree",
     "durability": 18
	 },
"stonehearth:loot_drops": {
     "entries": {
        "default": {
           "num_rolls": {
              "min": 1,
              "max": 1
           },
           "items": {
              "a_container": {
                 "uri": "age_of_giant-piles:container:a_container",
                 "weight": 1
              }
           }
        }
     }
  }
```
