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

Enhancement: Port all GameSettings ROM addresses to JSON files for easy importing #505

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

UTDZac
Copy link
Collaborator

@UTDZac UTDZac commented Jan 7, 2025

Closes #497

This Enhancement moves all hardcoded addresses found in GameSettings.lua to their own JSON file, located in the following folder: ~\ironmon_tracker\GameAddresses\

Each individual game version has its own JSON file. These were created automatically by simply loading up each game one at a time, then exporting the current GameSettings addresses to the file.

In addition, there is a TrackerOverrides.json file which contains various hard-coded values used by the tracker, such as the Friendship required to evo a Pokémon. These hard-coded values need to be able to be changed by external devs via Tracker Extensions, hence why they are part of their own JSON file. Devs can easily just override them all at once.

For Tracker Developers

  • Use TrackerAPI.loadGameSettingsFromJson(filepath) to import your custom ROM addresses
  • Use TrackerAPI.loadTrackerOverridesFromJson(filepath) to import your custom hard-coded value overrides

@UTDZac UTDZac added the Enhancement A change to an existing feature label Jan 7, 2025
@UTDZac UTDZac requested a review from Fellshadow January 7, 2025 22:13
@UTDZac UTDZac self-assigned this Jan 7, 2025
@UTDZac UTDZac linked an issue Jan 7, 2025 that may be closed by this pull request
Copy link
Collaborator

@Fellshadow Fellshadow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, and as discussed in discord a quick test with german FR seemed to work fine aside from the trainer notebook (which is an existing issue with the non-english roms)

ironmon_tracker/GameSettings.lua Show resolved Hide resolved
@UTDZac UTDZac merged commit 97de90e into dev Jan 8, 2025
@UTDZac UTDZac deleted the move-gamesettings-to-json branch January 8, 2025 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A change to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Store GameSettings.lua addresses as a JSON
2 participants