rotobash / pokemon-ngc-rando

Randomize XD and Colosseum
GNU General Public License v2.0
15 stars 2 forks source link

[BUG] Randomizing moves leaves some unchanged if new mon has <4 legal moves #69

Open qwertystop opened 1 year ago

qwertystop commented 1 year ago

Randomizer rolled a Kakuna for Emok over her Zubat; it still knew Thief and Astonish. I would guess that the issue is that if the random-selected mon cannot be randomized to a full four moves, the remaining slots are unchanged from the original rather than blanked? Caught on video at about 2:10:17 of https://www.youtube.com/watch?v=Yl54imFiJkc

qwertystop commented 1 year ago

Randomizer log: Colosseum-US-2022-11-05-17-49-24.txt

rotobash commented 1 year ago

Hi there, thanks for the report. Do you happen to remember the settings you used?

I checked the code and I think I can see what might have happened. Exactly as you said, it generates a new move set list and only replaces the moves from that list. So if the new moveset is only 2 moves and it originally knew 4 than the first 2 get replaced and the last 2 stay the same. I could see this scenario happening for "Pokemon Share Movesets" because then it's possible to have under 4 moves to pick from. Especially for Kakuna because it only learns two moves (Harden twice weirdly).

It should still pick randomly for the last 2 moves but it looks like it didn't. I'm wondering if there's a certain combination of settings that doesn't set the flag for the randomizer to fill out the rest of the moveset. I'll look into a way to fix this properly but if you want to make sure that doesn't happen, you could do "Every Pokemon starts with 4 moves" to make sure it always replaces the old moves.

qwertystop commented 1 year ago

Didn't save the settings – perhaps that, and the seed, should be recorded in the log file? We can't remember whether or not we checked "Every Pokemon starts with 4 moves", guessing probably not. We're pretty sure we did Unchanged for movesets, because we're pretty sure "Pokemon share movesets" was greyed out when we were discussing options, and the rest of the log looks consistent with that. We did randomize TM moves and compatibility, as well as evolutions, but didn't want species to be meaningless (so no randomized level-up learnsets, stats, etc) and didn't want "random legal moves" to drown out the level-up learnsets with TM ones.