villager skin tones

基本信息

属性 值
配置分类名 villager skin tones(Reference.CATEGORY_VILLAGER_SKIN_TONES)
类 astrotibs.villagenames.config.GeneralConfig
条目数 3
纹理目录 assets/villagenames/textures/entity/villager/skintone/

功能

控制本 mod 的村民肤色系统。按 README.md 描述,肤色由"生成群系的属性"决定:Villager skin tones, where the skin color of ensemble populations vary based on properties of their spawning biome(同一群系的一群村民肤色相近,随群系变化)。

3 项配置

配置键 字段 类型 默认值 行
Display Skin Tones villagerSkinTones boolean true :300
Skin Tone Variance Annealing villagerSkinToneVarianceAnnealing float 8/3 ≈ 2.6667 :301
Skin Tone Variance Scale villagerSkinToneVarianceScale float 1.0 :305

两个 float 的取值范围均为 0 到 Float.MAX_VALUE。

Display Skin Tones

源码说明:"Display Gaussian-distributed random skin tones assigned to villagers"——即肤色按高斯分布随机分配。

Skin Tone Variance Annealing(退火)

源码说明(config/GeneralConfig.java:301-304):

Statistical variance in skin tone for a population decreases as the number of skin-tone-affecting biome tags increases. Setting this value to zero eliminates that effect, making skin tone vary equally everywhere (aside from culling to the darkest/lightest tones). Increasing this value makes skin tone variation less likely in qualifying biomes.

即:一个群系上"影响肤色的群系标签"越多,该群系内村民肤色的方差越小(肤色更一致)——这是标准的退火式收敛。

取值 效果
0 取消退火效应,肤色到处都一样地随机(仍受最暗/最亮截断影响)
默认 8/3 标准退火强度
增大 合格群系中出现肤色差异的可能性降低

Skin Tone Variance Scale(缩放)

源码说明(config/GeneralConfig.java:305-308):

Proportionality constant for variance everywhere, irrespective of biome. Set this to zero for absolutely no variation for a given biome. Skin tones are culled to the darkest and lightest values, so setting this arbitrarily high will result in ONLY the darkest or lightest villagers. I estimate that the distribution is flattest, and thus population variance is maximized, around a value of about 2.6.

取值 效果
0 某群系内完全无肤色差异
默认 1.0 标准方差
≈ 2.6 作者估计分布最平缓、群系内方差最大的值
任意高 ⚠️ 肤色会被截断到最暗/最亮两端,结果只会出现最暗或最亮的村民

肤色截断

两个配置项的说明都强调:肤色值会被裁剪(cull)到最暗与最亮的边界。因此 Skin Tone Variance Scale 无论设多大,都无法突破截断上限——这是源码明确指出的行为,不是推测。

与网络同步的关系

本 mod 通过 Village Names Network 的 消息 ID 3(MessageModernVillagerSkin)把 skinTone 字段从服务端同步到客户端(network/MessageModernVillagerSkin.java:47),即肤色由服务端计算、客户端渲染。

相关条目