Translation
(→Contents of translation pack) |
m (→Contents of translation pack) |
||
(67 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{TOCRIGHT}} | ||
+ | {{finished}} | ||
+ | == Introduction == | ||
− | + | Blood Omnicide support translation packs in the form of separate [[PK3 | PK3 files]]. This article will explain how to edit them, creating your own localization pack. | |
− | + | ||
− | Blood Omnicide support translation packs in the form of separate [[PK3 | + | |
− | + | ||
− | This article will explain how to edit them, creating your own localization pack. | + | |
Translation packs follows this rules: | Translation packs follows this rules: | ||
Line 14: | Line 13: | ||
* More translation packs should be created to allow support for more languages | * More translation packs should be created to allow support for more languages | ||
− | = Names = | + | == Names == |
− | Standart naming for locale file is '''L-localename0.PK3''', where localename is language identificator. | + | Standart naming for locale file is '''L-localename0.PK3''', where localename is the language identificator. |
Example: localname is "espanol" and pack name will be '''L-espanol0.PK3'''. | Example: localname is "espanol" and pack name will be '''L-espanol0.PK3'''. | ||
Line 22: | Line 21: | ||
A number in the end is used to break up locale to separate PK3 files (or make update pack later), engine reads them in the order: '''L-espanol0.PK3''', '''L-espanol1.PK3''', '''L-espanol2.PK3''' etc. | A number in the end is used to break up locale to separate PK3 files (or make update pack later), engine reads them in the order: '''L-espanol0.PK3''', '''L-espanol1.PK3''', '''L-espanol2.PK3''' etc. | ||
− | = Text encoding = | + | == Text encoding == |
− | All text files should use UTF-8 encoding with no BOM (Byte-Order-Mark). | + | All text files should use Unicode (UTF-8) encoding with no BOM (Byte-Order-Mark). National encodings (ones Windows Notepad uses) are not suppored. |
− | + | Tools to edit text files in UTF-8: | |
+ | * [http://notepad-plus-plus.org/ Notepad++] | ||
+ | * [http://akelpad.sourceforge.net AkelPad] | ||
− | + | == Contents of translation pack == | |
− | + | ||
− | + | ||
− | + | ||
− | = Contents of translation pack = | + | |
* '''kain''' - base folder | * '''kain''' - base folder | ||
** '''locales''' | ** '''locales''' | ||
*** ''localename.nsx'' - heading locale script | *** ''localename.nsx'' - heading locale script | ||
− | *** ''localename.tga'' - а picture to | + | *** ''localename.tga'' - а picture to be shown in the locale selection menu |
*** '''locale/''' - general locales folder | *** '''locale/''' - general locales folder | ||
**** '''localename/''' - base locale folder | **** '''localename/''' - base locale folder | ||
− | **** '''fonts/''' - font definition files and font faces (see [[ | + | **** '''fonts/''' - font definition files and font faces (see [[NSX_(QFont) | QFONT files]]) |
− | **** ''' | + | **** '''gfx/''' - replacements for UI textures (kain/gfx). |
− | **** '' | + | **** '''models/''' - replacements for model textures (kain/models). |
− | **** ''credits.nsx'' - translation strings for credits | + | **** '''speech/''' - replacements for speech sounds (kain/sound/speech). |
− | **** ''gameover.nsx'' - translation strings for game over screen | + | **** '''strings/''' - all translation strings in the form of INI files (see [[NSX | NSX files]]) |
− | **** ''gamestats.nsx'' - translation strings for game stats | + | ***** ''characters.nsx'' - [[NSX (Translation string files) | translation strings]] for character names |
− | **** ''menu.nsx'' - translation strings for menus | + | ***** ''credits.nsx'' - translation strings for credits |
− | **** ''prestige.nsx'' - translation strings for prestige status | + | ***** ''gameover.nsx'' - translation strings for demo screen |
− | **** ''speech.nsx'' - translation strings for speech | + | ***** ''demo.nsx'' - translation strings for game over screen |
− | **** '' | + | ***** ''launcher.nsx'' - translation strings for game launcher. Should be ASCII (Ansi English) encoded, because currently launcher does not support UTF-8. |
+ | ***** ''launcher.utf8'' - a utf8-version of language translation. It is better to make utf8 first, then convert to ANSI. | ||
+ | ***** ''installer.nsx'' - translation strings for game installer. Should be ANSI encoded, because currently installer does not support UTF-8. | ||
+ | ***** ''installer.utf8'' - a utf8-version of installer translation. It is better to make utf8 first, then convert to ANSI. | ||
+ | ***** ''gamestats.nsx'' - translation strings for game stats | ||
+ | ***** ''mapnames.nsx'' - translation strings for map names (keys are filenames under kain/maps, values are names) | ||
+ | ***** ''menu.nsx'' - translation strings for menus | ||
+ | ***** ''prestige.nsx'' - translation strings for prestige status | ||
+ | ***** ''speech.nsx'' - translation strings for speech | ||
+ | **** '''video/'''- subtitles translation for FMV' (see [[DPSUBS | DPSUBS files]]) | ||
+ | **** '''textures/''' - replacements for map textures (kain/textures). | ||
+ | **** ''ui.ns2'' - user interface function (contains a numbering and date functions) | ||
− | = How to make a translation = | + | == How to make a translation == |
− | # Download | + | # Download sample pack; |
− | # Find .TTF/.OTF that matches your language and place them to the pack; | + | # Unpack it so that you have access to all files |
− | # Translate all strings files (.nsx); | + | # Rename it to your language |
+ | # Find .TTF/.OTF fonts that matches your language and place them to the pack (replace default fonts); | ||
+ | # Translate all the strings files (.nsx); | ||
+ | # Translate cinematics subtitles (.dpsubs) | ||
# Translate ui.ns2; | # Translate ui.ns2; | ||
+ | # Create translated worldmap tile | ||
# Create a picture to show in the locale selection menu; | # Create a picture to show in the locale selection menu; | ||
# Edit heading locale script (set author and version); | # Edit heading locale script (set author and version); | ||
+ | # (Optional) Add replacement speech sound files files | ||
+ | # (Optional) Add cinematics sound override files | ||
# Make a [[PK3]] file; | # Make a [[PK3]] file; | ||
+ | |||
+ | == Translating speech == | ||
+ | |||
+ | === How speech scripts works === | ||
+ | |||
+ | Speeches are activated by a game scripts which calls a ''character'':''group'':''key'' name to be played. Characters are defined in <locale>/strings/characters.nsx file (also can be defined in any other .nsx file under <locale>/strings/ in the [character] group). Groups are speech groups, defined inside NSX files in the ''[speech_<groupname>]'' style. There are separate groups for kain monologues, scene speech, gossip etc. Keys are key name inside speech groups, a value given to that key sets a text for speech. | ||
+ | |||
+ | Character+Grops+Keys form a unique speech, which has a text (a value of key) and matching sound file. The sound file path is expected to be: <basepath>/key.ogg or / <speechbase>/key.wav. The ''basepath'' is a basepath for speech files which are set per-character in the [speech] group (defined in very top of speech.nsx). For example, basepath for speech of kain character is 'speech/kain/'. | ||
+ | |||
+ | Example: | ||
+ | |||
+ | [speech] | ||
+ | kain=speech/kain/ | ||
+ | |||
+ | [speech_kain] | ||
+ | aver1=The gate of Avernus opened slowly before me, daring me to cross the threshold.<5.5>Who was I to reject such an invitation?<9> | ||
+ | aver2=Avernus consumed itself before my eyes. There seemed no easy path to gain entry to the hell laid out before me.<8.5>Perhaps there was a way inside from above the chaos that reigned there.<13> | ||
+ | |||
+ | This file defines two speeches: | ||
+ | * kain:kain:aver1 - points to speech/kain/aver1 | ||
+ | * kain:kain:aver2 - points to speech/kain/aver2 | ||
+ | |||
+ | === The speech text === | ||
+ | Speech text are subtitles text, which also should have ''timing marks'' to break speech in several parts to be played in sequence. It is important to break speech text into a parts as blood omen have some very large speech files, more than 50 seconds, which will take a half-screen for a text if shown all at once. | ||
+ | |||
+ | The timing mark are set as **<seconds>** tag, where ''seconds'' is a time, when text after timing mark will be displayed. The last <seconds> tag sets a length of whole speech, so if speech sound file get missing, speech are displayed anyway. | ||
+ | |||
+ | Example: | ||
+ | |||
+ | aver1=The gate of Avernus opened slowly before me, daring me to cross the threshold.<5.5>Who was I to reject such an invitation?<9> | ||
+ | |||
+ | This breaks aver1 speech into 2 parts: | ||
+ | * ''The gate of Avernus opened slowly before me, daring me to cross the threshold.'' | ||
+ | * ''Who was I to reject such an invitation?'' (starts at 5.5 seconds). | ||
+ | The whole length of speech is 9 seconds. | ||
+ | |||
+ | === Different game versions === | ||
+ | |||
+ | There are some special groups which are used to override the speech files based on current game version. | ||
+ | |||
+ | The [!PlayStation!] group sets the speech keys to override default speech, in playstation version of the game. It is proven that PlayStation version have some speech shortened and [!PlayStation!] groups lets it have adequate subtitles. The syntax of speech keys in [!PlayStation!] group is ''group_key=speech text''. | ||
+ | |||
+ | === Testing speech in game === | ||
+ | |||
+ | ==== Re-load locale ==== | ||
+ | {{cmd|menu_restart| [[console]] command to restart menu system and re-load the current locale.}} | ||
+ | |||
+ | When editing locale strings on-the-fly, use this command to force reload strings in order for changes to take effect. | ||
+ | |||
+ | ==== Play particular speech ==== | ||
+ | {{cmd|speech <action> <character> <group> <key> [wait_after_played] [delay_before_played] | [[console]] command helps to test any speech}} | ||
+ | |||
+ | Actions are: | ||
+ | *say - standart speech | ||
+ | *notice- heard 'in the player's head', used for someone's comments etc. | ||
+ | *overhead - npc talk (yellow text) | ||
+ | |||
+ | Examples: | ||
+ | speech say kain armor_desc 0 | ||
+ | speech say kain kain aver1 | ||
+ | speech say rogue gossip coor3 | ||
+ | |||
+ | {important|when editing speech.nsx on the fly, call the menu_restart command in the game for tha changes to take effect}} | ||
+ | |||
+ | ==== Testing a whole locale ==== | ||
+ | {{cmd|testlocale <localename> [vs localename] | [[console]] command helps to test whole locale for missing or extra strings.}} | ||
+ | |||
+ | ''localename'' is the name of the locale to be tested. 'vs localename' additional arg can be supplied to test agains non-default locale (like testign ru-ru vs fr-fr). | ||
+ | |||
+ | Examples: | ||
+ | testlocale fr-fr | ||
+ | textlocale fr-fr vs ru-ru | ||
+ | |||
+ | Example of command output: | ||
+ | string missing: '[speech_guardian] dej2' (locale/default/strings/speech.nsx:435) | ||
+ | extra string: '[!PlayStation!] [speech_guardian_bane3]' (locale/ru-ru/strings/speech.nsx:561) - not defined in 'default' locale | ||
== Sample locale packs == | == Sample locale packs == | ||
Here is the list of reference locale packs that you can use as a base: | Here is the list of reference locale packs that you can use as a base: | ||
− | + | ''' Blood Omnicide v0.1 NEW SPEECH LAYOUT ''' | |
+ | |||
+ | :Base locale pack (includes all files and texture sources): [http://omnicide.razorwind.ru/files/omnicide/0.1/locales/defaultLocale.zip download] | ||
+ | |||
+ | :Sample russian locale: [http://omnicide.razorwind.ru/files/omnicide/0.1/locales/sampleLocaleRu.zip download] | ||
+ | |||
+ | ''' Blood Omnicide Demo ''' (Using old translation layout) | ||
:English: [http://omnicide.legacy-of-kain.ru/files/omnicide/demo/locales/L-default0.PK3 download] | :English: [http://omnicide.legacy-of-kain.ru/files/omnicide/demo/locales/L-default0.PK3 download] | ||
Line 70: | Line 166: | ||
:Espanol: [http://omnicide.legacy-of-kain.ru/files/omnicide/demo/locales/L-es_ES0.PK3 download] | :Espanol: [http://omnicide.legacy-of-kain.ru/files/omnicide/demo/locales/L-es_ES0.PK3 download] | ||
− | |||
− | + | {{finished}} |
Latest revision as of 01:50, 31 July 2016
Contents |
[edit] Introduction
Blood Omnicide support translation packs in the form of separate PK3 files. This article will explain how to edit them, creating your own localization pack.
Translation packs follows this rules:
- Translate texts, textures, sounds, everything
- Language can be chosen without quitting the game
- More translation packs should be created to allow support for more languages
[edit] Names
Standart naming for locale file is L-localename0.PK3, where localename is the language identificator.
Example: localname is "espanol" and pack name will be L-espanol0.PK3.
A number in the end is used to break up locale to separate PK3 files (or make update pack later), engine reads them in the order: L-espanol0.PK3, L-espanol1.PK3, L-espanol2.PK3 etc.
[edit] Text encoding
All text files should use Unicode (UTF-8) encoding with no BOM (Byte-Order-Mark). National encodings (ones Windows Notepad uses) are not suppored.
Tools to edit text files in UTF-8:
[edit] Contents of translation pack
- kain - base folder
- locales
- localename.nsx - heading locale script
- localename.tga - а picture to be shown in the locale selection menu
- locale/ - general locales folder
- localename/ - base locale folder
- fonts/ - font definition files and font faces (see QFONT files)
- gfx/ - replacements for UI textures (kain/gfx).
- models/ - replacements for model textures (kain/models).
- speech/ - replacements for speech sounds (kain/sound/speech).
- strings/ - all translation strings in the form of INI files (see NSX files)
- characters.nsx - translation strings for character names
- credits.nsx - translation strings for credits
- gameover.nsx - translation strings for demo screen
- demo.nsx - translation strings for game over screen
- launcher.nsx - translation strings for game launcher. Should be ASCII (Ansi English) encoded, because currently launcher does not support UTF-8.
- launcher.utf8 - a utf8-version of language translation. It is better to make utf8 first, then convert to ANSI.
- installer.nsx - translation strings for game installer. Should be ANSI encoded, because currently installer does not support UTF-8.
- installer.utf8 - a utf8-version of installer translation. It is better to make utf8 first, then convert to ANSI.
- gamestats.nsx - translation strings for game stats
- mapnames.nsx - translation strings for map names (keys are filenames under kain/maps, values are names)
- menu.nsx - translation strings for menus
- prestige.nsx - translation strings for prestige status
- speech.nsx - translation strings for speech
- video/- subtitles translation for FMV' (see DPSUBS files)
- textures/ - replacements for map textures (kain/textures).
- ui.ns2 - user interface function (contains a numbering and date functions)
- locales
[edit] How to make a translation
- Download sample pack;
- Unpack it so that you have access to all files
- Rename it to your language
- Find .TTF/.OTF fonts that matches your language and place them to the pack (replace default fonts);
- Translate all the strings files (.nsx);
- Translate cinematics subtitles (.dpsubs)
- Translate ui.ns2;
- Create translated worldmap tile
- Create a picture to show in the locale selection menu;
- Edit heading locale script (set author and version);
- (Optional) Add replacement speech sound files files
- (Optional) Add cinematics sound override files
- Make a PK3 file;
[edit] Translating speech
[edit] How speech scripts works
Speeches are activated by a game scripts which calls a character:group:key name to be played. Characters are defined in <locale>/strings/characters.nsx file (also can be defined in any other .nsx file under <locale>/strings/ in the [character] group). Groups are speech groups, defined inside NSX files in the [speech_<groupname>] style. There are separate groups for kain monologues, scene speech, gossip etc. Keys are key name inside speech groups, a value given to that key sets a text for speech.
Character+Grops+Keys form a unique speech, which has a text (a value of key) and matching sound file. The sound file path is expected to be: <basepath>/key.ogg or / <speechbase>/key.wav. The basepath is a basepath for speech files which are set per-character in the [speech] group (defined in very top of speech.nsx). For example, basepath for speech of kain character is 'speech/kain/'.
Example:
[speech] kain=speech/kain/
[speech_kain] aver1=The gate of Avernus opened slowly before me, daring me to cross the threshold.<5.5>Who was I to reject such an invitation?<9> aver2=Avernus consumed itself before my eyes. There seemed no easy path to gain entry to the hell laid out before me.<8.5>Perhaps there was a way inside from above the chaos that reigned there.<13>
This file defines two speeches:
- kain:kain:aver1 - points to speech/kain/aver1
- kain:kain:aver2 - points to speech/kain/aver2
[edit] The speech text
Speech text are subtitles text, which also should have timing marks to break speech in several parts to be played in sequence. It is important to break speech text into a parts as blood omen have some very large speech files, more than 50 seconds, which will take a half-screen for a text if shown all at once.
The timing mark are set as **<seconds>** tag, where seconds is a time, when text after timing mark will be displayed. The last <seconds> tag sets a length of whole speech, so if speech sound file get missing, speech are displayed anyway.
Example:
aver1=The gate of Avernus opened slowly before me, daring me to cross the threshold.<5.5>Who was I to reject such an invitation?<9>
This breaks aver1 speech into 2 parts:
- The gate of Avernus opened slowly before me, daring me to cross the threshold.
- Who was I to reject such an invitation? (starts at 5.5 seconds).
The whole length of speech is 9 seconds.
[edit] Different game versions
There are some special groups which are used to override the speech files based on current game version.
The [!PlayStation!] group sets the speech keys to override default speech, in playstation version of the game. It is proven that PlayStation version have some speech shortened and [!PlayStation!] groups lets it have adequate subtitles. The syntax of speech keys in [!PlayStation!] group is group_key=speech text.
[edit] Testing speech in game
[edit] Re-load locale
When editing locale strings on-the-fly, use this command to force reload strings in order for changes to take effect.
[edit] Play particular speech
Actions are:
- say - standart speech
- notice- heard 'in the player's head', used for someone's comments etc.
- overhead - npc talk (yellow text)
Examples:
speech say kain armor_desc 0 speech say kain kain aver1 speech say rogue gossip coor3
{important|when editing speech.nsx on the fly, call the menu_restart command in the game for tha changes to take effect}}
[edit] Testing a whole locale
localename is the name of the locale to be tested. 'vs localename' additional arg can be supplied to test agains non-default locale (like testign ru-ru vs fr-fr).
Examples:
testlocale fr-fr textlocale fr-fr vs ru-ru
Example of command output:
string missing: '[speech_guardian] dej2' (locale/default/strings/speech.nsx:435) extra string: '[!PlayStation!] [speech_guardian_bane3]' (locale/ru-ru/strings/speech.nsx:561) - not defined in 'default' locale
[edit] Sample locale packs
Here is the list of reference locale packs that you can use as a base:
Blood Omnicide v0.1 NEW SPEECH LAYOUT
- Base locale pack (includes all files and texture sources): download
- Sample russian locale: download
Blood Omnicide Demo (Using old translation layout)
- English: download
- Russian: download
- Espanol: download