A Mod for Stardew Valley
- Author: Stef Schulz
- Repository: https://github.com/slothsoft/stardew-informant
- Open Issues: https://github.com/slothsoft/stardew-informant/issues
- NexusMods: https://www.nexusmods.com/stardewvalley/mods/14293
A mod that displays additional information on various objects. It marks inventory items that are still necessary for the bundle, calculates how many days are still left until the harvest and displays what is in a machine and how much time is left on it.
This mod also provides a handy API to extend its functionality.
Content of this ReadMe:
You need SMAPI to run any kind of mods. And of course you need Stardew Valley.
- Install SMAPI
- Unzip the latest Informant.zip to the Mods/ folder
- If you want to use spacechase0's Generic Mod Config Menu, this mod automatically hooks into its menu
The mod is automatically present in the game. You just need to move the mouse over the object you wish to get the information from.
If you don't like one or more of the displayed information (or worse, if there are conflicts with other mods), you can disable each type.
There are some decorators, i.e. images displayed on the regular item tooltip, that have a specific meaning:
- Bundles Decorator - displayed when the item is still needed for the bundles
- Field Office Decorator - displayed when the item is still needed for the island field office
- Museum Decorator - displayed when the item is still needed for the museum
- Rarecrow Decorator - displayed when the item is still needed for the rarecrow collection
- Shipping Decorator - displayed when the item was not yet shipped
For the Bundles Decorator, there is the option to show it on items needed for still locked bundles. On default, the decorator is only shown for the bundles you have access to, to keep it fair and balanced.
You can also configure the tooltip "trigger", i.e. if you want the tooltip to show when the mouse hovers over an object, or if you want to press a key. You can also select the key to press.
On default, of all the big craftable objects in the game, only machines that produce something will get a tooltip. You can configure that to include all craftable objects, or all except chest (if you have a mod that shows specific information for them already).
If you wish to configure this mod, it's advised to install spacechase0's Generic Mod Config Menu. Then there will be a config page.
But if you wish to change the config.json file manually, you can also do that. The config.json with all entries is:
{
"DisplayIds": {
"bundles": true,
"challenger-decorator": true,
"crop": true,
"fieldoffice": true,
"fruit-tree": true,
"rarecrow": true,
"machine": true,
"museum": true,
"sell-price": true,
"shipping": true,
"tree": true
},
"DecorateLockedBundles": false,
"HideMachineTooltips": "ForNonMachines",
"TooltipTrigger": "Hover",
"TooltipTriggerButton": "MouseRight"
}
Key in JSON | Config Name | Default Value | Explanation |
---|---|---|---|
DisplayIds.bundles |
Bundles Decorator | true |
True if the bundle decorator should be activated |
DisplayIds.crop |
Crops Tooltip | true |
True if the crops tooltip should be activated |
DisplayIds.fieldoffice |
Field Office Decorator | true |
True if the field office decorator tooltip should be activated |
DisplayIds.fruit-tree |
Fruit Trees Tooltip | true |
True if the fruit trees tooltip should be activated |
DisplayIds.machine |
Machines Tooltip | true |
True if the machines tooltip should be activated |
DisplayIds.museum |
Museum Decorator | true |
True if the museum decorator should be activated |
DisplayIds.rarecrow |
Rarecrow Decorator | true |
True if the rarecrow decorator should be activated |
DisplayIds.sell-price |
Sell Price Decorator | true |
True to show the item's price on the bottom of the tooltip |
DisplayIds.shipping |
Shipping Decorator | true |
True to marks items that were not shipped yet |
DisplayIds.tree |
Trees Tooltip | true |
True if the trees tooltip should be activated |
DecorateLockedBundles |
Decorate Locked Bundles | false |
ForNonMachines displays tooltips only on machines that do workForChests hides tooltips only for chestsNever displays tooltip on every item |
HideMachineTooltips |
Hide Machine Tooltips | ForNonMachines |
ForNonMachines displays tooltips only on machines that do workForChests hides tooltips only for chestsNever displays tooltip on every item |
TooltipTrigger |
Tooltip Trigger | Hover |
Hover to get tooltips when the mouse hovers over the itemButtonHeld to get tooltips only when a button is held |
TooltipTriggerButton |
Tooltip Button | MouseRight |
If the trigger is ButtonHeld , this is the button that triggers the tooltip |
Version | Issues | Changes |
---|---|---|
Future | Issues | |
1.4.0 | Issues | Add rarecrow and field office decorators |
1.3.3 | Issues | Portuguese translation and bugfixes |
1.3.2 | Issues | Translations (add French translation; update Korean translation) |
1.3.1 | Issues | Bugfixes (fix config for "new" recipe; fix fruit tree calculation on Ginger Island; make decorator display shipped item needed for "ship 15 of everything"; fix time remaining for casks; fix ginger tooltip) |
1.3.0 | Issues | Additional information (marks uncrafted recipes, shipping decorator, shows icons on tooltips) |
1.2.2 | Issues | Turkish translation |
1.2.1 | Issues | Chinese translation |
1.2.0 | Issues | Sell price feature |
1.1.1 | Issues | Bugfixes from NexusMods feedback |
1.1.0 | Issues | Split-screen & API fixes |
1.0.0 | Issues | Nexus Release |
0.4.0 | Issues | Prepare for Nexus Release |
0.3.0 | Issues | Strutured PoC |
0.2.0 | - | Crop Informant |
0.1.0 | - | Bundle Informant |
(All issues can be found here.)
Right now, not all translations are provided. If you want to help, translate either file in the i18n/ and test it right in your Stardew Valley (the same folder exists in your Mods/ folder). You can than provide it to me via pull request or email.
Key | Language | Translated? |
---|---|---|
default |
English | β |
de |
German | β |
es |
Spanish | π |
fr |
French | β (thanks to ArndGlh) |
hu |
Hungarian | π |
it |
Italian | π |
ja |
Japanese | π |
ko |
Korean | β (thanks to brighteast99) |
pt |
Portugese | β (thanks to Mikeliro |
ru |
Russian | π |
th |
Thai | π |
tr |
Turkish | β (thanks to ExaBronto) |
zh |
Chinese | β (thanks to gottyduke) |
(This section contains notes to myself.)
To start developing this mod, you need to
- Create stardewvalley.targets file with the game folder
There is a smaller API you can use without a direct dependency to this DLL. Just copy this interface:
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley.TerrainFeatures;
namespace MyMod.ThirdParty;
/// <summary>
/// Base class for the entire API. Can be used to add custom information providers.<br/>
/// <b>API Version:</b> 1.4.0
/// </summary>
public interface IInformant {
/// <summary>
/// Adds a tooltip generator for the <see cref="TerrainFeature"/>(s) under the mouse position.
/// </summary>
void AddTerrainFeatureTooltipGenerator(string id, Func<string> displayName, Func<string> description, Func<TerrainFeature, string> generator);
/// <summary>
/// Adds a tooltip generator for the <see cref="Object"/>(s) under the mouse position.
/// </summary>
void AddObjectTooltipGenerator(string id, Func<string> displayName, Func<string> description, Func<SObject, string?> generator);
/// <summary>
/// Adds a decorator for the <see cref="Item"/>(s) under the mouse position.
/// </summary>
void AddItemDecorator(string id, Func<string> displayName, Func<string> description, Func<Item, Texture2D?> decorator);
}
And then you can access the mod's API like this:
public class MyMod : Mod {
public override void Entry(IModHelper modHelper) {
Helper.Events.GameLoop.GameLaunched += (sender, args) => {
var informant = Helper.ModRegistry.GetApi<IInformant>("Slothsoft.Informant");
if (informant is null)
return;
// now call the methods of the informant
informant.AddItemDecorator(...);
informant.AddObjectTooltipGenerator(...);
informant.AddTerrainFeatureTooltipGenerator(...);
};
}
}
If more control over the API is wanted or needed, a dependency to this mod can be added, and then the entire Api folder can be used.
- Run build.bat, which only really works on my PC, but so what:
.\build
- Put the contents of bin/Informant*.zip in a fresh Stardew Valley and test if everything works
- Create a new tag and release on GitHub, append the ZIPs
- Increment the version in manifest.json and build/common.targets
- General Information:
- SMAPI API: Modding:Modder Guide/APIs
- Stardew Valley API: StawdewValley on GitHub
This project is licensed under the MIT License - see the MIT license for details.