****************************** MODDING ******************************

If you want to make mods, make a new folder, using the (hopefully unique) name of your mod. (Like the 'innoxia' folder in this directory.)

Currently supported directories:
CLOTHING MODS: res/mods/(yourName)/items/clothing
TATTOO MODS: res/mods/(yourName)/items/tattoos
WEAPON MODS: res/mods/(yourName)/items/weapons
PATTERN MODS: res/mods/(yourName)/items/patterns
OUTFIT MODS: res/mods/(yourname)/outfits/(descriptiveFolderName)
SET BONUS MODS: res/mods/(yourname)/setBonuses
STATUS EFFECT MODS: res/mods/(yourname)/statusEffects
COLOUR MODS: res/mods/(yourname)/colours
RACE MODS: res/mods/(yourname)/race
COMBAT MOVE MODS: res/mods/(yourname)/combatMove
DIALOGUE FLAGS AND NODES: res/mods/(yourname)/dialogue/
ENCOUNTERS: res/mods/(yourname)/encounters/
SEX ACTIONS AND MANAGERS: res/mods/(yourname)/sex/
	(probably best to keep them separate in actions and managers folders within that directory)
MAPS: res/mods/(yourname)/maps/
	(follow the standard of putting a new map in a named folder and then placeTypes folder, map.png for the map file, and worldType.xml for the map data)

Just to clarify, (yourName) should be whatever nickname the mod creator is using, or any unique name which encompasses everything inside your created mod folder (e.g. 'beeModding').

Within these mod folders (which you create), place the .xml and .svg files that are needed for each piece of clothing/tattoo.

I've included at least one example in each directory for you to reference (the 'clothing' example is in the 'template' folder). If you need any help, there is a 'mod-discussion' channel in the LT discord.

Commented examples not found in the mod folder can be found here:
Patterns:
	res/patterns/irbynx/camo.xml for patterns
Dialogue:
	res/dialogue/innoxia/flags.xml for dialogue flags
	res/dialogue/innoxia/encounters/fields/elis/woods.xml for dialogue nodes
Encounters:
	res/encounters/elis/woodland.xml for encounters
Maps:
	res/maps/innoxia/fields/elis/town/worldType.xml folder for new maps
	res/maps/innoxia/fields/elis/town/placeTypes/entry_east.xml for place types
Sex:
	res/sex/innoxia/managers/meraxis/duel/masturbation.xml for sex managers
	res/sex/innoxia/actions/meraxis/duel/orgasm_panties_cum.xml for sex actions

	
****************************** MODDED NPCS ******************************

While full NPCs are currently only available by creating them as a .java class file and building the game, there is an alternative.
An NPC .xml file can be loaded back into the game as a 'moddedCharacter', which can then be used in an encounter.
An example of this can be found here:
    res/dialogue/acexp/dominion/shady_dealer.xml
This loads the .xml character file from
    res/characters/acexp/shady_dealer.xml
But note that these character files can be located anywhere, and for mods it's probably best to place them in res/mods/(yourname)/characters/
Note that any character file that is to be used as a modded character needs to start (and end) with the <exportedCharacter> tag.

Loading a modded character is done with two methods in the main game object:
-- game.importModdedCharacter needs the .xml file with the modded character, and the parser target that it will use.
-- game.setModdedCharacterParserTarget will take the ID of the character (which should have been saved) and assigns a parser target to it.

The code below checks if the character has already been loaded, and the ID saved. If so, it just assigns the parser target to the correct ID. If not, it will create the NPC by
loading the .xml file, assign a parser target to it and also save the ID of the newly created NPC.

#IF(flags.hasSavedLong('AceXpShadyDealer'))
    [#game.setModdedCharacterParserTarget(flags.getSavedLong('AceXpShadyDealer'), 'AceXpShadyDealer')]
#ELSE
    [#flags.setSavedLong('AceXpShadyDealer', game.importModdedCharacter('res/characters/acexp/shady_dealer.xml', 'AceXpShadyDealer'))]
#ENDIF

The parser target can than be used to do anything that can be done with a NPC. For modded characters, there are a few new methods:
-- setTrader(true) makes the character a Trader (default false)
-- setItemTagsToBuy(Array of ITEM_TAGS) determines which items (if any) the Trader will buy. (default none)
-- setAbleToBeImpregnated(true) allows the character to be impregnated during sex (default false)
-- setClothingStealable(true) allows clothing of the character to be removed (by spells) (default false)


****************************** OPTIMISING SVG IMAGES ******************************

Once you have made your .svg images, you can optimise them (so that the game runs faster when rendering them), by doing the following:

1) All <flowRoot> elements should be manually removed (open your svg file in a text editor to do this). These are randomly added by Inkscape when dragging things in the editor and serve no purpose since they technically don't even exist in SVG 1.1, which all the files use.

2) Automated optimization can be done using SVGO (note 1), a relatively simple command line tool. The configuration used is included (note 2) and contains instructions on how to use it.

note 1: https://github.com/svg/svgo

note 2: https://github.com/Innoxia/liliths-throne-public/blob/dev/svgoConfig.yml

3) Alternatively, if you use Inkscape, there is a pre-installed plugin. An optimized file can be created using "Save as" and selecting "Optimized SVG" as the file type. Make sure to uncheck the export options "Collapse groups" in the options tab, "Shorten IDs" in the id tab, and add "patternLayer" to the list of preserved ids. (Thanks to DJ Addi for this.)