Server Setup - FreshSupaSulley/CensorCraft GitHub Wiki
Prerequisites
You need to setup simple voice chat! There are plenty of tutorials / YouTube videos available for this (see the official guide)
censorcraft-server.toml
CensorCraft uses a server config file at your_world/serverconfig/censorcraft-server.toml
(it will be generated when you first launch the mod on the server). Settings may have explanatory comments above them (marked with #
).
Common settings
global_taboos
Text that trigger punishments are called taboos. global_taboos
represents the list of taboos that will cause any enabled punishment to be triggered. To add items to this list, simply add entries to the array surrounded by double quotes like this:
global_taboos=["boom", "CHICKEN JOCKEY", "another forbidden phrase"]
Note that capitalizations don't matter.
[!TIP] When you want to add a taboo, you should first say that taboo in-game to find out if it's transcribed correctly to compensate for transcription inaccuracies and homophones. You can do this by enabling Show transcriptions in the mod config menu on the client side.
preferred_model
Besides global_taboos
, this is the other most important setting. Models are what CensorCraft uses under the hood to transcribe speech-to-text. When players join your world, they'll be asked to download the model to their local machine. By default, it's set to base.en
, which is an English-only transcription model (indicated by the .en
suffix) that offers decent results. You should only change this setting if you want to support different languages or tinker with the quality of transcriptions for players. This MUST be set to one of the models defined here, otherwise players won't be able to join your world.
Live updates
Most changes you make to this file will update live, but this is not true for all settings (the notable exception being preferred_model
, where players will need to rejoin your world). This means that most of the time, you don't have to restart the server if you decide to change something.
Misconfigurations and auto-corrections
If you make a mistake, the mod will attempt to auto-correct the file. It will create a backup of the bad config and suffix it with .bak
in the same directory as the server config file. This backup file does nothing but serve as a helpful reference for you to fix the original config, since auto-corrections will overwrite some of your changes. Note that due to library limitations, punishment settings do not have auto-correction capabilities and misconfigurations usually result in your changes simply not working.
Punishments
Structure
Each punishment has at least the following settings:
[punishment_name](/FreshSupaSulley/CensorCraft/wiki/punishment_name)
enable = false
# List of punishment-specific forbidden words and phrases (case-insensitive)
taboo = [""]
# Global taboos don't trigger this punishment
ignore_global_taboos = false
Punishment setting | Description |
---|---|
enable |
Must be set to true for the punishment to be active. |
taboo |
This is where you can define punishment-specific taboos. |
ignore_global_taboos |
By default, the punishment-specific taboo array is used in conjunction with global_taboos , meaning all global taboos will apply along with any additional taboos you add to the taboo array. However, if you don't want global taboos to apply, set this to true to only use taboo . |
Duplicates
Each punishment is marked with double square brackets. In TOML, this denotes an "array of tables", meaning you can copy and paste the same punishment as many times as you want. This is useful if you want one taboo
to map to a punishment with a certain configuration, and another to map to the same punishment but with a different configuration. Here's an example:
# Notice that these both use the same punishment type!
[entities](/FreshSupaSulley/CensorCraft/wiki/entities)
enable = true
# List of punishment-specific forbidden words and phrases (case-insensitive)
taboo = ["i hate the warden"]
# Global taboos don't trigger this punishment
ignore_global_taboos = false
# Entities to spawn on the player
# Allowed list (case-insensitive, duplicates allowed): acacia_boat, acacia_chest_boat, allay, ...
entities = ["warden"]
# Number of times the entire list will be spawned
# Range: 1 ~ 2147483647
quantity = 1
[entities](/FreshSupaSulley/CensorCraft/wiki/entities)
enable = true
# List of punishment-specific forbidden words and phrases (case-insensitive)
taboo = ["skeletons are so annoying"]
# Global taboos don't trigger this punishment
ignore_global_taboos = false
# Entities to spawn on the player
# Allowed list (case-insensitive, duplicates allowed): acacia_boat, acacia_chest_boat, allay, ...
entities = ["skeleton"]
# Number of times the entire list will be spawned
# Range: 1 ~ 2147483647
quantity = 1
In this example, the [entities](/FreshSupaSulley/CensorCraft/wiki/entities)
punishment is included twice to make different taboos map to summoning their own entities. So it's possible to say, "skeletons are so annoying" and summon a skeleton, while also possible to say "I hate the warden" and summon the warden.