Mesecon Documentation

This commit is contained in:
ExeVirus 2021-09-26 15:10:47 -04:00
parent cd3b4e5e9a
commit f426e88250
60 changed files with 479 additions and 0 deletions

View File

@ -0,0 +1,21 @@
Mesecons (Messy-Cons)
-----------------
Most Info taken from: https://mesecons.net/
Go there if you have a browser, use this for in-game
lookup info.
What is Mesecons?
Machines, Switches, Electronics, Sounds, Programs!
Mesecones puts the world at your control, moving objects,
opening doors, detecting monsters, making computers, etc.
The documentation elsewhere here in-game just coveres specific items.
For understanding how to put them together, I reccomend the
link above and go from there, this is not the end-all technical
mod for minetest, and is included in this adventure-like game
to spice up your world as you see fit. This is not a nuclear power
plant or anything, feel free to add mods like techage, techpack,
digilines, technic, you get the idea:)

View File

@ -0,0 +1,5 @@
mesecons_wire_inv.png
mesecons_wire_on.png
jeija_microcontroller_sides.png
jeija_fpga_top.png
jeija_hydro_turbine_inv.png

View File

@ -0,0 +1,25 @@
Mesecons (Messy-Cons)
-----------------
Most Info taken from: https://mesecons.net/
Go there if you have a browser, use this for in-game
lookup info.
What is Mesecons?
Machines, Switches, Electronics, Sounds, Programs!
Mesecones puts the world at your control, moving objects,
opening doors, detecting monsters, making computers, etc.
Things that create mesecon signals are receptors, and Things
that respond to signals are effectors. Some such as microcontrollers
are combinations of the two.
The documentation elsewhere here in-game just coveres specific items.
For understanding how to put them together, I reccomend the
link above and go from there, this is not the end-all technical
mod for minetest, and is included in this adventure-like game
to spice up your world as you see fit. This is not a nuclear power
plant or anything, feel free to add mods like techage, techpack,
digilines, technic, you get the idea:)

View File

@ -0,0 +1,5 @@
mesecons_wire_inv.png
mesecons_wire_on.png
jeija_microcontroller_sides.png
jeija_fpga_top.png
jeija_hydro_turbine_inv.png

View File

@ -0,0 +1,10 @@
Blinkyplant
-----------------
Blinky plants toggles between on and off state every three seconds.
Can be used to make clocks.
Also works after having restarted the game.
It stops blinking in an inactive block, then starts again when the block becomes active.
(active blocks are typically within 80 nodes of an active player)

View File

@ -0,0 +1,2 @@
jeija_blinky_plant_off.png
jeija_blinky_plant_on.png

View File

@ -0,0 +1,4 @@
Button
-----------------
This receptor can be attached to walls.
It turns on for 1 second when punched.

View File

@ -0,0 +1,2 @@
jeija_wall_button_off.png
jeija_wall_button_on.png

View File

@ -0,0 +1,5 @@
Command Block
-----------------
There is no crafting recipe as this should only be available for server admins.
Quite similar to the Minecraft counterpart. Executes server commands.
It works in inactive blocks.

View File

@ -0,0 +1,2 @@
jeija_commandblock_off.png
jeija_commandblock_on.png

View File

@ -0,0 +1,12 @@
Delayer
-----------------
The delayer delays the signal from the input for a determined time.
The time can be set by punching the delayer.
Possible delays are:
0.1 seconds
0.3 seconds
0.5 seconds
1.0 seconds
You may try to use it for creating songs with the noteblock. It works in unloaded blocks.

View File

@ -0,0 +1,2 @@
mesecons_delayer_off_1.png
mesecons_delayer_on_1.png

View File

@ -0,0 +1,27 @@
Detector
-----------------
There are two kinds of detectors: Node and Object.
Node Detector
==============
The node detector is a receptor.
It changes its state when either any node or a specific node is detected.
Right-click it to set a nodename to scan for. It can also receive digiline signals.
For example, you can send {distance=4, scanname="default:dirt"} to set
distance to 4 and scan for dirt. You can omit either parameter.
There is also a command parameter:
{command="get"} will respond with the detected nodename
{command="scan"} will respond with a boolean using the distance and nodename of the detector.
Nodenames must include the mod they reside in, so for instance default:dirt, not just dirt.
The distance parameter specifies how many blocks are between the node detector and the node
to detect. Automatic scanning with Mesecons output only works when the detector
is in an active block, but Digilines queries always work.
Object Detector
==============
The object detector is a receptor. It changes its state when a player approaches.
Right-click it to set a name to scan for. You can also search for comma-separated
lists of players where the detector gets activated if any of the names in the list are found.
It can also receive digiline signals which are the name to scan for on the specified channel
in the right-click menu. Automatic scanning with Mesecons output only works when the detector
is in an active block, but Digilines queries always work.

View File

@ -0,0 +1,4 @@
jeija_node_detector_off.png
jeija_node_detector_on.png
jeija_object_detector_off.png
jeija_object_detector_on.png

View File

@ -0,0 +1,6 @@
Mesecons Doors
-----------------
Mesecons overrides the default doors so they can be controlled
via mesecon signals, such as switches, levers, etc.
Simple, and fun!

View File

@ -0,0 +1,4 @@
doors_item_wood.png
doors_item_steel.png
doors_trapdoor_steel.png
doors_trapdoor.png

View File

@ -0,0 +1,26 @@
FPGAs (and Programmers)
-----------------
FPGA stands for "Field Programmable Gate Array"
Long story short, in the real world, these are
essentially programable circuits. Here they function
similarly.
From the Mesecon source:
++++++++++++
FPGAs can be used to chain multiple logic gates together in a compact manner.
They come with 4 I/O ports and 10 internal registers, which can then be connected
with each other to form logic circuits.
They work fine in unloaded blocks.
Supported gate types: AND, OR, NOT, XOR, NAND, XNOR, Buffer (=)
I/O ports: A B C D; Registers: numbered 0 to 9
++++++++++++
To understand what this means requires some decent learning of real electrical circuits
and logic. Feel free to paruse the Mesecons wiki and try some of the advanced tutorials,
they'll teach you some of these basics.
Programmers:
-----------------
The FPGA programmer can be used to copy gate configurations from one FPGA to another.
[Shift]+[Right-Click] an FPGA to read its configuration and "remember" it. Left-click (punch) FPGAs to write the saved configuration to them.

View File

@ -0,0 +1,2 @@
jeija_fpga_top.png
jeija_fpga_programmer.png

View File

@ -0,0 +1,46 @@
Logic Gates
-----------------
There are 7 different gates in mesecons, each do a
logic operation to the signal(s) received.
They all work in unloaded blocks.
AND
------
AND gates power their output if both inputs
(from left and right) are powered.
Diode
-----
Diodes conduct signals in one direction only.
NAND
-----
NAND gates do not power their output if both inputs
(from left and right) are powered,
but power it in every other case.
NOR
-----
NOR gates only power their output if none of their two
inputs is powered. They are basically OR gates with a
NOT gate at their output.
NOT
----
NOT gates invert signals, just like a mesecon torch does,
but faster. The input is at the opposite side of the output.
OR
-----
OR gates power their output if either of their inputs
(or both) are powered. You could basically get the same
behaviour with two diodes, but OR gates save some space.
XOR
-----
XOR gates power their output if only one input is powered,
they're off if either both or none of the inputs is powered.

View File

@ -0,0 +1,7 @@
jeija_gate_and.png
jeija_gate_diode.png
jeija_gate_nand.png
jeija_gate_nor.png
jeija_gate_not.png
jeija_gate_or.png
jeija_gate_xor.png

View File

@ -0,0 +1,4 @@
Hydroturbine
-----------------
Water turbines are receptors that turn on if flowing water is above them.
They only work in active blocks; in inactive blocks they keep their old state.

View File

@ -0,0 +1 @@
jeija_hydro_turbine_inv.png

View File

@ -0,0 +1,3 @@
Lamp
-----------------
Mesecon lamps are effectors that if powered emit light.

View File

@ -0,0 +1,2 @@
jeija_meselamp_off.png
jeija_meselamp_on.png

View File

@ -0,0 +1,19 @@
Lightstone
-----------------
There are a lot of lightstone colors:
1. blue
2. yellow
3. magenta
4. cyan
5. green
6. lightgrey
7. darkgrey
8. red
9. orange
10. pink
11. violet
12. white
They are Effectors, and glow when powered.
They work in inactive blocks.

View File

@ -0,0 +1,5 @@
jeija_lightstone_blue_on.png
jeija_lightstone_yellow_on.png
jeija_lightstone_magenta_on.png
jeija_lightstone_cyan_on.png
jeija_lightstone_green_on.png

View File

@ -0,0 +1,27 @@
LuaController
-----------------
The Luacontroller is an advanced programmable component.
You can simply code it in the language Mesecons uses itself:
Lua!
All the code runs in a sandbox, so it's completely safe
(but I won't guarantee that for absolute certainty!).
It works fine in an unloaded block,
loading the block when the program needs to run.
Events are properly delivered after a server restart.
Further Documentation:
http://mesecons.net/luacontroller/
Short programming reference:
----------------------------
ports = get_real_port_states(pos): gets if inputs are powered from outside
newport = merge_port_states(state1, state2): just does result = state1 or state2 for every port
set_port(pos, rule, state): activates/deactivates the mesecons according to the port states
set_port_states(pos, ports): Applies new port states to a Luacontroller at pos
run_inner(pos, code, event): runs code on the controller at pos and event
reset_formspec(pos, code, errmsg): installs new code and prints error messages, without resetting LCID
reset_meta(pos, code, errmsg): performs a software-reset, installs new code and prints error message
run(pos, event): a wrapper for run_inner which gets code & handles errors via reset_meta
resetn(pos): performs a hardware reset, turns off all ports

View File

@ -0,0 +1 @@
jeija_luacontroller_top.png

View File

@ -0,0 +1,20 @@
Mesecon Materials
-----------------
Fiber
-----
Craftitem: It can't be placed!
Made by cooking glue in the furnace.
Used for insulated mesecon crafting.
Glue
----
Craftitem: It can't be placed!
Made by cooking saplings in furnace.
Used for sticky pistons and sticky movestones.
Silicon
-------
Craftitem: It can't be placed!
You'll need it in order to craft advanced items.

View File

@ -0,0 +1,3 @@
mesecons_fiber.png
mesecons_glue.png
mesecons_silicon.png

View File

@ -0,0 +1,24 @@
Microcontroller
-----------------
Not great documentation avaiable,
but a single microcontroller allows four inputs:
A,B,C,D
And you apply standard binary operations on them:
XOR, NOT, AND, etc.
You can for example make B always the opposite of A:
sbi(B, !A)
"do(Output B 'equals' NOT A)"
sbi() is the syntax for Do() in this case,
and you can do multiple sbi()s in a single microcontroller:
sbi(B,!A)sbi(D,!C)
The above will make B opposite of A and D opposite of component.
And so on, just don't mix inputs and outputs, I'm sure that'll make for
some great bugs....

View File

@ -0,0 +1 @@
jeija_microcontroller_top.png

View File

@ -0,0 +1,14 @@
Movestones
-----------------
Movestones are effectors that push the blocks in front of them.
They move along on the right side of a mesecon wire track.
A movestone trying to move into, or push other nodes into,
an unloaded block doesn't move.
Sticky Movestones
-----------------
Sticky ones also pull blocks.
A sticky movestone trying to move into, or push other
nodes into, an unloaded block doesn't move.
A sticky movestone trying to pull nodes
from an unloaded block moves but leaves them behind.

View File

@ -0,0 +1,2 @@
jeija_movestone_arrows.png
jeija_sticky_movestone.png

View File

@ -0,0 +1,19 @@
Noteblock
-------------
This effector makes a sound if powered and can be used
for making music. Normally it makes piano sounds.
The sound frequency can be changed by punching the block
(only works for piano).
There are some special sounds that depend
on the block below:
Glass or Obsidian Glass: Hi-hat
Any stone: Kick
Chest or Locked Chest: Snare
Any tree: Crash
Any wooden planks: Lite Crash
Coal Block: Explosion sound
Lava Source: Fire sound
Steel Block: Piano (high pitch, one octave higher than normal)
Any Other Block: Piano (low pitch)

View File

@ -0,0 +1 @@
mesecons_noteblock.png

View File

@ -0,0 +1,15 @@
Piston
-----------------
Pistons are effectors, they push up to 20 blocks in front of them.
The push direction can be set by placing them from
different angles. A piston pointing into an unloaded
block won't extend. A piston retracting from an unloaded
block works, but gravity-sensitive nodes above the
empty space may not fall.
Stiky Piston
-----------------
Sticky pistons will pull back one block on retraction
An extended sticky piston that touches the surface of an
unloaded block and loses signal retracts but doesn't
pull anything.

View File

@ -0,0 +1,2 @@
mesecons_piston_pusher_front.png
mesecons_piston_pusher_front_sticky.png

View File

@ -0,0 +1,7 @@
Powerplant
-----------------
A power plant is a receptor that is always turned on:
---It provides energy---
It continues to work in an unloaded block.

View File

@ -0,0 +1 @@
jeija_power_plant.png

View File

@ -0,0 +1,8 @@
Pressure Plates
-----------------
This receptor turns on if there's an object above it.
An object can be a player, an item, a monster or animal...
Wooden vs. Stone doesn't make a difference, just in personal
taste.

View File

@ -0,0 +1,2 @@
jeija_pressure_plate_stone_inv.png
jeija_pressure_plate_wood_inv.png

View File

@ -0,0 +1,12 @@
Remove Stone
-----------------
Removestones are probably the simplest effectors possible.
They simply disappear when powered.
They work in inactive blocks.
Ghost Stone
-----------------
Ghoststones disappear when powered, just like Removestones.
But in contrast to Removestones, they reappear again when
not powered anymore and they are also conductive.
They work in inactive blocks.

View File

@ -0,0 +1,2 @@
jeija_ghoststone_inv.png
jeija_ghoststone.png

View File

@ -0,0 +1,7 @@
Solar Panel
-----------------
Solar panels are light receptors:
they turn on if there is enough light.
They only work in active blocks and in inactive
blocks they keep their old state.

View File

@ -0,0 +1,2 @@
mesecons_switch_off.png
mesecons_switch_on.png

View File

@ -0,0 +1,10 @@
Sticky Blocks
-----------------
Sticky blocks can be used together with pistons
or movestones to push / pull Structures that are
"glued" together using sticky blocks.
These only respond to movestone or piston actions, and
are not affected or create mesecon signals.
Remember the 20 block rule often still applies to pistons.

View File

@ -0,0 +1 @@
mesecons_stickyblocks_sticky.png

View File

@ -0,0 +1,4 @@
Switch
-----------------
The switch is a receptor.
It changes its state when punched.

View File

@ -0,0 +1 @@
mesecons_solarpanel.png

View File

@ -0,0 +1,9 @@
Mesecons Torch
-----------------
The torch is an inverter, it may take up to 1 second until
the signal has passed through. The input is 2 blocks away
in the direction of the stick, outputs are around the
mesecon glow.
It doesn't work in an inactive block;
it just retains its state until the block becomes active.

View File

@ -0,0 +1,2 @@
jeija_torches_off.png
jeija_torches_on.png

View File

@ -0,0 +1,4 @@
Wall Lever
-----------------
A receptor just like a switch,
but it can be attached to walls.

View File

@ -0,0 +1 @@
jeija_wall_lever_inv.png

View File

@ -0,0 +1,9 @@
Wires
-----------------
Mesecons are the wires, use them to connect effectors with receptors.
Wiring works through unloaded blocks; theyre loaded when the signal level changes.
Basic wire will essentially connect in all directions.
If you want to only have the wire connect in directions you specify,
then you should use insulated wire. To change the connections, you can rotate them
with a screwdriver (like almost everything else in the game)

View File

@ -0,0 +1 @@
jeija_insulated_wire_tjunction_tb_on.png

View File

@ -0,0 +1,12 @@
-- mesecons/documentation.lua
-----Load documentation via doc_helper------------------------
local MP = minetest.get_modpath(minetest.get_current_modname())
local docpath = MP .. DIR_DELIM .. "doc"
doc.add_category("mesecons",
{
name = "_Mesecons_",
description = "Mesecons",
build_formspec = doc.entry_builders.text_and_square_gallery,
})
doc.build_entries(docpath, "mesecons")

View File

@ -44,6 +44,9 @@ mesecon={} -- contains all functions and all global variables
mesecon.queue={} -- contains the ActionQueue
mesecon.queue.funcs={} -- contains all ActionQueue functions
-- Documentation
dofile(minetest.get_modpath("mesecons").."/documentation.lua")
-- Settings
dofile(minetest.get_modpath("mesecons").."/settings.lua")

View File

@ -1,2 +1,3 @@
name = mesecons
depends = default
optional_depends = doc_helper

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB