Skip to content

Conversation

@KoloInDaCrib
Copy link
Contributor

@KoloInDaCrib KoloInDaCrib commented Nov 9, 2025

Linked Issues

None.

Description

This PR introduces a macro that stores the chart text on compile-time to be later used to check if a chart file has been tampered with through mods that use _merge folder or override the chart file directly or through overriding a chart through the assets folder, effectively making cheating for scores more difficult.
Note that cheated scores are still possible by using some scripts to change the tallies however this PR makes cheating not baby-level.
Also the macro class is inside the funkin/util/macro folder so it's inaccessible to scripts.

Constants didn't seem to work during compilation so I couldn't use Constants.DEFAULT_VARIATION in the macro code, in case you're curious.

Screenshots/Videos

True.torial.mp4

@github-actions github-actions bot added size: large A large pull request with more than 100 changes. pr: haxe PR modifies game code. status: pending triage Awaiting review. and removed size: large A large pull request with more than 100 changes. labels Nov 9, 2025
@github-actions github-actions bot added the size: large A large pull request with more than 100 changes. label Nov 9, 2025
@KoloInDaCrib KoloInDaCrib changed the title [FEATURE] MAcro to detect if a chart has been tampered with on Runtime [FEATURE] Macro to detect if a chart has been tampered with on Runtime Nov 9, 2025
@AbnormalPoof AbnormalPoof added type: enhancement Involves an enhancement or new feature. topic: scoring Involves the game's ranking and scoring systems. labels Nov 9, 2025
@AbnormalPoof
Copy link
Member

Why not store a hash of the chart text instead
MD5/SHA1

  • Eric

@KoloInDaCrib KoloInDaCrib changed the title [FEATURE] Macro to detect if a chart has been tampered with on Runtime [FEATURE] Macro to detect if a chart has been changed on Runtime Nov 10, 2025
@EliteMasterEric
Copy link
Member

EliteMasterEric commented Nov 10, 2025

Implementation looks good in general, although we should probably add something to make sure you can't modify the chart data map via a script.

EDIT: Actually all that should require is blacklisting the SongDataValidator in the PolymodHandler

@KoloInDaCrib
Copy link
Contributor Author

KoloInDaCrib commented Nov 10, 2025

EDIT: Actually all that should require is blacklisting the SongDataValidator in the PolymodHandler

The class itself is in the funkin/util/macro folder whose classes already are blacklisted due to the CompiledClassList exploit which had been patched in #5185

@mikolka9144
Copy link
Contributor

mikolka9144 commented Nov 16, 2025

Is the no in-game note about "The score won't be saved" intentional?

I can already see someone complaining about the game not saving score because it just didn't ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: haxe PR modifies game code. size: large A large pull request with more than 100 changes. status: pending triage Awaiting review. topic: scoring Involves the game's ranking and scoring systems. type: enhancement Involves an enhancement or new feature.

Development

Successfully merging this pull request may close these issues.

4 participants