3. 预设套装

作者:

innoxia, bicobus

预设套装的目的是让随机NPC的衣物生成时不那么混乱。

最后提醒一句,下次更新我将允许自动生成穿孔。

此处是一个有注解的例子 res/mods/innoxia/outfits/casualDates/dress_toys.xml

3.1. coreAttributes

3.1.1. name

名称只会用于debug。然而该名称后续可能会使用在其他位置,最好给预设套装一个合适的(小写)名称。

<name><![CDATA[casual dress with toys]]></name>

3.1.2. description

同样,描述只会用于debug。然而该描述后续可能会使用在其他位置,最好给预设套装一个合适的描述。

<description><![CDATA[A dress hides the fact that the wearer has a toy or two inserted into their orifices...]]></description>

3.1.3. femininity

生成这套预设套装所需的女性化程度。

接受三种数值,分别为:

  1. MASCULINE

  2. ANDROGYNOUS (所有人均可使用)

  3. FEMININE

<femininity>FEMININE</femininity>

3.1.4. worldTypes

该预设套装会在那种世界类型中应用在随机生成角色身上。你可以将其留空,或者直接删除该元素,这样该书社套装就不会受到 WorldType 的限制(也就是随处可用)。

<worldTypes>
    <world>DOMINION</world>
    <world>SUBMISSION</world>
</worldTypes>

3.1.5. outfitTypes

该预设套装可以用于的预设套装类型。

参见

预设套装列表 outfitTypes

小心

截至目前( v0.3.0.6 ),游戏中只有 MUGGER 预设套装类型正在使用。但最终将会补齐预设套装类型。

<outfitTypes>
    <type>CASUAL_DATE</type>
</outfitTypes>

3.1.6. acceptableLegConfigurations

定义那些腿部配置可以装备该预设套装。

参见

腿部配置列表 legConfiguration

<acceptableLegConfigurations>
    <legConfiguration>BIPEDAL</legConfiguration>
</acceptableLegConfigurations>

3.1.7. conditional

对于某角色,需要满足这些条件才能生成该预设套装。 npc.hasFetish(FETISH_EXHIBITIONIST) 总应当纳入考虑。该条件 不支持 clothingConditionalX 元素。

参见

UtilText.java 中的 initScriptEngine() 方法展示了可以使用的内容。

<conditional><![CDATA[!npc.hasFetish(FETISH_EXHIBITIONIST) && npc.hasFetish(FETISH_MASTURBATION) && npc.getFetishDesire(FETISH_SUBMISSIVE).isPositive()]**></conditional>

3.1.8. weight

该预设套装从所有可用套装中选中的权重。默认预设套装的权重为100。由于可能的套装数量不定,所以被选中的概率也不能确定。

数字越大,这种预设套装月常见。没有上限。(非要说的话是32位有符号整数的最大值)

<weight>100</weight>

3.2. generationAttributes

3.2.1. 条件语句

节点属性:
constant 类型: boolean, 默认值: True

条件语句只会运算一次,仅在衣物生成的一开始,除非该元素被设置为 False

你可以定义任意数量的条件语句,并在该文件的其他位置使用。条件语句必须使用 CDATA 标签包裹,并且必须使用 clothingConditionalXcondX 的格式,其中 X 是一个不重复的字符串(例如 cond1condUnderwearclothingConditionalMeleeWeapons 等都是有效的标签)。

示例
<cond1 constant="true"><![CDATA[RND.nextInt(100)<=50]]></cond1>
<cond2 constant="true"><![CDATA[RND.nextInt(100)<=75]**></cond2>

3.2.2. presetColourGroups

节点属性:
singleColour 类型: boolean, 默认值: False, 可选项

singleColour 属性为可选项,设置为 True 时,意味着该组颜色总会从列表中返回随机选择后的同一个颜色。

预设颜色组会从其中定义的 randomColour 中随机选取一个,在该XML文件中做后续使用。你最多可以设置20个 presetColourGroupX,但是数字必须时连续的。(例如你可以定义 presetColourGroup1presetColourGroup2presetColourGroup3 ,但 不能是 presetColourGroup1presetColourGroup2presetColourGroup4 ,因为跳过了“3”)

可用的数值能够在 src/com/lilithsthrone/utils/colours 目录下找到。

可以使用前面定义过的 presetColourGroups ,但不能使用后面才定义的。(比如,不能在 presetColourGroup2 中使用 presetColourGroup2 。)

<presetColourGroup1 singleColour="true">
    <randomColour>CLOTHING_PINK</randomColour>
    <randomColour>CLOTHING_PINK_LIGHT</randomColour>
    <randomColour>CLOTHING_RED_DARK</randomColour>
</presetColourGroup1>

<presetColourGroup2>
    <randomColour>CLOTHING_BLACK</randomColour>
    <randomColour>presetColourGroup1</randomColour>
</presetColourGroup2>

<presetColourGroup3>
    <randomColour>CLOTHING_GOLD</randomColour>
    <randomColour>CLOTHING_SILVER</randomColour>
</presetColourGroup3>

<presetColourGroup4>
    <randomColour>CLOTHING_WHITE</randomColour>
    <randomColour>CLOTHING_PINK_LIGHT</randomColour>
</presetColourGroup4>

3.2.3. 主手武器(mainWeapons)和副手武器(offhandWeapons)

武器的添加方法与衣物类似(尽管限制更多)。这个文件没有使用武器。在这里查看武器范例: res/outfits/innoxia/genericMugger/dominion_masculine.xml

The content present in mainWeapons and offhandWeapons follow the same rules. The main weapons block defines which item should be inserted into the character’s main attack slot, where ass the off hand block defines which item to be inserted into the character’s off hand. Each block receive one or several weapon sub elements.

The weapon block require the following elements to be present:

conditional

引用文件中的条件语句。

types

有效物品列表可以从这里选取 物品标识符

damageTypes

可选的选择:ltgithub:src/com/lilithsthrone/game/combat/DamageType.java

primaryColours

包含 colour 元素列表,其中引用了之前定义的预设组。

secondaryColours

包含 colour 元素列表,其中引用了之前定义的预设组。

colours

元素可以用来补充或替代主要(primary)/次要(secondary)/第三(tertiary)颜色元素。

可以在与颜色相关的每个子元素中列出单独的颜色或 presetColourGroups

<mainWeapons>
    <weapon>
        <conditional><![CDATA[cond1 && !cond2]]></conditional>
        <types>
            <type>innoxia_pipe_pipe</type>
            <type>innoxia_bat_wooden</type>
            <type>innoxia_bat_metal</type>
        </types>
        <damageTypes>
            <damage>PHYSICAL</damage>
        </damageTypes>
        <primaryColours>
            <colour>presetColourGroup1</colour>
        </primaryColours>
        <secondaryColours/>
        <colours>
            <colour>presetColourGroup1</colour>
        </colours>
    </weapon>
</mainWeapons>

The element offhandWeapons follow a similar ruleset.

<offhandWeapons/>

3.2.4. guaranteedClothingEquips

从此处开始,在所有“conditional”元素中,你可以使用标签“clothing”来访问正在处理的服装类型。

所有预设的服装都 一定 会尝试穿戴。物品未被穿戴的唯一情况是,多种装备被分配到了相同的物品栏栏位(比如一条内裤和一条丁字裤),这种情况下只会装备第一件物品。

<guaranteedClothingEquips>
    <uniqueClothing>
            <clothing colour="CLOTHING_SILVER" colourSecondary="CLOTHING_PURPLE_LIGHT" colourTertiary="CLOTHING_BLACK" enchantmentKnown="true" id="innoxia_buttPlugs_butt_plug_jewel" isDirty="false" name="[npc.NamePos(true)] butt-plug" pattern="none" patternColour="CLOTHING_BLACK" patternColourSecondary="CLOTHING_BLACK" patternColourTertiary="CLOTHING_BLACK">
                    <effects>
                      <effect itemEffectType="CLOTHING" limit="0" potency="BOOST" primaryModifier="CLOTHING_ATTRIBUTE" secondaryModifier="DAMAGE_POISON" timer="0"/>
                      <effect itemEffectType="CLOTHING" limit="0" potency="MINOR_BOOST" primaryModifier="CLOTHING_ATTRIBUTE" secondaryModifier="DAMAGE_FIRE" timer="0"/>
                    </effects>
                    <displacedList/>
            </clothing>
    </uniqueClothing>

    <uniqueClothing>
            <conditional><![CDATA[npc.hasVagina()]]></conditional>
            <clothing colour="presetColourGroup2" colourSecondary="CLOTHING_BLACK" colourTertiary="CLOTHING_BLACK" enchantmentKnown="true" id="innoxia_vagina_insertable_dildo" isDirty="false" name="[npc.NamePos(true)** insertable dildo"></clothing>
    </uniqueClothing>
</guaranteedClothingEquips>

3.2.4.1. 衣物

Node Variables(结点属性):
colour 类型: constant
colourSecondary 类型: constant
colourTertiary 类型: constant
patternColour 类型: constant
patternColourSecondary 类型: constant
patternColourTertiary 类型: constant

所有颜色变量必须包含可用的 CLOTHING_ 颜色。

enchantmentKnown 类型: boolean

决定玩家会不会知道该物品的效果,或者玩家只能知道效果未确定。

id 类型: string

衣物ID

isDirty 类型: boolean

衣物是否脏污并需要清洗。

name 类型: string, 可选项

物品应该如何显示。以下示例将输出为“角色的肛塞": name="[npc.NamePos(true)] butt-plug" 。如果未填写此项,那么将直接使用服装的名称。

pattern 类型: string, 可选项

应用于物品的图样。

衣物标签包含以下子元素:

3.2.4.1.1. 效果

附魔列表。

3.2.4.1.2. displacedList

定义衣服的装备状态。

<displacedList>
     <displacementType value="UNBUTTONS"/>
 </displacedList>
displacementType Variables(展示种类属性):
value 类型: constant

常量列表见: src/com/lilithsthrone/game/inventory/clothing/DisplacementType.java

3.2.5. genericClothingType

这些元素会自动使用游戏中所有满足条件的服装填充可能的服装列表。

<genericClothingType>
    <itemTags>
      <tag>DRESS</tag>
    </itemTags>
    <acceptableFemininities>
            <femininity>FEMININE</femininity>
    </acceptableFemininities>
    <slot/>
    <rarity>COMMON</rarity>
    <conditional/>
    <primaryColours>
            <colour>presetColourGroup1</colour>
    </primaryColours>
    <secondaryColours/>
    <tertiaryColours/>
</genericClothingType>

<genericClothingType> <!-- Generic jewellery. This should probably be used in all outfits, unless you want to manually define your own jewellery. -->
    <itemTags/>
    <acceptableFemininities>
            <femininity>FEMININE</femininity>
            <femininity>ANDROGYNOUS</femininity>
    </acceptableFemininities>
    <slot/>
    <rarity>COMMON</rarity>
    <conditional><![CDATA[clothing.getSlot().isJewellery() && (RND.nextInt(100)<=25 || clothing.getSlot()==IS_PIERCING_EAR)]]></conditional>
    <primaryColours>
            <colour>presetColourGroup2</colour>
    </primaryColours>
    <secondaryColours/>
    <tertiaryColours/>
</genericClothingType>

3.2.5.1. itemTag

如果定义了标签(tags),那么只有具有提供的标签的服装才会被包括在随机选择中。可以为空。

在这里查看可接受的值: src/com/lilithsthrone/game/inventory/ItemTag.java

3.2.5.1.1. 标签(tag)

如果标签包含常量 DRESS ,那么游戏中所有被标记为 DRESS 的物品都会被包含在随机选择的范围中。

3.2.5.2. acceptableFemininities

如果定义了 femininity ,那么随机选择中只会出现女性化装备。

3.2.5.3. 栏位(slot)

如果定义了一个栏位(类型为InventorySlot),那么随机选择中只会出现适合该栏位的衣物。请使用以下页面中定义的枚举值: src/com/lilithsthrone/game/inventory/InventorySlot.java

3.2.5.4. rarity(稀有度)

如果定义了稀有度(rarity),那么只有具有这种稀有度的服装才会被包括在随机选择中。可选值可以在以下文件中找到: src/com/lilithsthrone/game/inventory/Rarity.java

3.2.5.5. conditional

如果定义了条件,那么只有满足该条件的服装才会被包括在随机选择中。如果使用条件语句,请将其用 CDATA` 标签包裹。

在以下逻辑中,耳环有100%的概率被装备。而其他首饰只有25%的概率。如果角色没有相关栏位,这些物品会被自动跳过。比如装备首饰时,没有穿孔的耳朵无法戴上耳环。

clothing.getSlot().isJewellery() && (RND.nextInt(100)<=25 || clothing.getSlot()==IS_PIERCING_EAR)

3.2.5.6. 主要(primary),次要(secondary)和第三(tertiary)颜色

三种子元素:

  • primaryColours

  • secondaryColours

  • tertiaryColours

每种都接受文件前面定义的预设颜色。

<primaryColours>
    <colour>presetColourGroup2</colour>
</primaryColours>

3.2.5.7. 颜色

colours 元素可以用来补充或替代主要(primary)/次要(secondary)/第三(tertiary)颜色元素。可以使用单独的颜色或presetColourGroups。

定义如下:

<colours>
    <colour>presetColourGroup1</colour>
</colours>

3.2.6. clothingType

大概这个块会根据类型列表过滤物品,然后每个满足 conditional 子元素的角色都有可能被选中。

颜色参考可作为该装备的预设颜色列表。

子元素 type 类型中的常量是硬编码常量或 物品标识符(Item’s identifier)

小心

有些衣物还没有转化未XML形式,可用的硬编码种类在: src/com/lilithsthrone/game/inventory/clothing/ClothingType.java

genericClothingTypeclothingType 会在装备前被混合在一起。因此,如果两个物品占据同一个栏位,比如说多个胸罩,那么只会随机选择其中一个。

primaryColours 子元素有可选属性 value,该属性可作为预设颜色列表使用,而不是作为单独的颜色使用。

<clothingType>
    <conditional><![CDATA[npc.hasBreasts()]]></conditional>
    <types>
            <type>CHEST_PLUNGE_BRA</type>
            <type>CHEST_LACY_PLUNGE_BRA</type>
            <type>CHEST_FULLCUP_BRA</type>
    </types>
    <primaryColours values="LINGERIE"/>
    <secondaryColours/>
    <tertiaryColours/>
</clothingType>

<clothingType>
    <conditional><![CDATA[npc.getFemininityValue()<75]]></conditional>
    <types>
            <type>FOOT_HEELS</type>
    </types>
    <primaryColours>
            <colour>presetColourGroup2</colour>
    </primaryColours>
    <secondaryColours/>
    <tertiaryColours/>
</clothingType>

<clothingType>
    <conditional><![CDATA[npc.getFemininityValue()>=75]]></conditional>
    <types>
            <type>FOOT_STILETTO_HEELS</type>
    </types>
    <primaryColours>
            <colour>presetColourGroup2</colour>
    </primaryColours>
    <secondaryColours/>
    <tertiaryColours/>
</clothingType>

<clothingType>
    <conditional><![CDATA[cond1]]></conditional>
    <types>
            <type>FINGER_RING</type>
    </types>
    <primaryColours>
            <colour>presetColourGroup2</colour>
    </primaryColours>
    <secondaryColours/>
    <tertiaryColours/>
</clothingType>

<clothingType>
    <conditional><![CDATA[!cond1 || cond2]]></conditional>
    <types>
            <type>NECK_HEART_NECKLACE</type>
    </types>
    <primaryColours>
            <colour>presetColourGroup2</colour>
    </primaryColours>
    <secondaryColours/>
    <tertiaryColours/>
</clothingType>