Alliance Francophone Sudden Strike

Fusion modding · UNITS / AVIA / LAND/DOM / ANIMAT / EXPLOSIONS

Français

Languages and names (desc.lng)

Since version 4.5.6, you can play Fusion in French or in English. The names of units and buildings are not in the sheets now: each sheet gives a key, and the game reads the text of that key in a language file. All players keep the same archives: a network game between a French player and an English player does not go out of sync.

This does not apply to maps, missions and briefings (missiontexts.lng, mis_unitnames).

Keys in the sheets

A value that starts with $ is a key. The game replaces it with its text, on all the lines of the sheet:

name $N_m4
shortname $S_m4
Name obj 12 $H_Atelier

Fusion names its keys as follows:

KeyContentsExample
N_<file>full name of a unitN_m4
S_<file>short name of a unitS_m4
H_<name>name of a buildingH_Atelier

<file> is the file name of the sheet, in lower case (dots, dashes and (t) included). A name in plain text (name "Tigre personnalise") still operates, but it does not get a translation.

Language files

  • French, the base language: lang2/desc.lng, in lang2.aps. It has all the keys.
  • Another language: Run/APRM/i18n/<code>/desc.lng (for example i18n/en/), a folder that all players get. It has only three files: desc.lng, game.lng (messages and menus during a mission) and menures.lng.
  • The language selection: the launcher and the RUI menu write two lines in sudtest.ini:
[Game]
Language=en

[data]
Common=i18n\en\

The game mounts the Common folder before its archives: a file in i18n\en\ replaces the same file of lang2.aps. For French, Common= stays empty. The game reads these lines again each time a mission loads.

desc.lng format

N_m4	Supply vehicle M4 18t
S_m4	M4
H_Atelier	Workshop
  • One line for each key: the key, then a space or a tab, then the text.
  • The file is in UTF-8, with no BOM. Accented letters show correctly.
  • A line that starts with a space or a tab continues the text of the line before it. Do not use this in desc.lng.
  • If a key occurs two times, only the first one is used.
  • Typographic quotes and punctuation (« » „ “ ’ – €) show as ?: use ASCII punctuation. Textured button fonts have no lower case.

Add a unit

  1. In the sheet, write name $N_<file> and shortname $S_<file>.
  2. Add the two keys, in French, to lang2/desc.lng.
  3. Add the two keys, translated, to i18n/en/desc.lng.
  4. Run python3 tools/i18n_check.py in the root folder of Fusion. It must end with no error.

Engine limits

LimitValueResult if you go above it
Full name of a unit63 bytesthe text is cut
Short name of a unit12 bytesthe engine cuts it, sometimes in the middle of an accented letter (2 bytes)
Name of a building31 bytesthe text is cut
game.lng + desc.lng of one language200 KB recommendedthe shared 256 KB buffer has no check
Keysidentified by their CRC-32two keys with the same CRC: the second one is lost

A key that desc.lng does not have no longer stops the game: the unit shows its key ($N_m4), which tells the modder what to add. A building with a missing key has no name.

In game.lng, keep for each key the same %d, %s, ~KEY_xx~, ~clr V1~ and \n as the French text.