Skip to content

Commit 41a99f7

Browse files
authored
Merge pull request #10322 from DestinyItemManager/clarity-schema-1.9
Clarity Stats schema 1.9
2 parents 2f743cf + 3fdb62b commit 41a99f7

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

config/i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,7 @@
12271227
"StrafingSpeed": "Strafing",
12281228
"CrouchingSpeed": "Crouching",
12291229
"TotalHP": "Total HP",
1230+
"ShieldHP": "Shield HP",
12301231
"DamageResistance": "PvE Damage Resist",
12311232
"FlinchResistance": "Flinch Resist"
12321233
},

src/app/clarity/descriptions/character-stats.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export interface Ability {
1919
Cooldowns: number[];
2020
/** Represents the behavior of certain abilities possessing additional scaling on their cooldown depending on the number of stored ability charges. The array's length represents the number of charges an ability has intrinsically. Numbers at every array index represent the Charge Rate scalar for the ability with [index] number of stored ability charges. As this is a Charge Rate scalar, cooldown times can be calculated by dividing the times in the Cooldowns member of abilities by the scalars in this array. Do note that this is not a required member of Ability objects and will only be present if an ability has multiple charges. (Therefore, if this property is absent, it is to be assumed that the ability only has a single charge by default) */
2121
ChargeBasedScaling?: number[];
22+
/** Abilities receive different amounts of 'chunk energy' from things like mods and other sources depending on their base cooldown. So let's say an armor mod gives you 10% grenade energy when popping your class ability — you'd multiply that 10% by the number listed here to arrive at the final amount you'll actually receive. An user-facing explanation of this property is available at the top level of the CharacterStat object under <ChunkEnergyScalarDescription>. */
23+
ChunkEnergyScalar?: number;
24+
/** This number represents the scalar for how much benefit you get from active super regeneration with your super ability. This ranges from 0.8 for a Tier 1 super to 1.2 for a Tier 5 super. Active Regen refers to any source of super energy that isn't just passively waiting for it to recharge. So aside from the normal passive regen and other effects that are 'additional base super regen', these influence everything. Be it collecting orbs of power, killing enemies (including assists), taking and dealing damage, armor mods, this covers everything else. */
25+
ActiveRegenScalar?: number;
2226
}
2327

2428
/** Contains a locale ID that you can use to grab the description for the item in your selected language. The ID is provided in a [key].[value] format where there can be an arbitrary number of keys (though it'll be 2-3 at most). Then you can use these keys and values to query the './locale/[language code].json' files for the desired description. */
@@ -29,12 +33,6 @@ export interface SuperAbility {
2933
Hash: number;
3034
/** Array index represents the Character Stat tier. Cooldowns are in seconds. Rounded to 2 decimal points. Note: Rounding to 2 decimal places is solely for improving math precision when combined with Override objects. When displaying these cooldown times, it is STRONGLY recommended to round them to an integer. */
3135
Cooldowns: number[];
32-
/** Numbers are provided in Damage Resist percentages and represent the Damage Resistance the super provied inside PvP. If the array is empty, the DR value is still unknown. If the array only contains one value, it represents the passive DR of the super. If the value is -9999, the value is still unknown (workaround that allows only inputting one of the PvE or PvP values. If other values are present, check the condition array for the conditions of each of them. */
33-
PvPDamageResistance: number[];
34-
/** Same length as the PvPDamageResistance array and works the exact same way except it stores the DR values for PvE. */
35-
PvEDamageResistance: number[];
36-
/** Array length matches the length of the DamageResistance arrays. This property can be ignored when the length of the arrays is 1 as that represents the passive DR of the Super that doesn't have a condition. The array contains the condition for each Damage Resist value at the same index in the DamageResistance arrays. Unfortunately, there is no way to realistically account for all the different conditions without using simple text for it so these will be succinct descriptions instead of item hashes or the like. */
37-
DRCondition: Description[];
3836
}
3937

4038
export interface Override {
@@ -43,7 +41,7 @@ export interface Override {
4341
/** The inventoryItem hash of each ability that is required to trigger the effects of this 'Override'. Only overrides 'Abilities' under the same Character Stat as the 'Override'. Any one of these will trigger its effect defined in the other 'Override' properties. Wildcards: if the requirements array only contains 1 item and it's a 0, any ability tied to this Character Stat will have its cooldown overwritten. Negative numbers in the array indicate filters, these will be the inventoryItem hashes of subclasses multiplied by -1. Any abilities tied to the given subclass will have their cooldowns overwritten. */
4442
Requirements: number[];
4543

46-
// One of CooldownOverride, Scalar, or FlatIncrease will be set.
44+
// One of CooldownOverride, Scalar, or ChunkEnergyOverride will be set.
4745

4846
/** Array index represents the Character Stat tier. Cooldowns are in seconds. Rounded to 2 decimal points. Overrides the cooldowns of the items listed in the 'Requirements' array before the scalar is applied. Identical to the 'Cooldowns' array of the 'Ability' object. */
4947
CooldownOverride?: number[];
@@ -52,9 +50,9 @@ export interface Override {
5250
*/
5351
Scalar?: number[];
5452
/**
55-
* Length of the array is equal to the length of the 'Requirements' array. Each item represents a flat increase to the cooldown time of the abilities (of a subclass) listed in the 'Requirements' array at the same array index. If 'CooldownOverride' or 'Scalar' property is specified: Time is added to the cooldown times at every tier after 'CooldownOverride's and 'Scalar's have been applied.
53+
* Length of the array is equal to the length of the <Requirements> array. Each item represents an override of the <ChunkEnergyScalar> property of the abilities (of a subclass) listed in the <Requirements> array at the same array index. If <CooldownOverride> or <Scalar> property is specified: Time is added to the cooldown times at every tier after <CooldownOverride>s and <Scalar>s have been applied.
5654
*/
57-
FlatIncrease?: number[];
55+
ChunkEnergyOverride?: number[];
5856
}
5957

6058
export interface StatAbilities {
@@ -91,8 +89,8 @@ export interface Recovery extends StatAbilities {
9189
}
9290

9391
export interface Resilience extends StatAbilities {
94-
/** Array index represents the Resilience tier. The numbers represent your total HP at each tier. 'Health' is a static 70 HP, the rest are what Bungie calls 'Shields' in-game. If you wish to display them separately, just subtract 70 from the numbers to get your shield HP. */
95-
TotalHP: DescriptionArray;
92+
/** Array index represents the Resilience tier. The numbers represent how much HP your <Shields> have at each tier. <Shields> are the 115 to 130 HP 'right-side portion' of your Total HP alongside <Health>. The amount of <Health> you have depends on the activity: 100 HP in most Crucible playlists (excluding Momentum Control and Mayhem) and 70 HP everywhere else. */
93+
ShieldHP: DescriptionArray;
9694
/** Array index represents the Resilience tier. The numbers represent the percentage damage resistance granted IN PVE at each tier. */
9795
PvEDamageResistance: DescriptionArray;
9896
/** Array index represents the Resilience tier. The numbers represent the percentage flinch resistance granted at each tier. */

src/app/clarity/descriptions/loadDescriptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const urls = {
1616
statsVersion: `${CLARITY_BASE}Character-Stats/update.json`,
1717
} as const;
1818

19-
const CLARITY_STATS_SUPPORTED_SCHEMA = '1.8';
19+
const CLARITY_STATS_SUPPORTED_SCHEMA = '1.9';
2020

2121
const fetchClarity = async <T>(type: keyof typeof urls, version?: string) => {
2222
const url = urls[type];

src/app/store-stats/ClarityCharacterStat.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ export default function ClarityCharacterStat({
8989
if (scalar) {
9090
cooldowns = cooldowns.map((v) => scalar * v);
9191
}
92-
const flatIncrease = o.FlatIncrease?.[abilityIndex];
93-
if (flatIncrease) {
94-
cooldowns = cooldowns.map((v) => v + flatIncrease);
95-
}
9692
overrides.push(defs.InventoryItem.get(o.Hash));
9793
}
9894
}
@@ -137,12 +133,14 @@ export default function ClarityCharacterStat({
137133
unit={t('Stats.MetersPerSecond')}
138134
/>,
139135
);
140-
} else if ('TotalHP' in clarityStatData) {
136+
} else if ('ShieldHP' in clarityStatData) {
141137
intrinsicCooldowns.push(
142138
<StatTableRow
143-
key="TotalHP"
144-
name={t('Stats.TotalHP')}
145-
cooldowns={clarityStatData.TotalHP.Array}
139+
key="ShieldHP"
140+
// t('Stats.TotalHP')
141+
// keep this around maybe?
142+
name={t('Stats.ShieldHP')}
143+
cooldowns={clarityStatData.ShieldHP.Array}
146144
tier={tier}
147145
unit={t('Stats.HP')}
148146
/>,

src/locale/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,7 @@
12071207
"PowerModifier": "Power granted by seasonal experience progression",
12081208
"Prestige": "Prestige Level: {{level}}\n{{exp}}xp until 5 motes of light.",
12091209
"Quality": "Stats quality",
1210+
"ShieldHP": "Shield HP",
12101211
"StrafingSpeed": "Strafing",
12111212
"Strength": "Strength",
12121213
"Sunset": "Sunset",

0 commit comments

Comments
 (0)