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

Cheatman: Add user cheat selection #1364

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KrahJohlito
Copy link
Member

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK or other dependencies
  • Others (please specify below)

Pull Request description

This adds a cheat selection menu at game launch if the cheat mode is selected in cheat settings. It will read your cht file and group the title description to the code below and it is that title that will be displayed in the menu, for this reason its a good idea to have your cht files descriptive and concise. See screenshots below for examples.

Also just some general clean ups to the cheat system.

chtexample
mode
menuss

@iGom
Copy link

iGom commented Oct 25, 2024

works like a charm

@AKuHAK
Copy link
Member

AKuHAK commented Nov 15, 2024

@KrahJohlito can you add few words about this feature into readme as part of this PR?

@israpps
Copy link
Member

israpps commented Nov 15, 2024

A little idea that will save us LOTS of invalid issue reports
What if the cheat engine frontent automatically ticks any cheat named Mastercode

@KrahJohlito
Copy link
Member Author

KrahJohlito commented Nov 15, 2024

A little idea that will save us LOTS of invalid issue reports What if the cheat engine frontent automatically ticks any cheat named Mastercode

Because of the way the cheat system works they’re all ticked/on by default, because both modes use the same code but if mode == 1 a menu pops up so you can disable whatever cheats you don’t want. Otherwise it just boots with all in their default state (enabled).

It (currently) does not carry over subsequent boots so you need to disable each time.. I couldn’t decide the best way to go about it.. do we write hashes to the cht file to save them as disabled? Do we write a new file containing just the names of the enabled cheats and then compare that to the cht file to only auto enable the same ones next time the menu opens? I ran out of time to make a decision and this is still an improvement over the old system so just opened the PR. Cheat system could still be improved further in the future though.

@KrahJohlito
Copy link
Member Author

KrahJohlito commented Nov 15, 2024

@KrahJohlito can you add few words about this feature into readme as part of this PR?

Sure I’ll try write something later (and I’ll fix the conflict)

@AKuHAK
Copy link
Member

AKuHAK commented Nov 16, 2024

A little idea that will save us LOTS of invalid issue reports What if the cheat engine frontent automatically ticks any cheat named Mastercode

Because of the way the cheat system works they’re all ticked/on by default, because both modes use the same code but if mode == 1 a menu pops up so you can disable whatever cheats you don’t want. Otherwise it just boots with all in their default state (enabled).

It (currently) does not carry over subsequent boots so you need to disable each time.. I couldn’t decide the best way to go about it.. do we write hashes to the cht file to save them as disabled? Do we write a new file containing just the names of the enabled cheats and then compare that to the cht file to only auto enable the same ones next time the menu opens? I ran out of time to make a decision and this is still an improvement over the old system so just opened the PR. Cheat system could still be improved further in the future though.

I think that @israpps meant that mastercode section should be mandatory, non-disablable, and maybe even not visible in gui.

@KrahJohlito
Copy link
Member Author

A little idea that will save us LOTS of invalid issue reports What if the cheat engine frontent automatically ticks any cheat named Mastercode

Because of the way the cheat system works they’re all ticked/on by default, because both modes use the same code but if mode == 1 a menu pops up so you can disable whatever cheats you don’t want. Otherwise it just boots with all in their default state (enabled).
It (currently) does not carry over subsequent boots so you need to disable each time.. I couldn’t decide the best way to go about it.. do we write hashes to the cht file to save them as disabled? Do we write a new file containing just the names of the enabled cheats and then compare that to the cht file to only auto enable the same ones next time the menu opens? I ran out of time to make a decision and this is still an improvement over the old system so just opened the PR. Cheat system could still be improved further in the future though.

I think that @israpps meant that mastercode section should be mandatory, non-disablable, and maybe even not visible in gui.

alright I made it so mastercode or master code and their variants can't be disabled .. I think leaving it visible is a good idea so users can see if they have a valid mastercode.. will take care of most variants but we can't account for all master-code master_code etc at some point users just need to have some semblance of understanding about the system they're using.

added a readme entry for cheats.. idk if you want it as a separate commit but there it is, if it's not sufficient someone is free to edit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants