Skip to content

[PF2e] Languages

Matheus Clemente edited this page Jan 29, 2024 · 7 revisions

Resetting the Languages' Rarities

If you toggled the Remove Languages module setting off, you must have noticed the original languages are all set to Common rarity. To reset them, input the following into the console:

game.settings.set("pf2e", "homebrew.languageRarities", new (game.settings.get("pf2e", "homebrew.languageRarities").constructor)().toObject())

Tip

It won't delete any homebrew languages, but will reset them back to Common rarity.

Updating "Common" messages

If you want to update your messages in "Common" to a certain language, edit the LANGUAGE_KEY on the following macro:

Note

  • If it's a PF2e language, the language key is its lowercased name (e.g. "Taldane" -> "taldane").
  • If it's a custom language set on Polyglot, you must first create it on PF2e's Homebrew Elements menu first.
    • Avoid using special characters. Space and minus (-) are ok to use.
const LANGUAGE_KEY = null;

if (
  game.settings.get("pf2e", "homebrew.languages").some((l) => l.id === LANGUAGE_KEY)
  || CONFIG.PF2E.languages[LANGUAGE_KEY]
) {
  const changed = Array.from(game.messages)
    .slice(-100) // You can remove this line to update every message, but it is not advised
    .filter((m) => m.flags?.polyglot?.language === "common")
    .map((m) => {
    return {
      _id: m._id,
      "flags.polyglot.language": LANGUAGE_KEY 
    };
  });
  ChatMessage.updateDocuments(changed);
}

Warning

You can update all Common messages in your world but it is not advised on worlds with lots of chat messages.

Setting "Omni"-languages

You must create the languages on PF2e's Homebrew Elements menu and then add the language to the field you want.

Tip

The "Omni"-languages are meant to simulate the effects of some PF2e spells, such as the Translate and Truespeech spells, respectively represented by the Omniscient and Omnispeech settings.

The Omniglot setting has no gameplay counterpart.

Languages aren't being removed from the list

If the language was a previously default language (e.g. "Taldane" or "Gnomish"), this is merely a visual bug, it won't be removed immediately from the list, but it will be removed properly when saving changes.

Warning

If the language wasn't a default language, file an issue.