3. Outfits

Authors:

innoxia, bicobus

Outfits are a way to make randomly generated NPCs’ outfit generation less chaotic.

As a final note, I will add support for allowing the automatic generation of piercings in the next update.

An annotated example lives at res/mods/innoxia/outfits/casualDates/dress_toys.xml

3.1. coreAttributes

3.1.1. name

Names are only used for debugging purposes. Still, in case the name is used elsewhere later on, it’s best to give your outfit a suitable (lowercase) name.

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

3.1.2. description

Again, descriptions are only used for debugging purposes. Still, in case the name is used elsewhere later on, it’s best to give your outfit a suitable description.

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

3.1.3. femininity

The femininity needed for someone to generate this outfit.

The three acceptables values are respectively:

  1. MASCULINE

  2. ANDROGYNOUS (anyone can use this outfit)

  3. FEMININE

<femininity>FEMININE</femininity>

3.1.4. worldTypes

The worlds in which this outfit may be used for randomly generated characters. You can leave this empty, or delete the element entirely, if you do not want this outfit to be restricted based on WorldType (so it can be used anywhere).

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

3.1.5. outfitTypes

Outfit types that this outfit can be used in.

See also

A list of outfitTypes.

Caution

At the time of creation (v0.3.0.6), only the MUGGER outfitType is used in the game. All outfit types will be added eventually.

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

3.1.6. acceptableLegConfigurations

Define which leg configurations can equip this outfit.

See also

A list of legConfiguration.

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

3.1.7. conditional

The condition that needs to be satisfied for someone to generate this outfit. npc.hasFetish(FETISH_EXHIBITIONIST) should probably always be taken into account. This conditional instance does not support the clothingConditionalX elements.

See also

The method initScriptEngine() in UtilText.java shows you what you can get a handle on.

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

3.1.8. weight

How likely this outfit is to be randomly chosen out of all available ones. Default outfits have a weight of 100. As there could be several outfits added to the weighting method, the chance of this outfit being selected is not able to be precisely determined.

A bigger number makes the outfits more common. There is no upper limit.

<weight>100</weight>

3.2. generationAttributes

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.

<offhandWeapons/>

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.4.1.2. displacedList

Define in which state a piece of clothing is being equipped.

<displacedList>
     <displacementType value="UNBUTTONS"/>
 </displacedList>
displacementType Variables:
value Type: constant

The list of constants is available at src/com/lilithsthrone/game/inventory/clothing/DisplacementType.java

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.3. slot

If a slot (of type InventorySlot) is defined, then only clothing that fits into this slot will be included for random selection. Use the Enum values as defined in src/com/lilithsthrone/game/inventory/InventorySlot.java.

3.2.5.4. rarity

If a rarity is defined, then only clothing that has this rarity will be included for random selection. Accepted values can be found in the following file: src/com/lilithsthrone/game/inventory/Rarity.java.

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.

Caution

Some piece of clothing haven’t been (yet) converted into a XML format, those have hard coded types available at src/com/lilithsthrone/game/inventory/clothing/ClothingType.java

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>