Skip to content

A mod for Stardew Valley that displays a little marker next to items that are relevant for the community center bundles.

License

Notifications You must be signed in to change notification settings

nonparelli/stardew-informant

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Informant

A Mod for Stardew Valley

MIT Licence

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.

Screenshot

This mod also provides a handy API to extend its functionality.

Content of this ReadMe:

User Manual

Prerequisites

You need SMAPI to run any kind of mods. And of course you need Stardew Valley.

Installing

  1. Install SMAPI
  2. Unzip the latest Informant.zip to the Mods/ folder
  3. If you want to use spacechase0's Generic Mod Config Menu, this mod automatically hooks into its menu

Using the Mod

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.

Decorators

There are some decorators, i.e. images displayed on the regular item tooltip, that have a specific meaning:

  • Bundle Image Bundles Decorator - displayed when the item is still needed for the bundles
  • Field Office Image Field Office Decorator - displayed when the item is still needed for the island field office
  • Museum Image Museum Decorator - displayed when the item is still needed for the museum
  • Rarecrow Image Rarecrow Decorator - displayed when the item is still needed for the rarecrow collection
  • Shipping Bin Image 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.

Tooltips

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).

Configuration

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.

Screenshot

Screenshot

Screenshot

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 work
ForChests hides tooltips only for chests
Never displays tooltip on every item
HideMachineTooltips Hide Machine Tooltips ForNonMachines ForNonMachines displays tooltips only on machines that do work
ForChests hides tooltips only for chests
Never displays tooltip on every item
TooltipTrigger Tooltip Trigger Hover Hover to get tooltips when the mouse hovers over the item
ButtonHeld 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

Versions

Version Issues Changes
Future Issues
1.6.0 Issues Finished major 1.6 stuff and additional features, tea bush, bundle color, mossy tree, and FR i18n
1.5.x Issues Preliminary update for SDV 1.6 and various bugfixes
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.)

Translator Guide

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 βœ… (thanks to Cristofer07)
fr French βœ… (thanks to ArndGlh, Tenebrosful)
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)

Developer Notes

(This section contains notes to myself.)

Starting Development

To start developing this mod, you need to

  1. Create stardewvalley.targets file with the game folder

Use the Mod's API

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.

Release

  1. Run build.bat, which only really works on my PC, but so what:
.\build
  1. Put the contents of bin/Informant*.zip in a fresh Stardew Valley and test if everything works
  2. Create a new tag and release on GitHub, append the ZIPs
  3. Increment the version in manifest.json and build/common.targets

Used Tutorials

License

This project is licensed under the MIT License - see the MIT license for details.

About

A mod for Stardew Valley that displays a little marker next to items that are relevant for the community center bundles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.5%
  • PowerShell 1.5%