Mail Framework Mod v1.18.0
The MailFrameworkMod simplifies the process of sending mail to the player, offering greater control over when and what should be received. Additionally, it allows customization of the text and background color of letters, which is not possible through standard data file editing.
For Modders: API Usage
If you're a modder, follow these steps to integrate MailFrameworkMod into your own mod.
API Methods:
-
Copy Interfaces:
- Copy the IMailFrameworkModApi interface with the necessary methods from the MFM.
- Copy the ILetter interface for methods requiring its implementation.
-
Key Methods Overview:
-
RegisterContentPack:
- Use Helper.ContentPacks.CreateTemporary to load your mod’s folder, which should contain a mail.json file and possibly an i18n folder for translations.
- No manifest is required; just use the relevant method parameter to register.
-
-
GetLetter:
- Retrieve the ILetter object using the letter’s ID.
-
-
RegisterLetter:
- Fill in the ILetter object with the necessary properties and specify the conditions for delivering the letter. It is recommended to include feedback to identify the letter.
- For examples, refer to the section "For modders using dependency on MFM.
-
GetMailDataString:
- Obtain the mail data string using the letter ID. The mail data string contains translated text and a title separated by a delimiter [#].
-
For Modders Using MFM Dependency:
-
Include MailFrameworkMod.dll:
- Add MailFrameworkMod.dll in your SMAPI project.
-
Daily Mail Check:
- The mod will verify letters that meet the delivery condition at the start of each day and add them to the player’s mailbox.
-
Register Letters:
- Use MailRepository.SaveLetter(Letter) to register letters with the system.
-
Letter Behavior:
- These letters will be opened first when the player checks the mailbox.
- Once opened, the letter will be removed from the mailbox.
- At the end of the day, any letters still in the mailbox will be removed to avoid saving them in the game.
Installation:
-
Install SMAPI:
- Ensure you have the latest version of SMAPI installed.
-
Download and Extract the Mod:
- Unzip the "MailFrameworkMod" into the following directory:Копировать код.../Stardew Valley/Mods
-
Launch the Game via SMAPI:
- Start the game through SMAPI, and the mod will be automatically activated.
Note: This mod serves as a mail storage system, and it's best to load all letters at the beginning of the game session for smoother functionality.
SMAPI required!Mod Author: Digus
About Mod
Latest Version | v1.18.0 |
Game | Stardew Valley |
Category | Tools |
Downloads | 176 |
Created | 7 months ago |