MichalD96 / Perico-heist-goods-counter

MIT License
8 stars 3 forks source link

Weed has more bag_capacity_steps than pickup_steps #7

Closed adwitkow closed 2 years ago

adwitkow commented 2 years ago

https://github.com/MichalD96/Perico-heist-goods-counter/blob/d1b8637637ac9e82901775b166cb61870bcce2db/data/targets.json#L36 https://github.com/MichalD96/Perico-heist-goods-counter/blob/d1b8637637ac9e82901775b166cb61870bcce2db/data/targets.json#L37

For every other secondary target the amount of steps match.

I'm not sure if this is correct. From my experience it seems like 10 clicks is enough to pick up the whole stack (which would sum up to 37.5% and not 35% like the website is showing). image It's possible that I have no idea what I'm talking about, though :) In which case I would greatly appreciate some additional explanations as to how the pickup system works exactly and where you got these pickup step values from (I would love to see the source for myself).

MichalD96 commented 2 years ago

Yes, you are absolutely right that weed bag is 37.5%, but all values on the website are rounded down due to a little bug in game. The easiest is to show that bug on coke bag. When you collect 1 stack of coke (10 clicks), it fills the bar in right down corner in 45%, however when you pick up second stack of coke it fills the bag in 100%. It is impossible to make precise counter, because this bug is the bigger the more you mix secondary targets in your bag, and bug multiplies by amount of players. Also in some cases you can fill your bag in 105% when you pick up gold as last target, and you already have weed and coke in your bag. All values in targets.json are directly from game files, and seems you found the bug, i need to check this values again, because it is impossible to have 11 pickup steps, i messed something up. 🤔

Edit: i removed additional value in bag capacity steps

adwitkow commented 2 years ago

Cool! Thanks for the explanation. I think I'm getting the hang of this.

Though, are you sure that weed is correct now? It's showing 11 clicks for me at the moment: image

MichalD96 commented 2 years ago

I am still testing different precision levels, and i think i will come back to previous settings. The problem is i set full bag as 100%, in game it is 1800 units, and R* can change it any time. In case of this 11 clicks, usually when i play with friends we take amount of players -1 more clicks on last target from the list, and it works perfectly. 4 players +3 clicks 3 players +2 clicks 2 and 1 player +1 click

This precision change should fix it, but i see it still doesn't work in every case. I need to rewrite the counter with current information i have from the game, because adding targets to 100% bag capacity was a bad idea.

adwitkow commented 2 years ago

I wish I had better understanding of this system - I would love to contribute. I will play around with the calculator when heisting with my friends and if I find a way to improve it, I will create a PR.

Anyway, I guess I should close this issue since the difference is by design. Thanks for the explanations!