

包括设置 RegexForFullTextNeedToTranslate、RegexForEachLineNeedToTranslate 和 PresetTranslations 都可以显著减少不必要的翻译。见详细说明。
Setting RegexForFullTextNeedToTranslate, RegexForEachLineNeedToTranslate, and PresetTranslations can significantly reduce unnecessary translations. Please refer to detailed description.
TranslationAPI
选择使用的翻译 API。支持腾讯翻译 api、百度翻译 api和 Microsoft Azure 翻译 api。截止 2025.1.29,三者的免费额度为 Tencent 500万字符/月、Baidu 100万字符/月、Azure 200万字符/月。详见官方说明。
ToggleTranslationKeyBinding
启用或关闭翻译的按键。
RegexForFullTextNeedToTranslate
正则表达式,一个多行文本若匹配为真,则这个多行文本保留以待翻译。用来筛选待翻译的文本以节省翻译额度。
样例RegexForFullTextNeedToTranslate正则表达式:^(?!Enter the Gungeon).*$
RegexForEachLineNeedToTranslate
正则表达式,多行文本若存在一行匹配,整个多行文本保留以待翻译。用来筛选待翻译的文本以节省翻译额度。样例RegexForEachLineNeedToTranslate正则表达式(适配中文):^(?![@#])(?=\S)(?!^[\d\p{P}]+$)(?!.*[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]).*$
RegexForIgnoredSubstringWithinText
正则表达式,匹配文本中需要忽略的子文本。请使用非捕获组。这通常包括一些要特殊处理的贴图和转义符。样例RegexForIgnoredSubstringWithinText正则表达式(适配中文):(?:\[color\s+[^\]]+\])|(?:\[sprite\s+[^\]]+\])|(?:\[/color\])|(?:\{[^}]*\})|(?:\^[\w\d]{9})|(?:[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]+)|(?:<color=[^>]+>)|(?:</color>)|(?:^\s*[\d\p{P}]+\s*$)|(?:[<>\[\]])|(?:@[a-fA-F0-9]{6})
RequestBatchSize
发送请求的批量数据总大小。若翻译 api 提示单次请求过长,请减小此值。
MaxRetryCount
发生错误时的最大重试次数。
TranslationCacheCapacity
最大翻译缓存容量。
PresetTranslations
预设翻译的文件名。使用预设翻译以减少加载时常见文本的翻译请求,留空表示不使用。预设翻译为位于 dll 同目录下的 JSON 文件。
LogRequestedTexts
在日志中显示请求翻译的文本。
OverrideFont
用来覆盖游戏字体的字体。根据你需要的目标语言选择。
FontAssetBundleName
包含自定义字体的 AssetBundle 名称。位于 dll 同目录下。
CustomDfFontName
要使用的自定义 df 字体。请把它包含于 FontAssetBundle。
CustomTk2dFontName
要使用的自定义 tk2d 字体。请把它包含于 FontAssetBundle。
RegexForDfTokenizer
用于 df 生成 token 的正则表达式。token 用于处理文本的自动换行位置。如每个字换行还是单词后换行。参考默认样例填写。建议只修改 Text 相关内容。样例RegexForDfTokenizer正则表达式:(?<StartTag>\[(?<StartTagName>(color|sprite))\s*(?<AttributeValue>[^\]\s]+)?\])|(?<EndTag>\[\/(?<EndTagName>color|sprite)\])|(?<Newline>\r?\n)|(?<Whitespace>\s+)|(?<Text>[a-zA-Z0-9]+|.)
DfTextScaleExpandThreshold
低于这个值的 Df TextScale 会被扩大。为负表示不生效。
DfTextScaleExpandToValue
低于门槛的 Df TextScale 被扩大到多少。
ShowRequestedCharacterCount
显示已翻译字符数。
RequestedCharacterCountAlertThreshold
已请求翻译字符数警报阈值。当翻译请求即将超出时,会暂停翻译。为零表示不设阈值。
ToggleRequestedCharacterCountKeyBinding
开启或关闭已翻译字符数的显示的按键。
CountLabelAnchor
用空格或逗号分隔的一个二维向量,决定计数标签相对于父级的锚点位置。左上角为0 0,右下角是1 1。
CountLabelPivot
用空格或逗号分隔的一个二维向量,定义计数标签的定位基准点。左上角为0 0,右下角是1 1。
TranslateTextsOfItemTipsMod
翻译 ItemTipsMod 中的文本。
RegexForItemTipsModTokenizer
用于 ItemTipsMod 生成 token 的正则表达式。token 用于处理文本的自动换行位置。如每个字换行还是单词后换行。样例 RegexForItemTipsModTokenizer 正则表达式:(?:<color=[^>]+?>|</color>|[a-zA-Z0-9]+|\s+|.)
ItemTipsFontScale
ItemTips的字体缩放大小。
ItemTipsBackgroundWidthScale
ItemTips的背景宽度缩放大小。
ItemTipsLineHeightScale
ItemTips的行高缩放大小。
ItemTipsAnchor
用空格或逗号分隔的一个二维向量,决定ItemTips相对于父级的锚点位置。左上角为0 0,右下角是1 1。
ItemTipsPivot
用空格或逗号分隔的一个二维向量,定义ItemTips的定位基准点。左上角为0 0,右下角是1 1。
ItemTipsSourceBitmapFontBaseLine
ItemTips的字体如果由位图字体生成,可以在此控制位图字体的基准线。
TranslationAPI
Select the translation API to use. Supported APIs include Tencent Translation API, Baidu Translation API, and Microsoft Azure Translation API. As of January 29, 2025, the free quotas are: Tencent 5 million characters/month, Baidu 1 million characters/month, Azure 2 million characters/month. Please refer to the official documentation for more details.
ToggleTranslationKeyBinding
The key binding of toggling translation.
RegexForFullTextNeedToTranslate
A regular expression that matches multiline text. If the expression evaluates to true, the entire multiline text will be preserved for translation. This helps filter out unnecessary translation requests and save tranlation quotas. Example RegexForFullTextNeedToTranslate regex: ^(?!Enter the Gungeon).*$
RegexForEachLineNeedToTranslate
A regular expression that checks each line in multiline text. If any line matches, the whole multiline text will be preserved for translation. This also helps filter out unnecessary translation requests and save tranlation quotas. Example RegexForEachLineNeedToTranslate regex (fit for Chinese): ^(?![@#])(?=\S)(?!^[\d\p{P}]+$)(?!.*[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]).*$
RegexForIgnoredSubstringWithinText
A regular expression that matches substrings within text that should be ignored. Please use non-capturing groups. This typically includes elements like special image tags or escape sequences that need custom handling. Example RegexForIgnoredSubstringWithinText regex (fit for Chinese): (?:\[color\s+[^\]]+\])|(?:\[sprite\s+[^\]]+\])|(?:\[/color\])|(?:\{[^}]*\})|(?:\^[\w\d]{9})|(?:[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]+)|(?:<color=[^>]+>)|(?:</color>)|(?:^\s*[\d\p{P}]+\s*$)|(?:[<>\[\]])|(?:@[a-fA-F0-9]{6})
RequestBatchSize
The total size of the batch data for each translation request. If the translation API indicates that a request is too large, reduce this value.
MaxRetryCount
The maximum number of retry attempts when an error occurs during a translation request.
TranslationCacheCapacity
The maximum cache size for storing translations.
PresetTranslations
The filename of preset translations. Preset translations reduce translation requests for common texts during game loading. Leave it empty to disable this feature. The preset translations file is a JSON file located in the same directory as the DLL.
LogRequestedTexts
Log the text requested for translation.
OverrideFont
Font used to override the font of the game. Choose according to the target language you need.
FontAssetBundleName
The name of the AssetBundle containing custom fonts. Located in the same directory as the DLL.
CustomDfFontName
The name of the custom DF font to use. Include it within the FontAssetBundle.
CustomTk2dFontName
The name of the custom tk2d font to use. Include it within the FontAssetBundle.
RegexForDfTokenizer
A regular expression used to generate tokens for the DF tokenizer. Tokens help control the automatic line breaks for text. For example, whether to break lines after each character or after each word. Refer to the default example and modify mainly the text-related components. Example RegexForDfTokenizer regex: (?<StartTag>\[(?<StartTagName>(color|sprite))\s*(?<AttributeValue>[^\]\s]+)?\])|(?<EndTag>\[\/(?<EndTagName>color|sprite)\])|(?<Newline>\r?\n)|(?<Whitespace>\s+)|(?<Text>[a-zA-Z0-9]+|.)
DfTextScaleExpandThreshold
Df TextScale below this value will be expanded. Negative indicates non effectiveness.
DfTextScaleExpandToValue
How much is the Df TextScale below the threshold expanded to.
ShowRequestedCharacterCount
Show requested character count.
RequestedCharacterCountAlertThreshold
The alert threshold of the count of characters requested for translation. When this count is about to exceed, translation will be paused.
ToggleRequestedCharacterCountKeyBinding
The key binding of toggling the display of requested character count.
CountLabelAnchor
A two-dimensional vector separated by spaces or commas, which determines where the count label is anchored relative to its parent. The top left corner is 0 0, and the bottom right corner is 1 1.
CountLabelPivot
A two-dimensional vector separated by spaces or commas, which defines the pivot point of the count label for positioning. The top left corner is 0 0, and the bottom right corner is 1 1.
TranslateTextsOfItemTipsMod
Translate the text within the ItemTipsMod.
RegexForItemTipsModTokenizer
A regular expression used for generating tokens from ItemTipsMod. Token is used to handle the automatic line break position of text. Whether to wrap each word or to wrap after each word. Example RegexForItemTipsModTokenizer regex: (?:<color=[^>]+?>|</color>|[a-zA-Z0-9]+|\s+|.)
ItemTipsFontScale
The font scale of ItemTips.
ItemTipsBackgroundWidthScale
The width scale of ItemTips background.
ItemTipsLineHeightScale
The width scale of ItemTips line height.
ItemTipsAnchor
A two-dimensional vector separated by spaces or commas, which determines where ItemTips is anchored relative to its parent. The top left corner is 0 0, and the bottom right corner is 1 1.
ItemTipsPivot
A two-dimensional vector separated by spaces or commas, which defines the pivot point of ItemTips for positioning. The top left corner is 0 0, and the bottom right corner is 1 1.
ItemTipsSourceBitmapFontBaseLine
If the font used by ItemTips is generated from a bitmap font, you can adjust the baseline of the bitmap font here.
若默认字体不支持所需语言的字符,可以使用自定义字体。详见GitHub页面。
If the default font does not support the characters required for a specific language, you can use a custom font. For more details, please refer to the GitHub page.