JoeStrout/Farmtronics

Feature Request: Make it possible to recharge bots.

greysondn opened this issue · 2 comments

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

Bots have a limited amount of energy. Recharging only seems to happen when the day ends. It'd be nice to have a way to recharge them.

In JoeStrout's MiniScript Discord server, this was mentioned recently (here); this request in the issue tracker is meant to serve to collect notes so Joe has them somewhere to reference. User names provided are in reference to their discord ids on the server.

This issue may see major updates to its original body text; if it does, I'll post a comment indicating it has changed.

Detailed Description

The above covers the basic points sufficiently. Most the rest of this is just log notes. Importantly, while the design is meant to prevent bots from being overpowered, it is not a balancing intention to make bots completely unrechargable. (discord, here)

Most the rest of the Discord notes will end up in implementation details, as they concern that.

Usecase or Problem Being Solved

The player's character has the ability to recharge energy several ways.

  • By resting in a bed without swapping the day
  • By eating
  • By soaking in hot springs

It would be nice to have the bots be analogous to the player's limitations as much as possible. Ideas for those analogous things...

  • Resting in Bed
    • Go to a charging station
  • Eat
    • Use a battery?
  • Soak in hot springs
    • Go to a charging station

Possible Implementation

This is less a coherent plan and more notes on what has been suggested and said thus far.

  • Balance charging/energy restoration for bots

    • Look to the player's design choices by ConcernedApe for a model for what this could look like (greysondn)
  • Charging Station

    • Building

      • Provide a recipe to construct it like most basic machinery on the in-game farm (JoeStrout, Discord, here)

      • Alternatively, have Robin build it if it's considered major or some kind of big deal. (greysondn)

    • Powering

      • Charging stations use batteries as fuel? (phase858, Discord, here)

      • Tiered chargers? Let some generate bot energy from fuels, other from batteries, varying efficiency for conversion, etc. (greysondn, Discord, here)

      • Design an entire electricity system and descend into the madness of feature creep (greysondn, as a half-joke, Discord, here)

        • There's a mod that does this already that integration could be possibly done for. It's called "Utility Grid". (Mentioned by greysondn, Discord, here)
    • Solar Power

      • JoeStrout's original concept. Mentioned in Discord here
        • Design to not work at night. (JoeStrout, Discord, here)

        • Design to not work while it's raining. (JoeStrout, Discord, here)

  • Charging bot directly via consuming batteries

    • Make it a function so the player still has to write or find code to handle managing it? (phase858, Discord, here and here)

      • my original line of thinking was have a bot.useBattery function that if a battery is in the inventory, consume a battery and restores 30 energy [...] its worth noting my 30 energy for battery consumption was a rough number thrown out that probably would need balancing

    • phase858 has directly commented on this feature request with their own notes, here

Environment

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

On the battery consumption Idea:

  • Ideally the need to manually write your power management would balance it out in combination with the resource cost.
  • 30 energy per is a rough shot in the dark guess.
  • Ideally, the cost would be enough batteries to get the bot a full charge that encourages optimizing bot code, using multiple simultaneously, and other problem solving over throwing resources at a task, but still viable as a last resort.

As per request of @JoeStrout here is how to spawn in Battery Pack's for testing

either using CJB Item Spawner which based on the default keybindings, Press i on your keyboard and then type Battery Pack into the search bar and clicking the battery pack icon.

or using SMAPI's console by typing in the command

player_add Object 787 999

which gives the player 999 Battery Pack's