[DRAFT] Centralize ability balance values for localized descriptions#4032
Draft
Cinnlite wants to merge 8 commits into
Draft
[DRAFT] Centralize ability balance values for localized descriptions#4032Cinnlite wants to merge 8 commits into
Cinnlite wants to merge 8 commits into
Conversation
- derive gameplay and translated descriptions from shared values - generate the client definition registry automatically - validate translation placeholders and fallbacks - migrate Blizzard and Aqua Ring as initial examples
sylvainpolletvillard
requested changes
Jul 19, 2026
|
|
||
| export const AbilityConfigs = { | ||
| [Ability.AQUA_RING]: { | ||
| heal: [20, 40, 80, 160] |
Collaborator
There was a problem hiding this comment.
would need a way to store the ap/luck scaling info for these numbers. I suggest using the string format convention we already use in translations
suggestion:
Suggested change
| heal: [20, 40, 80, 160] | |
| heal: "[20,40,80,160,SP]" |
then the computeValue function would take care of parsing this format
Contributor
Author
There was a problem hiding this comment.
on hold: Will remove the different AP Scaling factors from abilities in separate PR and continue with this afterwards.
| const expectedFormats = getDynamicValueFormats(englishTemplate) | ||
| const actualFormats = getDynamicValueFormats(targetTemplate) | ||
| if (expectedFormats.join("|") !== actualFormats.join("|")) { | ||
| return `Dynamic value formatting must match English (including SP/LK): ${expectedFormats.join(", ")}` |
Collaborator
There was a problem hiding this comment.
if those formats per rank are part of the ability config and no longer the translation, no need to validate anything here
# Conflicts: # app/core/abilities/protect.ts # app/public/dist/client/locales/bg/translation.json # app/public/dist/client/locales/de/translation.json # app/public/dist/client/locales/en/translation.json # app/public/dist/client/locales/es/translation.json # app/public/dist/client/locales/fr/translation.json # app/public/dist/client/locales/it/translation.json # app/public/dist/client/locales/ja/translation.json # app/public/dist/client/locales/ko/translation.json # app/public/dist/client/locales/nl/translation.json # app/public/dist/client/locales/pt/translation.json # app/public/dist/client/locales/th/translation.json # app/public/dist/client/locales/vi/translation.json # app/public/dist/client/locales/zh/translation.json
…efinition-localization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This draft centralizes ability balance values so gameplay and localized descriptions can use the same numeric source.
It intentionally migrates only five abilities for now:
The goal is to validate the approach before migrating the remaining abilities.
Approach
Balance values are stored as plain objects in
config/game/abilities.ts.Ability strategies read values from this config and use
AbilityStrategy.computeValue()to select the correct value for the Pokémon’s star level.Translations retain their existing wording and presentation syntax, but numeric literals are replaced with named placeholders such as
{{damage}}and{{freezeDuration}}. The corresponding ability config is passed directly to i18next.The translation editor resolves these placeholders in its preview and prevents submissions when placeholders or dynamic-value formatting such as
SPandLKno longer match English.Benefits
Trade-offs