Localization

From DemonCrawl Wiki
Revision as of 22:19, 31 July 2020 by Thereforegames (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Therefore Games are currently in the process of adding localization support to DemonCrawl. As of v1.53, many strings can already be replaced through an external JSON file.

If you would like to translate DemonCrawl to another language--or if you simply want to swap out some item text with dank memes--this page will serve as a guide to help you get started.

Strings

DemonCrawl loads all of its strings on startup from the following file:

[Your Steam installation folder]\steamapps\Common\DemonCrawl\assets\strings\YourLanguage.json

Note: Many English strings are already hardcoded into the game and thus do not have to be included in your JSON file. If a string is missing from your JSON, DemonCrawl will fallback to the hardcoded English string.

You may switch your active language at the top of the Gameplay Options screen:

LanguageSelection.png

The list of languages is determined by the files found at the aforementioned path. If you wanted to translate DemonCrawl to Klingon, for example, you would first need to create a file called Klingon.json.

Formatting

In your DemonCrawl assets folder, you will find a file called Demo.json which contains every external string currently supported by the game. We recommend skimming through this file to get a better understanding of JSON formatting as well as DemonCrawl's key naming conventions. Do note that JSON is cAsE SeNsiTive.

Here are some examples:

Items

  • "Item":"Your Item Title"
  • "Item_desc":"Your item description."
  • "Item_msg":"A toast notification related to your item."

e.g.

  • "Brass Knuckles":"Brass Knuckles"
  • "Brass Knuckles_desc":"For the next 10 turns, you can powerchord any cell."
  • "Brass Knuckles_msg":"Your Brass Knuckles broke!"


Items may have multiple toast notifications, which are often suffixed with SUCCESS, FAIL, or one of DemonCrawl's event triggers:

  • PRE_DMG
  • DMG
  • PRE_ENTER_STAGE
  • ENTER_STAGE
  • BEGIN_STAGE
  • COMPLETE_STAGE
  • LEAVE_STAGE
  • GAIN_COINS
  • SPEND_COINS
  • SPEND_COINS_ALT
  • RESTORE_LIFE
  • GAIN_MAX_LIFE
  • LOSE_LIFE
  • LOSE_MAX_LIFE
  • ENTER_SPECIAL_STAGE
  • LEAVE_SPECIAL_STAGE
  • GAIN_DEFENSE
  • LOSE_DEFENSE
  • ARMOR_BREAK
  • ARMOR_REMOVE
  • GAIN_THIS_ITEM
  • GAIN_ITEM
  • CONSUME_ITEM
  • USE_THIS_ITEM
  • PRE_USE_ITEM
  • LOSE_ITEM
  • LOSE_THIS_ITEM
  • USE_MAGIC
  • COLLECT_LOOT
  • COLLECT_COIN
  • COLLECT_DIAMOND
  • COLLECT_HEART
  • COLLECT_CHEST
  • PRE_MONSTER_REVEAL
  • MONSTER_REVEAL
  • OBJECT_DIE
  • AFTER_OBJECT_DIE
  • SAWBLADE_EXPLODE
  • FAMILIAR_MOVE
  • MISTAKE
  • OPEN_CELL
  • DISCOVER_VALUE
  • STATUS_COMPLETE
  • STAGE_TIMER
  • EACH_TURN
  • QUEST_COMPLETE
  • GUARANTEE_OBJECTS
  • BUY_ITEM_SHOP
  • SPAWN_OBJECT
  • ORB_CREATE
  • PROJECTILE_CREATE
  • BURN_OBJECT
  • FREEZE_MONSTER
  • APPLY_AURA
  • PASS_TURN
  • CHAIN_WARNINGS
  • UPDATE_CHAIN
  • BREAK_CHAIN
  • ACTIVATE_MYSTIC_STATUE
  • TRY_POWERCHORD
  • UPDATE_SHOP
  • BEFORE_MAGIC
  • GAME_OVER
  • MAGIC_DO_COLUMN
  • MAGIC_DO_ROW
  • MAGIC_RADIUS
  • CANCEL_GAIN_MAX_LIFE
  • CANCEL_RESTORE_LIFE
  • ADJUST_RESTORE_LIFE_VALUE
  • ADJUST_COIN_VALUE
  • ADJUST_DIAMOND_VALUE
  • ADJUST_ITEM_FIND_MIN
  • ADJUST_ITEM_FIND_MAX
  • ADJUST_LOSE_LIFE_VALUE
  • ADJUST_STATUS_DURATION
  • REPEAT_STRANGER
  • REPEAT_REVEAL
  • STATUS_AFTER
  • STATUS_EVERY
  • STATUS_CANCEL
  • STATUS_REMOVE
  • DO_AUTODISCHARGE


Quests

  • "quest_Name":"Quest Name"
  • "quest_Name_desc":"Your quest description."

e.g.

  • "quest_Glory Days":"Glory Days"
  • "quest_Glory Days_desc":"The king has tasked you with the delivery of an important message to a land across the great waters. Use your renowned tracking skills to avoid the monsters along the way!"


Stages

  • "stage_Name":"Stage Name"
  • "stage_Name_desc":"Your stage description."
  • "stage_Name_sign":"The unique sign message for this stage."
  • "stage_Name_prefix":"The prefix name that appears as a hybrid stage."

e.g.

  • "stage_Forest":"Forest"
  • "stage_Forest_desc":"The journey begins here."
  • "stage_Forest_sign":"BEWARE: MONSTERS NEARBY"
  • "stage_Forest_prefix":"Wooded"


Stage Mods

  • "mod_Name":"Stage Mod Name"
  • "mod_Name_desc":"Your stage mod description."

e.g.

  • "mod_Burning":"Burning"
  • "mod_Burning_desc":"Stage contains burning cells. Monsters are never in burning cells."


Errors

  • "error_name":"The error string."

e.g.

  • "error_no_monsters":"You cannot use this until monsters have spawned"