Wiki for implementing the Scoring API in rundowns.
To implement custom scoring in a rundown, a ScoreTable.json
must be included in the rundown's /Custom
folder, and must be of a ScoreTable format.
A ScoreTable format consists of the following JSON structure:
{
"version": 1
"primary": PrimaryScore[],
"secondary": SecondaryScore[],
"melee": MeleeScore
}
Description: Internally used to differentiate different versions of ScoreTables if the format of them get updated. For now, this value should always be 1
.
Type: The integer 1
.
Description: Contains the scores for primary weapons, or GearStandard.
Type: An array of PrimaryScore formats, or PrimaryScore[].
Description: Contains the scores for secondary weapons, or GearSpecial.
Type: An array of SecondaryScore formats, or SecondaryScore[].
Description: Contains the score for melee weapons, or GearMelee.
Type: MeleeScore format, or MeleeScore.
A PrimaryScore format consists of the following JSON structure:
{
"persistentID": uint,
"hitScore": uint,
"killScore": uint
}
Description: An ID that maps the weapon to the one the same persistent ID specified in the GameData_ArchetypeDataBlock_bin.json
.
Type: An unsigned 32-bit integer, or uint
. A uint
can have a value between 0 and 4294967295 (inclusive).
Description: The total score awarded when a player achieves a hitmarker on an enemy. This score will not be awarded if the player kills the enemy.
Type: A Score format, or an unsigned 32-bit integer.
Default Value: The default value for a non-defined primary weapon is 10
.
Description: The total score awarded when a player achieves a kill.
Type: A Score format, or an unsigned 32-bit integer.
Default Value: The default value for a non-defined primary weapon is 200
.
A SecondaryScore format consists of the following JSON structure:
{
"persistentID": uint,
"hitScore": uint,
"killScore": uint
}
Description: An ID that maps the weapon to the one the same persistent ID specified in the GameData_ArchetypeDataBlock_bin.json
.
Type: An unsigned 32-bit integer, or uint
. A uint
can have a value between 0 and 4294967295 (inclusive).
Description: The total score awarded when a player achieves a hitmarker on an enemy. This score will not be awarded if the player kills the enemy.
Type: A Score format, or an unsigned 32-bit integer.
Default Value: The default value for a non-defined secondary weapon is 10
.
Description: The total score awarded when a player achieves a kill.
Type: A Score format, or an unsigned 32-bit integer.
Default Value: The default value for a non-defined secondary weapon is 100
.
A MeleeScore format consists of the following JSON structure:
{
"hitScore": uint,
"killScore": uint
}
Description: The total score awarded when a player achieves a hitmarker on an enemy. This score will not be awarded if the player kills the enemy.
Type: A Score format, or an unsigned 32-bit integer.
Default Value: The default value for a non-defined melee weapon is 10
.
Description: The total score awarded when a player achieves a kill.
Type: A Score format, or an unsigned 32-bit integer.
Default Value: The default value for a non-defined melee weapon is 130
.
An unsigned 32-bit integer, or uint
. A uint
can have a value between 0 and 4294967295 (inclusive).
Keep in mind the scoring system works in 10
increments, so 125
is not a valid score, but 120
is.
{
"hitScore": 10,
"killScore": 130
}
{
"persistentID": 35,
"hitScore": 10,
"killScore": 150
}
{
"persistentID": 67,
"hitScore": 10,
"killScore": 320
}
{
"version": 1,
"primary": [
{
"persistentID": 67,
"hitScore": 10,
"killScore": 320
}
],
"secondary": [
{
"persistentID": 35,
"hitScore": 10,
"killScore": 320
}
],
"melee": [
{
"hitScore": 10,
"killScore": 130
}
]
}