You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/createmods.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,30 @@ Code mods should use `FezGame.Tools.ModText` to read their custom keys. `GetStri
56
56
vardialogue=ModText.GetString("MY_MOD_INTRO");
57
57
```
58
58
59
+
### Creating a standalone language pack
60
+
61
+
Language packs are independent of mods. Put a folder or ZIP archive in `FEZ/Languages`; a pack must contain `Language.xml` and an `Assets` directory. ZIP archives contain the pack root directly, rather than an additional enclosing directory.
62
+
63
+
```xml
64
+
<Language>
65
+
<Code>nl</Code>
66
+
<DisplayName>Dutch</DisplayName>
67
+
<Locale>LanguageDutch</Locale>
68
+
<SmallFont>Fonts\Latin Small</SmallFont>
69
+
<BigFont>Fonts\Latin Big</BigFont>
70
+
</Language>
71
+
```
72
+
73
+
`Code` is a required lowercase two-letter code. `DisplayName` is the stable English name stored in settings. `Locale` is an optional StaticText key, such as `LanguageDutch`, used to localize the slider label; when it is absent or untranslated, `DisplayName` is used. `SmallFont` and `BigFont` are required asset paths, relative to `Assets`, without the `.xnb` extension. The declared font assets must exist in the pack.
74
+
75
+
Place translated FEZ resources at these normal asset paths:
76
+
77
+
-`Assets/Resources/StaticText.xnb`
78
+
-`Assets/Resources/GameText.xnb`
79
+
-`Assets/Resources/CreditsText.xnb`
80
+
81
+
Each resource uses FEZ's existing `Dictionary<string, Dictionary<string, string>>` format. Use the pack code (`nl` in the example) as its localized dictionary key. Missing resource keys fall back to FEZ's original language text.
82
+
59
83
## Creating custom logic mod
60
84
61
85
Mod loader loads library file given in metadata as an assembly, then attempts to create instances of every non-abstract public class extending the `GameComponent` class before initialization (before any services are created). After the game has been initialized (that is, as soon as all necessary services are initiated), it adds created instances into the list of game's components and initializes them, allowing their `Update` and `Draw` (use `DrawableGameComponent`) to be properly executed within the game's loop.
0 commit comments