Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Emerald trainer errors #502

Open
biterror opened this issue Dec 25, 2024 · 7 comments
Open

[Bug]: Emerald trainer errors #502

biterror opened this issue Dec 25, 2024 · 7 comments
Assignees
Labels
Bug Something isn't working

Comments

@biterror
Copy link

Describe the bug

There are some inconsistencies in the notebook trainer data for Emerald. Some are missing or misplaced.

Mt. Pyre is missing the lower 2 rockets outdoors (the 2 not directly facing each other). I did not get their trainer IDs, I'll go back for them later if needed.

Route 131 contains trainer #465 when it should be #456

The interviewers 2nd and 3rd battle are missing. The way these work is it's a double battle that you talk to to fight, and then they appear at a second position in the map, then a third, then it loops back to the first. In the Kaizo run you can fight them once per location - the team changes and level increases. I think these should be in the Notebook:
Emerald #52 goes on route 118
Emerald #53 goes on route 120

Seafloor cavern (map ID 148+ 151 +
Trainer ID 14 is missing (on 151)
***Additionally the "Trainers defeated: 3/7" message does not appear in this cave at all for some reason

I'm still playing through this run (even though it's dead) for the sake of catching all these, so there may be more, but there really isn't much left. The Notebook feature is a godsend for getting through the water grind without missing anyone - I used to have to tick them off the Interactive Map one by one but now I can just run around and use Notebook to make sure none were missed!

Steps to Reproduce

Play Emerald For Some Reason
For the bit marked with *** defeat any of the 7 trainers inside Seafloor Cavern

What tracker version are you using?

b8.9.0

What operating system are you using?

Windows 10

What emulator(s) are you seeing the problem on?

Bizhawk 2.8

Relevant log output

No response

Additional Information

No response

@biterror biterror added the Bug Something isn't working label Dec 25, 2024
@biterror
Copy link
Author

I need to review the Space Center also, apparently I was not paying attention in there. Pretty sure I cleared it and it says 7/9

@biterror
Copy link
Author

Several trainers on Abandoned Ship (in Map IDs 187,194) did not give the message but are correct in notebook

@biterror
Copy link
Author

Not getting the message in Sootopolis Gym basement/harem room, map ID 110

@biterror
Copy link
Author

Okay it took a while to get back to the space center from the closest save state I had, and was able to replicate the Space Center issue. The last battle is a double battle you fight alongside Steven against #734 and #514 - I was at 7/9 trainers fought before this battle. After the battle it still shows 7/9 and does not show either of those two trainers as having been fought. It's like the tracker doesn't properly recogonize the end of the battle (because it's a weird one)

I'm moving on to the next run now, if I find any more weirdness I'll report it!

@UTDZac UTDZac self-assigned this Jan 3, 2025
@UTDZac
Copy link
Collaborator

UTDZac commented Jan 3, 2025

I've fixed the following issues, per the above commit:

  • Route 131: change trainer 465 to 456
  • Seafloor Cavern: add trainer 14 to Emerald only

The below were already in the proper route data section:

  • Route 118 already includes trainer 52
  • Route 120 already includes trainer 53
  • Space Center 2F already includes trainer 734 and 514 (yes this battle is weird; unsure if it's fixable)

I don't know why this wasn't working for you. May require deeper investigation.

Trainers I could not fix as I lack details:

  • Mt Pyre 2 trainers you mentioned (i need their IDs & their map ID)
  • ALL Seafloor Cavern trainers, each at the proper floor
  • ALL Abandoned Ship trainers, each at the proper floor
  • ALL Sootopolis Gym trainers, each at the proper floor
    • And likely true for the Gym 4 trainers, the fire lady or whoever

The "trainers i didnt fix" is a two part issue:

The tracker message that shows defeated trainers only appears if the trainer was in that area. For whatever reason, i did not write in trainers for many areas in Emerald. I combined the dungeon trainers into a single floor. This is why the message will appear on a certain floor of a dungeon but not all floors. In order to resolve this, I need:

  1. The exact Trainer ID for the trainer while you battle the trainer. This can be seen by clicking the battle balls icon on the enemy pokemon screen during the battle. Note: you must be in battle, you cannot simply lookup the id via the Notebook
  2. AND I need the exact Map ID where you fought the trainer. The "Map ID" is just a unique identifier for the route, area, or floor you are on. You may have noticed, but many dungeons have multiple floors, each with their own Map ID

Thus, for each inconsistency, if you provide the pair of the Trainer ID and the Map ID, I can more easily fix this issue.

Other notes

I unfortunately do not have the time to play Emerald myself, or to manually review these in game. No rush on getting this done, but I may not have time to solve this. If you have the time, or know how to provide this data, then I can very easily make these fixes. Just let me know.

@Fellshadow
Copy link
Collaborator

On the missing details, can get the data from the decomp without having to manually go to the places in-game (though it's still a bit of a tedious manual process and at some point someone probably should double-check them in-game too to be 100% sure)

the maps are located here in the decomp. Each folder here contains a map.json and a scripts.inc file, the former contains all the "objects" on that map (e.g. trainers) and the latter contains the scripts relating to them (e.g. the scripts that initiate the trainer fights)

Taking Seafloor Cavern Room 4 as an example:

  1. In map.json we can see two trainers, with scripts SeafloorCavern_Room4_EventScript_Grunt3 and SeafloorCavern_Room4_EventScript_Grunt4
  2. Going over to the scripts.inc file we can see these scripts start trainer fights with trainers TRAINER_GRUNT_SEAFLOOR_CAVERN_3 and TRAINER_GRUNT_SEAFLOOR_CAVERN_4 (the trainerbattle_single lines, which could instead be trainerbattle_double if it's a double battle)
  3. These trainer names can then be searched for in the opponents.h file to get the trainer IDs, where we see that TRAINER_GRUNT_SEAFLOOR_CAVERN_3 is 8 and TRAINER_GRUNT_SEAFLOOR_CAVERN_4 is 14 (the one that you added)

One issue with this method is that idk how to get the map ID number from the info in the map.json file, however we also included names in our RouteData file so could look it up that way (e.g. the above example is map ID 151 in our RouteData file)

It's also a lot of manual tediousness, as you have to manually look through the map.json to identify trainers then look up the trainer name to search in opponents.h from the scripts.inc file, note that NPCs / non-trainers would also be in this map.json file (usually with "trainer_type": "TRAINER_TYPE_NONE" I believe)

@biterror
Copy link
Author

biterror commented Jan 4, 2025

Next time I get a run to that point, I'll get the data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants