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
A simple library for adding custom localizations to [Demeo](https://www.resolutiongames.com/demeo).
4
+
5
+
## Installation
6
+
Download the [latest stable release](https://github.com/orendain/DemeoMods/releases/latest)'s `Py.LibLocalization-version.zip` file
7
+
and extract it into your Demeo game folder.
8
+
9
+
You should have a folder structure that looks like this:
10
+
```
11
+
Demeo (or Demeo - PC Edition)/
12
+
├─ DemeoMods/
13
+
│ ├─ Py.LibLocalization/
14
+
│ │ ├─ 0Harmony.dll
15
+
│ │ ├─ Py.LibLocalization.dll
16
+
```
17
+
18
+
## Developer Guide
19
+
### Setup
20
+
Add dependencies for `ResolutionGames.Singleton.dll` (which can be found in Demeo's `demeo_Data/Managed` folder)
21
+
and `Py.LibLocalization.dll`
22
+
23
+
### Add a localization
24
+
> [!IMPORTANT]
25
+
> You should add your localizations before the built-in mod loader (Boardgame.Modding.ModLoader) calls `DemeoMod.Load` since that's when LibLocalization refreshes Demeo's localization list.\
26
+
> It's recommended to load them during `DemeoMod.OnEarlyInit` if you're using the built-in mod loader.\
27
+
> You can still add localizations after `DemeoMod.Load` has been called you'll just need to call `registry.Refresh()` but this is resource intensive and should generally be avoided since it reloads all localizations, vanilla (from Unity Resources) and modded (from LocaleRegistry).
28
+
29
+
1. Start by getting the singleton instance of LocalRegistry.
{ "Card/mycard/description", "Look at this card I made!" }
45
+
}
46
+
);
47
+
48
+
// Add single
49
+
registry.AddLocalization("en-US", "Card/mycard/title", "My Custom Card");
50
+
```
51
+
If you're not sure what to use for the localization id, have a look at [default-localization-keys.txt](default-localization-keys.txt). It contains all the localization ids included in Demeo by default and should give you a general idea on how to format your ids.
52
+
53
+
54
+
### Frequently Asked Questions
55
+
- Q: Why does the download include `0Harmony.dll`?\
56
+
A: Since we use the built-in mod loader we need to load Lib.Harmony ourselves. If it's already loaded by a third-party mod loader the dll will be ignored.
0 commit comments