Modding: howto add new text

From AoW: Planetfall
Jump to navigation Jump to search

Adding a new localized text file[edit]

If you want to add new things like units or abilities into the game, you will also need to add new text into the game so that those units and spells have distinct names and descriptions. You can add new text into the game by creating your own XML files, based on the example XML file provided on our website.

This XML file is best edited in a spreadsheet program, such as Microsoft Excel or LibreOffice. Make sure you save the file as an Excel 2003 XML file once you are done editing it.

The unique name of your XML file should be placed in cell A1. Then, each string you add is identified by two other names, a SCENE ID and a TEXT ID. By adding all three together, you can get a sort unique identifier for the string. The string in the above spreadsheet is identified by: EXAMPLE@EXAMPLE_SCENE@NAME

You should always enter the English version of the text into the “ENGLISH STRING” column in the Documents\Paradox Interactive\Age of Wonders Planetfall\Mods\VanguardCommandoMod\Language\EN\NewXML.xml file. Any translated versions of the text go in different translated XML files found in their respective maps found in Documents\Paradox Interactive\Age of Wonders Planetfall\Mods\VanguardCommandoMod\Language\

To actually link the xml to game you will have to link the xml to a resource pack:
Modding text 01.PNG
Steps

  1. Open Package Manager, open your mod and launch ResourceEd
  2. Open the resource pack .rpk you want to link your xml file to.
  3. Goto Content - Language to actually link it.


Modding text 02.PNG
NOTE: the VanguardCommandoMod.7z features all the xml files to add a new unit. This works for any ability or spell. Rename the files and A1 cell to create unique files.


Formatting Text[edit]

The game supports tags being placed into text to change formatting and insert icons into the text. These tags always begin and end with [square brackets]. If a tag needs to be opened and closed, then closing tag is marked with a /. For example: [bold] Bold Text Here! [/bold] If a tag doesn’t need to be closed, then it should have a / just before the closing square bracket. For example: [/] A list of useful tags is included at the end of this document.

String Key Replacers[edit]

You will notice that many unit abilities and spells have a field called “String Key Replacer”. This system can be used to replace a piece of text in an abilities name or description with another piece of text, usually a number representing a duration or an amount of damage. This is done to allow designers to change values in resources without having them need to change the localized strings which contain data about what they changed.

For example, the description for Hypermetabolism says: Heal for {Lifesteal}[hp/] per attack.

Using the String Key Replacer system {Lifesteal} is replaced with “+6”. If someone wants to change the strength of Hypermetabolism later on, they only need to change the replacer rather than the description of the ability itself.

Useful Text Tags[edit]

The game features many tags for formatting, layout, icons and colors. They can be found in a separate document. See Planetfall TML Tags.pdf.

Quick Guide: Adding your own Localized Text to your Mod[edit]

  • Download the VanguardCommandoMod.7z file from our website.
  • Goto the \Language folder and notice for each language there is a map with an XML file and Name.txt
  • The Name.txt file should not be changed and match the base game’s Language folder
  • Copy the files into your mod’s folder. The XML filename should be unique! To be safe, it’s probably a good idea to give it the same name as your mod.
  • To check that the XML file is in the right place, open your Package in the Package Manager. The XML file should appear in the list of Included Files.
  • Open the XML file in Excel or LibreOffice’s spreadsheet editor
  • Change the value in cell A1 to the name of the XML file. The name should be in ALL CAPITAL LETTERS with NO SPACES.
  • Add your own text entries, starting from row 5.
  • Each string should have a SCENE_ID and a TEXT_ID. Make sure both are ALL CAPITAL LETTERS with NO SPACES.
  • Copy the English text from the ENGLISH STRING column into the LOCALIZED STRING column for the other language XML files (or fill in translated text, if you have it)
  • Make sure the XML file is not being edited when you launch the game! Excel will block the game from loading if it’s editing the XML file.

Quick Guide: Adding a new language and voice to the game[edit]

It is now possible to add a new language to the game using mods. How do you add a new language to the game?

First create a new mod:

  • Launch the Package Manager (Game Editor)
  • In the Package Manager, select “New” from the file menu
  • Enter the file name for your mod and click “Set”
  • Give your Mod a title
  • Optionally add a mod preview image

To actually add a new language copy an existing Language from the base game to your mod

  • Copy \Steam\steamapps\common\Age of Wonders Planetfall\Language\PL to Documents\Paradox Interactive\Age of Wonders Planetfall\Mods\NewLanguageModName\Language
  • For example if you want add the Italian language rename \PL to \IT
  • Edit Name.txt found in Steam\steamapps\common\Age of Wonders Planetfall\Language\IT and add the name of the Language here
  • Mass rename all the XML files with a wildcard XXX_PL.xml to _IT.xml
  • You can easily do this by opening a command prompt and using ren *_PL.xml *_IT.xml
  • Now you ready to translate all the base game text using the LOCALIZED STRING in each xml.

Optionally you can also add voice for your language to the mod. Age of Wonders Planetfall only features english voice / full audio. So this also works for existing languages already in the game.

In order to add voice:

  • Copy english the voice files from Steam\steamapps\common\Age of Wonders Planetfall\Language\EN\Title\Voices to Steam\steamapps\common\Age of Wonders Planetfall\Language\IT\Title
  • Do this also for any DLC content to the right map.
  • Replace the english voice files with your new recordings keeping the file naming intact.