script extensions

From Wiki

Jump to: navigation, search
Line 33: Line 33:
  
 
'''''Tip: as of 1.1.1.7 you can change the colour of system, status, and subtitle and default dialog text (all one thing, three in total) independent of one another. Refer to [[#system_fonts_tint]], [[#status_fonts_tint]], and [[#lettering_tint]].'''''
 
'''''Tip: as of 1.1.1.7 you can change the colour of system, status, and subtitle and default dialog text (all one thing, three in total) independent of one another. Refer to [[#system_fonts_tint]], [[#status_fonts_tint]], and [[#lettering_tint]].'''''
 +
 +
===='''Previously of [Locale]'''====
 +
'''''Historical note: the following extensions were originally found in the [[Locale]] section. Now deceased.'''''
 +
 +
Extensions in this section pertain to the localization, or translation, of game text. Game text translation is handled differently from the translation of the tools that come with Sword of Moonlight. Refer to the [[#Editor]] section for tool translation.
 +
 +
''Note that the descriptions of the extensions here are not intended to be a translation "how-to" manual. However in addendum to [[#do_use_abbreviation_prefix]] and [[#do_use_contextual_prefixes]] below, there is a third type of prefix that is always considered and therefore has no associated extension. This prefix uses 20Bs_ and 16Bs_ respectively to translate truncated item names. Specifically 20Bs_ is used by the top-level Equip menu, and 16Bs_ is used in the Store menu. If an item's name is longer than 16Bs, or bytes, then the truncated version must also be translated. You can use this opportunity to devise abbreviated names. Regardless if the truncated name is not translated the item will not be translated in these menu screens.''
 +
 +
====do_use_abbreviation_prefix====
 +
{{Ex/inival|1.0.0.1|binary statements|in the affirmative looks for abbreviated versions of some of the text in menus that has historically been abbreviated upon translation due to screen and or character memory limitations. The abbreviated forms are prefixed with abbr_ in the script file|do}}
 +
 +
''Note that this is an extension because it becomes necessary to pull double duty for the abbreviated versions, though it is only single duty if there are abbreviated translations. Also a player may want to disable the abbreviations since wider resolutions tend to have more screen space, however this is not recommended nor yet supported by the built-in English translation. It is also helpful to be able to see at a glance that the game is, or is not, using the abbreviations.''
 +
 +
====do_use_builtin_english_by_default====
 +
{{Ex/inival|1.0.0.1|binary statements|in the affirmative translates all of Sword of Moonlight's Japanese text into a simplified ASCII English translation whenever a translation is not found with the game's script file. Some symbolic elements may still rely on non-ASCII characters. If the player's locale is ja_JP the original Japanese text is used by default. Note that the built-in English may change between releases|do}}
 +
 +
====do_use_builtin_locale_date_format====
 +
{{Ex/inival|1.0.0.1|binary statements|in the affirmative uses the international dates and figures settings on the player's computer for the game clock and the save game dates. The locale can be overridden, in a limited way, by [[#locale_to_use_for_dates_and_figures]]|do}}
 +
 +
====do_use_contextual_prefixes====
 +
{{Ex/inival|1.0.0.1|binary statements|in the affirmative looks for specialized versions of some of the text in menus that is identical letter by letter in Japanese yet might be translated differently in one place or the other. The prefixes are applied indiscriminately anywhere that they might be useful. The prefixes are not limited to the following however this is not necessarily the place for a comprehensive translation guide|do}}
 +
 +
{|class="floatleft" style="width:50ex; display:inline-block"
 +
|top_ ||menu screen name in the top left corner
 +
|-
 +
|sub_ ||menu item label in the left hand column
 +
|-
 +
|hp_ ||HP, or hit points, numbers in the menu
 +
|-
 +
|mp_ ||MP, or magic points, numbers in the menu
 +
|-
 +
|str_ ||Strength stat number in the menu
 +
|-
 +
|mag_ ||Magic stat number in the menu
 +
|-
 +
|exp_ ||EP, or experience points, number in the menu
 +
|-
 +
|gold_ ||Gold number in the menu
 +
|}
 +
{|class="floatleft"  style="clear:none; width:50ex; display:inline-block"
 +
|sls_ ||Slash affinity number in the menu
 +
|-
 +
|sms_ ||Smash affinity number in the menu
 +
|-
 +
|stb_ ||Stab affinity number in the menu
 +
|-
 +
|flm_ ||Flame affinity number in the menu
 +
|-
 +
|ert_ ||Earth affinity number in the menu
 +
|-
 +
|wnd_ ||Wind affinity number in the menu
 +
|-
 +
|wtr_ ||Water affinity number in the menu
 +
|-
 +
|hly_ ||Holy affinity number in the menu
 +
|}
 +
{|class="floatleft" style="clear:none; display:inline-block"
 +
|info_ ||appraisal screen text
 +
|-
 +
|shop_ ||shop "BUY" screen text
 +
|-
 +
|sell_ ||shop "SELL" screen text
 +
|-
 +
|hud_ ||gauges heads-up-display on/off setting
 +
|-
 +
|nav_ ||compass heads-up-display on/off setting
 +
|-
 +
|inv_ ||inventory item display on/off setting
 +
|-
 +
|bob_ ||walking effect on/off setting
 +
|-
 +
|cfg_ ||controller button assignment
 +
|}<br style="clear:left" />
 +
 +
Refer to [[#do_use_abbreviation_prefix]] for more explanation of prefixes in general.
 +
 +
====locale_to_use_for_dates_and_figures====
 +
{{Ex/inival|1.0.0.1|language and country code pairs|manually sets the locale used by [[#do_use_builtin_locale_date_format]] for times and dates. At some point this extension may also effect numeric stats for the few regions of the world that do not use Arabic numerals or decimal points however there would need to be a third extension to enact that behavior|ll_CC}}
 +
 +
''Note that the [[Windows]] Control Panel allows very fine grain control over different elements of displaying dates and figures, however this extension is only able to indiscriminately apply the default settings for a particular part of the world to both dates and figures.''
 +
 +
====locale_to_use_for_play====
 +
{{Ex/inival|1.0.0.1|language and country code pairs|manually specifies the locale to use. If a translation is unavailable then the current user account's locale is tried. And failing that [[#locale_to_use_for_play_if_not_found]] is tried|ll_CC}}
 +
 +
====locale_to_use_for_play_if_not_found====
 +
{{Ex/inival|1.0.0.1|language and country code pairs|specifies the default locale to use failing all else|ll_CC}}
 +
 +
====translation_to_use_for_play====
 +
{{Ex/inival|1.0.0.1|an ASCII only POSIX and NTFS legal file name|manually specifies the translation file to use relative to the locale folder with the file's extension stripped off. The default behavior is to use [[#international_translation_title]] or else [[#international_production_title]] or else ''script'' is used (''som_db'' prior to 1.1.2.3.)
 +
 +
The script file is looked for in the [[lang]]/ll_CC/LC_MESSAGES folder. Where ll_CC is a [[#ll_CC|#language and country code pair]]}}
  
 
</onlyinclude>
 
</onlyinclude>

Revision as of 05:30, 24 August 2013


fonts_to_use_instead_of_...

Introduced around 1.0.0.1, this extension takes the part after fonts_to_use_instead_of_ and uses the provided fonts in place of any font that has a name that matches. Underscores (_) are treated as single character wildcards. This kind of extension applies to dialogue text only. To change the menu (and other) fonts refer to #system_fonts_to_use. Values are limited to synthetic fonts.[#]

Note: a font may have multiple aliases even though matching is only done against the alias that was assigned to the text being displayed.

status_fonts_contrast

Introduced around 1.1.1.7, this extension establishes the colour of on-screen element font shadows, excluding subtitles. The default colour is 464646. Partial transparency is not supported as of 1.1.1.5. Refer to #status_fonts_to_use. Values are limited to hexadecimal colour codes.[#]

status_fonts_height

Introduced around 1.1.1.5, this extension establishes the height of on-screen element fonts, excluding subtitles. Refer to #status_fonts_to_use. Values are limited to positive whole numbers.[#]

status_fonts_tint

Introduced around 1.1.1.7, this extension establishes the colour of on-screen element fonts, excluding subtitles. The default colour is dcdcdc. Partial transparency is not supported as of 1.1.1.5. Refer to #status_fonts_to_use. Values are limited to hexadecimal colour codes.[#]

status_fonts_to_use

Introduced around 1.1.1.5, this extension establishes the on-screen element fonts excluding subtitles. The default behavior is to use the menu fonts described by #system_fonts_to_use. Values are limited to synthetic fonts.[#]

Note that Sword of Moonlight's on-screen element text is not font based. #do_st provides an alternative heads-up-display, and #do_pause and #do_escape display notifications to the center of the screen.

system_fonts_contrast

Introduced around 1.1.1.7, this extension replaces the colour of in-game menu text fonts. The default colour is 464646. Partial transparency is not supported as of 1.1.1.5. Refer to #system_fonts_to_use. Values are limited to hexadecimal colour codes.[#]

system_fonts_tint

Introduced around 1.1.1.7, this extension replaces the colour of in-game menu text fonts. The default colour is dcdcdc. Partial transparency is not supported as of 1.1.1.5. Refer to #system_fonts_to_use. Values are limited to hexadecimal colour codes.[#]

system_fonts_to_use

Introduced around 1.0.0.1, this extension replaces the font used by in-game menu text with the provided fonts. Refer to #status_fonts_to_use to target the on-screen element fonts provided by #do_pause, #do_escape, and #do_st specifically. Values are limited to synthetic fonts.[#]

Note: that this extension may also replace the fonts (but not colour) of dialogue and subtitle text which uses the same font as the in-game menus. This behavior is not by design and is subject to change in the future.

Tip: as of 1.1.1.7 you can change the colour of system, status, and subtitle and default dialog text (all one thing, three in total) independent of one another. Refer to #system_fonts_tint, #status_fonts_tint, and #lettering_tint.

Previously of [Locale]

Historical note: the following extensions were originally found in the Locale section. Now deceased.

Extensions in this section pertain to the localization, or translation, of game text. Game text translation is handled differently from the translation of the tools that come with Sword of Moonlight. Refer to the #Editor section for tool translation.

Note that the descriptions of the extensions here are not intended to be a translation "how-to" manual. However in addendum to #do_use_abbreviation_prefix and #do_use_contextual_prefixes below, there is a third type of prefix that is always considered and therefore has no associated extension. This prefix uses 20Bs_ and 16Bs_ respectively to translate truncated item names. Specifically 20Bs_ is used by the top-level Equip menu, and 16Bs_ is used in the Store menu. If an item's name is longer than 16Bs, or bytes, then the truncated version must also be translated. You can use this opportunity to devise abbreviated names. Regardless if the truncated name is not translated the item will not be translated in these menu screens.

do_use_abbreviation_prefix

Introduced around 1.0.0.1, this extension in the affirmative looks for abbreviated versions of some of the text in menus that has historically been abbreviated upon translation due to screen and or character memory limitations. The abbreviated forms are prefixed with abbr_ in the script file. Values are limited to binary statements.[#]

Note that this is an extension because it becomes necessary to pull double duty for the abbreviated versions, though it is only single duty if there are abbreviated translations. Also a player may want to disable the abbreviations since wider resolutions tend to have more screen space, however this is not recommended nor yet supported by the built-in English translation. It is also helpful to be able to see at a glance that the game is, or is not, using the abbreviations.

do_use_builtin_english_by_default

Introduced around 1.0.0.1, this extension in the affirmative translates all of Sword of Moonlight's Japanese text into a simplified ASCII English translation whenever a translation is not found with the game's script file. Some symbolic elements may still rely on non-ASCII characters. If the player's locale is ja_JP the original Japanese text is used by default. Note that the built-in English may change between releases. Values are limited to binary statements.[#]

do_use_builtin_locale_date_format

Introduced around 1.0.0.1, this extension in the affirmative uses the international dates and figures settings on the player's computer for the game clock and the save game dates. The locale can be overridden, in a limited way, by #locale_to_use_for_dates_and_figures. Values are limited to binary statements.[#]

do_use_contextual_prefixes

Introduced around 1.0.0.1, this extension in the affirmative looks for specialized versions of some of the text in menus that is identical letter by letter in Japanese yet might be translated differently in one place or the other. The prefixes are applied indiscriminately anywhere that they might be useful. The prefixes are not limited to the following however this is not necessarily the place for a comprehensive translation guide. Values are limited to binary statements.[#]

top_ menu screen name in the top left corner
sub_ menu item label in the left hand column
hp_ HP, or hit points, numbers in the menu
mp_ MP, or magic points, numbers in the menu
str_ Strength stat number in the menu
mag_ Magic stat number in the menu
exp_ EP, or experience points, number in the menu
gold_ Gold number in the menu
sls_ Slash affinity number in the menu
sms_ Smash affinity number in the menu
stb_ Stab affinity number in the menu
flm_ Flame affinity number in the menu
ert_ Earth affinity number in the menu
wnd_ Wind affinity number in the menu
wtr_ Water affinity number in the menu
hly_ Holy affinity number in the menu
info_ appraisal screen text
shop_ shop "BUY" screen text
sell_ shop "SELL" screen text
hud_ gauges heads-up-display on/off setting
nav_ compass heads-up-display on/off setting
inv_ inventory item display on/off setting
bob_ walking effect on/off setting
cfg_ controller button assignment


Refer to #do_use_abbreviation_prefix for more explanation of prefixes in general.

locale_to_use_for_dates_and_figures

Introduced around 1.0.0.1, this extension manually sets the locale used by #do_use_builtin_locale_date_format for times and dates. At some point this extension may also effect numeric stats for the few regions of the world that do not use Arabic numerals or decimal points however there would need to be a third extension to enact that behavior. Values are limited to language and country code pairs.[#]

Note that the Windows Control Panel allows very fine grain control over different elements of displaying dates and figures, however this extension is only able to indiscriminately apply the default settings for a particular part of the world to both dates and figures.

locale_to_use_for_play

Introduced around 1.0.0.1, this extension manually specifies the locale to use. If a translation is unavailable then the current user account's locale is tried. And failing that #locale_to_use_for_play_if_not_found is tried. Values are limited to language and country code pairs.[#]

locale_to_use_for_play_if_not_found

Introduced around 1.0.0.1, this extension specifies the default locale to use failing all else. Values are limited to language and country code pairs.[#]

translation_to_use_for_play

Introduced around 1.0.0.1, this extension manually specifies the translation file to use relative to the locale folder with the file's extension stripped off. The default behavior is to use #international_translation_title or else #international_production_title or else script is used (som_db prior to 1.1.2.3.)

The script file is looked for in the lang/ll_CC/LC_MESSAGES folder. Where ll_CC is a #language and country code pair. Values are limited to an ASCII only POSIX and NTFS legal file name.