====== Game Classes ====== ===== Item ===== Item for inventory. ^ Parameter ^ Type ^ Description ^ | name | string | Item name. Must be unique | | cost | number | price of item | | descr | string | item description | | icon | string / [[#KTCharInventoryPreview|KTCharInventoryPreview]] | item icon | | trade | boolean | whether the item can be traded | | buy | boolean | can sell/buy item | | hidden | boolean | if "True", the name and description are replaced by "???" | | shop | "tenten" / "shady" | in which store the item is sold | | ptr | boolean | If ''True'', then the item is for Patrons only | ===== Outfit ===== Item for the inventory + an item of clothing for the character. Parameters are the same as [[#Item|Item]], plus more ^ Parameter ^ Type ^ Description ^ | char | "Ino" / "Sakura" / "Hinata" | name of the character the item is for | | layer | string | the name of the layer on which to place the image of the clothes. It is also the name of the folder where the image is located. | | val | string | the name of the image without the .webp extension which is in the ''layer'' folder | | lust | number | What level of depravity is required to wear the item | ===== KTCharInventoryPreview ===== The icon of the item with the clothing. ^ Parameter ^ Type ^ Description ^ | char_name | string | name of the character the item is for | | layers | (string, string)[] | List of layers that are applied over the character | | crop | (number, number, number, number) | How to crop an image | **Example** KTCharInventoryPreview( char_name="hinata", layers=[ ("base", "default"), ("eyes", "default"), ("mouth", "default"), ("costume", "my_custom_costume"), ], crop=(0, 336, 600, 600), ) In order to write a complete list of layers for each item, there are pre-made lists that you can use. ino_preview_nude_layers = [ ('base', 'default'), ('boobs', 'default'), ('left_hand', 'default'), ('right_hand', 'default'), ('eyes', 'default'), ('mouth', 'default') ] ino_preview_layers = ino_preview_nude_layers + [ ('bra', 'default'), ('panties', 'default'), ] sakura_preview_layers = [ ('base', 'default'), ('boobs', 'default'), ('left_hand', 'naked'), ('right_hand', 'naked'), ('eyes', 'default'), ('mouth', 'default'), ] hinata_preview_layers = [ ('base', 'default'), ('eyes', 'default'), ('mouth', 'default') ] An example of how to use the list. KTCharInventoryPreview( char_name="hinata", layers=hinata_preview_layers + [("costume", "my_custom_costume")], crop=(0, 336, 600, 600), ) There are also predefined cropping options for previews. ino_top_inv_preview = (149, 329, 303, 303) ino_bottom_inv_preview = (149, 668, 303, 303) ino_costume_inv_preview = (0, 336, 600, 600) ino_face_inv_preview = (149, 130, 303, 303) hinata_face_inv_preview = (149, 100, 303, 303) sakura_face_inv_preview = (180, 170, 303, 303) sakura_top_inv_preview = (180, 350, 303, 303) ===== Module ===== Module for interaction with the game. ^ Static parameters ^ Type ^ Description ^ | id | string | module id. Must be unique. | | subscribe_on_events | string[] | list of events to which the module should subscribe. See [[mods:events|List of events]] | ^ Function name ^ Arguments ^ Description ^ | on_init | | Called once when starting the game (new or loading a save) | | on_event | event | Called when the event to which the module is subscribed occurs |