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

Add TRR gamestring support #699

Merged
merged 8 commits into from
Jun 2, 2024

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Jun 1, 2024

Part of #614.
Resolves #698.
Resolves #701.

Checklist

Description

This is the last aspect (at least for the time being) in TRR that we're able to randomize. I'll follow this up with a documentation PR, which will close the related issue, then release it for testing and any bugs raised from that can be handled separately.

This is a big change, but filtering out the JSON will probably be a good approach, or going commit-by-commit. Previously, TR2 and 3 had their own format which was tied to the string indices in the script file, then we had TR1X which was much more intuitive with string keys to values. We now use the TR1X format for everything, hence the large JSON rewrite. The specific implementations handle the conversion of our keys to where in the script the values need to be placed. Similarly for TRR, it's another set of mappings into the text files here.

This also fixes a bug that has gone unnoticed since TR3 strings were introduced in #242. The files were all in ANSI but UTF8 is needed here, and they had several unusable characters as a result. Everything is now sanitized.

We will use one data format and convert to the script formats as necessary. This will need TR2/3 JSON file conversions - to follow.
Character encoding issues resolved (bug since inception).
Levels sorted by sequence rather than name to match TR1 and TR2.
Mapping to follow.
@lahm86 lahm86 added enhancement New feature or request TR1 TR2 TR3 labels Jun 1, 2024
@lahm86 lahm86 added this to the 1.9.0 milestone Jun 1, 2024
@lahm86 lahm86 self-assigned this Jun 1, 2024
@lahm86 lahm86 requested review from rr-, chreden and makotocchi June 1, 2024 15:30
@lahm86
Copy link
Collaborator Author

lahm86 commented Jun 2, 2024

Lilly Jericho provided translations for TRUB so I've bundled those into this PR too. It's all auto-generated JSON.

@lahm86 lahm86 merged commit 479efb9 into LostArtefacts:master Jun 2, 2024
2 checks passed
@lahm86 lahm86 deleted the issue-614-trr-gamestrings branch June 2, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request TR1 TR2 TR3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TRUB translations TR3 gamestring files use the wrong encoding
2 participants