Stardew Valley

File information

Last updated

Original upload

Created by

Slothsoft

Uploaded by

staubwirbel

Virus scan

Safe to use

Documentation

Readme

View as plain text

Informant

A Mod for Stardew Valley

[MIT Licence]

- 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:

- User Manual
- Prerequisites
- Installing
- Using the Mod
- Configuration
- Versions
- Translator Guide
- Developer Notes
- License

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.

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 true True if the bundle decorator should be activated
Decorator

DisplayIds.crop Crops true True if the crops tooltip should be activated
Tooltip

DisplayIds.fieldoffice Field true True if the field office decorator tooltip should
Office be activated
Decorator

DisplayIds.fruit-tree Fruit Trees true True if the fruit trees tooltip should be
Tooltip activated

DisplayIds.machine Machines true True if the machines tooltip should be activated
Tooltip

DisplayIds.museum Museum true True if the museum decorator should be activated
Decorator

DisplayIds.rarecrow Rarecrow true True if the rarecrow decorator should be
Decorator activated

DisplayIds.sell-price Sell Price true True to show the item’s price on the bottom of
Decorator the tooltip

DisplayIds.shipping Shipping true True to marks items that were not shipped yet
Decorator

DisplayIds.tree Trees true True if the trees tooltip should be activated
Tooltip

DecorateLockedBundles Decorate false ForNonMachines displays tooltips only on machines
Locked that do workForChests hides tooltips only for
Bundles chestsNever displays tooltip on every item

HideMachineTooltips Hide ForNonMachines ForNonMachines displays tooltips only on machines
Machine that do workForChests hides tooltips only for
Tooltips chestsNever displays tooltip on every item

TooltipTrigger Tooltip Hover Hover to get tooltips when the mouse hovers over
Trigger the itemButtonHeld to get tooltips only when a
button is held

TooltipTriggerButton Tooltip MouseRight If the trigger is ButtonHeld, this is the button
Button that triggers the tooltip
-------------------------------------------------------------------------------------------------------

Versions

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

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 🔜

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

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;

///


/// Base class for the entire API. Can be used to add custom information providers.

/// API Version: 1.4.0
///

public interface IInformant {

///
/// Adds a tooltip generator for the (s) under the mouse position.
///

void AddTerrainFeatureTooltipGenerator(string id, Func displayName, Func description, Func generator);

///
/// Adds a tooltip generator for the (s) under the mouse position.
///

void AddObjectTooltipGenerator(string id, Func displayName, Func description, Func generator);

///
/// Adds a decorator for the (s) under the mouse position.
///

void AddItemDecorator(string id, Func displayName, Func description, Func 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("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

3. Put the contents of _bin/Informant*.zip_ in a fresh Stardew Valley
and test if everything works
4. Create a new tag and release on GitHub, append the ZIPs
5. Increment the version in manifest.json and build/common.targets

Used Tutorials

- General Information:
- SMAPI API: Modding:Modder Guide/APIs
- Stardew Valley API: StawdewValley on GitHub

License

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

[MIT Licence]: https://img.shields.io/github/license/jenkinsci/java-client-api.svg?label=License
[1]: https://github.com/slothsoft/stardew-informant/blob/main/LICENSE
[Stef Schulz]: mailto:[email protected]
[SMAPI]: https://smapi.io/
[Stardew Valley]: https://www.stardewvalley.net/
[Informant.zip]: https://github.com/slothsoft/stardew-informant/releases/latest
[Generic Mod Config Menu]: https://www.nexusmods.com/stardewvalley/mods/5098
[Bundle Image]: https://github.com/slothsoft/stardew-informant/blob/main/Informant/assets/bundle.png
[Field Office Image]: https://github.com/slothsoft/stardew-informant/blob/main/Informant/assets/field_office.png
[Museum Image]: https://github.com/slothsoft/stardew-informant/blob/main/Informant/assets/museum.png
[Rarecrow Image]: https://github.com/slothsoft/stardew-informant/blob/main/Informant/assets/rarecrow.png
[Shipping Bin Image]: https://github.com/slothsoft/stardew-informant/blob/main/Informant/assets/shipping_bin.png
[Issues]: https://github.com/slothsoft/stardew-informant/milestone/1
[2]: https://github.com/slothsoft/stardew-informant/milestone/14?closed=1
[3]: https://github.com/slothsoft/stardew-informant/milestone/13?closed=1
[4]: https://github.com/slothsoft/stardew-informant/milestone/12?closed=1
[5]: https://github.com/slothsoft/stardew-informant/milestone/11?closed=1
[6]: https://github.com/slothsoft/stardew-informant/milestone/9?closed=1
[7]: https://github.com/slothsoft/stardew-informant/milestone/10?closed=1
[8]: https://github.com/slothsoft/stardew-informant/milestone/8?closed=1
[9]: https://github.com/slothsoft/stardew-informant/milestone/7?closed=1
[10]: https://github.com/slothsoft/stardew-informant/milestone/6?closed=1
[11]: https://github.com/slothsoft/stardew-informant/milestone/5?closed=1
[12]: https://github.com/slothsoft/stardew-informant/milestone/4?closed=1
[13]: https://github.com/slothsoft/stardew-informant/milestone/3?closed=1
[14]: https://github.com/slothsoft/stardew-informant/milestone/2?closed=1
[here]: https://github.com/slothsoft/stardew-informant/issues
[i18n/]: https://github.com/slothsoft/stardew-informant/blob/main/Informant/i18n/
[pull request]: https://github.com/slothsoft/stardew-informant/fork
[ArndGlh]: https://github.com/ArndGlh
[brighteast99]: https://github.com/brighteast99
[Mikeliro]: https://github.com/Mikeliro
[ExaBronto]: https://www.nexusmods.com/stardewvalley/users/114449313
[gottyduke]: https://github.com/gottyduke
[stardewvalley.targets]: https://github.com/Pathoschild/SMAPI/blob/develop/docs/technical/mod-package.md#custom-game-path
[Api]: https://github.com/slothsoft/stardew-informant/blob/main/Informant/Api
[Modding:Modder Guide/APIs]: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs
[StawdewValley on GitHub]: https://github.com/veywrn/StardewValley