JoeStrout/Farmtronics

Feature Request: Read from/write to ingame notification toasts

greysondn opened this issue · 2 comments

This request is very label-on-the-tin type.

I first briefly mentioned this in JoeStrout's MiniScript Discord server; it can be found in the logs here. That request has been split into two requests, however, as it seems to be asking for two very different things in the underlying game as far as I can tell.

Detailed Description

The game featues an in-game toast notification system to inform the player of various immediate pieces of data.

What I'm proposing is that the MiniScript interpreter in Farmtronics needs to be able to read from and write to this interface element.

Here's some snapshots of it showing information bottom left of the screen on a modded version of the game. Note how there appear to be at least two forms - with an icon and without an icon. Also be aware that some toast notices are global and some are directed to a single player (this is more apparent in multiplayer sessions). While player-specific toasts would be useful, too, the primary interest is in global toast notification data for this feature request.

image

image

image

Usecase or Problem Being Solved

There are two main uses for this, which can be separated into two components - reading and writing.

  • Reading
    • There may be some data in the global toasts relevant to bot behaviors, which can be controlled by reading them.
  • Writing
    • Right now, in order to check the state of a machine or bot in-game, it's necessary to either visit it directly or else read the SMAPI console log.
      • The machine or bot could instead be programmed to create a toast popup for things that actually matter to the player
  • Both
    • The game doesn't provide a toast log. In theory, one could be written using the ability to both read and write, and a replay provided of toasts on request.

Possible Implementation

As far as under the hood, I don't know much about Stardew Valley modding, sorry.

As far as a few key ideas and points, however, here:

  • Write: The bot or computer, when speaking, should probably use its inventory sprite as an icon, or optionally no icon at all.
  • Write: It may be prudent to provide a mod config option to let players deny bots and computers the ability to completely disable toast from bots and computers, to act as a safety switch to diffuse malicious and/or naïve behavior in the community.
  • Read: It may be best to maintain some variation on a global queue for toast messages, as opposed to forcing players to specifically catch each toast popup themselves when it first comes in.
    • Limiting the size of this would be wise for various reasons - not the least of which, it shouldn't eat up RAM for players who don't make use of it
    • Toast numbering and throwaway when the queue exceeds a certain size would probably be the best utilities to let players see if they potentially missed a toast in the queue.

Environment

  • Version used:
    • Farmtronics 1.1.0
  • Host operating system:
    • Windows 10 Home x64

I feel this use case is better handled via the in-game chat (#18), which also identifies the speaker and allows for two-way communication (i.e., you could give your bots remote commands).

No problem! This was part of the motivation in splitting it into two requests in the first place - recognition that the two were related but not the same.

Whee one less item on my request list!