Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buying container with content is cheaper than buying only the content #49160

Closed
Salty-Panda opened this issue Jun 3, 2021 · 8 comments
Closed
Labels
<Bug> This needs to be fixed <Exploit> Unintended interactions or behavior, usually breaking how the game is balanced Items: Containers Things that hold other things Items / Item Actions / Item Qualities Items and how they work and interact NPC / Factions NPCs, AI, Speech, Factions, Ownership

Comments

@Salty-Panda
Copy link
Contributor

Salty-Panda commented Jun 3, 2021

Describe the bug

In the trade menu, items in containers are listed twice. Once themselves, once as the content of the container. Buying container is cheaper than buying items alone.

Steps To Reproduce

Find NPC who sells items in a container (spawn and sell packaged jerky?)
Observe the bugged price

Expected behavior

Buying items with container cost more than buying only the items

Screenshots

image
image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 2004
  • Game Version: 418b45d [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Bionic Professions [package_bionic_professions],
    Aftershock [aftershock],
    Blaze Industries [blazeindustries],
    Magiclysm [magiclysm],
    DinoMod [DinoMod],
    Crazy Cataclysm [crazy_cataclysm],
    No Rail Stations [No_Rail_Stations],
    Graphical Overmap [Graphical_Overmap],
    Graphical Overmap Magiclysm [Graphical_Overmap_Magiclysm],
    No Fungal Monsters [No_Fungi],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills]
    ]

Additional context

Already reported once in #46626 but was closed by @BrettDong, I guess they misread the issue since their comment was unrelated to what was written but I didn't particularly care to reopen this again until today saw this bug again.

@Salty-Panda Salty-Panda changed the title Buying items with the container is cheaper than buying only items Buying container with content is cheaper than buying only the content Jun 3, 2021
@actual-nh actual-nh added <Bug> This needs to be fixed <Exploit> Unintended interactions or behavior, usually breaking how the game is balanced Items / Item Actions / Item Qualities Items and how they work and interact Items: Containers Things that hold other things NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Jun 3, 2021
@Psiclops
Copy link

Psiclops commented Jun 4, 2021

Your screenshots do not support your theory. In both of those cases, the container plus the contents costs more than just the contents.
cheese (8) $1.03
plastic bag with cheese $7.40

3L jar with tomatos $10.67
tomatoes $0.94

@Salty-Panda
Copy link
Contributor Author

You forgot to multiply the values

@big-smitty
Copy link

Yeah on the first screenshot its $1.03 for one cheese, so should be $8.24 for 8 cheeses.
But the whole container and all the cheese is $7.40, so I think salty-panda is right

@actual-nh
Copy link
Contributor

@emomicrowave: Would #48922 help with this?

@big-smitty
Copy link

@emomicrowave: Would #48922 help with this?

No that was pushed on the 18th, problem is persistent on experimental 38074ba, released the 25th

@emomicrowave
Copy link
Contributor

emomicrowave commented Jun 7, 2021

No that was pushed on the 18th, problem is persistent on experimental 38074ba, released the 25th

Do experimentals include umerged pull requests? I don't think so.

But anyway, you're right that it doesn't work. My code just adds a check to disallow selling items out of sealed containers. Did some testing and when you examine the items in your inventory, the barter price is calculated correctly:

  • canned tomato (11) - Barter value $0.50 each = $5.50
  • 3L glass jar - Barter value $0.10
  • 3L glass jar > canned tomatoes - Barter value $5.60

However it when looking at the actual price, the 3L glass jar has a price of $0.00. Maybe that has something to do with the problem? That some containers such as the plastic bag and the 3L glass jar have a base price of 0? Is this intended?

@kierandavidmccormick
Copy link

Could not reproduce in the latest experimental 6502158. Testing with a variety of items (expensive, cheap, food, non-food) at both high and low skill levels at both the refugee center and exodii, I could not reproduce a discrepancy in price greater than one cent per item. This may have been fixed in #57660, or some other fix to trading between when this was opened and now.

@anothersimulacrum
Copy link
Member

If someone can reproduce, comment and I will reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed <Exploit> Unintended interactions or behavior, usually breaking how the game is balanced Items: Containers Things that hold other things Items / Item Actions / Item Qualities Items and how they work and interact NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

No branches or pull requests

7 participants