# Where's my money? Bulk trading with Broker in Refugee Camp

**URL:** <https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521>\
**Category:** The Garage\
**Created:** [December 17, 2020, 11:07pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521 "2020-12-17T23:07:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Blay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/paul_blay/32/6803_2.png) [@Paul\_Blay](https://discourse.cataclysmdda.org/u/Paul_Blay)\
**Post date:** [December 17, 2020, 11:07pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/1 "2020-12-17T23:07:42Z")

</div>

When you deliver ‘food supplies’ to the Broker in the Refugee camp he says how much he’s giving you for them and … according to the definition of the effect ‘u\_bulk\_trade\_accept’ … I should get the Free Merchant’s trading script to that value.

> [@](#):
>
> `u_bulk_trade_accept`  
> `npc_bulk_trade_accept` | Only valid after a `repeat_response`. The player trades all instances of the item from the `repeat_response` with the NPC. For `u_bulk_trade_accept`, the player loses the items from their inventory and gains the same value of the NPC’s faction currecy; for `npc_bulk_trade_accept`, the player gains the items from the NPC’s inventory and loses the same value of the NPC’s faction currency. If there is remaining value, or the NPC doesn’t have a faction currency, the remainder goes into the NPC’s `op_of_u.owed`.

But I don’t get anything? I just traded a whole lot of vinegar to him and should have been given $45 worth of merch. 😕

---

<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:** [December 18, 2020, 3:13am UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/2 "2020-12-18T03:13:08Z")

</div>

Known bug; I need to fix it. In the meantime, just debug in the Merch and my apologies.

---

<div class="post-metadata">

**Author:** ![Paul\_Blay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/paul_blay/32/6803_2.png) [@Paul\_Blay](https://discourse.cataclysmdda.org/u/Paul_Blay)\
**Post date:** [December 18, 2020, 4:51am UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/3 "2020-12-18T04:51:22Z")

</div>

Eh, don’t worry. It sort of cancels out with the overly generous merchant bug.

---

<div class="post-metadata">

**Author:** ![Maddremor](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maddremor](https://discourse.cataclysmdda.org/u/Maddremor)\
**Post date:** [December 18, 2020, 12:19pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/4 "2020-12-18T12:19:06Z")

</div>

Huh…  
And here I thought the broker had figured out that I’m only dealing mutant jerky and dehydrated lettuce.

---

<div class="post-metadata">

**Author:** ![Paul\_Blay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/paul_blay/32/6803_2.png) [@Paul\_Blay](https://discourse.cataclysmdda.org/u/Paul_Blay)\
**Post date:** [December 18, 2020, 12:36pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/5 "2020-12-18T12:36:33Z")

</div>

Nothing wrong with dehydrated lettuce. I make all my vegetable pies with dehydrated lettuce.

They’re like two slices of pastry surrounding empty air, but whatever.

---

<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:** [December 18, 2020, 3:24pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/6 "2020-12-18T15:24:31Z")

</div>

So now I’ve gone and looked at this bug, and it’s happening because the broker is valuing a Merch at $0 and skipping out on the loop where he actually gives you Merch. The part where he skips giving you Merch is correct; what I can’t figure out is why he isn’t valuing Merch at all.

---

<div class="post-metadata">

**Author:** ![Paul\_Blay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/paul_blay/32/6803_2.png) [@Paul\_Blay](https://discourse.cataclysmdda.org/u/Paul_Blay)\
**Post date:** [December 18, 2020, 3:35pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/7 "2020-12-18T15:35:40Z")

</div>

> [@mlangsdorf](#):
>
> The part where he skips giving you Merch is correct; what I can’t figure out is why he isn’t valuing Merch at all.

He must have realized that merch is just paper with some squiggles on it. It’s the same reason some nut jobs expect all fiat currencies to fail ‘any day now’.

---

<div class="post-metadata">

**Author:** ![Mantar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mantar/32/42_2.png) [@Mantar](https://discourse.cataclysmdda.org/u/Mantar)\
**Post date:** [December 18, 2020, 5:52pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/8 "2020-12-18T17:52:35Z")

</div>

To be fair to nutjobs, if people stop believing that piece of paper with squiggles on it is valuable, any such currency reallly could collapse overnight. But it generally requires some sort of catastrophic event that shakes people’s faith in the continued solvency of the issuing body.

---

<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:** [December 18, 2020, 8:27pm UTC](https://discourse.cataclysmdda.org/t/wheres-my-money-bulk-trading-with-broker-in-refugee-camp/25521/9 "2020-12-18T20:27:33Z")

</div>

You’d think.

So when I created the cool new `talker` infrastructure that will eventually let you have conversations with your car, your intelligent magic sword, and random bits of terrain, I forgot hook all the connections for the `value()` from the `npc` class up through `talker_npc`. Thus, `talker` was returning the default value of 0.

Fix submitted: [https://github.com/CleverRaven/Cataclysm-DDA/pull/46117](https://github.com/CleverRaven/Cataclysm-DDA/pull/46117)
