本篇教程由作者设定未经允许禁止转载。
废话不多说,直接开始介绍教程,配置文件很长,但是内容很简单。先安装模组以生成配置文件吧。
配置文件——以锁链套为例
添加锁链套套装效果
进入.minecraft\config\setbonus,打开文件1.12.2.009+。配置已以锁链套为例进行了添加:
# Configuration fil,
general {
"client settings" {
# Whether or not to show set bonus information in discovered set item tooltips
B:"1. Enable Tooltips"=false
}
"server settings" {
# FILLSCREEN Each item you want to include in a set needs to be defined here first
#
# Layout is...
# Equipment id, domain:item:meta > nbtkey1 = nbtvalue1 & nbtkey2 = nbtvalue2...
# The equipment id must be unique, and is only used to refer to the item in the equipment set config
#
# eg...
#
# SSword, stone_sword
# DSword, diamond_sword
#
# DDagger, backstab:diamond_dagger
#
# TetraSickleSingle, tetra:duplex_tool_modular > duplex/sickle_left_material & duplex/butt_right_material
#
# WirtsLeggings, diamond_leggings > display:Name = "Wirt's Leggings" & ench: = minecraft:protection ; lvl:4s
#
S:"1. Equipment" <
chainmail1, minecraft:chainmail_helmet
chainmail2, minecraft:chainmail_chestplate
chainmail3, minecraft:chainmail_leggings
chainmail4, minecraft:chainmail_boots
>
# FILLSCREEN Each equipment set is defined here
# Each equip id must be defined in the Equipment list first
#
# Layout is...
# Set id, set name, slot | slot = equip id | equip id, slot | slot = equip id | equip id, etc.
#
# - Vanilla slots: mainhand, offhand, head, chest, legs, feet, hotbar, inventory
# - Baubles slots: bauble_amulet, bauble_ring, bauble_belt, bauble_head, bauble_body, bauble_charm, bauble_trinket
# - You can also refer to slots by their slot number, eg. the top-left slot of the inventory is 9
#
# eg...
#
# SnD, Sword and Dagger, mainhand | offhand = WSword | SSword | ISword | GSword | DSword, mainhand | offhand = WDagger | SDagger | IDagger | GDagger | DDagger
#
# DArmor, Diamond Armor, head = DHelm, chest = DChest, legs = DLegs, feet = DBoots
#
S:"2. Equipment Sets" <
chainmail, haste, head = chainmail1, chest = chainmail2, legs = chainmail3, feet = chainmail4
>
# FILLSCREEN Each bonus is defined here
#
# Layout is...
# Bonus id, bonus name, discovery mode, requirement, requirement, requirement, etc.
#
# Discovery mode is a number:
# 0 = hidden until the player has activated the bonus at least once
# 1 = always visible
# 2 = always hidden
#
# Each requirement is one of these:
# A set; just put in the set id. For a partial set, add a period and the number of set items required
# an attribute total; put in the attribute name followed by a sign and a number, eg.
# generic.armor > 7
#
# eg...
#
# DualWieldSnD, Dual Wield, 0, SnD, generic.armor <= 5
#
S:"2f. Bonuses" <
suoliantao, haste armor, 0, chainmail
>
# FILLSCREEN Attribute modifiers you receive as part of a bonus
#
# Layout is...
# Bonus id, attribute = amount @ operation, attribute = amount @ operation, etc.
#
# eg...
#
# This makes the Dual Wield bonus from the bonus example give a 50% attack damage bonus
# DualWieldSnD, generic.attackDamage = 0.5 @ 1
#
S:"3. Attribute Modifiers" <
>
# FILLSCREEN Constant potion effects received as part of a bonus
#
# Layout is...
# Bonus id, potion.level.duration.interval, potion.level.duration.interval, etc.
#
# eg...
#
# This makes the Dual Wield bonus from the bonus example give haste 2
# DualWieldSnD, haste.2
#
# And this does the same thing, but the potion effect is only active for 5 seconds, every 10 seconds (5 on, 5 off, repeat)
# DualWieldSnD, haste.2.100.200
#
S:"4. Potion Effects" <
suoliantao, minecraft:haste.2.200.1500
>
}
}
配置文件改写—— B:"1. Enable Tooltips"=false
游戏为你设置过的物品设置了信息显示功能,这里如果为true,鼠标悬浮在物品上显示的信息中便会显示你在接下来的地方设置的名字,例如不死鸟套装这种名字。但是我这里选择关闭,因为默认的字体和颜色不好看,很突兀,还会显得信息很乱。因此下面我不会介绍有关这个名字显示的事,但是如果你需要的话,可以开启进行尝试,观察物品上的文字显示,这并不是什么难事。
配置文件改写——S:"1. Equipment"
<
chainmail1, minecraft:chainmail_helmet
chainmail2, minecraft:chainmail_chestplate
chainmail3, minecraft:chainmail_leggings
chainmail4, minecraft:chainmail_boots
>
红色的字体,即物品的ID;而绿色的则是每个物品在配置文件里的ID,可随意书写,但需要记住每个ID对应的物品。这里的物品不受限制,任何物品都可以在此注册ID。任何ID都可随意书写。
配置文件改写——S:"2. Equipment Sets"
<
chainmail, haste, head = chainmail1, chest = chainmail2, legs = chainmail3, feet = chainmail4
>
完成之前的套装ID设置之后,便可来到这部分。
chainmail指的是套装ID,即这个ID指的是后续标注的全部物品,全部物品共同使用一个ID;此ID与之前的物品ID不可重复,均为独一无二的ID。
haste指的是名字,我没试过中文,同时怀疑该名字也必须是独一无二的,否则会导致模组出现bug。
head = chainmail1, chest = chainmail2, legs = chainmail3, feet = chainmail4 部分为套装的各个部位设置,将之前自己设置的ID填入对应的部位;若你不需要设置一身,而只需要半身,则删减你不需要的部位,只保留你需要的部位。
若你需要武器,比如主手钻石剑,副手金剑,则为:
<
zhushou, half1, mainhand = zuanshijian(假设在之前为钻石剑设置了zuanshijian的ID)
fushou, half2, offhand = jinjian(假设在之前为金剑设置了jinjian的ID)
>
此处需注意不可将mainhand与offhand写在一起,经过多次尝试我发现bug层出不穷,不清楚原因,只能用这个方法来解决。
若你需要设置饰品,饰品槽位与武器写法一致,有:bauble_amulet;bauble_ring, bauble_belt;bauble_head;bauble_body;bauble_charm;bauble_trinket来对应各个穿戴的部位,非常细节。例如更多饰品的黑曜石头骨,则为:
<
shipin, shipin1,bauble_body= heiyaoshitougu(假设在之前为黑曜石头骨设置了heiyaoshitougu的ID)
>
配置文件改写—— S:"2f. Bonuses"
<
suoliantao, haste armor, 0, chainmail
>
suoliantao仍为一个ID,即chainmail处应当填写的内容的总ID,这个ID也需要自行设置、确保独一无二。chainmail处应当填写的内容为自行自定义的,若你在之前的部分设置了一个武器,并赋予了它ID,那么在这里你可以添加两个ID,将武器与防具合并为一整个套装,它们之间用逗号隔开。如我之前举例了钻石剑、金剑的例子,若我想设置穿戴锁链套、主手钻石剑、副手金剑这三个条件为一个套装,那么此处应为:
<
suoliantao, haste armor, 0, chainmail,zhushou,fushou
>
haste armor则为这个套装的名称,必须设置,且这个名称与haste并不一致、不能重复;本人已太久没使用这个功能,如果你好奇它会显示在什么地方请自行尝试。
0处的数值可填写0/1/2。该功能用于控制是否隐藏套装效果的名字,即haste armor,0为玩家成功激活一次套装后显示,1为永远显示,2为永远隐藏。
配置文件改写——S:"4. Potion Effects"
<
suoliantao, minecraft:haste.2.200.1500
>
suoliantao在这里为上一部分设置的套装ID,
minecraft:haste为药水效果,可自行查阅原版、模组的药水属性,理论上全部支持,包括负面属性
2指的是药水效果等级,需要注意的是这里与游戏中effect指令不同,effect玩家0级的药水实际上会显示为1级,effect玩家1级则是2级,而这是设置2则为2级,与指令存在差别
200指的是药水效果持续时间。若你想设置永久buff,则此处不需要填任何东西,例如suoliantao, minecraft:haste.2即可。如果你不想设置永久buff,则此处需要填写数字,每20tick为现实中的1秒,这里的200指的是10秒钟。
1500指的是药水的循环时间。永久buff也不需要填写此处内容;若你不需要永久buff,也设置了药水的持续时间,则必须设置药水的循环时间。所谓药水循环时间,即药水并不是一次性的,你也不希望衣服穿上只会给一次buff然后就啥都没有吧?因此这里产生了循环概念,我这里填写了1500,即无论如何,每隔75秒,套装会再次给予玩家10秒的药水buff,1500需要从穿上完整套装开始计算。若循环时间低于持续时间,或未填写循环时间,buff仍然是无限的,例如suoliantao, minecraft:haste.2.200这个写法,尽管设置了持续时间,但是进游戏后你会发现只不过是药水效果从无限的**.**变成了10,仍然为永久buff。
小结
通过以上修改,我便设置了一个套装效果,穿4件锁链防具时,我将会在75秒后获得10秒急迫2效果,此效果将会每75秒出现一次。
实战——设置复杂的套装效果
这里我会直接套用之前的例子,写一个复杂点的套装效果,并不再解释各个部位的作用,希望能帮到你。
S:"1. Equipment"
<
chainmail1, minecraft:chainmail_helmet
chainmail2, minecraft:chainmail_chestplate
chainmail3, minecraft:chainmail_leggings
chainmail4, minecraft:chainmail_boots
zuanshijian, minecraft:diamond_sowrd
jinjian, minecraft:golden_sword
heiyaoshitougu, bountifulbaubles:trinketobsidianskull
>
S:"2. Equipment Sets"
<
chainmail, haste, head = chainmail1, chest = chainmail2, legs = chainmail3, feet = chainmail4
zhushou, half1, mainhand = zuanshijian
fushou, half2, offhand = jinjian
shipin, shipin1,bauble_body= heiyaoshitougu
>
S:"2f. Bonuses"
<
suoliantao, haste armor, 0, chainmail,zhushou,fushou,shipin
>
S:"4. Potion Effects"
<
suoliantao, minecraft:haste.2.200.1500
>
书写完成,此时我们得到的套装要求:穿着全套的锁链套,主手必须是钻石剑,副手必须是金剑,饰品栏的躯干部分必须是黑曜石头骨,凑齐以上要求便可获得急迫2的药水效果,效果持续10秒,每75秒刷新一次。
以上便是该模组的使用方法。