2.4. 武器物品

作者:

innoxia, bicobus

2.4.1. coreAttributes

2.4.1.1. authorTag

在项目中显示模组作者(你)的名字。如果留空或没有该标签,将使用基于文件夹名称作为默认标签。

这个标签是可选项。

<authorTag><![CDATA[A discreet inscription at the base of the dagger's blade informs you that it was made by 'Innoxia'.]]></authorTag>

2.4.1.2. value

该物品价值多少。

<value>3000</value>

2.4.1.3. melee

如果是近战武器请使用 “true” ,如果是远程武器请使用 “false” 。(不带引号。)

<melee>true</melee>

2.4.1.4. twoHanded

如果是双手武器请使用 “true” 这样它就无法和副手武器同时使用了,如果是单手武器请使用 “false” 。(不包括引号。)

<twoHanded>false</twoHanded>

2.4.1.5. determiner

在“Innoxia 手持 X 恶魔匕首”这个例子中,这个X就是就是量词,这通常填入“一把”或者“一支”,但是对于其他武器来说这个量词可能是不同的。

像“Innoxia拿着X剪刀”这个例子中, 这里X(这个量词)就应该写作“一把”。

<determiner><![CDATA[a]]></determiner>

2.4.1.6. name

武器的单数名称。

appendDamageName

默认为true,可以省略。如果你不希望用伤害类型来描述该武器,那么把它设置为false。例如,在设置为false的情况下,这把匕首将始终被称为“恶魔匕首”,而不是“强力恶魔匕首”之类的。

<name appendDamageName="true"><![CDATA[Demon's Dagger]]></name>

2.4.1.7. namePlural

这个武器的复数名称。

pluralByDefault

pluralByDefault 这个属性定义了这个武器在调用时直接以复数名称调用(例如“a pair of pants”),不太符合汉语习惯可无视。

<namePlural pluralByDefault="false"><![CDATA[Demon's Daggers]]></namePlural>

2.4.1.8. description

关于这个物品的描述或者传说之类的。

<description><![CDATA[A demon's dagger, with a blade made out of enchanted ethereal energy. Daggers such as this one are carried by the elite demon Enforcers, and, while intended primarily to be a symbol of power and status, they are nonetheless completely functional.]]></description>

2.4.1.9. attackDescriptor

武器的使用方式。这应该是一个动词,在战斗中用作攻击动作的称谓。

<attackDescriptor>stab</attackDescriptor>

2.4.1.10. attackTooltipDescription

战斗中悬停在攻击动作上时显示的说明。遵循与 equipText 相同的准则(本页下面的几个条目有所提及)。

由于该工具提示只能从玩家的视角看到,因此你可以始终以第一人称叙述。 (使用npc2作为目标。)

<attackTooltipDescription><![CDATA[Strike out with your Demon's Dagger at [npc2.name].]]></attackTooltipDescription>

2.4.1.11. rarity

这件武器的稀有性。

可以在这里找到这些值: src/com/lilithsthrone/game/inventory/Rarity.java

<rarity>EPIC</rarity>

2.4.1.12. weaponSet

这套武器属于哪一种套装。

可以在这里找到这些值: /res/setBonuses/

参见

物品套装

<weaponSet/>

2.4.1.13. 1.13 equipText

装备该武器时使用的说明。描述应该是通用的,玩家和 NPC 都可以使用。只要确保在使用动词时使用标签 [npc.verb()] ,例如,解析如下: (不用看解析了,汉语不区分,仅使用动词即可)

  • [npc.verb(run)] 若果npc是玩家的话 = “run”(不用看解析了,汉语不区分这个,也就是说默认一个动词就好)

  • [npc.verb(run)] 如果npc不是玩家角色 = “runs”(不用看解析了,汉语不区分这个,也就是说默认一个动词就好)

始终使用第一人称单数动词。(不用看解析了,汉语不区分这个,也就是说默认一个动词就好)

(不用看解析了,汉语不区分这个,也就是说默认一个动词就好)

(不用看解析了,汉语不区分这个,也就是说默认一个动词就好)

<equipText><![CDATA[[npc.Name] [npc.verb(unsheathe)] the dagger, readying it for use in combat.]]></equipText>

2.4.1.14. 1.14 unequipText

装备此武器时使用的说明。遵循与 equipText 相同的准则。

<unequipText><![CDATA[[npc.Name] [npc.verb(sheathe)] the dagger, before putting it away.]]></unequipText>

2.4.1.15. 1.15 imageName

该武器图像在角色库存中的文件名。游戏唯一支持的文件类型是.svg。我使用免费程序“Inkscape”为游戏制作.svg图像。

<imageName>dagger_sheathed.svg</imageName>

2.4.1.16. 1.16 imageEquippedname

装备时该武器图像的文件名。可以(通常也是)与图像名称相同(在本例中为 dagger_sheathed.svg )。

<imageEquippedName>dagger.svg</imageEquippedName>

2.4.1.17. 1.17 physicalResistance

装备该武器后可提供的基础物理抗性。 只有盾牌或其他此类保护性武器才真正应该高于 0。

<physicalResistance>0</physicalResistance>

2.4.1.18. 1.18 damage

此武器造成的基础伤害。

<damage>20</damage>

如果你想定义额外的范围伤害,添加 aoe 元素。

一个AoE伤害的例子可以在 res/weapons/innoxia/lightningGlobe/lightning_globe.xml 中找到。

<aoe chance="50">10</aoe> 50% chance of hitting an additional enemy (who has not been hit yet) for 10 damage
<aoe chance="25">5</aoe> 25% chance of hitting an additional enemy (who has not been hit yet) for 5 damage

2.4.1.19. 1.19 arcaneCost

使用此武器需要多少奥术精华,远程武器通常使用1,而近战武器通常使用0。

<arcaneCost>0</arcaneCost>

2.4.1.20. 1.20 damageVariance

当此武器实际用于攻击时,基础伤害的随机偏差值。

可以在这里找到这些值: https://github.com/Innoxia/liliths-throne-public/blob/master/src/com/lilithsthrone/game/combat/DamageVariance.java

<damageVariance>MEDIUM</damageVariance>

2.4.1.21. 1.21 availableDamageTypes

这个武器的伤害类型。

值可以在这里找到(不应该使用MISC):src/com/lilithsthrone/game/combat/DamageType.java

<availableDamageTypes>
    <damageType>PHYSICAL</damageType>
    <damageType>ICE</damageType>
    <damageType>FIRE</damageType>
    <damageType>POISON</damageType>
</availableDamageTypes>

2.4.1.22. 1.22 spells

装备此武器时解锁的咒语。如果你想添加,使用如下格式:

<spells changeOnReforge="true"> <!-- ref:cor -->
    <spell damageType="FIRE">FIREBALL</spell> <!-- ref:dmt -->
    <spell damageType="ICE">ICE_SHARD</spell>
    <spell damageType="LUST">ARCANE_AROUSAL</spell>
    <spell damageType="PHYSICAL">SLAM</spell>
    <spell damageType="POISON">POISON_VAPOURS</spell>
</spells>

changeOnReforge变量决定当玩家改变伤害类型时,该武器是否应该变换法术。(例如,如果他们将 FIRE 匕首锻造为 ICE 匕首,如果changeOnReforge为true,那么授予的法术 FIREBALL 将自动切换为 ICE_SHARD )。

damageType变量与解锁衍生武器法术的damageType保持一致。可以拥有多种同种damageType,比如:

<spell damageType="FIRE">FIREBALL</spell>
<spell damageType="FIRE">FLASH</spell>
<spell damageType="FIRE">ICE_SHARD</spell>
<spell damageType="FIRE">STEAL</spell>

需要注意 damageType 不需要与法术的学派保持一致(所以 FIRE 能够解锁 ICE_SHARD ,等等)

法术值可以在这里找: https://github.com/Innoxia/liliths-throne-public/blob/master/src/com/lilithsthrone/game/combat/Spell.java

对于空的法术列表,请使用空元素:

<spells/>

2.4.1.23. 1.23 combatMoves

装备该武器时解锁的战斗动作。 combatMoves 元素与 spells 元素相似。

<combatMoves changeOnReforge="true">
    <move damageType="PHYSICAL">ASSAULT_RIFLE_MAG_DUMP</move>
</combatMoves>

changeOnReforge属性决定了该武器是否会在玩家修改伤害类型时,重新生成战斗动作。以上方的示例为例,如果将一个 PHYSICAL 伤害的匕首重铸成 ICE 伤害的匕首,且changeOnReforge值为true,那么原本获得的战斗动作 ASSAULT_RIFLE_MAG_DUMP 就会消失。

damageType变量与解锁衍生武器动作的damageType保持一致。可以拥有多种同种damageType,比如:

<move damageType="FIRE">EXAMPLE_MOVE_1</move>
<move damageType="FIRE">EXAMPLE_MOVE_2</move>
<move damageType="FIRE">EXAMPLE_MOVE_3</move>
<move damageType="FIRE">EXAMPLE_MOVE_4</move>

战斗动作的可用值请参见: https://github.com/Innoxia/liliths-throne-public/blob/master/src/com/lilithsthrone/game/combat/CMWeaponSpecials.java

注意: 战斗动作暂时无法mod。很快就会有添加mod战斗动作的功能!

对于没有战斗动作的物品,留作空元素即可:

<combatMoves/>

2.4.1.24. 1.24 enchantmentLimit(附魔限制)

该武器可以被施加的附魔的数量。考虑到平衡,标准武器为5。

<enchantmentLimit>5</enchantmentLimit>

2.4.1.25. 1.25 effects(效果)

该武器生成时附带的效果。请记住玩家可以移除、修改或添加效果。如果想知道该元素内应该填入什么,最简单的方式就是在游戏中附魔,保存游戏,然后复制对应物品的“effects”到此处。

对于secondaryModifier有两个特殊值,分别是:

RESISTANCE_WEAPON

添加与该武器伤害类型相关的护盾。

DAMAGE_WEAPON

添加与该武器伤害类型相关的伤害。

例如,若该匕首生成时类型为 POISON, 然后我将两个 CRITICAL_CHANCE 都替换为了 DAMAGE_WEAPON ,那么该匕首生成时将带有两个+5毒素伤害的效果。

<effects>
    <effect itemEffectType="CLOTHING" limit="0" potency="MAJOR_BOOST" primaryModifier="CLOTHING_ATTRIBUTE" secondaryModifier="CRITICAL_CHANCE" timer="0"/>
    <effect itemEffectType="CLOTHING" limit="0" potency="MAJOR_BOOST" primaryModifier="CLOTHING_ATTRIBUTE" secondaryModifier="CRITICAL_CHANCE" timer="0"/>
</effects>

2.4.1.26. 1.26 extraEffects

你可以使用这一部分来描述该武器可能附带的额外效果。当玩家将鼠标悬浮在武器图标上,这些效果将会显示在提示中所以尽量保持简短(应当保持在一行内)。应当仅用于描述 1.27 onHitEffect 元素中发生的结果。没有角色会当作解析参数传入,所以你 不应 使用任何与角色相关的解析元素(例如 [npc.name] )。对于该武器,没有特殊效果需要描述,但如果你想要使用这一部分,请遵循以下格式:

<extraEffects>
    <effect><![CDATA[Stab time!]]></effect>
</extraEffects>

空额外效果:

<extraEffects/>

2.4.1.27. 1.27 onHitEffect

此处的效果将会在每次武器击中目标时应用。但并 不会 在武器重击时应用。返回的文本将会被添加到击中描述的后方。 npc 代表着攻击者,而 npc2 代表着目标,用于效果或解析。对于该武器,没有击中效果需要添加,但如果你想要使用这一部分,请遵循以下格式:

<onHitEffect><![CDATA[
[##npc2.setHealth(0)]
[npc2.Name] is instantly defeated!
]]></onHitEffect>

空效果

<onHitEffect/>

2.4.1.28. 1.28 onCriticalHitEffect

此处的效果将会在每次武器重击目标时应用。但并 不会 在武器非重击时应用。

返回的文本将会被添加到击中描述的后方。 npc 代表着攻击者,而 npc2 代表着目标,用于效果或解析。请与 on-hit-effect 使用同样格式。

<onCriticalHitEffect/>

2.4.1.29. 1.29 colours

请参见与颜色有关的相关 文档

衣服可以按喜欢的方式着色,但如果你希望玩家可以给衣服染色,你可以在这里指定可用的颜色。 primaryColourssecondaryColours 都是以默认颜色生成的,而它们的 Dye 只有在玩家选择将衣服染成该颜色时才可用。 游戏会检测特定的颜色值,并根据玩家选择的值重新染色。值如下:

  • 红色是游戏中 DAMAGE TYPE 图形颜色时使用的基本颜色,游戏中武器只能识别和更改以下颜色:

    • #ff2a2a

    • #ff5555

    • #ff8080

    • #ffaaaa

    • #ffd5d5

  • 橘色是游戏中更改图形颜色 PRIMARY 的基本颜色,游戏只能识别和更改以下颜色:

    • #ff7f2a

    • #ff9955

    • #ffb380

    • #ffccaa

    • #ffe6d5

  • 黄色是游戏中更改图形颜色 SECONDARY 的基本颜色,游戏只能识别和更改以下颜色:

    • #ffd42a

    • #ffdd55

    • #ffe680

    • #ffeeaa

    • #fff6d5

  • 绿色是游戏中更改图形颜色 TERTIARY 的基本颜色,游戏只能识别和更改以下颜色:

    • #abc837

    • #bcd35f

    • #cdde87

    • #dde9af

    • #eef4d7

正如你上面所看到的,武器与服装不同之处在于它们的 Red 会根据武器伤害类型重新着色!下面定义的 primaryColourssecondaryColourstertiaryColours` 可以分别给对应的 OrangeYellowGreen 重新着色。

所有的渐变色都应被叫做: innoGrad1innoGrad2,等等。

你可以在这里看到这些颜色(用于服装)的视觉表示: https://www.lilithsthrone.com/wiki/doku.php?id=modding_wiki:modding:creating_clothes

你能在这里找到颜色清单: https://github.com/Innoxia/liliths-throne-public/blob/master/src/com/lilithsthrone/utils/ColourListPresets.java

<primaryColours recolouringAllowed="true" values="JUST_STEEL"/> <!-- You can leave the attribute 'recolouringAllowed' out of colour definitions. If you want the player to be unable to change this colour, then set it as false. This is only used in very niche situations (such as for the filly choker).-->

<primaryColoursDye values="ALL_METAL"/>
<secondaryColours values="JUST_BLACK"/>
<secondaryColoursDye values="ALL"/>

2.4.1.30. 1.30 customColours

你可以定义任意数量的自定义颜色,以替换为 svg 上色的可使用颜色。 如果你使用了上面的 primary/secondary/tertiary 元素,则不要使用它们关联颜色的十六进制值 (例如,如果你定义了一个 primaryColours 元素,就不要在 customColour 属性中使用 #ff7f2a、#ff9955、#ffb380、#ffccaa 或 #ffe6d5。)

千万不要使用这几种色调,因为它们是留给伤害类型的颜色: #ff2a2a, #ff5555, #ff8080, #ffaaaa, or #ffd5d5

<customColours>
    <!-- The 'copyColourIndex' attribute defines which colour index should be copied into this colour slot on weapon generation. This particular colour, having an index of 0, will always be coloured the same as the primary colour when generated. Indexes go from 0->X, where X is the number of defined colours. i.e. If you only define primary and secondary, the first custom colour (i.e. this one) will have an index of 2. -->
    <customColour copyColourIndex="0" c0="#6C5D53" c1="#917C6F" c2="#AC9D93" c3="#C8BEB7" c4="#E3DEDB">
            <defaultColours>
                    <colour>CLOTHING_STEEL</colour>
            </defaultColours>
            <extraColours values="ALL_METAL"/>
    </customColour>
     <!-- This particular copyColourIndex, having an index of 1, will always be coloured the same as the secondary colour when generated -->
    <customColour copyColourIndex="1" recolouringAllowed="true" c0="#6C5353" c1="#916F6F" c2="#AC9393" c3="#C8B7B7" c4="#E3DBDB"> <!-- These are the colours which you've used in your svg and would like replaced with the colours you define below. c0 is the darkest shade. Shades can go up to any number, but setting just 5 shades should work best. -->
            <defaultColours>
                    <colour>CLOTHING_BLACK</colour> <!-- The colours which this clothing should spawn in with. -->
            </defaultColours>
            <extraColours values="ALL"/> <!-- The colours which this weapon can be dyed to. -->
    </customColour>
</customColours>

2.4.1.31. 1.31 itemTags

适用于武器的特殊物品标签。可以在这里找到: https://github.com/Innoxia/liliths-throne-public/blob/master/src/com/lilithsthrone/game/inventory/ItemTag.java

<itemTags>
    <tag>SOLD_BY_VICKY</tag>
    <tag>WEAPON_BLADE</tag>
</itemTags>

2.4.2. 2 hitDescription

击中敌人时使用的描述。攻击者每次攻击目标时都会随机选择一个 hitText 值。遵循与 equitext 相同的原则。

你可以使用 criticalHitText 元素添加命中描述,这些描述只会在暴击命中时显示。 这是可选的属性,你可以不需要定义任何暴击命中描述。 如果没有定义,并且发生了暴击,则将使用常规的 hitText 代替。

<hitDescriptions>
    <hitText><![CDATA[
    Thrusting out with [npc.her] Demon's Dagger, [npc.name] [npc.verb(manage)] to stab [npc2.name] in the chest; the ethereal arcane blade passing through [npc2.her] torso to drain [npc2.her] energy!
    ]]></hitText>
    <hitText><![CDATA[
    Striking out at [npc2.name] with [npc.her] Demon's Dagger, [npc.name] [npc.verb(manage)] to slash through [npc2.her] [npc2.arm] with the ethereal blade and drain [npc2.her] energy!
    ]]></hitText>
    <hitText><![CDATA[
    With a quick step forwards, [npc.name] [npc.verb(lunge)] out at [npc2.name] with [npc.her] Demon's Dagger, sinking the ethereal blade into [npc2.her] shoulder and causing [npc2.herHim] to lose some energy!
    ]]></hitText>
    <criticalHitText><![CDATA[
    Expertly sidestepping around [npc2.namePos] attempt to block [npc.her] attack, [npc.name] [npc.verb(deal)] a devastating strike with [npc.her] Demon's Dagger!
    ]]></criticalHitText>
</hitDescriptions>

2.4.3. 3 missDescription

未命中敌人时的描述。每次攻击者错过目标时,都会随机选择一个 missText ,遵循与equipText 一样的原则。

<missDescriptions>
    <missText><![CDATA[
    Thrusting out with [npc.her] Demon's Dagger, [npc.name] [npc.verb(attempt)] to stab [npc2.name] in the chest, but [npc.verb(end)] up missing [npc2.herHim]!
    ]]></missText>
    <missText><![CDATA[
    Striking out at [npc2.name] with [npc.her] Demon's Dagger, [npc.name] [npc.verb(let)] out a frustrated cry as [npc.she] [npc.verb(miss)] [npc.her] target!
    ]]></missText>
    <missText><![CDATA[
    With a quick step forwards, [npc.name] [npc.verb(lunge)] out at [npc2.name] with [npc.her] Demon's Dagger, but [npc.she] [npc.verb(miss)] [npc.her] target!
    ]]></missText>
</missDescriptions>