Contents
Overview
Preface
Note on status effects and how to use them
Some elements expect Boolean values
Shared tags and information
Item’s identifier
author tags
value
name
plural name
determiner
Description
Item’s image
rarity
colours
Custom Colours
status effects special case
1.1. Preface¶
The following documents will try it’s best to expose the different ways ofaugmenting your experience while playing Lilith’s Throne. While the documentstries to be as accurate as possible, you’re invited, dear reader, to consultexisting xml
files residing in your res/mods/
folder.
If you are unsure of anything, please use the Lilith’s Throne Discord to askfor help!
1.2. Note on status effects and how to use them¶
We understand by effects a set of of logic conditonally applied to a character.The source of definining that condition differs, is ultimately applied throughan applyEffect
block. Most wearable items has to go through a set bonus inorder to have access to the status effects mechanics.
Wearable have to define themselves as part of a set. The set then activate thestatus effect based on simple conditionnals. Sets of one item, although counterintuitive, are acceptable. Non-wearable items have a direct access to anapplyEffect
block, and as such do not require a reference to astatusEffect
.
1.3. Some elements expect Boolean values¶
Some elements are boolean switches which are either true, or false. The name ofthe element is usually explicit enough to inform you of it’s function, forexample consumedOnUsed
convey that the item should or should not be consumedonce the player uses it.
Whenever an element is stated to be boolean, one of the following value isexpected:
true
false
1.5. Item’s identifier¶
The item identifier is the internal name of your objects and the only way torefer to them from between xml
files. It is calculated from your clothing’sfolder and .xml
name using the following code:
modAuthorDirectory.getName() + "_" + innerChild.getParentFile().getName() + "_" + innerChild.getName().split("\\.")[0]
Which would resolve to innoxia_template_socks
for the object located inres/mods/innoxia/clothing/template/socks.xml
.
The identifier is generated for every pertinent file existing in your modulesfolder structure. The identifier being generated, and not user defined, is animportant variable to keep in mind. If you ever rename the folder or the xml
file, the identifier will change which, in turn, will invalidate all existingreference present in the players saves files.
1.6. author tags¶
How attribution to the mod author (you) should be displayed in the object’stooltip. If left blank or not included, a default attribution based on foldername will be used.
The content of the element should be a short one line descriptor.
- Example
A tag discreetly sewn into the T-shirt’s inner lining informs youthat it was made by ’Innoxia’.
1.7. value¶
The base value of an object. I roughly base things on 1 flame = 10p, so 10flames = £1.
1.8. name¶
The name element contain the singular form of the name of the object (Onesock, two socks).
The name element can on occasion accept variables, refer to the specificdocumentation of the object you aim to create for details.
Names can be informal, for objects that are not normally shown to the playerlike outfits, and are only used for debugging purpose.
1.8.1. plural name¶
Each object with the possession of a name also has a plural form. If you have toinform name, expect to fill in it’s plural form.
1.9. determiner¶
The determiner which is displayed before an item’s name. While they are usually“a” or “an”, for things like socks or gloves, you’ll want to use “a pair of”where it makes sense. I use the CDATA
tag for all text values, as it allowshtml markup to be embedded without causing issues.
Should this element remain undefined, the game will automatically select either“a” or “an” based on the name of the item. The game will ignore values passed tothis elements if they equate “a” or “an”.
Literate Example
Innoxia was holding a pair of scissors.
Code Example
<determiner><![CDATA[a pair of]]></determiner>
1.10. Description¶
A long form description of the item. Should be present for each object under theitems category.
1.11. Item’s image¶
The element imageName
will be found through the different objects. Itinforms of the file path for the object’s image. All images must be .svgformat. Colours to be used are described below, above the primaryColourselement. I use the free program InkScape to make my.svg images. .svg images scale perfectly up and down to any size, so, while itshould be a square, it doesn’t really matter what size your canvas is (althoughI use 256 × 256 as a personal preference).
If the item can be equipped, then an imageEquippedname
must also beprovided. Please refer to the appropriate documentation for more details.
1.12. rarity¶
The rarity of several object can be defined using the constants listed in thefile src/com/lilithsthrone/game/inventory/Rarity.java.
Please note that any item set with a rarity of LEGENDARY will not appearnaturally in the game, neither from the shop keepers nor random encounters.
1.13. colours¶
Colours are available for most moddable items. The rules to follow are generallythe same for all type of item, with the exception for the weapons which expandon the core mechanic.
Your items can be coloured any way you like, but if you’d like the player to beable to dye your clothing, you can specify available colours here.primaryColours
, secondaryColours
, and tertiaryColours
can all spawnin as a default colour, while their ’Dye’ counterparts are only available if theplayer chooses to dye the clothing in that colour. The game detects specificcolour values, and recolours them to the value chosen by the player. Thesevalues are as follows:
Red is used as base colour for changing the primary colour of the graphicin-game, and the game will only recognise and change the following colours:
#ff2a2a
#ff5555
#ff8080
#ffaaaa
#ffd5d5
Orange is used as base colour for changing the secondary colour of thegraphic in-game, and the game will only recognise and change the followingcolours:
#ff7f2a
#ff9955
#ffb380
#ffccaa
#ffe6d5
Yellow is used as base colour for changing the tertiary colour of thegraphic in-game, and the game will only recognise and change the followingcolours:
#ffd42a
#ffdd55
#ffe680
#ffeeaa
#fff6d5
Important
Any gradients that you use should be called: innoGrad1
, innoGrad2
,etc.
A visual representation of these colours is available on the wiki.
Colour lists to be used can be found here:src/com/lilithsthrone/utils/colours.
You can leave the attribute recolouringAllowed
out of colour definitions. Ifyou 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).
You can also make your own, custom list of colours to be used. The followingcolours in tertiaryColoursDye
are all found within the list preset ALL
,but this is for a demonstration.
If you want to include custom colours, do not define a values
attribute, andinstead, list each Colour.
Important
please use the Colour
values that start with CLOTHING_
.
- Code Example
<primaryColours recolouringAllowed="true" values="JUST_WHITE"/><primaryColoursDye values="ALL"/><secondaryColours values="JUST_BLACK"/><secondaryColoursDye values="ALL"/><tertiaryColours values="JUST_WHITE"/><tertiaryColoursDye> <colour>CLOTHING_WHITE</colour> <colour>CLOTHING_BLACK</colour> <colour>CLOTHING_GREY</colour> <colour>CLOTHING_RED</colour> <colour>CLOTHING_RED_BRIGHT</colour> <colour>CLOTHING_RED_DARK</colour> <colour>CLOTHING_ORANGE</colour> <colour>CLOTHING_ORANGE_BRIGHT</colour> <colour>CLOTHING_ORANGE_DARK</colour> <colour>CLOTHING_BROWN</colour> <colour>CLOTHING_TAN</colour> <colour>CLOTHING_YELLOW</colour> <colour>CLOTHING_GREEN_LIME</colour> <colour>CLOTHING_GREEN</colour> <colour>CLOTHING_GREEN_DARK</colour> <colour>CLOTHING_TURQUOISE</colour> <colour>CLOTHING_BLUE_LIGHT</colour> <colour>CLOTHING_BLUE</colour> <colour>CLOTHING_BLUE_DARK</colour> <colour>CLOTHING_PURPLE</colour> <colour>CLOTHING_PURPLE_DARK</colour> <colour>CLOTHING_PURPLE_LIGHT</colour> <colour>CLOTHING_PINK</colour> <colour>CLOTHING_PINK_LIGHT</colour></tertiaryColoursDye>
1.13.1. Custom Colours¶
You can define any number of custom colours to replace the shades you’vecoloured your svg with.
The copyColourIndex
attribute seen in the example below defines which colourindex should be copied into this colour slot on weapon generation. Thisparticular colour, having an index of 0, will always be coloured the same as theprimary colour when generated. Indexes go from 0 \(\to\) X, where X is thenumber of defined colours. i.e. If you only define primary and secondary, thefirst custom colour will have an index of 2.
Attributes from c0
\(\to\) c4
are the colours which you’ve used inyour svg and would like replaced with the colours you define below. c0
isthe darkest shade. Shades can go up to any number, but setting just 5 shadesshould work best.
If you have used the primary
/ secondary
/ tertiary
elements upabove, then do not use their associated colour hexes. (i.e. If you’ve defined aprimaryColours
element, do not use either of #ff2a2a
, #ff5555
,#ff8080
, #ffaaaa
, or #ffd5d5
in the customColour attributes.)
You should also not use any of the following, as they are reserved forpattern colours:
|
|
|
<customColours> <customColour copyColourIndex="0" c0="#6C5353" c1="#916F6F" c2="#AC9393" c3="#C8B7B7" c4="#E3DBDB"> (ref:cci) <defaultColours> <colour>CLOTHING_GREY</colour> <!-- The colours which this clothing should spawn in with. --> </defaultColours> <extraColours values="ALL"/> <!-- The colours which this clothing can be dyed to. --> </customColour></customColours>
1.13.2. status effects special case¶
Status effects also accept colours, but to a lesser degree. The colours forstatus effects are there to recolor the icon, as such at most three values areexpected for primary
, secondary
, and tertiary
colours.