OpenComputers Integration

NTM contains integration with another mod named "OpenComputers", which can be used to gather information about blocks, machines, and players. Below you can find instructions on how to connect machines to a network and the functions available to the computer. \*You will need a general knowledge of Lua, file structure, and a basic intuition on how OpenComputers networks function.

## Setup

Connecting a NTM machine/block to an OpenComputers system is extremely simple, all that's needed is a few cables. Use cables to connect the machine/block to the OpenComputers network.

Getting the values from the components is not as easy as may seem. Every NTM compatible machine/block, when connected to an OpenComputers network, will be given a unique component address that can be used to address that component. These addresses can be seen by typing 'components' into the OpenOS terminal. Additionally, you can use an Analyzer to grab the addresses by ctrl-shift-clicking a component.

All of the below machines have extra appended (added to the end) information about their position on every *getInfo* callback (unless specified otherwise). Ex. (First value, Second value, X-Coordinate, Y-Coordinate, Z-Coordinate)

## RBMK

### Normal/ReaSim Fuel Rod (rbmk\_fuel\_rod / rbmk\_fuel\_rod\_reasim)

**Note: There is currently a bug when pulling from the flux value (fast or slow) of a MEP-239 fuel rod, as the values returned are incorrect by orders of magnitude. No apparent cause for the issue has been found yet.**

* *getHeat* - Returns the current heat.
* *getSkinHeat* - Returns the current hull heat, if there's no rod, returns "N/A".
* *getCoreHeat* - Returns the current core heat, if there's no rod, returns "N/A".
* *getFluxSlow* - Returns the amount of slow flux **entering** the rod.
* *getFluxFast* - Returns the amount of fast flux **entering** the rod.
* *getDepletion* - Returns the depletion percent, if there's no rod, returns "N/A".
* *getXenonPoison* - Returns the xenon poisoning percent, if there's no rod, returns "N/A".
* *getModerated* - Returns true if the fuel column is moderated, else returns false.
* *getInfo* - Returns all fields mentioned above {Heat, Hull Heat, Core Heat, Slow Flux, Fast Flux, Enrichment, Xenon Poison, Moderated}.

### Control Rod (rbmk\_control\_rod)

* *getHeat* - Returns the current heat.
* *getLevel* - Returns the current level.
* *getTargetLevel* - Returns the current target level.
* *getColor* - Returns the set rod color.
* *getInfo* - Returns all fields mentioned above {Heat, Level, Target Level}
* *setLevel* - Sets the rod level in percent, maximum is 100%

### Steam Channel (rbmk\_boiler)

* *getHeat* - Returns the current heat.
* *getSteam* - Returns the current amount of steam.
* *getSteamMax* - Returns the maximum amount of steam.
* *getWater* - Returns the current amount of water.
* *getWaterMax* - Returns the maximum amount of water.
* *getSteamType* - Returns the current steam type, (0 is steam, 1 is dense steam, 2 is super dense steam, 3 is ultra dense steam)
* *setSteamType* - Sets the current steam type using the key above. (Requires an integer, returns true on success)
* *getInfo* - Returns all fields mentioned above {Heat, Steam, Max Steam, Water, Max Water, Steam Type}

### Cooler (rbmk\_cooler)

* *getHeat* - Returns the current heat.
* *getCryo* - Returns the current amount of cryogel.
* *getCryoMax* - Returns the maximum amount of cryogel.
* *getInfo* - Returns all fields mentioned above {Heat, Cryo, Max Cryo}

### Heater (rbmk\_heater)

* *getHeat* - Returns the current heat.
* *getFill* - Returns the current amount of fluid in the input tank.
* *getFillMax* - Returns the maximum amount of fluid in the input tank.
* *getExport* - Returns the current amount of fluid in the output tank.
* *getExportMax* - Returns the maximum amount of fluid in the output tank.
* *getFillType* - Returns the ID of the input fluid.
* *getExportType* - Returns the ID of the output fluid.
* *getInfo* - Returns all fields mentioned above {Heat, Fill, Max Fill, Export, Max Export, Fill Type, Export Type}

### Irradiation Column (rbmk\_outgasser)

* *getGas* - Returns the current amount of gas.
* *getGasMax* - Returns the maximum amount of gas.
* *getProgress* - Returns the current progress of the irradiation.
* *getGasType* - Returns the ID of the gas inside the tank.
* *getInfo* - Returns all fields mentioned above {Gas, Max Gas, Progress, Gas Type}

### RBMK Crane (rbmk\_crane)

* *move* - Can move to 4 directions, "left", "right", "up", "down". Do note that one "move" function moves the arm only 1/20 of a block.
* *load* - Loads or unloads the rod.
* *getDepletion* - Returns the depletion percent from the rod, if there's no rod, returns "N/A".
* *getXenonPosion* - Returns the xenon poisoning percent from the rod, if there's no rod, returns "N/A".

## ZIRNOX (zirnox\_reactor)

* *getTemp* - Returns the current temp.
* *getPressure* - Returns the current pressure.
* *getWater* - Returns the current amount of water.
* *getCarbonDioxide* - Returns the current amount of carbon dioxide.
* *getSteam* - Returns the current amount of steam.
* *isActive* - Returns a Boolean (true of false).
* *getInfo* - Returns all fields mentioned above {Temperature, Pressure, Water, CO2, Steam, Active} (Doesn't contain coordinates).
* *setActive* - Requires a Boolean (true or false).

## Research Reactor (research\_reactor)

* *getTemp* - Returns the current temp.
* *getLevel* - Returns the current rod level in percent.
* *getTargetLevel* - Returns the target rod level.
* *getFlux* - Returns the total flux.
* *getInfo* - Returns all fields mentioned above {Temp, Level, Target Level, Flux} (Doesn't contain coordinates).
* *setLevel* - Sets the rod level.

## Reactor Control (reactor\_control)

* *isLinked* - Returns if the control is linked to a reactor.
* *getReactor* - Returns an array of values for the reactor (Rod level, Flux, Heat).
* *setParams* - Takes in a multitude of values for setting functions/values. (New function; (0 = linear, 1 = quadratic, 2 = logarithmic), Maximum heat, Minimum heat, Maximum level, Minimum level.)
* *getParams* - Returns the current parameters set in the control block. (Function from 0-2, Max heat, Min heat, Max level, Min level.
* Doesn't have a getInfo function

## Breeding Reactor (breeding\_reactor)

* *getFlux* - returns the current flux.
* *getProgress* - returns the current progress percentage.
* *getInfo* - returns all fields mentioned above {Flux, Progress} (Doesn't contain coordinates).

## DFC Reactor

### DFC Emitter (dfc\_emitter)

* *getEnergyInfo* - Returns the energy information (Energy Stored, Max Energy).
* *getCryogel* - Returns the amount of cryogel stored.
* *getInput* - Returns the percentage of input.
* *isActive* - Returns a Boolean (true or false).
* *getInfo* - Returns all fields mentioned above {Energy Stored, Max Energy, Cryogel, Input, Active} (Doesn't contain coordinates).
* *setActive* - Requires a Boolean (true or false).
* *setInput* - Set the input up to 100%.

### DFC Stabilizer (dfc\_stabilizer)

* *getEnergyInfo* - Returns the energy information (Energy Stored, Max Energy).
* *getInput* - returns the percentage of input.
* *getDurability* - returns the current durability of the lens, if not found, will return "N/A".
* *getInfo* - returns all fields mentioned above {Energy Stored, Max Energy, Input, Durability} (Doesn't contain coordinates).
* *setInput* - set the input up to 100%.

### DFC Injector (dfc\_injector)

* *getFirstFuel* - Returns the amount of fuel in the first tank.
* *getSecondFuel* - Returns the amount of fuel in the second tank.
* *getInfo* - Returns all fields mentioned above {First Fuel, Second Fuel} (Doesn't contain coordinates).

### DFC Receiver (dfc\_receiver)

* *getEnergyInfo* - Returns the energy information (Input, Output).
* *getCryogel* - Returns the amount of cryogel.
* *getInfo* - Returns all fields mentioned above {Input, Output, Cryogel} (Doesn't contain coordinates).

## Storage (Energy/Fluid)

### Fluid Tank/BAT 9000/Fluid Barrel (ntm\_tank/ntm\_fluid\_tank)

**Both the BAT9000 and the Fluid Barrel have the component name of "ntm\_fluid\_tank", and all compatible fluid tanks use the same basic callbacks.**

* *getFluidStored* - returns the amount of fluid stored in mB (millibuckets).
* *getMaxStored* - returns the maximum fluid stored in mB.
* *getTypeStored* - returns the type of fluid stored.
* *getInfo* - Returns all fields mentioned above {Fluid Stored, Max Stored, Type Stored} (Doesn't contain coordinates).

### Energy Storage Block (ntm\_energy\_storage)

* *getEnergyInfo* - Returns the energy information (Energy Stored, Max Energy).
* *getInfo* - Returns all fields mentioned above {Energy, Max Energy} (Doesn't contain coordinates).

### Fluid Duct Gauge (ntm\_fluid\_gauge)

* *getTransfer* - returns the fluid transfer per tick and per second.
* *getFluid* - returns the fluid set for the gauge.
* *getInfo* - Returns all fields mentioned above {Per tick, Per second, Type}.

## Other

### Radar (ntm\_radar)

**This is currently being redone due to the new radar changes, and is currently inoperable.**

### Missile Launch Pad (launch\_pad)

* *getEnergyInfo* - Returns the energy information (Energy Stored, Max Energy).
* *getCoords* - returns current coordinates in a table; returns coordinates on success, otherwise returns false.
* *setCoords* - sets coordinates if there is a designator (x, y); returns true on success, otherwise returns false.
* *launch* - launches rocket.

### Large Launch Pad (large\_launch\_pad)

* *getEnergyInfo* - Returns the energy information (Energy Stored, Max Energy).
* *getContents* - Returns a multitude of arguments: Fuel fill, Fuel max fill, Fuel type, Oxidizer fill, Oxidizer max fill, Oxidizer type, Solid fuel fill, and Solid fuel max.
* *getLaunchInfo* - Returns 4 booleans: If the missile can launch, If the missile provided is valid, if the launch pad has a valid designator, and if the missile has enough fuel to launch.
* *getCoords* - returns current coordinates in a table; returns coordinates on success, otherwise returns false.
* *setCoords* - sets coordinates if there is a designator (x, y); returns true on success, otherwise returns false.
* *launch* - launches rocket.

### Geiger Counter (ntm\_geiger)

* *getRads* - returns the amount of **chunk radiation** as a number.

Made by microwave\_man\_\_\_