casewalker / narrator-configs-mod

A Minecraft mod to provide users fine-grained control over the narrator
MIT License
0 stars 0 forks source link

Narrator Configs Mod

Minecraft comes with a builtin narrator. For this narrator, there are three narration options available:

There are Minecraft Community Feedback posts requesting for the game to expand on what narrations already exist within Minecraft (see here and here). As well, there is an Accessibility Plus mod which aims to tackle many of the issues pointed out in those feedback posts (which can be found here).

However, new narrations aside, some users find the existing narration options to be too limited. For example, some users may feel that "Narrates All" contains too much narration for them, but that "Narrates Chat" also misses important system messages that come through the chat display. A simpler mod was created for this exact issue (see here). But some users may still want to fully customize the narrator in ways that are not covered by any of the above options.

This mod attempts to give fine-grained control to Minecraft players to define exactly which narrations they want to hear and which they do not.

Note that this mod is built on top of Fabric.

Configuration

The mod expects to find a configuration file in the config directory (either narratorconfigsmod.yml or narratorconfigsmod.json). The mod has four configuration properties:

NOTE: The prefixes described above are found in the language files that come built-in in Minecraft. For convenience, an example US-English language file is included in this repository under src/main/resources/language_examples/en_us.json

An example YAML configuration file:

# Enable chat so that chat messages are narrated
chatEnabled: yes
# Enable specific system messages based on matching their keys' prefixes in the Minecraft language files:
enabledPrefixes:
  # match the "joined", "joined (renamed)", and "left" multiplayer messages
  - multiplayer.player.
  # match incoming and outgoing whispers
  - commands.message.display.
  # match when a player completes advancements, challenges, and goals
  - chat.type.advancement.
  # match all player death messages
  - death.
  # match messages related to player sleep
  - sleep.

In order to use the mod, a new narrator option inside the Options... > Accessibility Settings... > Narrator settings was added. Click through until the Narrator is set to "Custom Configs".

License

Licensed under the MIT License (MIT). Copyright © 2022 Case Walker.