Support achievements that are triggered automatically with stats.

The achievements config MUST be generated with the achievements_gen.py script.
This commit is contained in:
Mr_Goldberg 2022-07-12 01:09:27 -04:00
parent 3f8ce69b6d
commit 8695ea2dce
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
5 changed files with 151 additions and 76 deletions

View file

@ -88,6 +88,8 @@ You can use https://steamdb.info/ to list items and attributes they have and put
Keep in mind that some item are not valid to have in your inventory. For example, in PayDay2 all items below item_id 50000 will make your game crash.
items.json should contain all the item definitions for the game, default_items.json is the quantity of each item that you want a user to have initially in their inventory. By default the user will have no items.
You can use the scripts\stats_schema_achievement_gen\achievements_gen.py script in the emu source code repo to generate a achievements config from a steam: appcache\stats\UserGameStatsSchema_{appid}.bin file.
Leaderboards:
By default the emulator assumes all leaderboards queried by the game (FindLeaderboard()) exist and creates them with the most common options (sort method descending, display type numeric)
In some games this default behavior doesn't work and so you may need to tweak which leaderboards the game sees.
@ -105,6 +107,8 @@ The format is: STAT_NAME=type=default value
The type can be: int, float or avgrate
The default value is simply a number that represents the default value for the stat.
You can use the scripts\stats_schema_achievement_gen\achievements_gen.py script in the emu source code repo to generate a stats config from a steam: appcache\stats\UserGameStatsSchema_{appid}.bin file.
Build id:
Add a steam_settings\build_id.txt with the build id if the game doesn't show the correct build id and you want the emu to give it the correct one.
An example can be found in steam_settings.EXAMPLE