Bookcase is a core API mod for Stardew Valley. The aim of this mod is to provide other moders with helpful utilities and improve general compatability between mods.
- Log - This class allows you to create a logger for your mod with wrappers for different log levels.
- Utilities - There are many utility classes and helper methods. They can be found in Bookcase.Utils.
- Events - This mod gives mods event hooks which they can use. See Bookcase.Events.BookcaseEvents for a full list.
Note: These steps are written with Visual Studio as the IDE. Other IDEs will also work, but the install steps may be different.
- You will need StardewValley and SMAPI installed on your computer.
- You should already know how to create a SMAPI mod. You can find more info about that here.
- Create a new project in Visual Studio.
- Right click on your project in the Solution Explorer and select
Manage NuGet Packages
. - Click on Browse if it's not already selected, and search for Bookcase.
- Install Bookcase for the version of the game you want. Usually this is the latest version.
- Expand your project in the solution explorer, and then expand References.
- Click on 0Harmony and then in the bottom properties set Copy Local to False.
- Restart your Visual Studio.
The SMAPI mod loader needs to know that your mod requires Bookcase. You can define that by adding the following property to the manifest.json
of your mod.
"Dependencies": [{
"UniqueID": "darkhax.bookcase",
"MinimumVersion": "MIN_VERSION_HERE"
}]
If you have sucessfully added Bookcase to your project, you should now be able to reference the mod and game classes. You can test this by adding these namespace references to one of your classes.
using Bookcase;
using StardewValley;
using StardewModdingAPI;
using Harmony;