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

patch_manager: add ability to add configurable patches #13415

Merged
merged 9 commits into from
Feb 22, 2023

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Feb 18, 2023

  • Lets you add multiple configurable values to patches, including type (double or long), min, max or enum.
  • Current types are
    • double_range
    • double_enum
    • long_range
    • long_enum

Examples

image
image
image
image

@Megamouse
Copy link
Contributor Author

Added more features.

@Megamouse Megamouse force-pushed the pathuuuu branch 6 times, most recently from 243930a to 90d297c Compare February 19, 2023 09:46
@Megamouse
Copy link
Contributor Author

Added labels to the dropdown values

@Megamouse
Copy link
Contributor Author

Added possibility to use multiple dynamic values per patch

@Megamouse Megamouse force-pushed the pathuuuu branch 2 times, most recently from 62d687b to 95e8112 Compare February 19, 2023 10:56
@Megamouse Megamouse marked this pull request as ready for review February 19, 2023 10:58
@Megamouse Megamouse changed the title patch_manager: add ability to add dynamic patches patch_manager: add ability to add configurable patches Feb 19, 2023
@Megamouse
Copy link
Contributor Author

Changed the wording to "Configurable"

@dio-gh
Copy link
Contributor

dio-gh commented Feb 19, 2023

How are the configured inputs persisted? What happens when a patch is updated, particularly when its exposed input variables are expanded on or removed from?

@Megamouse
Copy link
Contributor Author

Good point. I added sanity checks

image

@Megamouse
Copy link
Contributor Author

But I guess you'll have to rename the value itself or the patch if you want to make sure the user doesn't have an unwanted old value after an update.

@Megamouse
Copy link
Contributor Author

Megamouse commented Feb 19, 2023

The persistence is similar to before. One value per game version, like the "Enabled" value.
Only now it's saved as a map. It's backwards compatible, so no enabled patches should be lost.
It won't work the other way around though.

image

@dio-gh
Copy link
Contributor

dio-gh commented Feb 19, 2023

Adjusted my AR patch for Nier like so, works!

image

Which I'm actually kind of surprised about - thought the type mismatch (f32 vs f64) would cause issues. I reckon you simply downcast as needed then?

Persistence works between sessions correctly too.

The only complaint I really have is the combobox for the range values. It keeps throwing away focus after typing in a single digit, and doesn't allow for more than two digits after the floating point. This extra precision is important for some kinds of patches (case in point, like AR patches for example).

LGTM otherwise, good stuff!

@Megamouse
Copy link
Contributor Author

@dio-gh I believe I fixed the focus loss.
The double spin box should now have 10 decimal places. I hope that's enough.

@dio-gh
Copy link
Contributor

dio-gh commented Feb 20, 2023

Works great, thanks! Checked how it behaves with the integer type too, also works as expected.

@Megamouse Megamouse merged commit a9f399d into RPCS3:master Feb 22, 2023
@Megamouse Megamouse deleted the pathuuuu branch February 22, 2023 18:57
@iSupakilla
Copy link

It might not be worth the time to but someone from the Discord mentioned it wouldn't hurt to ask, for the Configurable Values, would it be possible to add something like a short_enum instead of long?

For example: Kingdom Hearts has an XP Multiplier with options. 0x1F7CZ is the code given and 5x, 10x etc are options valued at 0005 to make 0x1F7C0005
( [Z]000A=10x;0064=100x;03E8=1000x;2710=10000x[/Z] )

as of now, i have the values as long_enum
storing it at "10x": 0x1F7C000A and calling it with [ be32, 0x00194844, "EXP Multiplier" ]

would it be possible to store it as "10x": 000A and call it with [ be32, 0x00194844, 0x1F7C"Z" ] ?

@Megamouse
Copy link
Contributor Author

It shouldn't matter what type it is.
Long just means the string is assumed to be any integer and double means ithe string will be converted to any floating point number

@iSupakilla
Copy link

iSupakilla commented Jun 18, 2023 via email

@Megamouse
Copy link
Contributor Author

This is not the place to discuss Artemis stuff. You should probably comment on the artemis feature request issue for that.

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

Successfully merging this pull request may close these issues.

3 participants