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

Global settings #234

Merged
merged 4 commits into from
Nov 2, 2019
Merged

Global settings #234

merged 4 commits into from
Nov 2, 2019

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
  • Requires update of the gsKit
  • Others (please specify below)

Pull Request description

  • Global Settings
    Add a global config for game settings (conf_game.cfg) this allows the user to choose between loading per game or global settings on a game by game/feature by feature basis.. global config is used by default and supports GSM, Cheats & PADEMU... per game settings take precedence over global if selected.

For a simple breakdown of how it works see here:
https://www.psx-place.com/threads/open-ps2-loader-v0-9-3.13415/page-45#post-211808

  • VMC
    Added a quick fix for VMC GUI, commit message explains it... the issue was present in previous builds which is why it carried over to the new Game Menu.

  • Info Page
    Also I gotta agree with @TnA-Plastic on this one, the UseInfoPage option is redundant now as it is always an option by choosing to press square or not before booting a game so having the toggle switch only confuses noobies.

Test Build
https://www.sendspace.com/file/z6cbop

@Jay-Jay-OPL
Copy link
Contributor

I believe you missed one line change under the lng/lang_English.lng file.

LINE 64: Remove All Settings

change to:

LINE 64: Remove Settings

Since here under: src/lang.c

You did change it to...

LINE 50: "Remove Settings",

Plus, I thought, maybe it's best to remove the following lines instead. My question is why leave lang text strings that no longer serve a purpose -- hence make translators keep translating lines that are no longer being used in the application. -- Just a thought...

Here they are as far as I could spot them... (there may be more source files that may point to that line?...)

include/lang.h

LINE 149: _STR_USE_INFO_SCREEN, // string no longer used

lng/lang_English.lng

LINE 166: Display Info Page

src/lang.c

LINE 152: "Unused", // string no longer used

Your thoughts?

@KrahJohlito
Copy link
Member Author

KrahJohlito commented Nov 2, 2019

Yea I forgot the template. but I think it’s better to leave the strings rather than remove, if someone wants to add a new one they can just replace it that’s why I left the comments. Otherwise all the Lang files will need to be shifted up one line at said line.. easier to just leave it unused until someone wants a new Lang string.

@KrahJohlito
Copy link
Member Author

@ElPatas1
This PR is now complete (pending your approval) when you've had a chance to test.

Best Regards.

@ElPatas1
Copy link
Contributor

ElPatas1 commented Nov 2, 2019

@KrahJohlito

Hello,

i tested already the test build with the previous PR, if nothing new is changed here
i merge it now, please confirm.

Best regards.

@KrahJohlito
Copy link
Member Author

@ElPatas1
Only the English template has changed since the previous PR, so nothing further to test.

Thank you.

@ElPatas1 ElPatas1 merged commit ca071b2 into ps2homebrew:master Nov 2, 2019
@ElPatas1
Copy link
Contributor

ElPatas1 commented Nov 2, 2019

Hello,

merged, thank you.

Best regards.

@TnA-Plastic
Copy link

The global functions are cool indeed as well as the removal of the OPL-setting, which is rather a theme-thing...

@KrahJohlito KrahJohlito deleted the global-settings branch November 2, 2019 11:32
@Jay-Jay-OPL
Copy link
Contributor

A little question here, how do we set GLOBAL to be off by default in OPL?

@KrahJohlito
Copy link
Member Author

KrahJohlito commented Nov 2, 2019

You dont, thats the point.. Global game settings only effect GSM, PADEMU & Cheats.. most people use the same settings for all of these throughout their game library.. set Globals so vast majority of your library use those settings, when you find a game that say your GSM settings don't work for switch GSM to per game and use settings that work for that game.

or alternatively use it in the opposite way, if you only want GSM settings for a couple games.. set all your Globals to OFF and just per game those few games.

The idea is you can now mix and match and use say Global PADEMU settings but Per Game GSM settings etc etc

@Jay-Jay-OPL
Copy link
Contributor

Jay-Jay-OPL commented Nov 2, 2019

I see.

I think right now, since this feature is quite new, there will be some confusion for most end-users.

You see right now, when users had "let's say the CHEAT ENGINE enabled for a game" and if they browse that Cheat menu right now for that game -- they will find that it says it's not enabled and the GLOBAL settings is enabled.

So in order to fix this so the menu shows the true setting found from their game's CFG settings, they have to switch GLOBAL to Per Game so it finally shows the correct setting -- that they had enabled the CHEAT engine for that game.

Plus I also tested running the game without making the adjustment above, and found the cheats did not load for the game, so it seems that I will have to switch to the Per Game Cheat setting for each game that has Cheats in order for the Cheat Engine to be turned on. NOTE: not all my games have game cheats -- so this is why the per game cheat feature was ideal for me.

So the other issue is that this new change will now make a lot of end-users have to adjust (again) all their settings for Cheats, GSM, and PADEMU for this to work...

So, can we change this? Can we not make Global be by default when they first try this new release? But give them that option to enable it, once they've read more about it and know if this settings fits them or not?

I think it would have been better (still not sure, since it's a new feature) that the GLOBAL setting would not be set to default, but instead per game for each of those settings, and then allow the end-user to choose to enable GLOBAL, once they learn more about it.

Another question, since I know it will come up in the help topics. Let's say some people like using different GSM Video Settings for certain games. Let's say some games they have it set to play at 480p and then they have a few games set to 720p. How will that affect them if they set GLOBAL? -- which of the two video modes will be the GLOBAL setting?

Or those that only want their PAL Games to be GSM forced to NTSC or vise-versa?

@KrahJohlito
Copy link
Member Author

KrahJohlito commented Nov 2, 2019

When the GUI reads GLOBAL you are setting, saving and loading Global settings and vice versa, so whatever the Settings Mode switch is set to is what you are adjusting/saving/loading, per game, per feature.

Plus I also tested running the game without making the adjustment above, and found the cheats did not load for the game, so it seems that I will have to switch to the Per Game Cheat setting for each game that has Cheats in order for the Cheat Engine to be turned on. NOTE: not all my games have game cheats -- so this is why the per game cheat feature was ideal for me.

You need to look at the majority, if most of your games use CHEATS then set Global Cheats to ON and those that don't set Per Game OFF.. it can be used both ways, you don't have to Per Game heaps of games ON if only a handful don't have Cheats.

I see what you are saying, but from my understanding (and the people that were involved in the discussion) most peoples Per Game Configs have the same settings for the vast majority of their games.. so really all you need to do is set Globals and then for certain games switch that Settings Mode switch and save, it will load your already saved Per Game settings (if you already have a cfg for that game).

@Jay-Jay-OPL
Copy link
Contributor

Jay-Jay-OPL commented Nov 2, 2019

I think that is where the issue is.

Currently it seems that the new feature is not reading the older Per Game Settings that were done in the past prior to this new feature.

So right now, all my games that I had Cheats or GSM (custom settings) are disabled. I have to manually go into them, and toggle from Global to Per Game so the older CFG settings are read for that particular module.

For example:
I don't want to turn on GSM globally since only a very few games (about 5%) had GSM settings and they were a bit different (customized settings) in each case.

Plus the same goes with Cheats, only a few had them (about 25%), not all of them.

And the problem is right now, I have to go back and readjust all those so they can be enabled, since the new feature right now is ignoring all those past per game settings.

@KrahJohlito
Copy link
Member Author

That's how it works, that was the best implementation moving forward.. unfortunately the idea of Globals is to be...well...Global and ON by default otherwise it defeats the purpose.. I can see your issue but unfortunately already made Per Game cfgs aren't going to have the CFG Key since they never existed before.

You could potentially use a batch file or something to add the keys if you wish to use all existing Per Game cfgs

@Jay-Jay-OPL
Copy link
Contributor

Jay-Jay-OPL commented Nov 2, 2019

I see, well, okay. No problem.

You read my mind, the batch file or even OPLM Manager (after an update) might assist with that, at least to enable all the per game settings I had for my games and it might help others on the same boat as I find myself in right now.

So the task will be to:

Finds this line:
$EnableCheat=1

Then add this new line after it:
$CheatsSource=1

My guess that line represents the Per Game Setting? Right?

And simply do the same for both GSM and also PADEMU.

What is the string for the Global setting? So it makes sure to only follow what's found inside the conf_game.cfg file inside the OPL folder.

I'll inform the troops once we release the new version later on in a few hours. I can already predict some incoming new help topics: "Help! My cheats are not working in the latest OPL version!" "Help! My GSM settings are not working in the latest OPL version!" and etc.

I think I will tell them that if they have lots of games that use the same settings, to enable the Global and set their settings accordingly to each one, then manually set those to Per Game for those with unique settings and etc.

@TnA-Plastic
Copy link

TnA-Plastic commented Nov 2, 2019

Actually... We EVER HAD Globals (all 'off' or 'generic')! We just couldn't adjust them before! ;)

Some things to note: That's why I said, the Cheat-Functionality (specifically regarding support in the GUI) needs some rework as well! It's not the fault of the new implementation, but due to errors which were made in the past...

I once had a conversation with @sp193, where I stated something along the lines of that 'I will just let them do however they want to, because the future will prove me right!'... I wouldn't have thought that @KrahJohlito and @Tupakaveli would be those who would be the ones to prove some of these things tho', haha. ^^

Regarding Cheats: IMO that needs it's own menu with selection of cheats (could also be in the Info-Page, instead of accessible via another Main-menu-GUI-Button) and some of the current cheat-settings could become redundant as well!

@BatRastard
Copy link
Contributor

You know what's funny? A week or so ago when I was reading about the re-Globalization efforts for GSM, Cheats, and PADEMU, I lost my shit. Had a big ol rant typed up bitching about how it killed my previous work, etc. and being "Per-Game Uber Alles" dogmatic over here ....... and then I realized two things:

(1) Retired means no longer having dog in this fight and thus I forfeit the right to bitch ... (well, I can bitch, but bitching and maintaining credibility is never mutually inclusive; warm and tall glasses of "STFU, Bat!" can be served ... :P )

(2) I failed to recognize the potential inefficiencies of Per-Game at the time I was slogging everything under that umbrella. I do remember a handful of people were MAD about Per-Game GSM (because it was a Global variable before) and lobbied for a choice between Global and Per-Game at the time, but Doc, SP193, and I were hearing none of it, and it mainly stems from the three of us having small hard drives and thus smaller gaming libraries. Going through all 15 to 20 games on our lowly 80GB drives?!? Didn't bother us three goony birds all that much - took about 8 to 10 minutes! But woe to the hell on Earth it foisted on those that had joined the 1TB or 2TB club! LMAO

We failed to recognize that those gamers (i.e those that could afford such large drives back then) would become the prevailing majority over time, especially once 1TB or 2TB drives hit the $50-$80 price range for us poor bastards ... ;)

@KrahJohlito
Copy link
Member Author

KrahJohlito commented Nov 3, 2019

So the task will be to:

Finds this line:
$EnableCheat=1

Then add this new line after it:
$CheatsSource=1

My guess that line represents the Per Game Setting? Right?

And simply do the same for both GSM and also PADEMU.

Yes, that is correct

What is the string for the Global setting? So it makes sure to only follow what's found inside the conf_game.cfg file inside the OPL folder.

There isn't one, the cheat engine for example first loads default compiled in settings (which is everything OFF) then checks your per game cfg for $CheatsSource=1 and if it exists continues to load settings from there.. otherwise it uses conf_game.cfg.

@BatRastard

how it killed my previous work

I know you explained your thought process but I just wanted to single this bit out, I hope you don't still feel this way (it seems like you don't).. I think of it as expanding on your work rather than killing it, Per Game is still in there and still very useful.

If we only had Global and came across a game that didn't work with those settings it would be a PITA to change every time just for that game, that's why I think the current system works quite well together.. The initial 'getting used to it phase' will be annoying for some but I think overall its a good system and it wouldn't have been possible without your work on Per Game. :)

@TnA-Plastic
Copy link

Hm... What about a check, if global settings (file[s]) is[/are] present and if there is non, it defaults to the 'off-internals' or per-game-settings if that file is present?

Would that be a feasible solution or rather not?

@KrahJohlito
Copy link
Member Author

@Jay-Jay-OPL
Dekkit was kind enough to throw together a batch file, get it here

https://www.psx-place.com/threads/open-ps2-loader-v0-9-3.13415/page-46

The soul purpose of this BAT is to bring per game cfgs that were made with the old system up to date with the new system without having to do it through the GUI for tonnes of games, so it is only needed to be used once and if you have a large collection.

As for OPLM it doesn’t need a batch converter but it would need to add the new keys when creating per game cfgs if the user wanted it to auto enable per game.

@Jay-Jay-OPL
Copy link
Contributor

Jay-Jay-OPL commented Nov 8, 2019

Thanks, we are also moments away from releasing a quick-fix with OPLM, this is why we didn't go the BAT route.

We also noticed that during a previous pull that MODES 7 and 8 were finally removed from the GUI, so we are also contemplating whether we should also create an update to remove those modes from user's CFG settings or leave them there for older OPL compatibility builds and just add a notifier in the CFG Editor that they are obsolete (for now)? Still unsure if we should...?

Yes, we plan to add the new keys to users that opt to use Per Game settings with OPLM.

Thanks again...

@BatRastard
Copy link
Contributor

@KrahJohlito -- No, I don't feel that way. Quite the opposite: not only does it expand on my work, it actually corrects a major blind spot and oversight: most hard drives less than 250GB are 8 to 10 years past their MTBF, and 500GB+ hard drives have been the new normal for quite some time. For the sake of efficiency and common sense, giving us a choice between Per-Game and Globalized for GSM, CHEATS, and PADEMU is necessary. Hell, I've got a 500GB laptop drive in my PS2 now with 70+ games and it's only half full. I see myself moving away from Per-Game in short order! :)

AKuHAK pushed a commit that referenced this pull request Sep 30, 2021
citronalco pushed a commit to citronalco/OPL-Daily-Builds that referenced this pull request Sep 10, 2023
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.

None yet

5 participants