diff --git a/CHANGELOG.md b/CHANGELOG.md index d389f3e8..ea17de27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,21 @@ +* **[qingchunnh]** update Chinese translations for the overlay +* add a new option `allow_unknown_stats` in `configs.main.ini` to allow games to change unknown stats. + the emu by default rejects any changes to a stat not mentioned inside `steam_settings/stats.txt`, this option allows these changes +* add a new option `save_only_higher_stat_achievement_progress` in `configs.main.ini` and enable it by default. + this option will prevent the emu from updating the progress of any achievement due to a stat change/update, if the new value is less than or equal the current one. + this solves an overlay spam problem and avoids *some* useless disk write operations. + + unfortunately some games abuse stats and update them a lot during gameplay with useless and disposable values, this will cause a lot of disk write operations and cannot be avoided unless you remove the definition of that stat from `steam_settings/stats.txt`, or avoiding that definition file altogether and forget about stats +* in `Steam_User_Stats::ResetAllStats()` reset the achievement `progress` only if it was defined in the original schema in `steam_settings/achievements.json` +* save achievement progress/max progress as `uint32` instead of `float` + +--- + ## 2024/6/21 * fix the conditions for achievement progress indication when a game updates a stat which is tied to an achievement now the user achievements will be updated and saved, and an overlay notification will be triggered. - works with `Achievement Watcher by xan105` and the built-in overlay. + works with **[Achievement Watcher by xan105](https://github.com/xan105/Achievement-Watcher)** and the built-in overlay. you need `stats.txt` and `achievements.json` inside your local `steam_settings` folder for this feature to work properly * fix an old problem where games would crash on exit if the overlay was enabled, more prominent in `DirectX 12` games, also set the overlay hook procedure to an empty function before cleaning up the overlay * remove an invalid condition when resetting stats, only write to disk and share values with any gameserver if the stat value isn't already the default diff --git a/dll/settings_parser.cpp b/dll/settings_parser.cpp index 99ca894f..e6acc44b 100644 --- a/dll/settings_parser.cpp +++ b/dll/settings_parser.cpp @@ -719,7 +719,7 @@ static void parse_app_paths(class Settings *settings_client, Settings *settings_ auto val_ptr = ini.GetValue("app::paths", id.pItem); if (!val_ptr || !val_ptr[0]) continue; - AppId_t appid = std::stol(id.pItem); + AppId_t appid = (AppId_t)std::stoul(id.pItem); std::string rel_path(val_ptr); std::string path = canonical_path(program_path + rel_path); diff --git a/post_build/README.experimental_steamclient.md b/post_build/README.experimental_steamclient.md index c37103b6..cc446dea 100644 --- a/post_build/README.experimental_steamclient.md +++ b/post_build/README.experimental_steamclient.md @@ -39,7 +39,8 @@ You do not need to create a `steam_interfaces.txt` file for the `steamclient` ve * `ResumeByDebugger`: setting this to `1` or `y` or `true` will prevent the loader from calling `ResumeThread()` on the main thread after spawning the .exe, and it will display a mesage with the process ID (PID) so you attach your debugger on it. Note that you have to resume the main thread from the debugger after attaching, also the entry breakpoint may not be set automatically, but you can do that manually. * `DllsToInjectFolder` *(optional)*: path to a folder containing dlls to force inject into the app upon start, - the loader will attempt to detect the dll architecture (32 or 64 bit), if it didn't match the architecture of the exe, then it will ignored + the loader will attempt to detect the dll architecture (32 or 64 bit), if it didn't match the architecture of the exe then it will be ignored. + Path is either full or relative to this loader * `IgnoreInjectionError`: setting this to `1` or `y` or `true` will prevent the loader from displaying an error message when a dll injection fails * `IgnoreLoaderArchDifference`: don't display an error message if the architecture of the loader is different from the app. this will result in a silent failure if a dll injection didn't succeed. @@ -62,9 +63,11 @@ This allows the loader to be used/called from other external apps which set addi The folder specified by this identifier should contain the .dll files you'd like to inject in the app earlier during its creation. All the subfolders inside this folder will be traversed recursively, and the .dll files inside these subfolders will be loaded/injected. -Additionaly, you can create a file called `load_order.txt` inside your folder (root level, not inside any subdir), mentioning on each line the .dll files to inject, the order of the lines will instruct the loader which .dll to inject first, the .dll mentioned on the first line will be injected first and so on. -Each line inside this file has to be the relative path to the target .dll, and it should be relative to your folder. Check the example. -Any .dll file not mentioned in this file will be loaded later, but in random order. +Additionaly, you can create a file called `load_order.txt` inside your folder (root level, not inside any subdir), mentioning on each line the .dll files to inject. +The order of the lines will instruct the loader which .dll to inject first, the .dll mentioned on the first line will be injected first and so on. +Each line inside this file has to be the relative path of your target .dll, and it should be relative to your folder. Check the example. + +If this file is created then the loader will only inject the .dll files mentioned inside it, otherwise it will attempt to find all valid .dll files and inject them. --- diff --git a/post_build/README.release.md b/post_build/README.release.md index 3fd16e1f..1bdd4dcb 100644 --- a/post_build/README.release.md +++ b/post_build/README.release.md @@ -14,7 +14,7 @@ https://gitlab.com/Mr_Goldberg/goldberg_emulator then move it inside the folder `steam_settings` 4. Move the entire folder `steam_settings` beside the emu .dll/.so. 5. Copy the the example files `steam_settings.EXAMPLE\configs.xxx.EXAMPLE.ini` and paste them inside your own `steam_settings` folder, then the postfix `.EXAMPLE`. - Make sure to only keep the options you need, don't sepecify everything +6. Make sure to keep the **only** options you need, do **NOT** sepecify everything inside these .ini files Mr.Goldberg's note: @@ -59,7 +59,7 @@ Any configurations inside your `steam_settings` folder will always override the ## Portable saves: -If you decided to use local saves by specifying the parameter `local_save_path` inside your local `steam_settings/configs.user.ini`, the emu will completely ignore the global settings folder, allowing a full portable behavior +If you want to use local/portable saves, specify the parameter `local_save_path` inside your local `steam_settings/configs.user.ini`, the emu will completely ignore the global settings folder, allowing a full portable behavior --- @@ -188,13 +188,11 @@ An example can be found in `steam_settings.EXAMPLE` --- ## Stats: -By default this emulators assumes all stats do not exist unless they have been written once by the game. -This works for the majority of games but some games might read a stat for the first time -and expect a default value to be read when doing so. +By default this emulator assumes all stats do not exist unless the option `allow_unknown_stats` in `configs.main.ini` is set to 1. -To set the type for each stat along with the default value, put a `stats.txt` file in the `steam_settings` folder. +To properly define the stats of a game, put a `stats.txt` file in the `steam_settings` folder. The format is: -`STAT_NAME=type=default value` +`stat_name=type=default value` The type can be * int diff --git a/tools/steamclient_loader/win/ColdClientLoader.ini b/tools/steamclient_loader/win/ColdClientLoader.ini index 3f7c26e2..991d3dc9 100644 --- a/tools/steamclient_loader/win/ColdClientLoader.ini +++ b/tools/steamclient_loader/win/ColdClientLoader.ini @@ -21,11 +21,12 @@ ForceInjectSteamClient=0 # force inject GameOverlayRenderer dll instead of waiting for the app to load it ForceInjectGameOverlayRenderer=0 -# path to a folder containing some dlls to inject into the app upon start +# path to a folder containing some dlls to inject into the app upon start, absolute path or relative to this loader # this folder will be traversed recursively # additionally, inside this folder you can create a file called `load_order.txt` and -# inside it, specify line by line the order of the dlls that have to be injected -# each line should be a relative path of the dll, relative to the injection folder +# specify line by line the order of the dlls that have to be injected +# each line should be the relative path of the target dll, relative to the injection folder +# If this file is created then the loader will only inject the .dll files mentioned inside it # example: #DllsToInjectFolder=extra_dlls DllsToInjectFolder=