Modding:Inkscape for LT

From Lilith's Throne
Revision as of 04:13, 29 February 2024 by Sightglass (Sọ̀rọ̀ | contribs) (→‎Color Palette: Palette table formatting)
Jump to navigationJump to search

[This document was originally written by Solace (solace2358) on the LT Discord. It has been adapted to wiki markup.]

Don’t use the autotrace feature.

This guide explains some aspects of XML files associated with SVG images, but for the most part XMLs can be learned about from the templates in LTs game files.

Canvas size for LT SVGs should be 256 x 256. If you open an SVG file in notepad or other text-editing apps, you can see the data that builds the image. Among that data, you should see: viewBox="0 0 256 256"

Viewbox errors lead to the image not being properly sized or placed in the item box in-game. The easiest way to avoid this is to save an existing SVG file under

Setting Up

Color Palette

Clothing can be coloured any way you like, but if you'd like the player to be able to dye your clothing, you can specify available colors.

PrimaryColours, secondaryColours, and tertiaryColours can all spawn in as a default color, while their 'Dye' counterparts are only available if the player chooses to dye the clothing in that color. The game detects specific color values, and recolors them to the value chosen by the player.

These values are as follows:

Red is used as base color for changing the primary color of the graphic in-game, and for most items the game will only recognise and change the following colors: Orange is used as base color for changing the secondary color of the graphic in-game, and the game will only recognise and change the following colors: Yellow is used as base color for changing the tertiary color of the graphic in-game, and the game will only recognise and change the following colors:
#ff2a2a #ff7f2a #ffd42a
#ff5555 #ff9955 #ffdd55
#ff8080 #ffb380 #ffe680
#ffaaaa #ffccaa #ffeeaa
#ffd5d5 #ffe6d5 #fff6d5

The darker the shade of each color is in the SVG file, the darker the color applied in-game will appear. This can be used to apply shadows as well as indicate depth. Typically, the closer something is to the foreground, the brighter the shade will be used, and the farther something is from the foreground, the darker the shade will be used. Example:

In this example, the 2nd lightest shade of primaryColour is used for the base tone, the middle shade of primaryColour is used for the buttons to make them stand out from the base, and the darkest shade of primaryColour is used to indicate the back/inside of the shirt.

The specific values for weapons and patterns are slightly different. All of the necessary colors for LT are in a document in my Google Drive, next to this tutorial document, called “lt-colors.gpl”.

After downloading that .gpl file, you’ll need to add it to InkScape. The likely file path for this is:

Local Disc (C:) → Program Files → InkScape → share → inkscape → palettes

Place the “lt-colors.gpl” file inside of the “palettes” folder, and open InkScape. In InkScape, click the 3 horizontal lines icon at the bottom right of the workspace.

A list of available palettes will appear. Find and select “Lilith’s Throne.” Now the available colors at the bottom of the workspace should be as they appear in the image above. If you hover the cursor over any of the colors, it will tell you what type of item in LT it is meant for, and whether it is Primary, Secondary, Tertiary, or Damage Type (for weapons).

With any object selected in InkScape, you can left-click on a color from the palette to fill the selected object with that color. You can also right-click on the color in the palette list to fill the stroke of the selected object with that color.