1
0
Fork 0
mirror of https://github.com/Detanup01/gbe_fork.git synced 2025-06-07 09:45:55 +02:00

Merge pull request #223 from GogoVang/dev

Update and rename stats.EXAMPLE.txt to stats.EXAMPLE.json
This commit is contained in:
Detanup01 2025-05-09 09:53:45 +02:00 committed by GitHub
commit e6b3a69e8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 54 additions and 10 deletions

View file

@ -190,16 +190,23 @@ An example can be found in `steam_settings.EXAMPLE`
## Stats:
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 properly define the stats of a game, put a `stats.txt` file in the `steam_settings` folder.
To properly define the stats of a game, put a `stats.json` file in the `steam_settings` folder.
The format is:
`stat_name=type=default value`
`{
"name": "stat_name",
"type": "stat_type",
"default": "default_value",
"global": "global_value"
}`
The type can be
* int
* float
* avgrate
The default value is simply a number that represents the default value for the stat.
The default value is simply a number that represents the default value for the stat.
The "global" value sets the global (shared) value of a specific stat, used by some games for features like DLC unlocks.
You can use the command line tool `generate_emu_config` to generate a stats config

View file

@ -0,0 +1,44 @@
[
{
"default": "0",
"global": "0",
"name": "lifetime_experience",
"type": "int"
},
{
"default": "0",
"global": "0",
"name": "experience",
"type": "int"
},
{
"default": "3.5",
"global": "0",
"name": "stat_example_name1",
"type": "float"
},
{
"default": "1337",
"global": "250000",
"name": "stat_example_name2",
"type": "int"
},
{
"default": "5",
"global": "5",
"name": "stat_example_name3",
"type": "int"
},
{
"default": "0",
"global": "0",
"name": "stat_example_name4",
"type": "float"
},
{
"default": "0",
"global": "0",
"name": "stat_example_name5",
"type": "avgrate"
}
]

View file

@ -1,7 +0,0 @@
lifetime_experience=int=0
experience=int=0
stat_example_name1=float=3.5
stat_example_name2=int=1337
stat_example_name3=int=0
stat_example_name4=float=0
stat_example_name5=avgrate=0