mods
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
mods [2024/01/06 15:00] – [List of sources] superuser | mods [2024/01/06 15:01] (current) – [List of sources] superuser | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Mods ====== | ||
+ | Mods make various changes to the game. For example, they change the interface, add costumes for characters, add new characters, and change scenes that are already in the game. | ||
+ | |||
+ | Official mods can be found in the game itself. In the main menu at the top there is a tab Mods. | ||
+ | |||
+ | ===== Sources ===== | ||
+ | |||
+ | By default you should have 3 mod sources: **Local Mods**, **Patron Mods** and **Official**. | ||
+ | * Local mods - These are mods that are already installed | ||
+ | * Patron Mods - Official source of mods available only to Patrons. | ||
+ | * Official - Official source of mods available to everyone. | ||
+ | |||
+ | ==== List of sources ==== | ||
+ | |||
+ | * Official mods: http:// | ||
+ | * Game translations: | ||
+ | * Mods for mod developers: https:// | ||
+ | |||
+ | |||
+ | [[mods: | ||
+ | |||
+ | ===== Mods ===== | ||
+ | |||
+ | ==== How to install an official mod ==== | ||
+ | |||
+ | - Start the game | ||
+ | - At the top, select the **Mods** tab. | ||
+ | - Select the source of the mods. For example, Official. | ||
+ | - Select the mod. | ||
+ | - Click the **Install** button. | ||
+ | - Reload the game. | ||
+ | |||
+ | ==== How to install a third-party mod ==== | ||
+ | - Unpack the archive with the mod into a folder with mods. See. [[# | ||
+ | |||
+ | ==== Where mods are stored ==== | ||
+ | By default, mods are located in the " | ||
+ | |||
+ | Also in the game settings, if you scroll to the bottom, you can specify a different path to the folder with mods. | ||
+ | |||
+ | ==== How to disable a mod ==== | ||
+ | - Star the game. | ||
+ | - At the top, select the **Mods** tab. | ||
+ | - Select the source **Local Mods**. | ||
+ | - Select a mod. | ||
+ | - Click **Disable**. | ||
+ | |||
+ | ------- | ||
+ | |||
+ | Each mod should be in a separate folder named the same as the mod's id. | ||
+ | |||
+ | There should be a '' | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Scripts ==== | ||
+ | Code files must be in **.rpym** or **.rpymc** format. This is the same as **.rpy** and **.rpyc**. Don't know about .rpy and .rpyc? See [[https:// | ||
+ | |||
+ | You write mod code in .rpym files, when you start the game they will be compiled into .rpymc. | ||
+ | |||
+ | The files can simply be in a folder, or in a **.rpa** archive. | ||
+ | |||
+ | ==== How to replace an image from a game ==== | ||
+ | |||
+ | To do this, you need to add a new parameter '' | ||
+ | This parameter specifies a list of folders, files from which will be recognized by the game, as if they were in the game itself from the very beginning. | ||
+ | |||
+ | To change the image in the game, you need to know the location of the original image. In folder, specified in the '' | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | A simple mod that replaces the background of the room in which the player appears at the very beginning of the game. | ||
+ | |||
+ | The original background is stored in this path: | ||
+ | < | ||
+ | images/ | ||
+ | </ | ||
+ | |||
+ | Mod folder structure: | ||
+ | < | ||
+ | mods | ||
+ | └───mod-id | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | |||
+ | </ | ||
+ | |||
+ | Where '' | ||
+ | |||
+ | The content of the '' | ||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | That's all it takes to replace the image. | ||
+ | ==== How to interact with game events ==== | ||
+ | To do this, you need to create a class (in the **.rpym** file) that inherits the '' | ||
+ | |||
+ | For example, a module that reacts to a change in the time of day and a change in location. | ||
+ | <code python> | ||
+ | init python: | ||
+ | class DemoModule(Module): | ||
+ | id=" | ||
+ | subscribe_on_events=[" | ||
+ | |||
+ | def on_event(self, | ||
+ | if event.type == " | ||
+ | if event.is_morning: | ||
+ | renpy.notify(" | ||
+ | elif event.is_evening: | ||
+ | renpy.notify(" | ||
+ | elif event.type == " | ||
+ | renpy.notify(" | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== How to add an item to the store ==== | ||
+ | To do this, you need to create a variable from the [[mods: | ||
+ | |||
+ | * It is desirable that the variable name starts with '' | ||
+ | * Item name must be unique and must not be repeated. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | Adding a regular item to the Tenten shop. | ||
+ | |||
+ | <code python> | ||
+ | init python: | ||
+ | item_pen = Item( | ||
+ | name=__(" | ||
+ | cost=5, | ||
+ | icon=" | ||
+ | descr=__(" | ||
+ | shop=" | ||
+ | ) | ||
+ | </ | ||
+ | |||
+ | Adding clothes to the Ten-Ten store. | ||
+ | |||
+ | <code python> | ||
+ | init python: | ||
+ | item_ino_my_new_costume = Outfit( | ||
+ | name=__(" | ||
+ | cost=100, | ||
+ | descr=__(" | ||
+ | char=" | ||
+ | lust=10, | ||
+ | layer=" | ||
+ | val=" | ||
+ | shop=" | ||
+ | ptr=False, | ||
+ | icon=KTCharInventoryPreview( | ||
+ | char_name=" | ||
+ | layers=ino_preview_layers + [(" | ||
+ | crop=ino_costume_inv_preview | ||
+ | ), | ||
+ | ) | ||
+ | </ | ||
+ | |||
+ | Mod folder structure: | ||
+ | < | ||
+ | mods | ||
+ | └───mod-id | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | │ | ||
+ | |||
+ | </ | ||
+ | |||
+ | With this approach, the item will only be in the store if you start a new game. To add an item to the store, if the player is loading an already existing save, use [[mods: | ||
+ | |||
+ | You will get something like this: | ||
+ | <code python> | ||
+ | def on_event(self, | ||
+ | if event.type == " | ||
+ | inv_shop.add(item_my_item) | ||
+ | </ | ||
+ | |||
+ | ===== Game variables ===== | ||
+ | ==== Time of the Day ==== | ||
+ | <code python> | ||
+ | if game.time.is_morning: | ||
+ | "Now is the day" | ||
+ | elif game.time.is_evening: | ||
+ | "It is evening now" | ||
+ | |||
+ | $ game.time.set_morning() | ||
+ | "Now is the day" | ||
+ | $ game.time.set_evening() | ||
+ | "Now it's evening" | ||
+ | |||
+ | $ game.time.next_cycle() | ||
+ | "If there was a day, now it is evening. If it was evening, it is now day and the counter of days has increased." | ||
+ | |||
+ | $ game.time.next_day() | ||
+ | "It is now exactly a day and the counter of days has increased by 1." | ||
+ | |||
+ | $ game.time.skip_days(10) | ||
+ | "The day counter has increased by 10." | ||
+ | </ |
mods.txt · Last modified: 2024/01/06 15:01 by superuser