JoeStrout/Farmtronics

Feature Request: Provide tooling to silently accept data from/send data to SMAPI console

greysondn opened this issue · 0 comments

This request is the first non-obvious one I've made.

SMAPI runs things in a server console. Farmtronics already writes some data to that console. What I'm proposing is that Farmtronics may benefit from giving the user the ability to read from and write to that console without showing anything in-game corresponding to it.

Detailed Description

The above covers most the points, actually.

Usecase or Problem Being Solved

Any programmer with enough patience would be able to then write a wrapper to the game's SMAPI launcher to read from/write to the server console, providing a mechanism to bridge Farmtronics and its facilities to other languages and toolkits.

For example, a simple command interpreter could be written for the ingame Farmtronics bot, and then it could emit a message to the server console when it's ready for its next command. The tooling bridged via the console wrapper could then send the next command to the bot. Simple and clean.

This would let workhorse code be written in other languages, as a key example of usecase; in my own selfish terms, I could write logic primarily in Python after wrapping SMAPI's console in it.

Possible Implementation

  • It may be wise to provide a mod configuration switch to remove the MiniScript interpreter's ability to read from the console, to prevent unpredictable malicious behavior.

  • Information the mod writes to the console should not be interpreted as commands by the console.

Environment

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