Villager Rebalance
Villager Rebalance 是一个服务端 Fabric 模组,它在保持机制可配置的同时,使村民的升级过程更难被滥用。
功能
治愈折扣限制
重复治疗僵尸村民会在达到可配置的治愈次数后移除一项符合条件的交易。这确保了一次治愈仍然有效,同时减少了重复治愈的滥用行为。
配置选项:
curing.enabled:启用该模块。
curing.maxSafeCures:在触发惩罚前允许的治愈次数。
curing.penaltyChancePercent:超额治愈导致移除一项交易的概率百分比。
curing.slotSelection:选择被移除的交易,可选值为 random(随机)、highestValue(最高价值)或 lastSlot(最后一个槽位)。
重置防止
受影响的职业中未进行过交易的村民会记住其首次生成的报价。在记忆半径内破坏并替换工作站会恢复这些报价,而不是重新生成新的报价。
重置锁定是按职业存储的,因此村民可以为如羽毛工匠和图书管理员等不同工作记住单独的受影响职业的报价。与村民进行交易将清除存储的锁定。
配置选项:
rerollPrevention.enabled:启用该模块。
rerollPrevention.memoryRadius:在职业变更清除旧报价锁定之前,从记住的工作站出发的距离。
rerollPrevention.affectedProfessions:受重置防止影响的村民职业 ID,以逗号分隔。
图书管理员稀有书籍调整
当 librarians.rareBookBiasEnabled 开启时,图书管理员的书籍交易可以偏向于配置的稀有附魔。概率通过 librarians.rareBookBiasChancePercentByLevel 按村民等级进行配置。
列表包含五个按等级顺序排列的逗号分隔百分比:
1级, 2级, 3级, 4级, 5级
默认值为:
0,0,25,50,75
这意味着 1 级和 2 级的图书管理员保持原版书籍生成,3 级有 25% 的概率使用配置的稀有附魔,4 级有 50% 的概率,5 级有 75% 的概率。
重复防止由 librarians.rareDuplicatePreventionEnabled 单独控制。当稀有书籍偏向开启时,如果附近存在其他配置的稀有附魔,重复防止会避免选择已经存在于附近的配置的稀有附魔。当稀有书籍偏向关闭时,如果相同的稀有附魔已经存在于附近,重复防止仍可以替换新生成的配置的稀有书籍。
配置选项:
librarians.enabled:启用该模块。
librarians.rareBookBiasEnabled:启用基于等级的概率,用配置的稀有附魔替换书籍交易。
librarians.rareBookBiasChancePercentByLevel:1 到 5 级的五个逗号分隔百分比。
librarians.rareDuplicatePreventionEnabled:尽可能避免附近的重复稀有书籍。
librarians.duplicateSearchRadius:用于检查附近图书管理员的半径。
librarians.rareEnchantments:被视为稀有的附魔 ID,以逗号分隔。
村庄福利
村庄福利可以奖励维持村庄的玩家,并对靠近贫困村庄的玩家进行惩罚。当 welfare.enabled 开启时,它作为围绕每个玩家的周期性服务端扫描运行。
对于每个玩家,模组使用 welfare.scanRadius 检查玩家周围的一个区域。只有满足以下条件时,村庄才被视为已维护:
- 附近至少有一个存活的村民。
- 该区域包含至少
welfare.minBeds 张床。
- 计数的床具有至少
welfare.minSafeLight 的局部亮度。
- 该区域包含至少
welfare.minJobSites 个工作站方块。
如果扫描通过且启用了奖励,每个附近的村民都会为该玩家获得 welfare.rewardReputation 少量正面八卦。这是原版村民声誉数据,因此它可以随时间改善附近的交易价格。奖励在每个玩家的 welfare.rewardCooldownTicks 内只能发生一次。
如果扫描失败,启用了惩罚,并且附近至少有一个村民,每个附近的村民都会为该玩家获得 welfare.penaltyReputation 少量负面八卦。这会使附近的交易变差。惩罚在每个玩家的 welfare.penaltyCooldownTicks 内只能发生一次。
扫描间隔基于奖励冷却时间,且运行频率不高于每秒一次。奖励和惩罚冷却时间分别跟踪,因此玩家可以因维护了村庄而获得奖励,随后如果同一区域不再满足要求,则会被惩罚。
配置选项:
welfare.enabled:启用福利扫描。
welfare.scanRadius:用于检查每个玩家周围的半径。
welfare.minBeds:所需的安全床数量。
welfare.minJobSites:所需的工作站方块数量。
welfare.minSafeLight:计入的床的最小光照等级。
welfare.rewardEnabled:启用正面八卦奖励。
welfare.rewardReputation:添加的少量正面八卦数量。
welfare.rewardCooldownTicks:每位玩家的奖励冷却时间。
welfare.penaltyEnabled:启用贫困福利惩罚。
welfare.penaltyReputation:添加的少量负面八卦数量。
welfare.penaltyCooldownTicks:每位玩家的惩罚冷却时间。
命令
所有命令都需要管理员权限级别。
/villagerrebalance help
/villagerrebalance reload
配置
配置文件生成于:
config/villager-rebalance.json
文件在服务器启动时加载,并在命令更改后保存。使用 /villagerrebalance reload 在运行时重新加载文件。
要求
Villager Rebalance
Villager Rebalance is a server-side Fabric mod that makes villager progression harder to exploit while keeping the mechanics configurable.
Features
Cure Discount Limits
Repeated zombie villager curing can remove an eligible trade after a configurable number of safe cures. This keeps one cure useful while reducing repeated cure abuse.
Config options:
curing.enabled: enables the module.
curing.maxSafeCures: cures allowed before penalties can happen.
curing.penaltyChancePercent: chance that an excess cure removes one trade.
curing.slotSelection: chooses the removed trade with random, highestValue, or lastSlot.
Reroll Prevention
Untraded villagers in affected professions remember their first generated offers. Breaking and replacing a workstation within the memory radius restores those offers instead of rolling new ones.
Reroll locks are stored per profession, so a villager can remember separate affected-profession offers for jobs such as fletcher and librarian. Trading with the villager clears the stored locks.
Config options:
rerollPrevention.enabled: enables the module.
rerollPrevention.memoryRadius: distance from the remembered job site before old offer locks can be cleared by a profession change.
rerollPrevention.affectedProfessions: comma-separated villager profession ids affected by reroll prevention.
Librarian Rare Book Tuning
Librarian book trades can be biased toward configured rare enchantments when librarians.rareBookBiasEnabled is on. The chance is configured per villager level with librarians.rareBookBiasChancePercentByLevel.
The list has five comma-separated percentages in level order:
level 1, level 2, level 3, level 4, level 5
The default is:
0,0,25,50,75
That means level 1 and 2 librarians keep vanilla book generation, level 3 has a 25% chance to use a configured rare enchantment, level 4 has a 50% chance, and level 5 has a 75% chance.
Duplicate prevention is controlled separately with librarians.rareDuplicatePreventionEnabled. When rare-book bias is on, duplicate prevention avoids choosing a configured rare enchantment that already exists nearby when another configured rare enchantment is available. When rare-book bias is off, duplicate prevention can still replace a newly generated configured rare book if that same rare enchantment already exists nearby.
Config options:
librarians.enabled: enables the module.
librarians.rareBookBiasEnabled: enables the level-based chance to replace book trades with configured rare enchantments.
librarians.rareBookBiasChancePercentByLevel: five comma-separated percentages for levels 1 through 5.
librarians.rareDuplicatePreventionEnabled: avoids nearby duplicate rare books when possible.
librarians.duplicateSearchRadius: radius used to inspect nearby librarians.
librarians.rareEnchantments: comma-separated enchantment ids that count as rare.
Village Welfare
Village welfare can reward players for maintaining villages and penalize players near poor villages. It works as a periodic server-side scan around each player while welfare.enabled is on.
For each player, the mod checks a box around the player using welfare.scanRadius. A village only counts as maintained when all of these are true:
- At least one living villager is nearby.
- The area contains at least
welfare.minBeds beds.
- Counted beds have at least
welfare.minSafeLight local brightness.
- The area contains at least
welfare.minJobSites workstation blocks.
If the scan passes and rewards are enabled, every nearby villager receives welfare.rewardReputation minor positive gossip for that player. This is vanilla villager reputation data, so it can improve nearby trade prices over time. The reward can only happen once per player per welfare.rewardCooldownTicks.
If the scan fails, penalties are enabled, and there is at least one nearby villager, every nearby villager receives welfare.penaltyReputation minor negative gossip for that player. This can make nearby trades worse. The penalty can only happen once per player per welfare.penaltyCooldownTicks.
The scan interval is based on the reward cooldown and runs no faster than once per second. Reward and penalty cooldowns are tracked separately, so a player can be rewarded for a maintained village and later penalized if the same area no longer meets the requirements.
Config options:
welfare.enabled: enables welfare scans.
welfare.scanRadius: radius around each player to inspect.
welfare.minBeds: required safe beds.
welfare.minJobSites: required workstation blocks.
welfare.minSafeLight: minimum light level for counted beds.
welfare.rewardEnabled: enables positive gossip rewards.
welfare.rewardReputation: amount of minor positive gossip added.
welfare.rewardCooldownTicks: per-player reward cooldown.
welfare.penaltyEnabled: enables poor-welfare penalties.
welfare.penaltyReputation: amount of minor negative gossip added.
welfare.penaltyCooldownTicks: per-player penalty cooldown.
Commands
All commands require admin permission level.
/villagerrebalance help
/villagerrebalance reload
Configuration
The config file is generated at:
config/villager-rebalance.json
The file is loaded on server start and saved after command changes. Use /villagerrebalance reload to reload the file at runtime.
Requirements
评论 0
登录后参与评分
还没有评论,来抢沙发吧