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.
New structure for the settings and the one text of the plugin. The ZMenu contract is unchanged: same channel names, same whitelist, same answers inside the menu, same function for the other plugins. Please back up your config.json before you update, and stop the server to update (never reload this plugin while the server runs: it intercepts the game's own calls).
Settings and text apart (1.1.0)
- config.json now holds the settings only. It no longer contains any sentence shown to 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 edit it, do not rename it to config.json (it contains comments).
- The only text a player can see from this plugin is the line shown in the menu when a command gave no answer: "(no answer)". It is now in the lang folder (en.json, fr.json, de.json, es.json), under the key NoAnswerText. Those files are replaced at each update, so do not edit them.
- Your own text goes in lang\custom.json, which is never shipped and never overwritten by an update. Example: {"EN": {"NoAnswerText": "nothing to say"}, "FR": {"NoAnswerText": "pas de réponse"}}. 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 key 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.
Language of the menu text (1.1.0)
- The "(no answer)" line is shown in the language the player chose with the flags of the ZMenu menu, when the plugin has a text for it. Otherwise it uses the new setting General.Language (shipped: EN).
- For a sentence, the plugin looks in this order: custom.json in the language, the shipped file of that language, custom.json in English, en.json, then the English text built into the plugin.
Changes while the server runs (1.1.0)
- config.json and the files in the lang folder are now read again by themselves, about 10 seconds after they change. ZBridge.Reload does it at once.
- One exception: changing Reply.Enabled from false to true needs a server restart, because the hooks of the answer path are only placed at start. Changing it from true to false applies at once.
- ZBridge.Reload answers "settings reloaded (ACTIVE)" or "settings reloaded (DISABLED)", or "reload FAILED, previous settings kept" if config.json cannot be read.
- ZBridge.Status now ends with the texts loaded, for example "texts: lang EN FR DE ES", plus ", custom FR:1" when custom.json holds texts (language:number).
Upgrading from 1.0.x
- The old setting Reply.NoAnswerText is no longer read. If you had changed it, copy your text into lang\custom.json as EN.NoAnswerText (and under the other languages you use).
- The new setting General.Language does not need to be in your config.json: when it is missing the plugin uses EN.
- With Z-ARK 0.285.0 or newer, install the update from Z-ARK: it keeps your settings, moves your text to lang\custom.json, removes the old keys that are no longer used after a safety copy, and lists everything in the update report.
- Without Z-ARK: stop the server, replace the .dll, PluginInfo.json and config.commented.json and the lang folder (except lang\custom.json), keep your config.json, start the server, then run ZBridge.Status. Full steps are in "Upgrading from 1.0.x" in the description.
- Unchanged: the ZMenu channel (ZMenu, ZMenuReply), the whitelist, the menu buff, ZBridge.Caps, and the function that gives our other plugins the player's menu language.