wchill / bindingofisaac

binding of isaac related stuff
1 stars 1 forks source link

Calculator generates incorrect recipes for some seeds #1

Closed wchill closed 2 years ago

wchill commented 3 years ago

example: https://www.reddit.com/r/bindingofisaac/comments/r3d0vx/bag_of_crafting_calculator_for_nintendo_switch/hmbqis5/

wchill commented 3 years ago
SEED: ffqdxrfg

[ Bomb
  Bomb
  Bomb
  Penny
  Key
  Key
  Dime
  Dime ]
(total 21, ★★☆☆-★★★☆) -> Eye Drops (id 600 ★★★☆)

but actually generates Voodoo Head (id 599)

wchill commented 3 years ago
SEED: t0kg01zf

[ Dime
  Bomb
  Bomb
  Penny
  Penny
  Penny
  Penny
  Golden Bomb ]
(total 20, ★★☆☆-★★★☆) -> Stigmata (id 138 ★★☆☆)

but actually generates 9 Volt (116). [Penny, Penny, Penny, Dime, Heart, Soul Heart, Key, Bomb] worked fine though

wchill commented 3 years ago
SEED: t0kg01zf

[ Bomb
  Bomb
  Red Heart
  Red Heart
  Soul Heart
  Soul Heart
  Nickel
  Nickel ]
(total 20, ★★☆☆-★★★☆) -> Steam Sale (id 64 ★★☆☆)

but actually generates Pentagram (id 51)

hailsaturn commented 2 years ago

I'm consistently getting incorrect results trying to cheese for Eden's Blessing.

Examples:

SEED: 7bvmyw7d

[ Red Heart
  Red Heart
  Soul Heart
  Soul Heart
  Penny
  Nickel
  Nickel
  Key ]
(total 19, ★★☆☆-★★★☆) -> Eden's Blessing (id 381 ★★★☆)

But actually generates Host Hat (id 375)

SEED: g0rgkxtq

[ Red Heart
  Red Heart
  Soul Heart
  Soul Heart
  Soul Heart
  Nickel
  Bomb
  Bomb ]
(total 21, ★★☆☆-★★★☆) -> Eden's Blessing (id 381 ★★★☆)

But actually generates Host Hat (id 375)

SEED: g0rgkxtq

[ Soul Heart
  Soul Heart
  Penny
  Nickel
  Bomb
  Bomb
  Bomb
  Bomb ]
(total 20, ★★☆☆-★★★☆) -> Eden's Blessing (id 381 ★★★☆)

But actually generates Host Hat (again)

SEED: g0rgkxtq

[ Soul Heart
  Soul Heart
  Soul Heart
  Soul Heart
  Soul Heart
  Soul Heart
  Soul Heart
  Penny ]
(total 29, ★★★☆-★★★★) -> Eden's Blessing (id 381 ★★★☆)

But actually generates Teleport 2.0 (id 419)

SEED: dg9wm41b

[ Soul Heart
  Soul Heart
  Soul Heart
  Penny
  Penny
  Bomb
  Bomb
  Bomb ]
(total 20, ★★☆☆-★★★☆) -> Eden's Blessing (id 381 ★★★☆)

But actually generates Host Hat (id 375)

SEED: dg9wm41b

[ Red Heart
  Nickel
  Nickel
  Nickel
  Nickel
  Nickel
  Bomb
  Bomb ]
(total 20, ★★☆☆-★★★☆) -> Eden's Blessing (id 381 ★★★☆)

But actually generates Restock (id 376)

Not just Eden's blessing. Tried a random arrangement:

SEED: dg9wm41b

[ Soul Heart
  Penny
  Nickel
  Nickel
  Nickel
  Nickel
  Bomb
  Bomb ]
(total 21, ★★☆☆-★★★☆) -> Car Battery (id 356 ★★★☆)

But actually generates Wooden Nickel (id 349)

SEED: dg9wm41b

[ Red Heart
  Nickel
  Nickel
  Nickel
  Nickel
  Dime
  Bomb
  Bomb ]
(total 22, ★★☆☆-★★★☆) -> Capricorn (id 307 ★★★☆)

But actually generates Taurus (id 299)

I should say: most other items are being generated correctly. But I'm yet to successfully generate Eden's Blessing (I'm about 10 seeds deep; only started writing them down for the last 3). And Eden's Blessing is unlocked.

wchill commented 2 years ago

@hailsaturn Thanks, this helps a lot. As I expected, the actually generated ID is always less than the one predicted, which seems to confirm one of two things (if not both):

The info on Eden's Blessing helps a lot because of how big that range is (20-29 total points). I'll take another look at this this weekend.

Kirillabaskin commented 2 years ago

@wchill, hi. As i see, this project looks little bit dusty. I'm not so good python dev, but if you would point on LoC which causing problems, maybe i might be helpfull

wchill commented 2 years ago

@Kirillabaskin there's no specific line of code that's causing issues.

@hailsaturn I'm attempting to emulate this function using Unicorn to generate some proper test cases. Will report back once I have this working. Currently I have something extremely hacky, but I need to emulate calls to ItemConfig::GetCollectible() and ItemPool::GetPool().

wchill commented 2 years ago

image

Kirillabaskin commented 2 years ago

@wchill I founded that QUALITY_RANGES has mistakes in configuration Like for quality of pickups equal 19 there can be items of quality 1. Now it includes only items of quality 2 and 3

Kirillabaskin commented 2 years ago

And now it works !!!!!! I fixed configuration of QUALITY_RANGES and it works for all my test cases. YEAH!!!!

wchill commented 2 years ago

@Kirillabaskin can you give me the corrected ranges? I will verify against the binary.

Kirillabaskin commented 2 years ago

Sorry, i tried to make pr but forgot about forking your repo.

QUALITY_RANGES = [ (0, 0, 1), (9, 0, 2), (15, 1, 2), (19, 1, 3), (23, 1, 4), (27, 2, 4), (31, 3, 4), (35, 4, 4), ]

wchill commented 2 years ago

Ah, that is a very nice catch. I'll write unit tests and push a new version soon.

wchill commented 2 years ago

Looks like it works now, going to close this.

segthegamer commented 2 years ago

Hi! my girlfriend is asking if you know when will you be updating this mod to version 1.6? Thanks!

air-dex commented 2 years ago

I have found an error:

Et0san commented 1 year ago

Platform : PC (last steam ver.) SEED: J73Y1RSC

[ Bomb Bomb Bomb Penny Red Heart Red Heart Red Heart Red Heart ]

generates Dataminer instead of Clicker.

Issac123835 commented 1 year ago

Platform : Switch version v1.7 SEED: J73Y1RSC

[ Red Heart Blue Heart Coin Coin Bomb Bomb Bomb Dime]

generates Sharp Plug instead of Fanny Pack.

Zephies90 commented 8 months ago

Seed ZFWM VLBM platform version 1.7

{Bomb Bomb Bomb Soul Heart Soul Heart Soul Heart Nickel Nickel}

Supposed to be Book of Sin instead generates Super Bandage