VPlusChatFilter

版本 v1.0.0·更新於 2021-04-09

Chat Filter is a server-side only HarmonyX mod for Valheim. This mod filters profanities and censors them in the in game chat.

截圖 共 1 張

模組介紹 作者原文

Valheim Plus Chat Filter

Chat Filter is a server-side only HarmonyX mod for Valheim.

This mod filters profanities and censors them in the in game chat.

Everything is done server side, clients connecting to your server do not need to install this mod.

It censors the words for every one else in the server but the person who wrote the message will still see the profanities used.

Default Profanity Filter

By default the chat filter has a premade list so you can use it out of the box with no configuration. The default list of profanities can be seen in the library we used here.

Dependencies

BepInEx - The mod is loaded into Valheim using BepInEx.

It will work on a vanilla server as long as you run BepInEx along side it.

It should also work along side any other mods, including existing chat mods.

Installation

Download the latest release from here. Extract the files, and place them into the following folder:

C:\Program Files (x86)\Steam\steamapps\common\Valheim\BepInEx\plugins

The above location will be different for you if you have Valheim installed elsewhere.

Your folder structure should then look like this:

  • Valheim
  • BepInEx
  • plugins
  • VPlusChatFilter.dll
  • Filters

To-Do

The only feature outstanding is to enable adding or removing words from the chat filter while the server is still live.

Currently to add or remove words from the Chat Filter you need to restart the server.

Usage & Configuration

The plugin is controlled via a config file, which is generated when the mod loads for the first time and is located in

C:\Program Files (x86)\Steam\steamapps\common\Valheim\BepInEx\config

The config file is called.valheimplus.chatfilter

Config Options

You can change the file name for the custom add or remove filters using this section:

[Filtering]

Filename where custom words to add are.

Setting type: String

Default value: customAdd.filter

CustomWordsFilename = customAdd.filter

Filename where words to remove from filter are.

Setting type: String

Default value: customRemove.filter

RemoveWordsFilename = customRemove.filter

You can change the file name for the custom add or remove filters using this section:

[Filtering]

Filename where custom words to add are.

Setting type: String

Default value: customAdd.filter

CustomWordsFilename = customAdd.filter

Filename where words to remove from filter are.

Setting type: String

Default value: customRemove.filter

RemoveWordsFilename = customRemove.filter

You can enable or disable the custom add or remove filters using this section:

[Filtering.Toggles]

Add your own custom words.

Setting type: Boolean

Default value: false

AddCustomWords = false

Remove certain words from filters.

Setting type: Boolean

Default value: false

RemoveWords = false

You can set what symbol to replace censored words with, enable or disable the filter and also whether to wrap around words here:

[General]

Symbol to censor words with.

Setting type: String

Default value: *

ReplaceKey = *

[General.Toggles]

Whether or not to filter the chat.

Setting type: Boolean

Default value: true

EnableFilter = true

Whether or not to wrap around words.

Setting type: Boolean

Default value: true

WrapWords = true

Adding or Remove Custom Words

If you want to add or remove custom words from the default profanity filter. You can do the following:

  • Make sure you have enabled the option in the config as seen in the above section.
  • Edit the.filter or.filter, the format needs to be as seen in the.filter example file. each word needs to be separated by a comma and then a space.

This file is a template to show how to add words

Do NOT add anything else other than the words separated by ', '

Remember to remove these three lines before using this file

word1, word2, word3

Contributing

Pull requests are welcome.

Please make sure to update tests as appropriate.

Credits

  • Credit to Stephan Haunts for his Profanity Detector library which was used in this mod

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
VPlusChatFilter-1.0.0.zip
檔案大小
87.6 KiB