Restructure documentation
This commit is contained in:
parent
44125d4099
commit
7ea2dc8b84
169
README.md
169
README.md
@ -10,170 +10,14 @@ Download: [GitHub](https://github.com/joe7575/signs_bot/archive/master.zip)
|
||||
![Signs Bot](https://github.com/joe7575/signs_bot/blob/master/screenshot.png)
|
||||
|
||||
|
||||
The bot can only be controlled by signs that are placed in its path.
|
||||
The bot starts running after starting until it encounters a sign. There, the commands are then processed on the sign.
|
||||
The bot can also put himself signs in the way, which he then works off.
|
||||
There is also a sign that can be programmed by the player, which then are processed by the bot.
|
||||
### Introduction
|
||||
See [manual](https://github.com/joe7575/signs_bot/blob/master/techage_EN.md)
|
||||
|
||||
There are also the following blocks:
|
||||
- Sensors: These can send a signal to an actuator if they are connected to the actuator.
|
||||
- Actuators: These perform an action when they receive a signal from a sensor.
|
||||
The mod has an in-game help to all blocks and signs.
|
||||
If 'techage' is installed, the techage ingame manual will be expanded.
|
||||
If techage is not installed, it is recommended that you have installed the
|
||||
mods 'doc' and 'unified_inventory'.
|
||||
|
||||
Sensors must be connected (paired) with actuators. This is what the Connection Tool does. Click on both blocks one after the other.
|
||||
A successful pairing is indicated by a ping / pong noise.
|
||||
When pairing, the state of the actuator is important. In the case of the bot box, for example, the states "on" and "off", in the case of the control unit 1,2,3,4, etc.
|
||||
The state of the actuator is saved with the pairing and restored by the signal. For example, the robot can be switched on via a node sensor.
|
||||
|
||||
An actuator can receive signals from many sensors. A sensor can only be connected to an actuator. However, if several actuators are to be controlled by one sensor, a signal extender block must be used. This connects to a sensor when it is placed next to the sensor. This extender can then be paired with another actuator.
|
||||
|
||||
Sensors are:
|
||||
- Bot Sensor: Sends a signal when the robot passes by
|
||||
- Node Sensor: Sends a signal when it detects a change (tree, cactus, flower, etc.) in front of the sensor (over 3 positions)
|
||||
- Crop Sensor: Sends a signal when, for example, the wheat is fully grown
|
||||
- Bot Chest: Sends a signal depending on the chest state. Possible states are "empty", "not empty", "almost full". The state to be sent is defined while pairing.
|
||||
|
||||
Actuators are:
|
||||
- Control Unit: Can place up to 4 signs and steer the bot e.g. in different directions.
|
||||
- Signs Bot Box: Can be turned off and on
|
||||
|
||||
In addition, there are currently the following blocks:
|
||||
- The duplicator is used to copy Command Signs, i.e. the signs with their own commands.
|
||||
- Bot Flap: The "cat flap" is a door for the bot, which he opens automatically and closes behind him.
|
||||
- Sensor Extender for controlling additional actuators from one sensor signal
|
||||
- A Timer can be used to start the Bot cyclically
|
||||
- A Delayer can be used to delay and queue signals
|
||||
|
||||
More information:
|
||||
- Using the signs "take" and "add", the bot can pick items from Chests and put them in. The signs must be placed on the box. So far, only a few blocks are supported with Inventory.
|
||||
- The Control Unit can be charged with up to 4 labels. To do this, place a label next to the Control Unit and click on the Control Unit. The sign is only stored under this number.
|
||||
- The inventory of the Signs Bot Box is intended to represent the inventory of the Robot. As long as the robot is on the road, of course you have no access.
|
||||
|
||||
The copy function can be used to clone node cubes up to 5x3x3 nodes. There is the pattern shield for the template position and the copy shield for the "3x3x3" copy. Since the bot also copies air blocks, the function can also be used for mining or tunnels. The items to be placed must be in the inventory. Items that the bot degrades are in Inventory afterwards. If there are missing items in the inventory during copying, he will set "missing items" blocks, which dissolve into air when degrading.
|
||||
|
||||
In-game help:
|
||||
The mod has an in-game help to all blocks and signs. Therefore, it is highly recommended that you have installed the mods 'doc' and 'unified_inventory'.
|
||||
|
||||
### Commands:
|
||||
The commands are also all described as help in the "Sign command" node.
|
||||
All blocks or signs that are set are taken from the bot inventory.
|
||||
Any blocks or signs removed will be added back to the Bot Inventory.
|
||||
`<slot>` is always the bot internal inventory stack (1..8).
|
||||
For all Inventory commands applies: If the bot inventory stack specified by `<slot>` is full, so that nothing more can be done, or just empty, so that nothing more can be removed, the next slot will automatically be used.
|
||||
|
||||
move <steps> - to follow one or more steps forward without signs
|
||||
cond_move - walk to the next sign and work it off
|
||||
turn_left - turn left
|
||||
turn_right - turn right
|
||||
turn_around - turn around
|
||||
backward - one step backward
|
||||
turn_off - turn off the robot / back to the box
|
||||
pause <sec> - wait one or more seconds
|
||||
move_up - move up (maximum 2 times)
|
||||
move_down - move down
|
||||
fall_down - fall into a hole/chasm (up to 10 blocks)
|
||||
take_item <num> <slot> - take one or more items from a box
|
||||
add_item <num> <slot> - put one or more items in a box
|
||||
add_fuel <num> <slot> - for furnaces or similar
|
||||
place_front <slot> <lvl> - Set block in front of the robot
|
||||
place_left <slot> <lvl> - Set block to the left
|
||||
place_right <slot> <lvl> - set block to the right
|
||||
place_below <slot> - set block under the robot
|
||||
place_above <slot> - set block above the robot
|
||||
dig_front <slot> <lvl> - remove block in front of the robot
|
||||
dig_left <slot> <lvl> - remove block on the left
|
||||
dig_right <slot> <lvl> - remove block on the right
|
||||
dig_below <slot> - dig block under the robot
|
||||
dig_above <slot> - dig block above the robot
|
||||
rotate_item <lvl> <steps> - rotate a block in front of the robot
|
||||
set_param2 <lvl> <param2> - set param2 of the block in front of the robot
|
||||
place_sign <slot> - set sign
|
||||
place_sign_behind <slot> - put a sign behind the bot
|
||||
dig_sign <slot> - remove the sign
|
||||
trash_sign <slot> - Remove the sign, clear data and add to the item Inventory
|
||||
stop - Bot stops until the shield is removed
|
||||
pickup_items <slot> - pickup items (in a 3x3 field)
|
||||
drop_items <num> <slot> - drop items
|
||||
harvest - harvest a 3x3 field (farming)
|
||||
cutting - cut a 3x3 flower field
|
||||
sow_seed <slot> - a 3x3 field sowing / planting
|
||||
plant_sapling <slot> - plant a sapling in front of the robot
|
||||
pattern - save the blocks behind the shield (up to 5x3x3) as template
|
||||
copy <size> - make a copy of "pattern". Size is e.g. 3x3 (see ingame help)
|
||||
punch_cart - Punch a rail cart to start it
|
||||
add_compost <slot> - Put 2 leaves into the compost barrel
|
||||
take_compost <slot> - Take a compost item from the barrel
|
||||
print <text> - Output chat message for debug purposes
|
||||
take_water <slot> - Take water with empty bucket
|
||||
fill_cauldron <slot> - Fill the xdecor cauldron for a soup
|
||||
take_soup <slot> - Take boiling soup into empty bowl from cauldron
|
||||
flame_on - Make fire
|
||||
flame_off - Put out the fire
|
||||
|
||||
#### Techage specific commands
|
||||
|
||||
ignite - Ignite the techage charcoal lighter
|
||||
low_batt <percent> - Turn the bot off if the battery power is below the
|
||||
given value in percent (1..99)
|
||||
jump_low_batt <percent> <label> - Jump to <label> if the battery power is below the
|
||||
given value in percent (1..99)
|
||||
(see "Flow control commands")
|
||||
send_cmnd <receiver> <command> - Send a techage command to a given node.
|
||||
Receiver is addressed by the techage node number.
|
||||
For commands with two or more words, use the '*' character
|
||||
instead of spaces, e.g.: send_cmnd 3465 pull*default:dirt*2
|
||||
|
||||
|
||||
#### Flow control commands
|
||||
|
||||
jump <label> -- jump command, <label> is a word from the characters a-z or A-Z
|
||||
<label>: -- jump label / start of a function
|
||||
return -- return from a function
|
||||
repeat <num> -- start of a loop block, <num> is a number 1..999
|
||||
end -- end of a loop block
|
||||
call <label> -- call of a function (with return via the command 'return')
|
||||
|
||||
#### Further jump commands
|
||||
|
||||
jump_check_item <num> <slot> <label> - Check if there are <num> items in the chest like node.
|
||||
If not, jump to <label>.
|
||||
<slot> is the bot inventory slot (1..8) to specify the item,
|
||||
or 0 for any item.
|
||||
jump_low_batt <percent> <label> - See "Techage specific commands"
|
||||
|
||||
|
||||
|
||||
Example with a function at the beginning:
|
||||
|
||||
jump main -- jump to the label 'main'
|
||||
|
||||
foo: -- starting point of the function with the name 'foo'
|
||||
cmnd ...
|
||||
cmnd ...
|
||||
return -- end of 'foo'. Jump back
|
||||
|
||||
main: -- main program
|
||||
cmnd ...
|
||||
repeat 10 -- repeat all commands up to 'end' 10 times
|
||||
cmnd ...
|
||||
call foo -- call the subfunction 'foo'
|
||||
cmnd ...
|
||||
end -- end of the 'repeat' loop
|
||||
exit -- end of the program
|
||||
|
||||
Or alternatively with the function at the end:
|
||||
|
||||
cmnd ...
|
||||
repeat 10 -- repeat all commands up to 'end' 10 times
|
||||
cmnd ...
|
||||
call foo -- call the subfunction 'foo'
|
||||
cmnd ...
|
||||
end -- end of the 'repeat' loop
|
||||
exit -- end of the program
|
||||
|
||||
foo: -- starting point of the function with the name 'foo'
|
||||
cmnd ...
|
||||
cmnd ...
|
||||
return -- end of 'foo'. Jump back
|
||||
|
||||
### License
|
||||
Copyright (C) 2019-2023 Joachim Stolberg
|
||||
@ -214,6 +58,7 @@ optional: farming redo, node_io, doc, techage, minecart, xdecor, compost
|
||||
- 2022-03-19 V1.11 * Extend farming (and add ethereal) support (Thanks to nixnoxus)
|
||||
- 2022-09-11 V1.12 * Add commands `jump_low_batt` , `jump_check_item`, and `fall_down`
|
||||
- 2023-06-27 V1.13 * Add Beduino command support (see bep-006_sb_cmnd.md)
|
||||
- 2023-07-28 V1.13 * Introduction/manual restructured
|
||||
|
||||
|
||||
|
||||
|
2
doc.lua
2
doc.lua
@ -8,7 +8,7 @@
|
||||
GPLv3
|
||||
See LICENSE.txt for more information
|
||||
|
||||
Signs Bot: Bot Flap
|
||||
Signs Bot: Ingame Documentation
|
||||
|
||||
]]--
|
||||
|
||||
|
36
init.lua
36
init.lua
@ -77,3 +77,39 @@ dofile(MP.."/logic_and.lua")
|
||||
dofile(MP.."/compost.lua")
|
||||
|
||||
dofile(MP.."/tool.lua")
|
||||
|
||||
if minetest.global_exists("techage") then
|
||||
dofile(MP.."/techage_EN.lua")
|
||||
techage.add_manual_items({signs_bot_bot_inv = "signs_bot_bot_inv.png"})
|
||||
techage.add_manual_items({signs_bot_sign_left = "signs_bot_sign_left.png"})
|
||||
techage.add_manual_items({signs_bot_sensor_crop_inv = "signs_bot_sensor_crop_inv.png"})
|
||||
techage.add_manual_items({signs_bot_tool = "signs_bot_tool.png"})
|
||||
techage.add_manual_items({signs_bot_box = "signs_bot:box"})
|
||||
techage.add_manual_items({signs_bot_bot_flap = "signs_bot:bot_flap"})
|
||||
techage.add_manual_items({signs_bot_duplicator = "signs_bot:duplicator"})
|
||||
techage.add_manual_items({signs_bot_bot_sensor = "signs_bot:bot_sensor"})
|
||||
techage.add_manual_items({signs_bot_node_sensor = "signs_bot:node_sensor"})
|
||||
techage.add_manual_items({signs_bot_crop_sensor = "signs_bot:crop_sensor"})
|
||||
techage.add_manual_items({signs_bot_chest = "signs_bot:chest"})
|
||||
techage.add_manual_items({signs_bot_timer = "signs_bot:timer"})
|
||||
techage.add_manual_items({signs_bot_sensor_extender = "signs_bot:sensor_extender"})
|
||||
techage.add_manual_items({signs_bot_changer = "signs_bot:changer1"})
|
||||
techage.add_manual_items({signs_bot_sensor_extender = "signs_bot:sensor_extender"})
|
||||
techage.add_manual_items({signs_bot_and1 = "signs_bot:and1"})
|
||||
techage.add_manual_items({signs_bot_delayer = "signs_bot:delayer"})
|
||||
techage.add_manual_items({signs_bot_farming = "signs_bot:farming"})
|
||||
techage.add_manual_items({signs_bot_pattern = "signs_bot:pattern"})
|
||||
techage.add_manual_items({signs_bot_copy = "signs_bot:copy3x3x3"})
|
||||
techage.add_manual_items({signs_bot_flowers = "signs_bot:flowers"})
|
||||
techage.add_manual_items({signs_bot_aspen = "signs_bot:aspen"})
|
||||
techage.add_manual_items({signs_bot_sign_cmnd = "signs_bot:sign_cmnd"})
|
||||
techage.add_manual_items({signs_bot_sign_right = "signs_bot:sign_right"})
|
||||
techage.add_manual_items({signs_bot_sign_left = "signs_bot:sign_left"})
|
||||
techage.add_manual_items({signs_bot_sign_take = "signs_bot:sign_take"})
|
||||
techage.add_manual_items({signs_bot_sign_add = "signs_bot:sign_add"})
|
||||
techage.add_manual_items({signs_bot_sign_stop = "signs_bot:sign_stop"})
|
||||
techage.add_manual_items({signs_bot_sign_add_cart = "signs_bot:sign_add_cart"})
|
||||
techage.add_manual_items({signs_bot_sign_take_cart = "signs_bot:sign_take_cart"})
|
||||
techage.add_manual_items({signs_bot_water = "signs_bot:water"})
|
||||
techage.add_manual_items({signs_bot_soup = "signs_bot:soup"})
|
||||
end
|
||||
|
199
markdown2lua.py
Normal file
199
markdown2lua.py
Normal file
@ -0,0 +1,199 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import mistune # install v0.8.4 with: pip install mistune
|
||||
|
||||
__version__ = "1.0"
|
||||
|
||||
class WikiLinkInlineLexer(mistune.InlineLexer):
|
||||
def enable_wiki_link(self):
|
||||
# add wiki_link rules
|
||||
self.rules.wiki_link = re.compile(
|
||||
r'\[' # [
|
||||
r'([\s\S]+?\|[\s\S]+?)' # name| img-type
|
||||
r'\](?!\])' # ]
|
||||
)
|
||||
|
||||
# Add wiki_link parser to default rules
|
||||
# you can insert it some place you like
|
||||
# but place matters, maybe 3 is not good
|
||||
self.default_rules.insert(3, 'wiki_link')
|
||||
|
||||
def output_wiki_link(self, m):
|
||||
text = m.group(1)
|
||||
name, itype = text.split('|')
|
||||
# you can create an custom render
|
||||
# you can also return the html if you like
|
||||
return self.renderer.wiki_link(name, itype)
|
||||
|
||||
class MarkdownToLua(mistune.Renderer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
mistune.Renderer.__init__(self, *args, **kwargs)
|
||||
self.item_name = ""
|
||||
self.plan_table = ""
|
||||
self.is_first_header = True
|
||||
self.text_chunck = []
|
||||
self.lTitle = []
|
||||
self.lText = []
|
||||
self.lItemName = []
|
||||
self.lPlanTable = []
|
||||
print("Markdown-to-Lua v%s" % __version__)
|
||||
|
||||
def m2l_formspec_escape(self, text):
|
||||
text = text.replace("\\", "")
|
||||
text = text.replace("[", "\\\\[")
|
||||
text = text.replace("]", "\\\\]")
|
||||
text = text.replace(";", "\\\\;")
|
||||
text = text.replace(",", "\\\\,")
|
||||
text = text.replace('"', '\\"')
|
||||
text = text.replace('\n', '\\n')
|
||||
return text
|
||||
|
||||
def m2l_add_last_paragraph(self):
|
||||
"""
|
||||
Used to add a text block before the next header or at the end of the document
|
||||
"""
|
||||
self.lText.append(self.text_chunck)
|
||||
self.text_chunck = []
|
||||
self.lItemName.append(self.item_name)
|
||||
self.item_name = ""
|
||||
self.lPlanTable.append(self.plan_table)
|
||||
self.plan_table = ""
|
||||
##
|
||||
## Block Level
|
||||
##
|
||||
def block_code(self, code, lang):
|
||||
text = self.m2l_formspec_escape(code.strip())
|
||||
lines = text.split("\\n")
|
||||
lines = [" " + item for item in lines]
|
||||
self.text_chunck.extend(lines)
|
||||
self.text_chunck.append("")
|
||||
return ""
|
||||
|
||||
def header(self, text, level, raw=None):
|
||||
if not self.is_first_header:
|
||||
self.m2l_add_last_paragraph()
|
||||
self.is_first_header = False
|
||||
self.lTitle.append("%u,%s" % (level, self.m2l_formspec_escape(text)))
|
||||
return ""
|
||||
|
||||
def hrule(self):
|
||||
self.text_chunck.append("\n----------------------------------------------------\n")
|
||||
return ""
|
||||
|
||||
def paragraph(self, text):
|
||||
lines = text.split("\\n") + [""]
|
||||
self.text_chunck.extend(lines)
|
||||
return ""
|
||||
|
||||
def list(self, body, ordered=True):
|
||||
lines = body.split("\n")
|
||||
self.text_chunck.extend(lines)
|
||||
return ""
|
||||
|
||||
def list_item(self, text):
|
||||
return " - %s\n" % text.strip()
|
||||
##
|
||||
## Span Level
|
||||
##
|
||||
def emphasis(self, text):
|
||||
return "*%s*" % self.m2l_formspec_escape(text)
|
||||
|
||||
def double_emphasis(self, text):
|
||||
return "*%s*" % self.m2l_formspec_escape(text)
|
||||
|
||||
def codespan(self, text):
|
||||
return "'%s'" % self.m2l_formspec_escape(text)
|
||||
|
||||
def text(self, text):
|
||||
return self.m2l_formspec_escape(text)
|
||||
|
||||
def link(self, link, title, content):
|
||||
"""
|
||||
Used for plans and images:
|
||||
[myimage](/image/)
|
||||
[myplan](/plan/)
|
||||
"""
|
||||
if link == "/image/":
|
||||
self.item_name = content
|
||||
elif link == "/plan/":
|
||||
self.plan_table = content
|
||||
return content
|
||||
|
||||
def wiki_link(self, name, itype):
|
||||
"""
|
||||
Used for plans and images:
|
||||
[myimage|image]
|
||||
[myplan|plan]
|
||||
"""
|
||||
if itype == "image":
|
||||
self.item_name = name
|
||||
elif itype == "plan":
|
||||
self.plan_table = name
|
||||
return ""
|
||||
|
||||
def autolink(self, link, is_email=False):
|
||||
return link
|
||||
|
||||
def linebreak(self):
|
||||
return "\\n"
|
||||
|
||||
def newline(self):
|
||||
return "\\n"
|
||||
|
||||
def inline_html(self, text):
|
||||
#print(text)
|
||||
pass
|
||||
|
||||
def parse_md_file(self, src_name):
|
||||
print(" - Read MD file '%s'" % src_name)
|
||||
inline = WikiLinkInlineLexer(self)
|
||||
# enable the feature
|
||||
inline.enable_wiki_link()
|
||||
md = mistune.Markdown(renderer=self, inline=inline)
|
||||
md.renderer.src_name = src_name
|
||||
md.render(open(src_name, 'r').read())
|
||||
md.renderer.m2l_add_last_paragraph()
|
||||
|
||||
def lua_table(self, lData):
|
||||
lOut = []
|
||||
lOut.append("{")
|
||||
for line in lData:
|
||||
lOut.append(' "%s",' % line)
|
||||
lOut.append("}")
|
||||
return "\n".join(lOut)
|
||||
|
||||
def lua_text_table(self, lData):
|
||||
lOut = []
|
||||
lOut.append("{")
|
||||
for lines in lData:
|
||||
for line in lines[:-1]:
|
||||
line = line.replace('<br>', '\\n')
|
||||
lOut.append(' "%s\\n"..' % line)
|
||||
if len(lines) > 0:
|
||||
lOut.append(' "%s\\n",' % lines[-1])
|
||||
else:
|
||||
lOut.append(' "",')
|
||||
lOut.append("}")
|
||||
return "\n".join(lOut)
|
||||
|
||||
def gen_lua_file(self, dest_name, language="EN"):
|
||||
print(" - Write Lua file '%s'" % dest_name)
|
||||
lOut = []
|
||||
s = ", ".join([self.lua_table(self.lTitle),
|
||||
self.lua_text_table(self.lText),
|
||||
self.lua_table(self.lItemName),
|
||||
self.lua_table(self.lPlanTable)])
|
||||
open(dest_name, "w").write("techage.add_to_manual('%s', %s)\n" % (language, s))
|
||||
print("done.")
|
||||
|
||||
|
||||
m2l = MarkdownToLua()
|
||||
m2l.parse_md_file("./techage_EN.md")
|
||||
m2l.gen_lua_file("./techage_EN.lua", "EN")
|
||||
|
||||
#m2l = MarkdownToLua()
|
||||
#m2l.parse_md_file("./techage_DE.md")
|
||||
#m2l.gen_lua_file("./techage_DE.lua", "DE")
|
||||
|
553
techage_EN.lua
Normal file
553
techage_EN.lua
Normal file
@ -0,0 +1,553 @@
|
||||
techage.add_to_manual('EN', {
|
||||
"1,Signs Bot",
|
||||
"2,Firt Steps",
|
||||
"2,Signs",
|
||||
"2,Sensors and Actuators",
|
||||
"2,Sensor Connection Tool",
|
||||
"2,Inventory",
|
||||
"2,Nodes / Blocks",
|
||||
"3,Signs Bot Box",
|
||||
"3,Bot Flap",
|
||||
"3,Signs Duplicator",
|
||||
"3,Bot Sensor",
|
||||
"3,Node Sensor",
|
||||
"3,Crop Sensor",
|
||||
"3,Signs Bot Chest",
|
||||
"3,Bot Timer",
|
||||
"3,Bot Control Unit",
|
||||
"3,Sensor Extender",
|
||||
"3,Signal AND",
|
||||
"3,Signal Delayer",
|
||||
"3,Sign 'farming'",
|
||||
"3,Sign 'pattern'",
|
||||
"3,Sign 'copy3x3x3'",
|
||||
"3,Sign 'flowers'",
|
||||
"3,Sign 'aspen'",
|
||||
"3,Sign 'command'",
|
||||
"3,Sign \"turn right\"",
|
||||
"3,Sign \"turn left\"",
|
||||
"3,Sign \"take item\"",
|
||||
"3,Sign \"add item\"",
|
||||
"3,Sign \"stop\"",
|
||||
"3,Sign \"add to cart\" (minecart)",
|
||||
"3,Sign \"take from cart\" (minecart)",
|
||||
"3,Sign 'take water' (xdecor)",
|
||||
"3,Sign 'cook soup' (xdecor)",
|
||||
"2,Bot Commands",
|
||||
"3,Techage specific commands",
|
||||
"3,Flow control commands",
|
||||
"3,Further jump commands",
|
||||
"3,Flow control Examples",
|
||||
"4,Example with a function at the beginning:",
|
||||
"4,Example with a function at the end:",
|
||||
}, {
|
||||
"A robot controlled by signs.\n"..
|
||||
"\n"..
|
||||
"On the web: https://github.com/joe7575/signs_bot/blob/master/techage_EN.md\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"After you have placed the Signs Bot Box\\, you can start the bot by means of the\n"..
|
||||
"'On' button in the box menu. If the bot returns to its box right away\\,\n"..
|
||||
"you will need to charge it with electrical energy (techage) first.\n"..
|
||||
"The bot then runs straight up until it reaches an obstacle\n"..
|
||||
"(a step with two or more blocks up or down or a sign.)\n"..
|
||||
"\n"..
|
||||
"The bot can only be controlled by signs that are placed in its path.\n"..
|
||||
"\n"..
|
||||
"If the bot first reaches a sign it will execute the commands on the sign.\n"..
|
||||
"If the first command on the sign is e.g. 'turn_around'\\, the bot turns and goes back.\n"..
|
||||
"In this case\\, the bot reaches his box again and turns off.\n"..
|
||||
"\n"..
|
||||
"If the bot first reaches an obstacle it will stop\\, or if available\\, execute\n"..
|
||||
"the next commands from the last sign.\n"..
|
||||
"\n"..
|
||||
"The Signs Bot Box has an inventory with 6 stacks for signs and 8 stacks for\n"..
|
||||
"other items (to be placed/dug by the bot). This inventory simulates the bot\n"..
|
||||
"internal inventory. That means you will only have access to the inventory\n"..
|
||||
"if the bot is turned off ('sitting' in his box).\n"..
|
||||
"\n"..
|
||||
"There are also the following blocks:\n"..
|
||||
"\n"..
|
||||
" - Sensors: These can send a signal to an actuator if they are connected to the actuator.\n"..
|
||||
" - Actuators: These perform an action when they receive a signal from a sensor.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"You simply control the direction of the bot by means of the 'turn left' and\n"..
|
||||
"'turn right' signs (signs with the arrow). The bot can run over steps\n"..
|
||||
"(one block up/down). But there are also commands to move the bot up and down.\n"..
|
||||
"\n"..
|
||||
"It is not necessary to mark a way back to the box. With the command 'turn_off'\n"..
|
||||
"the bot will turn off and be back in his box from every position. The same applies\n"..
|
||||
"if you turn off the bot by the box menu. If the bot reaches a sign from the wrong\n"..
|
||||
"direction (from back or sides) the sign will be ignored. The bot will walk over.\n"..
|
||||
"\n"..
|
||||
"All predefined signs have a menu with a list of the bot commands. These signs\n"..
|
||||
"can't be changed\\, but you can craft and program your own signs. For this you\n"..
|
||||
"have to use the 'command' sign. This sign has an edit field for your commands\n"..
|
||||
"and a help page with all available commands. The help page has a copy button\n"..
|
||||
"to simplify the programming.\n"..
|
||||
"\n"..
|
||||
"Also for your own signs it is important to know: After the execution of the last\n"..
|
||||
"command of the sign\\, the bot falls back into its default behaviour and runs in\n"..
|
||||
"its taken direction.\n"..
|
||||
"\n"..
|
||||
"A standard job for the bot is to move items from one chest to another chest\n"..
|
||||
"(or node with a chest like inventory). This can be done by means of the two signs\n"..
|
||||
"'take item' and 'add item'. These signs have to be placed on top of chest nodes.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"In addition to the signs the bot can be controlled by means of sensors. Sensors\n"..
|
||||
"like the Bot Sensor have two states: on and off. If the Bot Sensor detects a bot\n"..
|
||||
"it will switch to the state 'on' and sends a signal to a connected block\\,\n"..
|
||||
"called an actuator.\n"..
|
||||
"\n"..
|
||||
"Sensors are:\n"..
|
||||
"\n"..
|
||||
" - Bot Sensor: Sends a signal when a robot passes by\n"..
|
||||
" - Node Sensor: Sends a signal when it detects any (new) node\n"..
|
||||
" - Crop Sensor: Sends a signal when\\, for example wheat is fully grown\n"..
|
||||
" - Bot Chest: Sends a signal depending on the chest state (empty\\, full)\n"..
|
||||
"\n"..
|
||||
"Actuators are:\n"..
|
||||
"\n"..
|
||||
" - Signs Bot Box: Can turn the bot off and on\n"..
|
||||
" - Control Unit: Can be used to exchange the sign to lead the bot\n"..
|
||||
"\n"..
|
||||
"Sensors must be connected (paired) with actuators. This is what the\n"..
|
||||
"\"Sensor Connection Tool\" does.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"To send a signal from a sensor to an actuator\\, the sensor has to be connected\n"..
|
||||
"(paired) with actuator. To connect sensor and actuator\\, the Sensor Connection Tool\n"..
|
||||
"has to be used. Simply click with the tool on both blocks and the sensor will be\n"..
|
||||
"connected with the actuator. A successful connection is indicated by a ping/pong noise.\n"..
|
||||
"\n"..
|
||||
"Before you connect sensor with actuator\\, take care that the actuator is in the\n"..
|
||||
"requested state. For example: If you want to start the Bot with a sensor\\, connect\n"..
|
||||
"the sensor with the Bot Box\\, when the Bot is in the state 'on'. Otherwise the sensor\n"..
|
||||
"signal will stop the Bot\\, instead of starting it.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The following applies to all commands that are used to place items in the bot inventory\\, like:\n"..
|
||||
"\n"..
|
||||
" - 'take_item <num> <slot>'\n"..
|
||||
" - 'pickup_items <slot>'\n"..
|
||||
" - 'trash_sign <slot>'\n"..
|
||||
" - 'harvest <slot>'\n"..
|
||||
" - 'dig_front <slot> <lvl>'\n"..
|
||||
"\n"..
|
||||
"If no slot or slot 0 was specified with the command (case A)\\, all 8 slots of the bot\n"..
|
||||
"inventory are checked one after the other. If a slot was specified (case B)\\,\n"..
|
||||
"only this slot is checked. \n"..
|
||||
"In both cases the following applies: \n"..
|
||||
"\n"..
|
||||
"If the slot is pre-configured and fits the item\\, or if the slot is not configured\n"..
|
||||
"and empty\\, or is only partially filled with the item type which should be added)\\,\n"..
|
||||
"then the items are added. If not all items can be added\\, the remaining slots will\n"..
|
||||
"be tried out in case A. Anything that could not be added to your own inventory goes back.\n"..
|
||||
"\n"..
|
||||
"The following applies to all commands that are used to take items from the bot inventory\\, like:\n"..
|
||||
"\n"..
|
||||
" - 'add_item <num> <slot>'\n"..
|
||||
"\n"..
|
||||
"It doesn't matter whether a slot is configured or not. The bot takes the first stack\n"..
|
||||
"that it can find from its own inventory and tries to use it. If a slot is specified\\,\n"..
|
||||
"it only takes this\\, if no slot has been specified\\, it checks all of them one after\n"..
|
||||
"the other\\, starting from slot 1 until it finds something. If the number found is\n"..
|
||||
"smaller than requested\\, he tries to take the rest out of any slot.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"",
|
||||
"The Box is the housing of the bot. Place the box and start the bot by means of the\n"..
|
||||
"'On' button. If the mod techage is installed\\, the bot needs electrical power.\n"..
|
||||
"The bot leaves the box on the right side. It will not start\\, if this position is blocked.\n"..
|
||||
"\n"..
|
||||
"To stop and remove the bot\\, press the 'Off' button.\n"..
|
||||
"The box inventory simulates the inventory of the bot.\n"..
|
||||
"You will not be able to access the inventory\\, if the bot is running.\n"..
|
||||
"The bot can carry up to 8 stacks and 6 signs with it.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The flap is a simple block used as door for the bot. Place the flap in any wall\\,\n"..
|
||||
"and the bot will automatically open and close the flap as it passes through it.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Duplicator can be used to make copies of signs:\n"..
|
||||
"\n"..
|
||||
" - Put one 'cmnd' sign to be used as template into the 'Template' inventory\n"..
|
||||
" - Add one or several 'blank signs' to the 'Input' inventory.\n"..
|
||||
" - Take the copies from the 'Output' inventory.\n"..
|
||||
"\n"..
|
||||
"Written books \\[default:book_written\\] can alternatively be used as template.\n"..
|
||||
"Already written signs can be used as input\\, too.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot Sensor detects any bot and sends a signal\\, if a bot is nearby.\n"..
|
||||
"The sensor range is one node/meter.\" The sensor direction does not care.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The node sensor sends cyclical signals when it detects that nodes have appeared\n"..
|
||||
"or disappeared\\, but has to be configured accordingly. Valid nodes are all kind\n"..
|
||||
"of blocks and plants. The sensor range is 3 nodes/meters in one direction.\n"..
|
||||
"The sensor has an active side (red) that must point to the observed area.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Crop Sensor sends cyclical signals when\\, for example\\, wheat is fully grown.\n"..
|
||||
"The sensor range is one node/meter. The sensor has an active side (red) that\n"..
|
||||
"must point to the crop/field.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Signs Bot Chest is a special chest with sensor function. It sends a signal\n"..
|
||||
"depending on the chest state. Possible states are 'empty'\\, 'not empty'\\, 'almost full'\n"..
|
||||
"\n"..
|
||||
"A typical use case is to turn off the bot\\, when the chest is almost full or empty.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"\"Special kind of sensor. Can be programmed with a time in seconds\\, e.g. to start\n"..
|
||||
"the bot cyclically.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot Control Unit is used to lead the bot by means of signs. The unit can be\n"..
|
||||
"loaded with up to 4 different signs and can be programmed by means of sensors.\n"..
|
||||
"\n"..
|
||||
"To load the unit\\, place a sign on the red side of the unit and click on the unit.\n"..
|
||||
"The sign disappears / is moved to the inventory of the unit.\n"..
|
||||
"This can be repeated 3 times.\n"..
|
||||
"\n"..
|
||||
"Use the connection tool to connect up to 4 sensors with the Bot Control Unit.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"With the Sensor Extender\\, sensor signals can be sent to more than one actuator.\n"..
|
||||
"Place one or more extender nearby the sensor and connect each extender with one\n"..
|
||||
"further actuator by means of the Connection Tool.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Signal is sent\\, if all input signals are received.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Signals are forwarded delayed. Subsequent signals are queued. \n"..
|
||||
"The delay time can be configured.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Used to harvest and seed a 3x3 field. Place the sign in front of the field.\n"..
|
||||
"The seed to be placed has to be in the first inventory slot of the bot. When finished\\, the bot turns.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Used to make a copy of a 3x3x3 cube. Place the sign in front of the pattern\n"..
|
||||
"to be copied. Use the copy sign to make the copy of this pattern on a different\n"..
|
||||
"location. The bot must first reach the pattern sign\\, then the copy sign.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Used to make a copy of a 3x3x3 cube. Place the sign in front of the location\\,\n"..
|
||||
"where the copy should be made. Use the pattern sign to mark the pattern.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Used to cut flowers on a 3x3 field. Place the sign in front of the field.\n"..
|
||||
"When finished\\, the bot turns.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Used to harvest an aspen or pine tree trunk\n"..
|
||||
"\n"..
|
||||
" - Place the sign in front of the tree.\n"..
|
||||
" - Place a chest to the right of the sign.\n"..
|
||||
" - Put a dirt stack (10 items min.) into the chest.\n"..
|
||||
" - Preconfigure slot 1 of the bot inventory with dirt\n"..
|
||||
" - Preconfigure slot 2 of the bot inventory with saplings\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The 'command' sign can be programmed by the player. Place the sign in front\n"..
|
||||
"of you and use the node menu to program your sequence of bot commands.\n"..
|
||||
"The menu has an edit field for your commands and a help page with all\n"..
|
||||
"available commands. The help page has a copy button to simplify the programming.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot turns right when it detects this sign in front of it.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot turns left when it detects this sign in front of it.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot takes items out of a chest in front of it and then turns around.\n"..
|
||||
"This sign has to be placed on top of the chest.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot puts items into a chest in front of it and then turns around.\n"..
|
||||
"This sign has to be placed on top of the chest.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot will stop in front of this sign until the sign is removed or\n"..
|
||||
"the bot is turned off.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot puts items into a minecart in front of it\\, pushes the cart and then turns\n"..
|
||||
"around. This sign has to be placed on top of the rail at the cart end position.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The Bot takes items out of a minecart in front of it\\, pushes the cart and then\n"..
|
||||
"turns around. This sign has to be placed on top of the rail at the cart end position.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Used to take water into bucket. Place the sign on a shore\\, in front of the still water pool. \n"..
|
||||
"\n"..
|
||||
"Items in slots:\n"..
|
||||
"\n"..
|
||||
" 1 - empty bucket\n"..
|
||||
"\n"..
|
||||
"The result is one bucket with water in selected inventory slot. When finished\\,\n"..
|
||||
"the bot turns around.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"Used to cook a vegetable soup in cauldron. Cauldon should be empty and located\n"..
|
||||
"above flammable material. Place the sign in front of the cauldron with one field\n"..
|
||||
"space\\, to prevent wooden sign from catching fire.\n"..
|
||||
"\n"..
|
||||
"Items in slots:\n"..
|
||||
"\n"..
|
||||
" 1 - water bucket\"\n"..
|
||||
" 2 - vegetable #1 (i.e. tomato)\n"..
|
||||
" 3 - vegetable #2 (i.e. carrot)\n"..
|
||||
" 4 - empty bowl (from farming or xdecor mods)\n"..
|
||||
"\n"..
|
||||
" The result is one bowl with vegetable soup in selected inventory slot.\n"..
|
||||
"When finished\\, the bot turns around.\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"The commands are also all described as help in the \"Sign command\" node.\n"..
|
||||
"All blocks or signs that are set are taken from the bot inventory.\n"..
|
||||
"Any blocks or signs removed will be added back to the Bot Inventory.\n"..
|
||||
"'<slot>' is always the bot internal inventory stack (1..8).\n"..
|
||||
"For all Inventory commands applies: If the bot inventory stack specified by '<slot>'\n"..
|
||||
"is full\\, so that nothing more can be done\\, or just empty\\, so that nothing\n"..
|
||||
"more can be removed\\, the next slot will automatically be used.\n"..
|
||||
"\n"..
|
||||
" move <steps> - to follow one or more steps forward without signs\n"..
|
||||
" cond_move - walk to the next sign and work it off\n"..
|
||||
" turn_left - turn left\n"..
|
||||
" turn_right - turn right\n"..
|
||||
" turn_around - turn around\n"..
|
||||
" backward - one step backward\n"..
|
||||
" turn_off - turn off the robot / back to the box\n"..
|
||||
" pause <sec> - wait one or more seconds\n"..
|
||||
" move_up - move up (maximum 2 times)\n"..
|
||||
" move_down - move down\n"..
|
||||
" fall_down - fall into a hole/chasm (up to 10 blocks)\n"..
|
||||
" take_item <num> <slot> - take one or more items from a box\n"..
|
||||
" add_item <num> <slot> - put one or more items in a box\n"..
|
||||
" add_fuel <num> <slot> - for furnaces or similar\n"..
|
||||
" place_front <slot> <lvl> - Set block in front of the robot\n"..
|
||||
" place_left <slot> <lvl> - Set block to the left\n"..
|
||||
" place_right <slot> <lvl> - set block to the right\n"..
|
||||
" place_below <slot> - set block under the robot\n"..
|
||||
" place_above <slot> - set block above the robot\n"..
|
||||
" dig_front <slot> <lvl> - remove block in front of the robot\n"..
|
||||
" dig_left <slot> <lvl> - remove block on the left\n"..
|
||||
" dig_right <slot> <lvl> - remove block on the right\n"..
|
||||
" dig_below <slot> - dig block under the robot\n"..
|
||||
" dig_above <slot> - dig block above the robot\n"..
|
||||
" rotate_item <lvl> <steps> - rotate a block in front of the robot\n"..
|
||||
" set_param2 <lvl> <param2> - set param2 of the block in front of the robot\n"..
|
||||
" place_sign <slot> - set sign\n"..
|
||||
" place_sign_behind <slot> - put a sign behind the bot\n"..
|
||||
" dig_sign <slot> - remove the sign\n"..
|
||||
" trash_sign <slot> - Remove the sign\\, clear data and add to the item Inventory\n"..
|
||||
" stop - Bot stops until the shield is removed\n"..
|
||||
" pickup_items <slot> - pickup items (in a 3x3 field)\n"..
|
||||
" drop_items <num> <slot> - drop items\n"..
|
||||
" harvest - harvest a 3x3 field (farming)\n"..
|
||||
" cutting - cut a 3x3 flower field\n"..
|
||||
" sow_seed <slot> - a 3x3 field sowing / planting\n"..
|
||||
" plant_sapling <slot> - plant a sapling in front of the robot\n"..
|
||||
" pattern - save the blocks behind the shield (up to 5x3x3) as template\n"..
|
||||
" copy <size> - make a copy of \"pattern\". Size is e.g. 3x3 (see ingame help)\n"..
|
||||
" punch_cart - Punch a rail cart to start it\n"..
|
||||
" add_compost <slot> - Put 2 leaves into the compost barrel\n"..
|
||||
" take_compost <slot> - Take a compost item from the barrel\n"..
|
||||
" print <text> - Output chat message for debug purposes\n"..
|
||||
" take_water <slot> - Take water with empty bucket\n"..
|
||||
" fill_cauldron <slot> - Fill the xdecor cauldron for a soup\n"..
|
||||
" take_soup <slot> - Take boiling soup into empty bowl from cauldron\n"..
|
||||
" flame_on - Make fire\n"..
|
||||
" flame_off - Put out the fire\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
" ignite - Ignite the techage charcoal lighter\n"..
|
||||
" low_batt <percent> - Turn the bot off if the battery power is below the \n"..
|
||||
" given value in percent (1..99)\n"..
|
||||
" jump_low_batt <percent> <label> - Jump to <label> if the battery power is below the \n"..
|
||||
" given value in percent (1..99)\n"..
|
||||
" (see \"Flow control commands\")\n"..
|
||||
" send_cmnd <receiver> <command> - Send a techage command to a given node. \n"..
|
||||
" Receiver is addressed by the techage node number. \n"..
|
||||
" For commands with two or more words\\, \n"..
|
||||
" use the '*' character\n"..
|
||||
" instead of spaces\\, e.g.: \n"..
|
||||
" send_cmnd 3465 pull*default:dirt*2\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
" jump <label> -- jump command\\, <label> is a word from the characters a-z or A-Z\n"..
|
||||
" <label>: -- jump label / start of a function\n"..
|
||||
" return -- return from a function\n"..
|
||||
" repeat <num> -- start of a loop block\\, <num> is a number 1..999\n"..
|
||||
" end -- end of a loop block\n"..
|
||||
" call <label> -- call of a function (with return via the command 'return')\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
" jump_check_item <num> <slot> <label> - Check if there are <num> items in the chest like node.\n"..
|
||||
" If not\\, jump to <label>.\n"..
|
||||
" <slot> is the bot inventory slot (1..8) to \n"..
|
||||
" specify the item\\, or 0 for any item.\n"..
|
||||
" jump_low_batt <percent> <label> - See \"Techage specific commands\"\n"..
|
||||
"\n"..
|
||||
"\n"..
|
||||
"\n",
|
||||
"",
|
||||
" jump main -- jump to the label 'main'\n"..
|
||||
" \n"..
|
||||
" foo: -- starting point of the function with the name 'foo'\n"..
|
||||
" cmnd ...\n"..
|
||||
" cmnd ...\n"..
|
||||
" return -- end of 'foo'. Jump back\n"..
|
||||
" \n"..
|
||||
" main: -- main program\n"..
|
||||
" cmnd ...\n"..
|
||||
" repeat 10 -- repeat all commands up to 'end' 10 times\n"..
|
||||
" cmnd ...\n"..
|
||||
" call foo -- call the subfunction 'foo'\n"..
|
||||
" cmnd ...\n"..
|
||||
" end -- end of the 'repeat' loop\n"..
|
||||
" exit -- end of the program\n"..
|
||||
"\n",
|
||||
" cmnd ...\n"..
|
||||
" repeat 10 -- repeat all commands up to 'end' 10 times\n"..
|
||||
" cmnd ...\n"..
|
||||
" call foo -- call the subfunction 'foo'\n"..
|
||||
" cmnd ...\n"..
|
||||
" end -- end of the 'repeat' loop\n"..
|
||||
" exit -- end of the program\n"..
|
||||
" \n"..
|
||||
" foo: -- starting point of the function with the name 'foo'\n"..
|
||||
" cmnd ...\n"..
|
||||
" cmnd ...\n"..
|
||||
" return -- end of 'foo'. Jump back\n"..
|
||||
"\n",
|
||||
}, {
|
||||
"signs_bot_bot_inv",
|
||||
"signs_bot_bot_inv",
|
||||
"signs_bot_sign_left",
|
||||
"signs_bot_sensor_crop_inv",
|
||||
"signs_bot_tool",
|
||||
"signs_bot_box",
|
||||
"",
|
||||
"signs_bot_box",
|
||||
"signs_bot_bot_flap",
|
||||
"signs_bot_duplicator",
|
||||
"signs_bot_bot_sensor",
|
||||
"signs_bot_node_sensor",
|
||||
"signs_bot_crop_sensor",
|
||||
"signs_bot_chest",
|
||||
"signs_bot_timer",
|
||||
"signs_bot_changer",
|
||||
"signs_bot_sensor_extender",
|
||||
"signs_bot_and1",
|
||||
"signs_bot_delayer",
|
||||
"signs_bot_farming",
|
||||
"signs_bot_pattern",
|
||||
"signs_bot_copy",
|
||||
"signs_bot_flowers",
|
||||
"signs_bot_aspen",
|
||||
"signs_bot_sign_cmnd",
|
||||
"signs_bot_sign_right",
|
||||
"signs_bot_sign_left",
|
||||
"signs_bot_sign_take",
|
||||
"signs_bot_sign_add",
|
||||
"signs_bot_sign_stop",
|
||||
"signs_bot_sign_add_cart",
|
||||
"signs_bot_sign_take_cart",
|
||||
"signs_bot_water",
|
||||
"signs_bot_soup",
|
||||
"signs_bot_bot_inv",
|
||||
"signs_bot_bot_inv",
|
||||
"signs_bot_bot_inv",
|
||||
"signs_bot_bot_inv",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
}, {
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
})
|
508
techage_EN.md
Normal file
508
techage_EN.md
Normal file
@ -0,0 +1,508 @@
|
||||
# Signs Bot
|
||||
|
||||
A robot controlled by signs.
|
||||
|
||||
On the web: https://github.com/joe7575/signs_bot/blob/master/techage_EN.md
|
||||
|
||||
[signs_bot_bot_inv|image]
|
||||
|
||||
## Firt Steps
|
||||
|
||||
After you have placed the Signs Bot Box, you can start the bot by means of the
|
||||
'On' button in the box menu. If the bot returns to its box right away,
|
||||
you will need to charge it with electrical energy (techage) first.
|
||||
The bot then runs straight up until it reaches an obstacle
|
||||
(a step with two or more blocks up or down or a sign.)
|
||||
|
||||
The bot can only be controlled by signs that are placed in its path.
|
||||
|
||||
If the bot first reaches a sign it will execute the commands on the sign.
|
||||
If the first command on the sign is e.g. 'turn_around', the bot turns and goes back.
|
||||
In this case, the bot reaches his box again and turns off.
|
||||
|
||||
If the bot first reaches an obstacle it will stop, or if available, execute
|
||||
the next commands from the last sign.
|
||||
|
||||
The Signs Bot Box has an inventory with 6 stacks for signs and 8 stacks for
|
||||
other items (to be placed/dug by the bot). This inventory simulates the bot
|
||||
internal inventory. That means you will only have access to the inventory
|
||||
if the bot is turned off ('sitting' in his box).
|
||||
|
||||
There are also the following blocks:
|
||||
- Sensors: These can send a signal to an actuator if they are connected to the actuator.
|
||||
- Actuators: These perform an action when they receive a signal from a sensor.
|
||||
|
||||
[signs_bot_bot_inv|image]
|
||||
|
||||
## Signs
|
||||
|
||||
You simply control the direction of the bot by means of the 'turn left' and
|
||||
'turn right' signs (signs with the arrow). The bot can run over steps
|
||||
(one block up/down). But there are also commands to move the bot up and down.
|
||||
|
||||
It is not necessary to mark a way back to the box. With the command 'turn_off'
|
||||
the bot will turn off and be back in his box from every position. The same applies
|
||||
if you turn off the bot by the box menu. If the bot reaches a sign from the wrong
|
||||
direction (from back or sides) the sign will be ignored. The bot will walk over.
|
||||
|
||||
All predefined signs have a menu with a list of the bot commands. These signs
|
||||
can't be changed, but you can craft and program your own signs. For this you
|
||||
have to use the 'command' sign. This sign has an edit field for your commands
|
||||
and a help page with all available commands. The help page has a copy button
|
||||
to simplify the programming.
|
||||
|
||||
Also for your own signs it is important to know: After the execution of the last
|
||||
command of the sign, the bot falls back into its default behaviour and runs in
|
||||
its taken direction.
|
||||
|
||||
A standard job for the bot is to move items from one chest to another chest
|
||||
(or node with a chest like inventory). This can be done by means of the two signs
|
||||
'take item' and 'add item'. These signs have to be placed on top of chest nodes.
|
||||
|
||||
[signs_bot_sign_left|image]
|
||||
|
||||
## Sensors and Actuators
|
||||
|
||||
In addition to the signs the bot can be controlled by means of sensors. Sensors
|
||||
like the Bot Sensor have two states: on and off. If the Bot Sensor detects a bot
|
||||
it will switch to the state 'on' and sends a signal to a connected block,
|
||||
called an actuator.
|
||||
|
||||
Sensors are:
|
||||
|
||||
- Bot Sensor: Sends a signal when a robot passes by
|
||||
- Node Sensor: Sends a signal when it detects any (new) node
|
||||
- Crop Sensor: Sends a signal when, for example wheat is fully grown
|
||||
- Bot Chest: Sends a signal depending on the chest state (empty, full)
|
||||
|
||||
Actuators are:
|
||||
|
||||
- Signs Bot Box: Can turn the bot off and on
|
||||
- Control Unit: Can be used to exchange the sign to lead the bot
|
||||
|
||||
Sensors must be connected (paired) with actuators. This is what the
|
||||
"Sensor Connection Tool" does.
|
||||
|
||||
[signs_bot_sensor_crop_inv|image]
|
||||
|
||||
|
||||
## Sensor Connection Tool
|
||||
|
||||
To send a signal from a sensor to an actuator, the sensor has to be connected
|
||||
(paired) with actuator. To connect sensor and actuator, the Sensor Connection Tool
|
||||
has to be used. Simply click with the tool on both blocks and the sensor will be
|
||||
connected with the actuator. A successful connection is indicated by a ping/pong noise.
|
||||
|
||||
Before you connect sensor with actuator, take care that the actuator is in the
|
||||
requested state. For example: If you want to start the Bot with a sensor, connect
|
||||
the sensor with the Bot Box, when the Bot is in the state 'on'. Otherwise the sensor
|
||||
signal will stop the Bot, instead of starting it.
|
||||
|
||||
[signs_bot_tool|image]
|
||||
|
||||
|
||||
## Inventory
|
||||
|
||||
The following applies to all commands that are used to place items in the bot inventory, like:
|
||||
|
||||
- `take_item <num> <slot>`
|
||||
- `pickup_items <slot>`
|
||||
- `trash_sign <slot>`
|
||||
- `harvest <slot>`
|
||||
- `dig_front <slot> <lvl>`
|
||||
|
||||
If no slot or slot 0 was specified with the command (case A), all 8 slots of the bot
|
||||
inventory are checked one after the other. If a slot was specified (case B),
|
||||
only this slot is checked.
|
||||
In both cases the following applies:
|
||||
|
||||
If the slot is pre-configured and fits the item, or if the slot is not configured
|
||||
and empty, or is only partially filled with the item type which should be added),
|
||||
then the items are added. If not all items can be added, the remaining slots will
|
||||
be tried out in case A. Anything that could not be added to your own inventory goes back.
|
||||
|
||||
The following applies to all commands that are used to take items from the bot inventory, like:
|
||||
|
||||
- `add_item <num> <slot>`
|
||||
|
||||
It doesn't matter whether a slot is configured or not. The bot takes the first stack
|
||||
that it can find from its own inventory and tries to use it. If a slot is specified,
|
||||
it only takes this, if no slot has been specified, it checks all of them one after
|
||||
the other, starting from slot 1 until it finds something. If the number found is
|
||||
smaller than requested, he tries to take the rest out of any slot.
|
||||
|
||||
[signs_bot_box|image]
|
||||
|
||||
## Nodes / Blocks
|
||||
|
||||
### Signs Bot Box
|
||||
|
||||
The Box is the housing of the bot. Place the box and start the bot by means of the
|
||||
'On' button. If the mod techage is installed, the bot needs electrical power.
|
||||
The bot leaves the box on the right side. It will not start, if this position is blocked.
|
||||
|
||||
To stop and remove the bot, press the 'Off' button.
|
||||
The box inventory simulates the inventory of the bot.
|
||||
You will not be able to access the inventory, if the bot is running.
|
||||
The bot can carry up to 8 stacks and 6 signs with it.
|
||||
|
||||
[signs_bot_box|image]
|
||||
|
||||
### Bot Flap
|
||||
|
||||
The flap is a simple block used as door for the bot. Place the flap in any wall,
|
||||
and the bot will automatically open and close the flap as it passes through it.
|
||||
|
||||
[signs_bot_bot_flap|image]
|
||||
|
||||
### Signs Duplicator
|
||||
|
||||
The Duplicator can be used to make copies of signs:
|
||||
|
||||
1. Put one 'cmnd' sign to be used as template into the 'Template' inventory
|
||||
2. Add one or several 'blank signs' to the 'Input' inventory.
|
||||
3. Take the copies from the 'Output' inventory.
|
||||
|
||||
Written books [default:book_written] can alternatively be used as template.
|
||||
Already written signs can be used as input, too.
|
||||
|
||||
[signs_bot_duplicator|image]
|
||||
|
||||
### Bot Sensor
|
||||
|
||||
The Bot Sensor detects any bot and sends a signal, if a bot is nearby.
|
||||
The sensor range is one node/meter." The sensor direction does not care.
|
||||
|
||||
[signs_bot_bot_sensor|image]
|
||||
|
||||
### Node Sensor
|
||||
|
||||
The node sensor sends cyclical signals when it detects that nodes have appeared
|
||||
or disappeared, but has to be configured accordingly. Valid nodes are all kind
|
||||
of blocks and plants. The sensor range is 3 nodes/meters in one direction.
|
||||
The sensor has an active side (red) that must point to the observed area.
|
||||
|
||||
[signs_bot_node_sensor|image]
|
||||
|
||||
### Crop Sensor
|
||||
|
||||
The Crop Sensor sends cyclical signals when, for example, wheat is fully grown.
|
||||
The sensor range is one node/meter. The sensor has an active side (red) that
|
||||
must point to the crop/field.
|
||||
|
||||
[signs_bot_crop_sensor|image]
|
||||
|
||||
### Signs Bot Chest
|
||||
|
||||
The Signs Bot Chest is a special chest with sensor function. It sends a signal
|
||||
depending on the chest state. Possible states are 'empty', 'not empty', 'almost full'
|
||||
|
||||
A typical use case is to turn off the bot, when the chest is almost full or empty.
|
||||
|
||||
[signs_bot_chest|image]
|
||||
|
||||
### Bot Timer
|
||||
|
||||
"Special kind of sensor. Can be programmed with a time in seconds, e.g. to start
|
||||
the bot cyclically.
|
||||
|
||||
[signs_bot_timer|image]
|
||||
|
||||
### Bot Control Unit
|
||||
|
||||
The Bot Control Unit is used to lead the bot by means of signs. The unit can be
|
||||
loaded with up to 4 different signs and can be programmed by means of sensors.
|
||||
|
||||
To load the unit, place a sign on the red side of the unit and click on the unit.
|
||||
The sign disappears / is moved to the inventory of the unit.
|
||||
This can be repeated 3 times.
|
||||
|
||||
Use the connection tool to connect up to 4 sensors with the Bot Control Unit.
|
||||
|
||||
[signs_bot_changer|image]
|
||||
|
||||
### Sensor Extender
|
||||
|
||||
With the Sensor Extender, sensor signals can be sent to more than one actuator.
|
||||
Place one or more extender nearby the sensor and connect each extender with one
|
||||
further actuator by means of the Connection Tool.
|
||||
|
||||
[signs_bot_sensor_extender|image]
|
||||
|
||||
### Signal AND
|
||||
|
||||
Signal is sent, if all input signals are received.
|
||||
|
||||
[signs_bot_and1|image]
|
||||
|
||||
### Signal Delayer
|
||||
|
||||
Signals are forwarded delayed. Subsequent signals are queued.
|
||||
The delay time can be configured.
|
||||
|
||||
[signs_bot_delayer|image]
|
||||
|
||||
### Sign 'farming'
|
||||
|
||||
Used to harvest and seed a 3x3 field. Place the sign in front of the field.
|
||||
The seed to be placed has to be in the first inventory slot of the bot. When finished, the bot turns.
|
||||
|
||||
[signs_bot_farming|image]
|
||||
|
||||
### Sign 'pattern'
|
||||
|
||||
Used to make a copy of a 3x3x3 cube. Place the sign in front of the pattern
|
||||
to be copied. Use the copy sign to make the copy of this pattern on a different
|
||||
location. The bot must first reach the pattern sign, then the copy sign.
|
||||
|
||||
[signs_bot_pattern|image]
|
||||
|
||||
### Sign 'copy3x3x3'
|
||||
|
||||
Used to make a copy of a 3x3x3 cube. Place the sign in front of the location,
|
||||
where the copy should be made. Use the pattern sign to mark the pattern.
|
||||
|
||||
[signs_bot_copy|image]
|
||||
|
||||
### Sign 'flowers'
|
||||
|
||||
Used to cut flowers on a 3x3 field. Place the sign in front of the field.
|
||||
When finished, the bot turns.
|
||||
|
||||
[signs_bot_flowers|image]
|
||||
|
||||
### Sign 'aspen'
|
||||
|
||||
Used to harvest an aspen or pine tree trunk
|
||||
|
||||
- Place the sign in front of the tree.
|
||||
- Place a chest to the right of the sign.
|
||||
- Put a dirt stack (10 items min.) into the chest.
|
||||
- Preconfigure slot 1 of the bot inventory with dirt
|
||||
- Preconfigure slot 2 of the bot inventory with saplings
|
||||
|
||||
[signs_bot_aspen|image]
|
||||
|
||||
### Sign 'command'
|
||||
|
||||
The 'command' sign can be programmed by the player. Place the sign in front
|
||||
of you and use the node menu to program your sequence of bot commands.
|
||||
The menu has an edit field for your commands and a help page with all
|
||||
available commands. The help page has a copy button to simplify the programming.
|
||||
|
||||
[signs_bot_sign_cmnd|image]
|
||||
|
||||
### Sign "turn right"
|
||||
|
||||
The Bot turns right when it detects this sign in front of it.
|
||||
|
||||
[signs_bot_sign_right|image]
|
||||
|
||||
### Sign "turn left"
|
||||
|
||||
The Bot turns left when it detects this sign in front of it.
|
||||
|
||||
[signs_bot_sign_left|image]
|
||||
|
||||
### Sign "take item"
|
||||
|
||||
The Bot takes items out of a chest in front of it and then turns around.
|
||||
This sign has to be placed on top of the chest.
|
||||
|
||||
[signs_bot_sign_take|image]
|
||||
|
||||
### Sign "add item"
|
||||
|
||||
The Bot puts items into a chest in front of it and then turns around.
|
||||
This sign has to be placed on top of the chest.
|
||||
|
||||
[signs_bot_sign_add|image]
|
||||
|
||||
### Sign "stop"
|
||||
|
||||
The Bot will stop in front of this sign until the sign is removed or
|
||||
the bot is turned off.
|
||||
|
||||
[signs_bot_sign_stop|image]
|
||||
|
||||
### Sign "add to cart" (minecart)
|
||||
|
||||
The Bot puts items into a minecart in front of it, pushes the cart and then turns
|
||||
around. This sign has to be placed on top of the rail at the cart end position.
|
||||
|
||||
[signs_bot_sign_add_cart|image]
|
||||
|
||||
### Sign "take from cart" (minecart)
|
||||
|
||||
The Bot takes items out of a minecart in front of it, pushes the cart and then
|
||||
turns around. This sign has to be placed on top of the rail at the cart end position.
|
||||
|
||||
[signs_bot_sign_take_cart|image]
|
||||
|
||||
### Sign 'take water' (xdecor)
|
||||
|
||||
Used to take water into bucket. Place the sign on a shore, in front of the still water pool.
|
||||
|
||||
Items in slots:
|
||||
|
||||
1 - empty bucket
|
||||
|
||||
The result is one bucket with water in selected inventory slot. When finished,
|
||||
the bot turns around.
|
||||
|
||||
[signs_bot_water|image]
|
||||
|
||||
### Sign 'cook soup' (xdecor)
|
||||
|
||||
Used to cook a vegetable soup in cauldron. Cauldon should be empty and located
|
||||
above flammable material. Place the sign in front of the cauldron with one field
|
||||
space, to prevent wooden sign from catching fire.
|
||||
|
||||
Items in slots:
|
||||
|
||||
1 - water bucket"
|
||||
2 - vegetable #1 (i.e. tomato)
|
||||
3 - vegetable #2 (i.e. carrot)
|
||||
4 - empty bowl (from farming or xdecor mods)
|
||||
|
||||
The result is one bowl with vegetable soup in selected inventory slot.
|
||||
When finished, the bot turns around.
|
||||
|
||||
[signs_bot_soup|image]
|
||||
|
||||
|
||||
## Bot Commands
|
||||
|
||||
The commands are also all described as help in the "Sign command" node.
|
||||
All blocks or signs that are set are taken from the bot inventory.
|
||||
Any blocks or signs removed will be added back to the Bot Inventory.
|
||||
`<slot>` is always the bot internal inventory stack (1..8).
|
||||
For all Inventory commands applies: If the bot inventory stack specified by `<slot>`
|
||||
is full, so that nothing more can be done, or just empty, so that nothing
|
||||
more can be removed, the next slot will automatically be used.
|
||||
|
||||
move <steps> - to follow one or more steps forward without signs
|
||||
cond_move - walk to the next sign and work it off
|
||||
turn_left - turn left
|
||||
turn_right - turn right
|
||||
turn_around - turn around
|
||||
backward - one step backward
|
||||
turn_off - turn off the robot / back to the box
|
||||
pause <sec> - wait one or more seconds
|
||||
move_up - move up (maximum 2 times)
|
||||
move_down - move down
|
||||
fall_down - fall into a hole/chasm (up to 10 blocks)
|
||||
take_item <num> <slot> - take one or more items from a box
|
||||
add_item <num> <slot> - put one or more items in a box
|
||||
add_fuel <num> <slot> - for furnaces or similar
|
||||
place_front <slot> <lvl> - Set block in front of the robot
|
||||
place_left <slot> <lvl> - Set block to the left
|
||||
place_right <slot> <lvl> - set block to the right
|
||||
place_below <slot> - set block under the robot
|
||||
place_above <slot> - set block above the robot
|
||||
dig_front <slot> <lvl> - remove block in front of the robot
|
||||
dig_left <slot> <lvl> - remove block on the left
|
||||
dig_right <slot> <lvl> - remove block on the right
|
||||
dig_below <slot> - dig block under the robot
|
||||
dig_above <slot> - dig block above the robot
|
||||
rotate_item <lvl> <steps> - rotate a block in front of the robot
|
||||
set_param2 <lvl> <param2> - set param2 of the block in front of the robot
|
||||
place_sign <slot> - set sign
|
||||
place_sign_behind <slot> - put a sign behind the bot
|
||||
dig_sign <slot> - remove the sign
|
||||
trash_sign <slot> - Remove the sign, clear data and add to the item Inventory
|
||||
stop - Bot stops until the shield is removed
|
||||
pickup_items <slot> - pickup items (in a 3x3 field)
|
||||
drop_items <num> <slot> - drop items
|
||||
harvest - harvest a 3x3 field (farming)
|
||||
cutting - cut a 3x3 flower field
|
||||
sow_seed <slot> - a 3x3 field sowing / planting
|
||||
plant_sapling <slot> - plant a sapling in front of the robot
|
||||
pattern - save the blocks behind the shield (up to 5x3x3) as template
|
||||
copy <size> - make a copy of "pattern". Size is e.g. 3x3 (see ingame help)
|
||||
punch_cart - Punch a rail cart to start it
|
||||
add_compost <slot> - Put 2 leaves into the compost barrel
|
||||
take_compost <slot> - Take a compost item from the barrel
|
||||
print <text> - Output chat message for debug purposes
|
||||
take_water <slot> - Take water with empty bucket
|
||||
fill_cauldron <slot> - Fill the xdecor cauldron for a soup
|
||||
take_soup <slot> - Take boiling soup into empty bowl from cauldron
|
||||
flame_on - Make fire
|
||||
flame_off - Put out the fire
|
||||
|
||||
[signs_bot_bot_inv|image]
|
||||
|
||||
### Techage specific commands
|
||||
|
||||
ignite - Ignite the techage charcoal lighter
|
||||
low_batt <percent> - Turn the bot off if the battery power is below the
|
||||
given value in percent (1..99)
|
||||
jump_low_batt <percent> <label> - Jump to <label> if the battery power is below the
|
||||
given value in percent (1..99)
|
||||
(see "Flow control commands")
|
||||
send_cmnd <receiver> <command> - Send a techage command to a given node.
|
||||
Receiver is addressed by the techage node number.
|
||||
For commands with two or more words,
|
||||
use the '*' character
|
||||
instead of spaces, e.g.:
|
||||
send_cmnd 3465 pull*default:dirt*2
|
||||
|
||||
[signs_bot_bot_inv|image]
|
||||
|
||||
### Flow control commands
|
||||
|
||||
jump <label> -- jump command, <label> is a word from the characters a-z or A-Z
|
||||
<label>: -- jump label / start of a function
|
||||
return -- return from a function
|
||||
repeat <num> -- start of a loop block, <num> is a number 1..999
|
||||
end -- end of a loop block
|
||||
call <label> -- call of a function (with return via the command 'return')
|
||||
|
||||
[signs_bot_bot_inv|image]
|
||||
|
||||
### Further jump commands
|
||||
|
||||
jump_check_item <num> <slot> <label> - Check if there are <num> items in the chest like node.
|
||||
If not, jump to <label>.
|
||||
<slot> is the bot inventory slot (1..8) to
|
||||
specify the item, or 0 for any item.
|
||||
jump_low_batt <percent> <label> - See "Techage specific commands"
|
||||
|
||||
|
||||
[signs_bot_bot_inv|image]
|
||||
|
||||
### Flow control Examples
|
||||
|
||||
#### Example with a function at the beginning:
|
||||
|
||||
jump main -- jump to the label 'main'
|
||||
|
||||
foo: -- starting point of the function with the name 'foo'
|
||||
cmnd ...
|
||||
cmnd ...
|
||||
return -- end of 'foo'. Jump back
|
||||
|
||||
main: -- main program
|
||||
cmnd ...
|
||||
repeat 10 -- repeat all commands up to 'end' 10 times
|
||||
cmnd ...
|
||||
call foo -- call the subfunction 'foo'
|
||||
cmnd ...
|
||||
end -- end of the 'repeat' loop
|
||||
exit -- end of the program
|
||||
|
||||
|
||||
#### Example with a function at the end:
|
||||
|
||||
cmnd ...
|
||||
repeat 10 -- repeat all commands up to 'end' 10 times
|
||||
cmnd ...
|
||||
call foo -- call the subfunction 'foo'
|
||||
cmnd ...
|
||||
end -- end of the 'repeat' loop
|
||||
exit -- end of the program
|
||||
|
||||
foo: -- starting point of the function with the name 'foo'
|
||||
cmnd ...
|
||||
cmnd ...
|
||||
return -- end of 'foo'. Jump back
|
Loading…
x
Reference in New Issue
Block a user