3.2.1. Conditional statements
- Node Variables:
-
constant
Type: boolean, Default: True
Conditional statements are evaluated only one time, at the start of
clothing generation, unless this variable is set to False
.
You can define any number of conditional statements to use elsewhere in this
file. They must be enclosed in CDATA
tags, and must use a format of
clothingConditionalX
or condX
, where X
is a unique String
(e.g.
cond1
, condUnderwear
, clothingConditionalMeleeWeapons
are all valid
tags).
- Example
<cond1 constant="true"><![CDATA[RND.nextInt(100)<=50]]></cond1>
<cond2 constant="true"><![CDATA[RND.nextInt(100)<=75]**></cond2>
3.2.2. presetColourGroups
- Node Variables:
-
singleColour
Type: boolean, Default: False, Optional
The optional singleColour
attribute, when set to True
,
means that this group will always return the same, randomly chosen
colour from its list.
Preset colour groups have one of their defined randomColour
randomly chosen
for further use in this XML file. You can have up to 20 presetColourGroupX
,
however the numbers must be consecutive. (i.e. You can have
presetColourGroup1
, presetColourGroup2
, and presetColourGroup3
, but
not presetColourGroup1
, presetColourGroup2
, and
presetColourGroup4
, as that skips out a “3”.)
Accepted values can be found in the files present in the
src/com/lilithsthrone/utils/colours diretory.
Preceding presetColourGroups
can be used, but not succeeding ones. (i.e.
presetColourGroup3
could not be used in 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 and offhandWeapons
Weapons can be added in a similar (although more limited) manner to clothing.
This file doesn’t use any weapons. Look at
res/outfits/innoxia/genericMugger/dominion_masculine.xml for a
weapon example.
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
references to the conditional statement present in the document.
types
A list of valid item to be chosen from. It expects items
identifiers.
damageTypes
Possible choices available at
src/com/lilithsthrone/game/combat/DamageType.java
primaryColours
contains a list of colour
elements, which makes references to the preset
groups defined previously.
secondaryColours
contains a list of colour
elements, which makes references to the preset
groups defined previously.
colours
element can be used in addition to, or as a replacement of, the
primary/secondary/tertiary colours elements.
Individual colours or presetColourGroups
can be listed in each sub-element
related to colours.
<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.
3.2.4. guaranteedClothingEquips
For all of the “conditional” elements from this point onwards, you can use the
tag “clothing” to access the clothing type being handled.
All of the pre-set clothing that is guaranteed to be attempted to be equipped.
The only time these items won’t be equipped is when multiple items of clothing
are assigned to the same inventory slot (such as a pair of panties and a thong),
in which case only the first item is used.
<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. clothing
- Node Variables:
-
colour
Type: constant
-
colourSecondary
Type: constant
-
colourTertiary
Type: constant
-
patternColour
Type: constant
-
patternColourSecondary
Type: constant
-
patternColourTertiary
Type: constant
All colours variables must contain a valid CLOTHING_
colour.
-
enchantmentKnown
Type: boolean
Determine if the effects on the item are known to the
player, or if the item remains unidentified.
-
id
Type: string
The clothing ID
-
isDirty
Type: boolean
Whether the clothing item should spawn dirty, and in need of cleaning.
-
name
Type: string, Optional
How the item should be displayed. The following example will output to
“Character’s butt-plug”: name="[npc.NamePos(true)] butt-plug"
. If
not present, the name of the clothing is used instead.
-
pattern
Type: string, Optional
The pattern to apply to the item.
The clothing tags has the following sub elements.
3.2.4.1.1. effects
List of enchantments.
3.2.5. genericClothingType
Theses elements automatically populate the possible clothing lists with all
clothing in the game that satisfies the conditionals.
<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
If tags are defined, then only clothing with the provided tags will be included
for random selection. May be left empty.
Accepted values can be found in the following file:
src/com/lilithsthrone/game/inventory/ItemTag.java
3.2.5.1.1. tag
If the tag contains the constant DRESS
, then all items in the game marked as
a DRESS
will be included for random selection.
3.2.5.2. acceptableFemininities
If femininity are defined, then only clothing suitable for this femininity
will be included for random selection.
3.2.5.5. conditional
If a condition is defined, then only clothing that satisfies this condition will
be included for random selection. Wrap the conditional statement in CDATA
tags if used.
In the following logic, earrings have 100% chance to be equipped. All other
jewellery have a 25% chance instead. These items are automatically skipped if
the character doesn’t have the relevant slot accessible. In the case of
jewellery, ears that are not pierced cannot received earrings.
clothing.getSlot().isJewellery() && (RND.nextInt(100)<=25 || clothing.getSlot()==IS_PIERCING_EAR)
3.2.5.6. primary, secondary and tertiary colours
Three sub elements:
primaryColours
secondaryColours
tertiaryColours
Each accepts a preset color defined earlier in the document.
<primaryColours>
<colour>presetColourGroup2</colour>
</primaryColours>
3.2.5.7. colours
colours
elements can be used in addition to, or as a replacement of, the
primary/secondary/tertiary colours elements. Individual colours or
presetColourGroups can be used.
It is defined as follows:
<colours>
<colour>presetColourGroup1</colour>
</colours>
3.2.6. clothingType
Presumably this block filters items based on the list of types, then each
character that satisfy the conditional
sub-element is susceptible to be
selected.
The colour references serves as a list of preset colours for this outfit’s
condional.
The constants present in the type
sub-elements are either hard coded
constants or Item’s identifier.
Both genericClothingType
and clothingType
are shuffled together before
being run through and worn. So if two items occupies the same slot, as for
example several bra, then only one of them will be chosen at random.
primaryColours
sub-element has an optional attribute value
, which can be
used as a pre-set colour list instead of defining individual colours.
<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>