Hartie95 / PokemonCheatPlugin

55 stars 18 forks source link

Random Pokemon DexNav Bug #4

Closed MrNbaYoh closed 8 years ago

MrNbaYoh commented 8 years ago

Well, I think overwrite all the route datas is a very bad idea. I am working on a fix, I am able to locate the exact location of the current route encounter table in the 0x14000000 part.

Hartie95 commented 8 years ago

Like I wrote in the readme, all route encouter modifiers are based on the original random encounter plugin by KazoWAR. Haven't changed much, only try and error to find what's in that area, so I can't say much about how good its doing, what its doing.

By the way, thanks for your work, you are adding many great thinks to this plugin.

MrNbaYoh commented 8 years ago

Ok so it seems that it only happens for some routes. I can fly from myokara to the battle resort without any problem but when I try to enter on the route 110 or 103 for example, it hangs.

Hartie95 commented 8 years ago

That could be the reason why it wasn't found before.

MrNbaYoh commented 8 years ago

Ok, moreover here is something interesting : Route 110 :

Normal : 35 01 0A 0A 35 01 0B 0B 35 01 0C 0C 35 01 0D 0D Modified : 03 00 0A 0A 35 01 0B 0B 35 01 0C 0C 35 01 0D 0D Result : it hangs.

Normal : 35 01 0A 0A 35 01 0B 0B 35 01 0C 0C 35 01 0D 0D Modified : 03 00 0A 0A 03 00 0B 0B 03 00 0C 0C 03 00 0D 0D Result : it works.

So if we replace all the same ID values with a new ID it works but when we replace only one of them, it hangs.

MrNbaYoh commented 8 years ago

Ok, so it is fixed. Now for the first table when a pokemon id is replaced, the last id that replaced it is stored. Then when we replace the second table for the dexnav, we set each id according to the last id which replaced it the first time. Then, the structure of the table is kept and the dexnav is randomised. Obviously all the pokemon in the table may not appear in the dexnav, it only depends on the max allowed number for the current zone.

And by the way, the plugin was constantly overwriting the table, it does not do that anymore, it detects when the zone changes.

Hartie95 commented 8 years ago

That's good. Do you mean the dexnav cheat only, or will the random encounter cheat in general only be applied of the zone changes, or will it stop changing it when the zone changes?

If you keep adding this much to the plugin, I maybe could add you as collaborator.

MrNbaYoh commented 8 years ago

Well, the randomiser will be launched every time the location changes. It is nearly working, I discovered some bugs, I hope I will be able to fix them quickly.

MrNbaYoh commented 8 years ago

OK I think I definitively fixed it.

Hartie95 commented 8 years ago

Can't wait for the PR. Keep up the good work, and sorry that I'm not able to do much atm, but I have not that much time atm and bootctr9's 1.0 Release has a higher priority for me atm.

MrNbaYoh commented 8 years ago

Also I saw that the random number generator is not seeded, I am going to correct that.