Compact Machines

Compact Machines

65M Downloads

Feature Idea: Simulated Machines

AngellusMortis opened this issue ยท 2 comments

commented

I am not using performance mods.

  • Confirm

Description

First: this is not a bug report, but you do not have other issue template types nor do you have a contributing doc or discussions enabled to explain how to communicate in any other way. Just an idea I had that I wanted to share. It may have already been thought of or not.

While Compact Machines are awesome, they still require the things inside of them to tick and use CPU cycles. They just shift the load from one dimension to another. So, I had an idea to "solve" that, which will work really well for "simple" things like tree farms, etc. But it could eventually be iterated over and even handle more complex things like crafters (on demand inputs/outputs) and mob farms (loot tables).

Basically, a new machine (or extension of existing ones) that basically have 3 modes:

  • Manual (works exactly like an existing Compact Machine)
  • Recording
  • Simulation

Going to use a create tree farm as an example just to illustrate the idea.

  1. You build a machine; it is in manual mode. You go inside, build your contraption, set it up to export the saplings, wood, etc. from the machine.

  2. You exit the machine and toggle it to recording mode. In recording mode, it automatically forcibly chunk loads the machine as well as the chunk the machine is in for the outside dimension. Recording mode runs for some amount of time, let's say 2 hours. During that time, it records all of the inputs and outputs to the machine.

  3. Once the recording mode timer ends, it enters simulation mode. It stops chunk loading and it calculates weights and averages for inputs and outputs and just acts like a basic machine. Nothing inside of the machine actually ticks or does anything.

Some notes:

The player can only enter the machine and edit in manual mode. Recording/simulation mode, entering the machine is disabled.

Obviously, a tree farm is a simple example. Loot tables, especially with randomized loot like enchantments, prefixes (Apotheosis), etc. make this a lot more complicated. So, you could automatically abort simulation mode if you detect any of these randomized aspects until they could be fully supported. Or you could just strip them. Say you make skeleton farm. Automatically ignore all bows or other randomized loot as output and give the player a warning about it. It essentially automatically voids them. So, the only outputs are bones and arrows.

Mod Version

N/A.

Forge Version

N/A.

Link to Crashlog

No response

Screenshot (if available)

No response

How to reproduce

N/A.

commented

I have some plans for an upgrade system that will solve some of the feature request you are asking for, however I do not have any plans for simulating real world gameplay.

Other mods such as WOOT have tried to do what you asked and it almost always ends in frustration or stats being calculated wrong, which ends up in unfair outcomes.

commented

That is why I said to start with more simple examples like tree farms. You should be able to very easily detect the presence of a mob entity and prevent any kind of simulating.

The main usefulness would be for multiplayer servers. Calculating inputs/outputs on most farms (like real farms/trees/whest/etc.) should be pretty easy since you are not dealing with loot tables. Create tree farms seem to always be kind of up there in CPU usage. Not as high as mobs, but every little bit helps.