Closed orffen closed 11 months ago
I'm not sure if this is entirely necessary; it's really just for consistency and any future translations. I came across this when I was going to use {{localize BASICFANTASYRPG.SpecialAbility}}
and realised that string says "Special Abilities" instead of what I expected.
However, developing migration scripts is probably a good idea - eventually we'll make a change to the system that will need to handle pre-existing objects.
Actually I need to figure this out as part of the r13 planned release; I'm making a change to Special Abilities which would allow them to be toggled as roll under/roll over; all pre-existing abilities then need to be set by default to rollUnder: true
; since this will be a new field.
In actor.mjs
within _prepareMonsterData()
, something like:
// Migration code to handle label rename
if (data.specialAbility.label === 'BASICFANTASYRPG.SpecialAbility')
data.specialAbility.label = 'BASICFANTASYRPG.SpecialAbilityBonus';
This hack would work I think in the short-term; longer term we should move to a system data model instead.
Rename the 'monster' type Actor
specialAbility
tospecialAbilityBonus
.All references will need to be updated as a result.
In
en.json
, we also have some translation strings which need to be changed:"BASICFANTASYRPG.SpecialAbilityBonus": "Special Ability Bonus",
"BASICFANTASYRPG.SpecialAbility": "Special Abilities",
to"BASICFANTASYRPG.SpecialAbility": "Special Ability",
However we need a migration path to update all existing 'monster' type Actors in the world and also in compendiums (this is also needed to update @Stew-rt's compendiums).
I think this will need to be performed as part of
Document.migrateSystemData()
. Something along the lines of: