This tutorial is set by the author to use the CC By-NC-SA protocol.
1. Design ideas
This tutorial is used to supplement fuel for generators in more practical devices, and it is also another practical example of OC's LUA.
First show the generator in more practical equipment: very easy to use, almost all resources at hand can be used for power generation, and the efficiency is good!It can be described as the first choice for energy sources in the early stages of development.Even if it develops in the later period, a 64 -fold high -temperature furnace generator can show your skills when the energy shortage -I'm afraid your fuel will not keep up!However, it also has a small problem: when the internal energy cache area is full, the burning fuel cannot be suspended, and it can only be burned all the time.If your power grid often works in a state of dissatisfaction with load, or a device with slow energy consumption such as AE, then your fuel utilization is very bad ... or even 90%of fuels may be wasted.Especially if the precious fuels such as coal blocks, the dust (TE), or solid/magic super fuel (GT) are used, the wasting part is even more impressive.
I have also considered building a large energy repository, and then used the redstone circuit to activate certain equipment to regularly provide fuel.However, energy involves all aspects of production. There are always various accidents that require artificial intervention, which makes me very uncomfortable for obsessive -compulsive disorder.This generates the idea of designing an automatic control program.
Design requirements: The value of the internal energy cache of the generator through the computer is less than a set value and no fuel in the generator, and the fuel is added.
Second, working environment
Mine World: Minecraft 1.7.10
Open computer: OpenComputers 1.7.2.1166
More practical equipment: Extrautilities 1.2.12
Other mods are random
Third, hardware placement
Positive map:
Back map:
illustrate:
The computer and the display do not need to use the best, as long as it can be run.Almost all parts in OC can be disassembled into raw materials, so at the beginning, you can use an ordinary computer first, and the resources are fully changed in the later period.And just install the CPU and graphics card (if it is an APU, it does not require graphics cards), memory, hard disk, EEPROM, this computer is basically a special computer.
The adapter and replacement device are placed next to the generator.The adapter can turn the generator into a device that can be recognized by a computer. More generators in more practical devices are the same name: GeneratorFurance, and then the computer can read its cache energy value.The replacement device is used to make up fuel for the generator, so the replacement device needs to be adjacent to the generator and the box.Note: The program automatically recognizes the containers around the replacement. The 1 -grid container is considered a generator, and a container greater than 1 grid is considered to be a fuel box.Therefore, there should be no other container around the replacement, including a computer case (this is a 10 -grid container).
Put the fuel in the box.As long as you can use it, you can put it in.The type of box is not limited. My survival file uses a multi -page box, and the 584 grids are covered with the dust!The computer will be sent to the generator one by one in order.
The energy unit below the box can be replaced with the energy repository in any MOD, or it is okay to send it directly with the energy pipeline.Under the normal working state, at least about 1/4 of the energy in the generator. For 64X generators, it is 1.6mrf, and the minimum generator also has 25krf.It's enough to consume the initial point.
Fourth, software part
After the computer is installed, you must first install a Internet card to download the program examples from the Internet.Of course, after downloading, you can remove it. If the resources on hand are tight, you can also remove the materials.
Open the computer, type Pastebin Get 3Z5CJTJN GENATOR.LUA and return to run. In the current directory, there is an extra generator.lua file.Run it directly.If you think this name is too long, you can set another simple name.
After the program runs, the screen resolution will be automatically adjusted to 50*14.The resolution of the basic graphics card is also 50*16, so no matter which graphics card and display are used, they can work normally.
The content of the display at work is as follows:
The content of each part is as follows:
Line 1 is the current clock (in the game) and cache energy value.You can use this computer for the hour.
The second line is the energy item, with the screen width as the maximum value, and the proportion of the current energy accounts for the maximum cache is visually displayed.It can be seen in the figure above that the current energy is about 10%of the full value.
Line 3 ~ The 6th line is the attributes and quantities that were sent to the fuel last time.Although OC can display Chinese, the support for Chinese is not perfect. Label content shows that "?", Please don't care too much about these details.The amount of fuel is set to 2 to prevent the fuel from disconnection. If you feel too small or too large, please modify the K value in the program yourself.
Line 7 was the time to get the fuel (also the time in the game).
In addition: If you want to build a power plant consisting of different generators, you can use this method to set up a power generation unit of 2*2*2.This is not only small, but also in line with modern industrial aesthetics, isn't it?
Five, Summary
I have been using this program for two days. I have tested all the generators in more practical equipment and can work normally. It is perfect.Especially for the TNT generator, every time the fuel is put, it is inevitable that you can throw it away with this!Just send the medicine or TNT into the box with a pipe and let it play it yourself.The only lack of beauty is that it is not possible to control multiple different generators at the same time.In fact, the performance of the computer is okay, but how to identify them is a big problem (who made them all the same!).
I hope that this applet can make everyone prefer the OC module, and also make the generators in more practical devices be more widely used.