From HBM's Nuclear Tech Wiki
OpenComputers (commonly called OC) is a mod that allows the user to use in-game computers to control/show information about other blocks/machines. NTM has built-in integration with OC, allowing for players to access/control many components of the mod with ease and automation. You will sometimes see this integration referred to as OC-NTM integration/compatibility.
Setup
Connecting a NTM machine/block to an OpenComputers system can be done by using OC cables to connect the OC system directly to the block/machine (without using an adapter).
Getting the values from the components is not as easy as it may seem. Every compatible machine/block from NTM, when connected to an OpenComputers network, will be given a unique component address that can be used to call that block in code. These addresses can be seen by typing components
into the OpenOS shell (or whatever shell the OS you are using has). Additionally, you can use an Analyzer to see the address by shift-clicking a block/machine, and copy the address by ctrl-shift-clicking it.
Unlocalized Names
NTM returns unlocalized names when getting fluid types through OC, meaning they sometimes will not have the same name as the name shown in-game. A table for finding unlocalized names and IDs for fluids can be found on this page.
Basic Terminology
integer
: A whole number value.
float
: A decimal value with 7 decimal places of precision.
double
: A decimal value with 16 decimal places of precision.
number
: OC uses this term to describe any number value, regardless of decimals. Always an integer
unless specified.
string
: A sequence or string of characters.
boolean
: A true or false value.
nil
: No value.
table
: An array of values with the first value being at index 1.
list
: Similar to a table, however the elements of the list are separated. Ex: a, b, c = foo()
Functions
RBMK
- Component Name:
"rbmk_fuel_rod"
Functions
Callback |
Return |
Type
|
getHeat()
|
Column heat in °C.
|
number (double)
|
getSkinHeat()
|
Fuel skin heat in °C, or N/A if no rod.
|
number (double)
|
getCoreHeat()
|
Fuel core heat in °C, or N/A if no rod.
|
number (double)
|
getFluxSlow()
|
Slow flux recieved by the rod.
|
number (double)
|
getFluxFast()
|
Fast flux recieved by the rod.
|
number (double)
|
getDepletion()
|
Fuel enrichment in %, or N/A if no rod.
|
number (double)
|
getXenonPoison()
|
Fuel xenon poisoning in %, or N/A if no rod.
|
number (double)
|
getType()
|
Internal name (unlocalized) of the fuel rod, or N/A if no rod. Example: "rbmk_fuel_hep" = "High Enriched Plutonium-239 RBMK Fuel Rod"
|
string
|
getModerated()
|
If the rod is moderated.
|
boolean
|
getCoordinates()
|
Global position of the column in the world.
Return Values for getCoordinates()
Index |
Value |
Type
|
1 |
X Coordinate |
number
|
2 |
Y Coordinate |
number
|
3 |
Z Coordinate |
number
|
|
list (number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getHeat()
|
2 |
getSkinHeat()
|
3 |
getCoreHeat()
|
4 |
getFluxSlow()
|
5 |
getFluxFast()
|
6 |
getDepletion()
|
7 |
getXenonPoison()
|
8 |
getType()
|
9 |
getModerated()
|
10-12 |
getCoordinates()
|
|
list
|
- Component Name:
"rbmk_control_rod"
Functions
Callback |
Return |
Type
|
getHeat()
|
Column heat in °C.
|
number (double)
|
getLevel()
|
Control rod height in %.
|
number (double)
|
getTargetLevel()
|
Control rod target height in %.
|
number (double)
|
setLevel(number)
|
Accepts one argument from 0-100% and sets the control rod target to the passed value. Returns true.
|
boolean (accepts number (double))
|
getColor()
|
Control rod color.
|
number
|
getCoordinates()
|
Global position of the column in the world.
Return Values for getCoordinates()
Index |
Value |
Type
|
1 |
X Coordinate |
number
|
2 |
Y Coordinate |
number
|
3 |
Z Coordinate |
number
|
|
list (number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getHeat()
|
2 |
getLevel()
|
3 |
getTargetLevel()
|
4-6 |
getCoordinates()
|
|
list
|
- Component Name:
"rbmk_boiler"
Functions
Callback |
Return |
Type
|
getHeat()
|
Column heat in °C.
|
number (double)
|
getSteam()
|
Steam in the column in mB.
|
number
|
getSteamMax()
|
Maximum Steam that can be stored in the column in mB.
|
number
|
getWater()
|
Water in the column in mB.
|
number
|
getWaterMax()
|
Maximum Water that can be stored in the column in mB.
|
number
|
getSteamType()
|
Steam type in a number.
|
number
|
setSteamType(number)
|
Accepts one argument from 0-3 and sets the steam type to the passed value based on the above table. Returns true.
|
boolean (accepts number)
|
getCoordinates()
|
Global position of the column in the world.
Return Values for getCoordinates()
Index |
Value |
Type
|
1 |
X Coordinate |
number
|
2 |
Y Coordinate |
number
|
3 |
Z Coordinate |
number
|
|
list (number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getHeat()
|
2 |
getSteam()
|
3 |
getSteamMax()
|
4 |
getWater()
|
5 |
getWaterMax()
|
6 |
getSteamType()
|
7-9 |
getCoordinates()
|
|
list
|
- Component Name:
"rbmk_cooler"
Functions
Callback |
Return |
Type
|
getHeat()
|
Column heat in °C.
|
number (double)
|
getCryo()
|
Amount of Cryogel in the column in mB.
|
number (double)
|
getCryoMax()
|
Maximum amount of Cryogel that can be stored in the column in mB.
|
number (double)
|
getCoordinates()
|
Global position of the column in the world.
Return Values for getCoordinates()
Index |
Value |
Type
|
1 |
X Coordinate |
number
|
2 |
Y Coordinate |
number
|
3 |
Z Coordinate |
number
|
|
list (number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getHeat()
|
2 |
getCryo()
|
3 |
getMaxCryo()
|
4-6 |
getCoordinates()
|
|
list
|
- Component Name:
"rbmk_heater"
Functions
Callback |
Return |
Type
|
getHeat()
|
Column heat in °C.
|
number (double)
|
getFill()
|
Input fluid in the column in mB.
|
number
|
getFillMax()
|
Maximum input fluid that can be stored in the column in mB.
|
number
|
getExport()
|
Output fluid in the column in mB.
|
number
|
getExportMax()
|
Maximum output fluid that can be stored in the column in mB.
|
number
|
getFillType()
|
Type of fluid in the input tank (unlocalized). Example: "Coolant" = "COOLANT"
|
string
|
getExportType()
|
Type of fluid in the output tank (unlocalized). Example: "Hot Coolant" = "COOLANT_HOT"
|
string
|
getCoordinates()
|
Global position of the column in the world.
Return Values for getCoordinates()
Index |
Value |
Tyoe
|
1 |
X Coordinate |
number
|
2 |
Y Coordinate |
number
|
3 |
Z Coordinate |
number
|
|
list (number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getHeat()
|
2 |
getFill()
|
3 |
getFillMax()
|
4 |
getExport()
|
5 |
getExportMax()
|
6 |
getFillType()
|
7 |
getExportType()
|
8-10 |
getCoordinates()
|
|
list
|
- Component Name:
"rbmk_outgasser"
Functions
Callback |
Return |
Type
|
getGas()
|
Gas in the output tank of the column in mB.
|
number
|
getGasMax()
|
Maximum gas in the output tank of the column in mB.
|
number
|
getGasType()
|
Type of gas in the output tank of the column. Example: "High-Performance Solvent" = "RADIOSOLVENT"
|
string
|
getProgress()
|
Progress of irradiation in the column (out of 10000).
|
number
|
getCoordinates()
|
Global position of the column in the world.
Return Values for getCoordinates()
Index |
Value |
Type
|
1 |
X Coordinate |
number
|
2 |
Y Coordinate |
number
|
3 |
Z Coordinate |
number
|
|
list (number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getGas()
|
2 |
getGasMax()
|
3 |
getGasType()
|
4 |
getProgress()
|
5-7 |
getCoordinates()
|
|
list
|
- Component Name:
"rbmk_crane"
Functions
Callback |
Return |
Type
|
move(string)
|
Accepts one argument. Returns nil if success, "Crane not found" if failed.
Input Arguments
Value |
Operation
|
"up" |
Moves crane 1/20th of a block upwards.
|
"down" |
Moves crane 1/20th of a block downwards.
|
"left" |
Moves crane 1/20th of a block left.
|
"right" |
Moves crane 1/20th of a block right.
|
|
nil; (accepts string)
|
load()
|
Load a rod from the fuel rod below into the crane. Returns nil if success, "Crane not found" if failed.
|
nil
|
getDepletion()
|
Enrichment of the rod inside the crane, "N/A" if no rod.
|
string
|
getXenonPoison()
|
Xenon poisoning of the rod inside the crane, "N/A" if no rod.
|
number
|
getCranePos()
|
Global position of the crane.
Return Values for getCranePos()
Index |
Value |
Type
|
1 |
X Coordinate |
number
|
2 |
Z Coordinate |
number
|
|
list (number)
|
Miscellaneous Reactors
- Component Name:
"zirnox_reactor"
Functions
Callback |
Return |
Type
|
getTemp()
|
Reactor heat in °C.
|
number
|
getPressure()
|
Reactor pressure in bar.
|
number
|
getWater()
|
Reactor Water level in mB.
|
number
|
getSteam()
|
Reactor Steam level in mB.
|
number
|
getCarbonDioxide()
|
Reactor carbon dioxide level in mB.
|
number
|
isActive()
|
If reactor is active (rods raised).
|
boolean
|
setActive(boolean)
|
Accepts one argument. Activates/deactivates the reactor.
|
nil; (accepts boolean)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getTemp()
|
2 |
getPressure()
|
3 |
getWater()
|
4 |
getSteam()
|
5 |
getCarbonDioxide()
|
6 |
isActive()
|
|
list
|
- Component Name:
"research_reactor"
Functions
Callback |
Return |
Type
|
getTemp()
|
Reactor heat in °C.
|
number
|
getLevel()
|
Reactor control rod level in %.
|
number (double)
|
getTargetLevel()
|
Reactor control rod target in %.
|
number (double)
|
getFlux()
|
Reactor flux.
|
number
|
setLevel(number)
|
Accepts one argument 0-100%. Sets the reactor control rod target extraction to the passed value.
|
nil; (accepts number (double))
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getTemp()
|
2 |
getLevel()
|
3 |
getTargetLevel()
|
4 |
getFlux()
|
|
list
|
- Component Name:
"reactor_control"
Functions
Callback |
Return |
Type
|
isLinked()
|
If the controller is connected to a reactor.
|
boolean
|
getReactor()
|
Linked reactor's values.
Return Values for getReactor()
Index |
Value |
Type
|
1 |
Reactor rod level in % (0 if unlinked). |
number (double)
|
2 |
Reactor flux (0 if unlinked). |
number
|
3 |
Reactor heat * 0.00002 * 980 + 20 (0 if unlinked). |
number
|
|
list (number)
|
getTargetLevel()
|
Reactor control rod target in %.
|
number (double)
|
setParams(number, number, number, number, number)
|
Accepts five arguments. Sets the automatic control settings for the controller.
Input Arguments
Index |
Argument |
Type
|
1 |
New function type.
Function Types
Value |
Function type
|
0 |
Linear
|
1 |
Quadratic
|
2 |
Logarithmic
|
|
number (0-2)
|
2
|
Maximum heat.
|
number (0-9999)
|
3
|
Minimum heat.
|
number (0-9999)
|
4
|
Level at maximum heat.
|
number (0-100%)
|
5
|
Level at minimum heat.
|
number (0-100%)
|
|
number
|
getParams()
|
Returns the parameters of the automatic control in the format of the above table.
|
list (number)
|
- Component Name:
"breeding_reactor"
Functions
Callback |
Return |
Type
|
getFlux()
|
Current incoming flux into the reactor.
|
number
|
getProgress()
|
Breeding progress from 0-1.
|
number (float)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getFlux()
|
2 |
getProgress()
|
|
list
|
DFC Components
- Component Name:
"dfc_emitter"
Functions
Callback |
Return |
Type
|
getEnergyInfo()
|
Energy information.
Return Values for getEnergyInfo()
Index |
Value |
Type
|
1 |
Current power stored in HE. |
number
|
2 |
Maximum power that can be stored in HE. |
number
|
|
list
|
getCryogel()
|
Current Cryogel level in the emitter in mB.
|
number
|
getInput()
|
Emitter output in %.
|
number
|
isActive()
|
If the emitter is active.
|
boolean
|
setActive(boolean)
|
Accepts one argument. Activates/deactivates the reactor based on the passed value.
|
nil; (accepts boolean)
|
setInput(number)
|
Accepts one argument. Sets the emitter power to the passed value (0-100%).
|
nil; (accepts number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1-2 |
getEnergyInfo()
|
3 |
getCryogel()
|
4 |
getInput()
|
5 |
isActive()
|
|
list
|
- Component Name:
"dfc_stabilizer"
Functions
Callback |
Return |
Type
|
getEnergyInfo()
|
Energy information.
Return Values for getEnergyInfo()
Index |
Value |
Type
|
1 |
Current power stored in HE. |
number
|
2 |
Maximum power that can be stored in HE. |
number
|
|
list
|
getInput()
|
Stabilizer output in %.
|
number
|
getDurability()
|
Durability of the lens, returns "N/A" if no lens.
|
number
|
setInput()
|
Accepts one argument. Sets the stabilizer output to the passed value (0-100%).
|
nil; (accepts number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1-2 |
getEnergyInfo()
|
3 |
getInput()
|
4 |
getDurability()
|
|
list
|
- Component Name:
"dfc_injector"
Functions
Callback |
Return |
Type
|
getFirstFuel()
|
Current amount of fuel in the first tank in mB.
|
number
|
getSecondFuel()
|
Current amount of fuel in the second tank in mB.
|
number
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getFirstFuel()
|
2 |
getSecondFuel()
|
|
list
|
- Component Name:
"dfc_receiver"
Functions
Callback |
Return |
Type
|
getEnergyInfo()
|
Energy information.
Return Values for getEnergyInfo()
Index |
Value |
Type
|
1 |
Current power stored in HE. |
number
|
2 |
Maximum power stored in HE. |
number
|
|
list
|
getCryogel()
|
Amount of Cryogel in the receiver's tank.
|
number
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1-2 |
getEnergyInfo()
|
3 |
getCryogel()
|
|
list
|
Fluid
Functions
Callback |
Return |
Type
|
getFluidStored()
|
Current amount of fluid stored inside the tank in mB.
|
number
|
getMaxFluidStored()
|
Maximum amount of fluid that can be stored inside the tank in mB.
|
number
|
getTypeStored()
|
Type of fluid in the tank (unlocalized). Example: "Reformate Gas" = "REFORMGAS"
|
string
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getFluidStored()
|
2 |
getMaxFluidStored()
|
3 |
getTypeStored()
|
|
list
|
Fluid Duct Gauge
- Component Name:
"ntm_fluid_gauge"
Functions
Callback |
Return |
Type
|
getTransfer()
|
Amount of fluid being transferred through the network in mB/t and mB/s.
Return values for getTransfer()
Index |
Value |
Type
|
1 |
Transfer rate in mB/t. |
number
|
2 |
Transfer rate in mB/s. |
number
|
|
list (number)
|
getFluid()
|
Type of fluid in the network (unlocalized). Example: "Desulfurized Crude Oil" = "OIL_DS"
|
string
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1-2 |
getTransfer()
|
3 |
getFluid()
|
|
list
|
Energy
- Component Name:
"ntm_energy_storage"
Functions
Callback |
Return |
Type
|
getEnergyInfo()
|
Energy information.
Return Values for getEnergyInfo()
Index |
Value |
Type
|
1 |
Current power stored in HE. |
number
|
2 |
Maximum power stored in HE. |
number
|
|
list
|
getInfo() |
This function is for compatibility between components; output is equal to getEnergyInfo() .
Return Values for getInfo()
Index |
Value
|
1-2 |
getEnergyInfo()
|
|
list
|
- Applies to all turbines.
- Component Name:
"ntm_turbine"
Functions
Callback |
Return |
Type
|
getFluid()
|
Fluid information.
Return Values for getFluid()
Index |
Value |
Type
|
1 |
Current Steam in the input tank in mB. |
number
|
2 |
Maximum amount of Steam that can be stored in the input tank in mB. |
number
|
3 |
Current amount of Low-Pressure Steam in the output tank in mB. |
number
|
4 |
Maximum amount of Low-Pressure Steam that can be stored in the output tank in mB. |
number
|
|
list
|
getType()
|
Steam type in a number.
|
number
|
setType(number)
|
Accepts one argument. Sets the steam type of the turbine based on the passed argument and the above table.
|
nil; (accepts number)
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1-4 |
getFluid()
|
5 |
getType()
|
|
list
|
- Component Name:
"ntm_gas_turbine"
Functions
Callback |
Return |
Type
|
getFluid()
|
Fluid information.
Return Values for getFluid()
Index |
Value |
Type
|
1 |
Current amount of gas in the fuel tank in mB. |
number
|
2 |
Maximum amount of gas that can be stored in the fuel tank in mB. |
number
|
3 |
Current amount of Engine Lubricant in mB. |
number
|
4 |
Maximum amount of Engine Lubricant that can be stored in mB. |
number
|
5 |
Current amount of Water in the tank in mB. |
number
|
6 |
Maximum amount of Water that can be stored in the tank in mB. |
number
|
7 |
Current amount of Steam in the tank in mB. |
number
|
8 |
Maximum amount of Steam that can be stored in the tank in mB. |
number
|
|
list (number)
|
getType()
|
Type of gas in the turbine (unlocalized). Example: "Reformate Gas" = "REFORMGAS"
|
string
|
getPower()
|
Current power stored in HE.
|
number
|
getThrottle()
|
Current turbine throttle (0-100%).
|
number
|
getState()
|
Current turbine state.
Turbine States
Value |
State
|
0 |
Turbine is shut down.
|
-1 |
Turbine is currently starting up.
|
1 |
Turbine is online and running.
|
|
number
|
getAuto()
|
If the turbine's automatic mode is enabled.
|
boolean
|
setThrottle()
|
Accepts one argument from 0-100% and sets the turbine throttle to the passed value.
|
nil; (accepts number)
|
setAuto()
|
Accepts one argument (true/false) and enables/disables the turbine automatic mode based on the passed value.
|
nil; (accepts boolean)
|
start()
|
Starts the turbine (if possible).
|
nil
|
stop()
|
Stops the turbine.
|
nil
|
getInfo() |
Return Values for getInfo()
Index |
Value
|
1 |
getThrottle()
|
2 |
getState()
|
3-10 |
getFluid()
|
|
list
|
Radar
- Component Name:
"ntm_radar"
Functions
Callback |
Return |
Type
|
getSettings()
|
Returns the current scanning settings for the radar.
Return Values for getSettings()
Index |
Value |
Type
|
1 |
If the radar is scanning for missiles. |
boolean
|
2 |
If the radar is scanning for artillery shells. |
boolean
|
3 |
If the radar is scanning for players. |
boolean
|
4 |
If the radar is scanning for missiles that have an upwards Y trajectory (Smart Mode). |
boolean
|
|
list
|
setSettings()
|
Sets the scanning settings for the radar.
Input Arguments
Index |
Argument |
Type
|
1
|
Missile scan mode.
|
boolean
|
2
|
Artillery shell scan mode.
|
boolean
|
3
|
Player scan mode.
|
boolean
|
4
|
Smart mode.
|
boolean
|
|
number
|
getRange(number)
|
Gets the range of the current type of radar. This can either be 1,000 for the normal radar, or 3,000 for the large radar.
|
number
|
getEnergyInfo()
|
Energy information.
Return Values for getEnergyInfo()
Index |
Value |
Type
|
1 |
Current power stored in HE. |
number
|
2 |
Maximum power stored in HE. |
number
|
|
list
|
isJammed()
|
If the radar is currently jammed by Digamma Radiation.
|
boolean
|
getAmount()
|
Part of the foundation for radar compatibility. Returns the amount of entities detected by the radar (missiles, players, shells, etc.).
|
number
|
isIndexPlayer()
|
Part of the indexing system for radar compatibility. Accepts a number as an index, finds the entity at that index, and then returns true if it is a player, false otherwise. Will return {nil, "No entity exists at that index."} if the index is out-of-bounds.
|
boolean; (accepts number)
|
getIndexType()
|
Part of the indexing system for radar compatibility. Accepts a number as an index, finds the entity at that index, and then returns the "blip level" of the entity. {nil, "No entity exists at that index."} if the index is out-of-bounds.
Radar Blip Level
Value |
Entity Type
|
0 |
Tier 0 Missile (Micro Missile Assemblies).
|
1 |
Tier 1 Missile.
|
2 |
Tier 2 Missile.
|
3 |
Tier 3 Missile.
|
4 |
Tier 4 Missile (Nuclear/Doomsday).
|
5 |
Size 10 Custom Missiles.
|
6 |
Size 10/15 Custom Missiles.
|
7 |
Size 15 Custom Missiles.
|
8 |
Size 15/20 Custom Missiles.
|
9 |
Size 20 Custom Missiles.
|
10 |
AB (Anti-Ballistic) Missiles.
|
11 |
Player.
|
12 |
Artillery Shells.
|
|
number; (accepts number)
|
getEntityAtIndex()
|
Part of the indexing system for radar compatibility. Accepts a number as an index, finds the entity at that index, then returns information on the entity. Will return {nil, "No entity exists at that index."} if the index is out-of-bounds.
Return Values for getEntityAtIndex()
Index |
Value |
Type
|
1 |
If the entity selected is a player. |
boolean
|
2 |
X-Position of the entity. |
number
|
3 |
Y-Position of the entity. |
number
|
4 |
Z-Position of the entity. |
number
|
5 |
"Blip Level" of the entity. |
number
|
6 |
Name of the entity (only applies to when a player is detected). |
string
|
|
list; (accepts number)
|