Closed pedroaugustobt closed 10 months ago
Replace originalAlphabets
and originalTongues
for:
languages = {
"common": {
label: "Common",
font: "Thorass",
},
"dwarven": {
label: "Dwarven",
font: "Dethek",
},
"elder": {
label: "Elder Speech",
font: "Espruar",
}
}
And replace:
- polyglot.registerSystem("TheWitcherTRPG", FictionalGameSystemLanguageProvider)
+ game.polyglot.api.registerSystem(FictionalGameSystemLanguageProvider)
Thanks, it's working!!!!
System Name: TheWitcherTRPG (https://github.com/AnthonyMonette/TheWitcherTRPG/tree/main)
I'm integrating Polyglota for this system and I came across an error. According to all my current attempts and logs, the error is when registering the module or system using the reference listed in its API (polyglot.registerSystem("TheWitcherTRPG", FictionalGameSystemLanguageProvider), polyglot.registerModule("TheWitcherTRPG", FictionalGameSystemLanguageProvider) ). The error in the console is this (ReferenceError: Error thrown in hooked function '' for hook 'polyglot.init'. polyglot is not defined).
Would there be any way to resolve it?
Hooks.once("polyglot.init", (LanguageProvider) => { console.log("Polyglot initialization started.") class FictionalGameSystemLanguageProvider extends LanguageProvider { languages = { common: { label: 'Common', font: 'Thorass', rng: 'default' }, dwarven: { label: 'Dwarven', font: 'Dethek', rng: 'default' }, elder: { label: 'Elder', font: 'Espruar', rng: 'default' }, }
})
Used code.