-
Notifications
You must be signed in to change notification settings - Fork 149
Cheat File Formatting Fixes #599
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
Open
ReverseTelnet
wants to merge
54
commits into
GoldHEN:main
Choose a base branch
from
ReverseTelnet:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+2,765
−233
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I began developing a script to do an any-to-any conversion of JSON, SHN, and MC4 cheats.
As bulk imports to test my script logic, I used the cheat files in this repository.
During development, I noticed there were many files that caused various Exceptions, almost always due to some formatting issue in the file, generally with SHN (XML).
This Pull Request fixes those files which had issues.
Issue - Ampersands
A primary issue is the use of '&' in the Cheat Text tag in SHN Files.
As a note for future Pull-Requests, may I please suggest that these are either always escaped or (better) use the word 'and' instead.
Issue - XML Junk Data (Hidden Trailing Characters)
Another common issue was XML junk data such as trailing form feed characters and STX characters (oddly enough).
Issue - Invalid XML Declaration
A third issues found was a leading question mark in the XML declaration.
Example:
Issue - Invalid XML Format
A fourth issues found was XML files that contained a single line of text.
They did not contain proper formatting, indents, or carriage returns.
This made it very difficult to find other issues, as several files had multiple problems.
Once formatted correctly, it became much easier to identify if the three issues above in the same file.
Issue - Plain-Text Not Padded Before Encryption
There were multiple MC4 files that would not properly decrypt due to ValueErrors of not have padding to the 16B mark. Details on this are included with this doc-string.
A clear indication of this was that the
mc4.xmlfile did not have cheat codes populated, only XML tags.These files had to be fixed almost completely manually, a true labor of love more than anything.
Once the file was decrypted to SHN, I re-encrypted back to MC4 and updated both the
mc4and correspondingmc4.xmlfile.