Skip to content

Generate fewer refill special deals above market price#2418

Merged
fenhl merged 5 commits into
OoTRandomizer:Devfrom
fenhl:scam
Feb 19, 2026
Merged

Generate fewer refill special deals above market price#2418
fenhl merged 5 commits into
OoTRandomizer:Devfrom
fenhl:scam

Conversation

@fenhl
Copy link
Copy Markdown
Collaborator

@fenhl fenhl commented May 16, 2025

This adds a new check when placing items where if the item is placed in a special deal location and that location's price is at or above the item's market price, the price is rerolled once and the lower of the two values is used.

The idea is to counterbalance the limited usefulness of refill special deals (due to being one-time purchases), and to help reduce rupee farming a bit. It's done on a random basis rather than always picking a price below market for the following reasons:

  • The occasional scam can be funny and for non-rupee refills sometimes even useful depending on item placements
  • To not affect balancing too much
  • Doing it this way makes it easier to follow the “Shopsanity Prices” setting

The “market price” of an item is defined as follows:

  • For rupees, the value of the rupee itself.
  • For refills that are also available as repeatable purchases in shops (or from business scrubs), the lowest available price.
  • Other items don't have defined market prices, so they're not affected by this change. This is both to avoid issues with logic and since finding consensus “market prices” for major items seems difficult.

Closes #1987.

Testing

This has not yet been tested. A good way to test this might be to use ootrstats to categorize item prices and compare the price distributions on Dev and this branch. See #2418 (comment).

@fenhl fenhl added Type: Enhancement New feature or request Component: Algorithm Search, Fill, Playthrough, etc Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested labels May 16, 2025
@fenhl

This comment was marked as resolved.

@fenhl fenhl added the Status: Waiting for Author Changes or response requested label Jul 17, 2025
@fenhl fenhl removed the Status: Waiting for Author Changes or response requested label Aug 25, 2025
@fenhl
Copy link
Copy Markdown
Collaborator Author

fenhl commented Oct 4, 2025

Tested this and the average price across all special deals goes from 98.527 rupees to 89.846 on the default 0–300 betavariate price distribution (sample size: 16384 seeds), so I'd say that confirms it's working.

@fenhl fenhl removed the Status: Needs Testing Probably should be tested label Oct 4, 2025
Comment thread World.py
@cjohnson57 cjohnson57 removed the Status: Needs Review Someone should be looking at it label Feb 18, 2026
@fenhl fenhl added this to the next milestone Feb 19, 2026
@fenhl fenhl merged commit 4de3236 into OoTRandomizer:Dev Feb 19, 2026
3 checks passed
@fenhl fenhl deleted the scam branch February 19, 2026 20:00
@geekley
Copy link
Copy Markdown

geekley commented Feb 19, 2026

The “market price” of an item is defined as follows:

  • For refills that are also available as repeatable purchases in shops (or from business scrubs), the lowest available price.

Does that "lowest available price" refer to vanilla prices or to whatever was assigned by the rando as the lowest price across all repeatable purchases?
Or to rephrase my question, why are there (vanilla?) market prices hard-coded for the refill items? Is it just an "initial" market price (sorry I don't understand this code)? Or a constant that will make it so special deal prices in general will tend downwards to vanilla prices, instead of special deals tending downwards to lowest rando-assigned repeatable prices?

@flagrama
Copy link
Copy Markdown

Repeatable purchases are the vanilla items already in the game. Changing the actual store item prices isn't something rando normally does. Some stores have different prices for them in vanilla, this code has decided the lowest of these values is the one to use for checking special deal prices against.

Not looking at the code too hard, I think this means for special deal refills the average price will trend downwards because if the first randomly rolled price is above the market price it will be re-rolled and the lower value used (even if it is still above the market price)

@geekley
Copy link
Copy Markdown

geekley commented Feb 19, 2026

Oh really? I thought Shopsanity would randomize repeatable purchase prices too, not just special deals and placement. I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Algorithm Search, Fill, Playthrough, etc Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting "No very obvious scams" in Shopsanity

4 participants