IMPORTANT, read before you install: the architecture of this plugin has been reworked and its configuration files have changed (config.json now holds the settings only, the texts move to a new lang folder, every setting is explained in config.commented.json). Read the new config files and these notes before you install, back up your config.json, and do not overwrite your old config.json without looking at it first.
This release brings together the changes of 1.1.0, 1.2.0 and 1.2.1. If you come from 1.0.x, read "Upgrading from 1.0.x" in the description before you update, and back up your config.json first.
New config structure (1.1.0)
- config.json now holds the settings only: General.Enabled, General.Language and Restart.Daily. It no longer contains any sentence read by players, and the plugin never writes to it.
- Every setting is explained in config.commented.json, shipped with the plugin and replaced at each update. It is the documentation: read it, do not rename it to config.json.
- The texts players read (the labels of /info general and /info breeding, the menu lines, the command list) are in the lang folder: en.json, fr.json, de.json, es.json. They are replaced at each update, so do not edit them.
- Your own texts go in lang\custom.json. It is never shipped and never overwritten by an update. Format: {"EN": {"GenHarvest": "Harvest rate: {v}"}, "FR": {"GenHarvest": "Récolte : {v}"}}. A key you leave out keeps the shipped text.
- To add a language, create lang\nl.json (or any 2 or 3 letter code) with the same keys as en.json, or add an "NL" block in custom.json.
- A file that cannot be read (invalid JSON) is ignored with a warning in the log. Nothing is written.
- The old Texts block of config.json is no longer read, and the plugin no longer renames old setting names in config.json. Copy the texts you changed into lang\custom.json, under their language. With Z-ARK 0.285.0 or newer this is done for you at install, after a safety copy.
- Changes to config.json and to the lang folder are picked up at the next /info (the plugin only re-reads when a file has changed). ZInfo.Reload forces a re-read.
- ZInfo.Status now ends with the texts loaded, for example "texts: lang EN FR DE ES, custom FR:2".
Texts in the language of each player (1.1.0)
- The answer to /info is sent in the language of the player who asked (the flag chosen in the ZMenu mod, carried by Z-Bridge) when the plugin has texts for it. Otherwise it uses the server language, General.Language.
- Search order for a sentence: lang\custom.json in the player's language, the shipped file of that language, custom.json in English, en.json, then the English text built into the plugin.
Where messages show (1.2.0 and 1.2.1)
- With Z-Messages 1.2.0 or newer, each player chooses where short messages show: /msg both (chat and top of the screen, the default), /msg chat, or /msg top. /msg alone shows the current choice. The server default is PlayerDisplay.Default in the Z-Messages config.
- 1.2.1: every line of an /info answer now follows that choice, one line at a time. A line longer than Style.TopOfScreenMaxLength in the Z-Messages config goes to the chat only.
- 1.2.0: /info cmd lists the /msg command, but only on a server where Z-Messages 1.2.0 or newer is installed. New text key: CmdMsg.
- Without Z-Messages 1.2.0 or newer, messages go to the chat and to the top of the screen, and /msg is not listed.
Other
- Restart.Daily keeps working as before. The wording of the restart line is now in the texts GenRestart and GenRestartFormat.
- Safer unload (1.2.1): when the server unloads the plugin, it now gives back the crash handler it set up at start.
- Texts shipped in English, French, German and Spanish.