ME level keeper terminal (An advanced autocrafting mechanic)
l-ricardo opened this issue · 3 comments
Describe the feature
A terminal where the player sees all craftable items in the network and can define an amount for each one to be kept in stock and also how many will be crafted at a time.
Reasons why it should be considered
Suppose I have 20 furnaces spread across my base where they are all being fueled with sticks for fuel through the AE2. I don’t have a stick farm, but I have a tree one that thanks to molecular assemblers can be turned into sticks, that is, I will need 20 crafting upgrades and my CPUs will keep flickering and crafting sticks 1 in 1 every time I use my furnaces. From a performance point of view isn’t it better to craft 200 sticks once in a while than 20 crafting of 1 stick every 10 seconds???
Centralizing the network’s ability to autocraft items in one place would be much more interesting and would be a huge help for the player to keep track of what the AE network is doing on its own. Now suppose I’m playing one of those expert modpacks and there’s that chain of microcrafting and I don’t want to do those junk setups with passive crafting, drawers and storage bus. It would be very useful to leave it predetermined for my AE network to always keep a certain amount of each item and if when I need to craft something that was not planned I will already have the subcomponents ready and I will have a smaller crafting since the subparts were already crafted when the AE network was in idle.
It would take the ae2 philosophy (which as far as I know is to automate everything) to another level, now everything is so automatic that the player would rarely need to request a crafting.
Additional Context
- Why not just use level emitters?
Well I use it. But they are not enough and very limited. The purpose of this suggestion is to offer a more advanced alternative to level emitters. (The purpose is not to make them obsolete after all they will still be very useful for things like turning off/on mobfarms)
- Now a description of how I envisioned this feature and why it would be so good as both QoL and performance enhancement.
I took some time and did this design for the terminal. Give me a discount because I’m not a professional and as the text is done in the code I didn’t worry at all about the font style. There is a lot of text written just to be clear and nothing confusing for the player what that setting means. All numbers there are to illustrate where the player will enter the autocrafting metrics.
In the first line "Work every 2000 ticks if there are 4 idle CPUs". Here we have a big point for performance. Unlike what happens with a crafting card in an exporter for example, this terminal is not updating all the time. This is possible due to the fact that instead of asking the network to craft 1 in 1. The idea is that the player configures to craft stacks at time if it is a highly needed item. In addition to the fact that it is visible to the player how much time this item will be restocked so it will be a fun game to calculate how much of the item has to be crafted at a time so the machines that previously would have a crafting card not run out of said item, so both methods achieve the same function.
Also has the configuration of how many CPUs are available this serves to maximize the speed of restocking and ensures that when the player wants to request an autocrafting manually he will have CPUs available. In the image, suppose the AE network has 10 CPUs the terminal will use only 6 simultaneously because when it tries to use the 7th there will no longer be 4 idle CPUs.
So only if these two terminal conditions check the autocrafting of the first item on the list to keep in stock will start.
Yes a list. As you can see in the arrows above and below each item, you can move them up and down, the highest items in the list are the ones that will be restocked first. And here comes the configuration of each item "Craft xxx more when below yyyy". In other words, it uses the same logic as the level emitter checks the number of items of that type stored and performs an action in which case the action would be to craft xxx of said item like a simulation of a player.
Let’s talk about colors:
Green: The item is above the minimum level.
Red: Cannot craft this item due to lack of resources/Crafting size exceeds CPUs/Crafting not completed... or something went wrong. In this case it would be interesting to give the player some kind of notification e.g. write in the chat "ME Level keeper terminal found a problem trying to craft X item".
Yellow: This item is in the crafting process. This function would be useful if the item takes longer to be made than the level keeper’s crafting cycle, so the ae2 would know that this was already requested and would not be confused trying to craft it infinitely.
Light gray: Item with a number lower than the minimum level but does not have high enough priority to be crafted i.e. the Level Keeper has not yet completed its operation order far enough to reach it. It would be a good indication for the player that he needs more CPUs.
Dark gray: This item is only there to show that it is craftable. To make it craftable by Level keeper it is necessary to add a crafting card for it. In other words, the player will still need the crafting card to prevent it from becoming obsolete and this will also turn the terminal more balanced.
How the logic would work:
I'm not a java expert. I only know C++ but based on that I'll give my hints to try to help the visualization. I'll use the colors to simplify.
When the timer reaches 0 it runs the operation. First see how many CPUs are available if it is less than the configured value does not perform any action and resets the timer, if greater or equal it means that there is idle CPU then read the first item in the list which has the highest priority to keep in stock. If the result of the analysis is green, read the next item, if it is green again, read the next one, if it is light gray asks for crafting the amount given by the player and change the color to yellow. And here to prevent this request from being the last CPU available, retest if there are CPU’s available. Or maybe to simplify it just make the operation run again from the beginning. Anyway read the next one on the list and if it's also light gray try crafting if it goes wrong alert the player and change the color in the GUI to red and analyze the next one, if it's green the next, if it's yellow the next, if it's red is next, if dark gray ends the operation and resets the timer.
In short:
Reset timer: Number of available CPUs less than specified, and Dark gray.
Analyzes the next item in priority order: Green, Yellow, Red
Request crafting: Light gray
- Concept problems:
All crafting cards would be stored in the terminal but what if someone accidentally breaks it? Keep the information or lose everything and need to configure everything again? What happens if the player puts more than one Level keeper terminal on the network? Do they share inventory? Or hide those items that are already have an crafting card and allow the player to have multiples with different configurations? Or impose a limitation of only one terminal per network and apply the same ME Controller behavior?
- Ending
Hope i helped. Sorry for the huge post I hope you guys like the idea since I searched here and didn't see any such request. Anyway I love this mod and this is a feature that would be game changing for me not to have to deal with the frustration of having to wait for an item I've already automatized to craft. There is no worse feeling than trying to make a torch and realizing that there is no stick ready, having to go to the search and request 1000 of them to see if this lack stops happening and hours later try to make a pickaxe and realize that the sticks are gone again. If no one noticed I have a trauma with sticks.
I like this idea.
however, I doubt this will become part of ae2 itself (there have been similar suggestions (not as detailed tho), which were rejected because keeping stock is already possible).
If it gets rejected, that sounds like a good concept for an addon.
We will not be adding this functionality as this is already possible within AE2, albeit very inconvenient at a large scale.
That sounds like a great addon idea though. Such a thing should be possible with our API. I can for example imagine it as a multiblock, or maybe as many ME Level Keeper
s each storing a few requests, which could all be accessed at once with an ME Level Keeper Terminal
.