Sabresite Posted July 24, 2017 Posted July 24, 2017 Thanks to @Kaphotics for pointing me in the right direction. I took the past few days to analyze the randomization mechanic for local events. I also figured out how offset 0x205 in WCFull is used. As we know in Gen 7 you can only receive a wondercard that you have not received before in the set. It turns out that 0x205 can determine the likelihood of which one you get. Every WC in the distribution set gets a base weight of 1 (even if set to 0). The wondercard gets added to a list the same number of times equal to the weight. So if the weight is 5, it gets added 5 times. This is akin to filling a jar of M&M's and picking one out at random. This has interesting ramifications (if it ever gets used). As we know, when offset 0x204 is equal to the number of WCs in the set (like eeveelutions), the player receives each WC uniquely once, and then subsequently receives one at random. This means that 0x205 determines how likely a person would be to get the "rare" WC again. if offset 0x204 is higher than the number of WCs in the set (like the anime pokes), then the player can only receive a total number of WCs equal to the number of WCs and cannot receive any duplicates. For example, if there are 3 WCs in the set, but 0x204 is set to 4, then you can only receive each WC once and no duplicates. if offset 0x204 is LOWER than the number of WCs in the set (we haven't seen this yet), then the player can only receive a total number of WCs equal to the counter. The likelihood of a pokemon increases as you receive them because the probably of the pokemon (presumably common ones) that were already received are not included in the total weight. So if there are 5 pokemon, 1, 10, 10, 10, 10, then the first time the rare is 1/41, while the next time it is 1/31, etc. And as an interesting note, it looks like the max number of wondercards in a distribution is 20 and the maximum weight is 255. That means the list can have up to 5,100 entries (20.4KB memory), and minimum odds of 1/5100, and a maximum of 1/1 (single pokemon). I personally think it is a terribly written mechanic compared to 5th anniv eggs during the GBA era. 1
Guest Posted July 24, 2017 Posted July 24, 2017 I remember the Comet Shard was *incredibly* rare to get while with the Eevees, I received one of each before getting any doubles.
Sabresite Posted July 24, 2017 Author Posted July 24, 2017 While it is possible they could have used probably weights for that distribution, it doesn't make sense since you got one of each first and you could get them all.
Guest Posted July 24, 2017 Posted July 24, 2017 (edited) Sorry, I don't understand what you're saying. Both events I'm talking about were random and they allowed you to download them every day. It took me more than 80 downloads to get one Comet Shard last winter. Staff told me it's extremely rare intentionally. But I didn't get a single eevee evolution twice before I got them all. I only used one game and I may have had crazy luck, but that's what I was observing. Edited July 24, 2017 by Guest
Sabresite Posted July 24, 2017 Author Posted July 24, 2017 If you are talking about the first set of items from PCJP, they did not have the flag to get one of each and it was random each time. It is possible they had weights. We will never know since nobody dumped it. EDIT: If I had to guess, it looked like this: 18, 18, 18, 18, 18, 9, 1, where 9 is full restore, and 1 is comet shard.
Guest Posted July 25, 2017 Posted July 25, 2017 (edited) I dumped this event from the raw compressed offset (0x82D44B0) and I'm unable to decompress this data as of now and I want to confirm its validity. I'm still waiting for @Bond697 to help me on this case. Anyone know what happened to him? He said he was going to help me but right before I gave him all the data he disappeared. Edited July 25, 2017 by Guest
Sabresite Posted July 25, 2017 Author Posted July 25, 2017 If you send the dump to me I can do it. I wish I knew that you were ram dumping the events.
Sabresite Posted July 25, 2017 Author Posted July 25, 2017 6 hours ago, Purin said: I dumped this event from the raw compressed offset (0x82D44B0) and I'm unable to decompress this data as of now and I want to confirm its validity. I'm still waiting for @Bond697 to help me on this case. Anyone know what happened to him? He said he was going to help me but right before I gave him all the data he disappeared. If the data is compressed and you haven't been successful at decompressing it, how do you know the WC Data is at that offset?
Guest Posted July 25, 2017 Posted July 25, 2017 (edited) I worked on this a few months ago and followed what the game was doing. It takes this raw data, modifies only 0x58 bytes of it (might indeed be some kind of encryption) and then decompresses it. I just don't know how to find the algorithm that does the modification, therefore I can only decompress a part of it, not all. I'm just going to wait for Bond's help, we're not in a hurry after all. Edited July 25, 2017 by Guest
Sabresite Posted July 25, 2017 Author Posted July 25, 2017 Considering the entire ROM has symbols and @Kaphotics and I have a pretty good handle, it is easy to find the function you are talking about. Translating the code to C and then interpreting is difficult without associated data. If you want to wait for @Bond697, you will be waiting a while as he is not regularly active.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now