Egglocke parsing

Issue #1066 new
Søren Jacobsen created an issue


the parser for egglocke eggs has a lot of issues, and generally seem untested. Parsing long files such as to generate 20 boxes of pokemon crashes the game, and even for short files like 2 boxes it is extremely annoying by creating a lot of excess dialoug


Using the load pokemon eggs from file feature pointed to a valid 120 line files created 120 dialog boxes with the string "O" that the user has to press a key to skip. If a bigger file (tested with 1200 = 20 boxes as the use random pokemon feature) did create 1200 of the message boxes, followed by crashing. Pressing enter a bit too fast and losing track I did not get to see the crash report (and i don't know where the crash logs are stored) The feature is generally useless as long as this persists.

Further inconveniences

The parser is also REALLY bad at providing feedback when there are errors parsing the egg file. The Yes/No box is provided with no context whatsoever, the context i could deduce by behaviour is "want me to crash your game?" as yes simply crashes where no lets you parse the file again (which is really nice since the file is not hooked by the process so i could actually replace it and avoid that unskippable cutscene every test run. GGCWID) Also while the egg generator lets you select as few moves as you want (and fills the rest of the fields with -1) the parser expects 4 positive values for the moves. But what if i want blank? -1 is not skipped by the parser but pointet out as an error, giving you options to crash or retry.


I like pokemon, but mainly first generation, so I thought I could abuse egglocke to make my team conveniently only contain gen1 pokemanners. So I cooked up a quick ruby script (attached) and after a lot of tweaking, got it to generate 20 boxes of eggs (attached) of gen1 pokemon with only one (if possible damaging) move each. (and free perfect IVs, who doesnt like that... And EXP share... I was looking forward to not grinding) Started a game loaded the file, pressed ENTER about a thousand times and accidentally closed the crash popup.

The script

Not much to say about it. Generate a list of what i made out to be by the game accepted gen1 pokemanners (by ID) and generate 1200 lines. Each line has a random (uniform distribution) ID from the list, a gender (random 50-50 unless nidoran) and a move. First I naively selected tackle, but not all of the pokemanners know that from egg, so a hash of exceptions was made, replacing the move with something else. The move is used in all 4 slots, a very hacky workarround the missing feature of blank move parsing. IVs set to 31 nature set to something that doesnt do anything, and item set to EXP share

Comments (1)

  1. Log in to comment