.. highlight:: xml
.. `outfits`_
=======
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
:ltgithub:`res/mods/innoxia/outfits/casualDates/dress_toys.xml`
coreAttributes
--------------
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.
.. code:: xml
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.
.. code:: xml
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``
.. code:: xml
FEMININE
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).
.. seealso::
:ltgithub:`src/com/lilithsthrone/world/WorldType.java`.
.. code:: xml
DOMINION
SUBMISSION
outfitTypes
~~~~~~~~~~~
Outfit types that this outfit can be used in.
.. seealso::
A list of :ltgithub:`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.
.. code:: xml
CASUAL_DATE
acceptableLegConfigurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Define which leg configurations can equip this outfit.
.. seealso::
A list of :ltgithub:`legConfiguration`.
.. code:: xml
BIPEDAL
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.
.. seealso::
- List of accepted
:ltgithub:`method calls`
for the “npc” (using the ``npc`` tag).
- List of accepted :ltgithub:`method calls`
for the main game (using the ``game`` tag).
- Generic method calls can be found in:
:ltgithub:`src/com/lilithsthrone/game/dialogue/utils/UtilText.java`
The method ``initScriptEngine()`` in ``UtilText.java`` shows you what you can get a
handle on.
.. code:: xml
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.
.. code:: xml
100
generationAttributes
--------------------
Conditional statements
~~~~~~~~~~~~~~~~~~~~~~
**Node Variables:**
.. nodevar:: constant (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
.. code:: xml
presetColourGroups
~~~~~~~~~~~~~~~~~~
**Node Variables:**
.. nodevar:: [singleColour] (False)
The optional :nodevar:`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
:ltgithub:`src/com/lilithsthrone/utils/colours` diretory.
Preceding ``presetColourGroups`` can be used, but not succeeding ones. (i.e.
``presetColourGroup3`` could not be used in ``presetColourGroup2``.)
.. code:: xml
CLOTHING_PINK
CLOTHING_PINK_LIGHT
CLOTHING_RED_DARK
CLOTHING_BLACK
presetColourGroup1
CLOTHING_GOLD
CLOTHING_SILVER
CLOTHING_WHITE
CLOTHING_PINK_LIGHT
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
:ltgithub:`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 :ref:`items
identifiers`.
``damageTypes``
Possible choices available at
:ltgithub:`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.
.. code-block:: xml
innoxia_pipe_pipe
innoxia_bat_wooden
innoxia_bat_metal
PHYSICAL
presetColourGroup1
presetColourGroup1
The element ``offhandWeapons`` follow a similar ruleset.
.. code:: xml
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.
.. code:: xml
clothing
^^^^^^^^
**Node Variables**:
.. nodevar:: colour ()
.. nodevar:: colourSecondary ()
.. nodevar:: colourTertiary ()
.. nodevar:: patternColour ()
.. nodevar:: patternColourSecondary ()
.. nodevar:: patternColourTertiary ()
All colours variables must contain a valid ``CLOTHING_`` colour.
.. nodevar:: enchantmentKnown ()
Determine if the effects on the item are known to the
player, or if the item remains unidentified.
.. nodevar:: id ()
The clothing ID
.. seealso:: :ref:`items-identifier`
.. nodevar:: isDirty ()
Whether the clothing item should spawn dirty, and in need of cleaning.
.. nodevar:: [name] ()
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.
.. nodevar:: [pattern] ()
The pattern to apply to the item.
The clothing tags has the following sub elements.
effects
:::::::
List of enchantments.
displacedList
:::::::::::::
Define in which state a piece of clothing is being equipped.
::
**displacementType Variables:**
.. nodevar:: value ()
The list of constants is available at
:ltgithub:`src/com/lilithsthrone/game/inventory/clothing/DisplacementType.java`
genericClothingType
~~~~~~~~~~~~~~~~~~~
Theses elements automatically populate the possible clothing lists with all
clothing in the game that satisfies the conditionals.
.. code:: xml
DRESS
FEMININE
COMMON
presetColourGroup1
FEMININE
ANDROGYNOUS
COMMON
presetColourGroup2
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 `_
tag
:::
If the tag contains the constant ``DRESS``, then all items in the game marked as
a ``DRESS`` will be included for random selection.
acceptableFemininities
^^^^^^^^^^^^^^^^^^^^^^
If `femininity`_ are defined, then only clothing suitable for this femininity
will be included for random selection.
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 :ltgithub:`src/com/lilithsthrone/game/inventory/InventorySlot.java`.
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: :ltgithub:`src/com/lilithsthrone/game/inventory/Rarity.java`.
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.
.. code:: java
clothing.getSlot().isJewellery() && (RND.nextInt(100)<=25 || clothing.getSlot()==IS_PIERCING_EAR)
primary, secondary and tertiary colours
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Three sub elements:
- ``primaryColours``
- ``secondaryColours``
- ``tertiaryColours``
Each accepts a preset color defined earlier in the document.
.. code:: xml
presetColourGroup2
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:
.. code:: xml
presetColourGroup1
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 :ref:`items-identifier`.
.. caution:: Some piece of clothing haven't been (yet) converted into a XML
format, those have hard coded types available at
:ltgithub:`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.
.. seealso::
:ltgithub:`src/com/lilithsthrone/utils/colours/ColourListPresets.java`
.. code:: xml
CHEST_PLUNGE_BRA
CHEST_LACY_PLUNGE_BRA
CHEST_FULLCUP_BRA
FOOT_HEELS
presetColourGroup2
=75]]>
FOOT_STILETTO_HEELS
presetColourGroup2
FINGER_RING
presetColourGroup2
NECK_HEART_NECKLACE
presetColourGroup2