[Mod] Signs Bot [signs_bot]

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

[Mod] Signs Bot [signs_bot]

by joe7575 » Post

A robot controlled by signs.

Image

The bot can only be controlled by signs that are placed in its path.
After starting, the bot runs in the default direction until it encounters a sign. There, the commands on the sign are processed.
Signs are available for many standard tasks.
There is also a sign that can be programmed by the player, which then is processed by the bot.
But there are not programming skills needed, Bot commands are similar to chat commands.

Videos Tutorials (in German language):
https://youtu.be/odqUJhSBxYY
https://youtu.be/B9-CFvx9X3I
https://youtu.be/_nsvjcQhb6U

Further 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.
Sensors must be connected (paired) with actuators, by means of the Connection Tool. Click on both blocks one after the other. A successful pairing is indicated by a ping / pong noise.

When pairing, the current state of the actuator is important.
The state of the actuator is saved with the pairing and restored by the received signal. For example, the robot can be switched on or off 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 can 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 block (tree, cactus, flower, etc.)
  • Crop Sendor: Sends a signal when, for example, the wheat is fully grown
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
  • 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.

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


The code is on GitHub.

License
Copyright (C) 2019 Joachim Stolberg
Code: Licensed under the GNU GPL version 3 or later. See LICENSE.txt


Dependencies
default, farming, basic_materials, tubelib2
optional: farming redo, node_io
Attachments
screenshot.png
screenshot.png (119.65 KiB) Viewed 3559 times
Last edited by joe7575 on Sun Jul 14, 2019 21:47, edited 1 time in total.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Signs Bot [signs_bot]

by Sokomine » Post

Looks very cute. I'm sure many players will love the mod if they ever happen to encounter it. Would be nice to have it on a server. Also looks like something that could fit very well into the educational environment.
A list of my mods can be found here.

User avatar
maxx
Member
Posts: 44
Joined: Thu Feb 15, 2018 15:24
GitHub: maxhipp
In-game: maxx or max
Location: Germany | Bavaria

Re: [Mod] Signs Bot [signs_bot]

by maxx » Post

The Signs Bot is installed on these two servers:
- Joes Miniwelt (v0.4.17)
- Tech Age Survival (v5)

And of course he’s very cute :)
Stay safe! | Don't forget the planet

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

Lift up:

The bot recursively builds a stairway based on a building sign that is placed cyclically and then used again and again (see video).

Image

Video: https://vimeo.com/327372072

Now adapted to techage
Attachments
starway.png
starway.png (263.99 KiB) Viewed 3561 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

Update v1.02:
New program flow commands added for loops and functions:

Code: Select all

    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')
This allows for example to build a cobble tower around the sign with the script:

Code: Select all

  turn_right
  move 1
  turn_left
  repeat 11
      move_up
      repeat 4
          place_front 0 -1
          move 1
          place_front 0 -1
          move 1
          turn_left
      end
  end
Image
Attachments
bot_tower.png
bot_tower.png (155.1 KiB) Viewed 3561 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

racal
Member
Posts: 72
Joined: Tue May 26, 2020 08:49

Re: [Mod] Signs Bot [signs_bot]

by racal » Post

Can Signs Bot be used to fix defective tubelib items? Say:
  1. Get repair kit from chest
  2. Travel to defective tubelib node
  3. Punch defective tubelib item with repair kit
Wondering if this can be done to fully automate (or almost to near automation) a harvest/quarry system.

PS... Might as well enable Signs Bot to replace SmartLine/SaferLua Controller dead batteries. :D

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

racal wrote:
Thu Jun 04, 2020 06:56
Can Signs Bot be used to fix defective tubelib items?
Currently not, but would be possible.
The question is: How shall the bot know, if any node is defect?
Of course, you can use a bot that visits all relevant nodes cyclically and tries to fix them.

But does this make sense? If a server owner enables the "machine ageing" feature to keep the players busy, is it a good idea to provide a way to bypass this feature?

The same goes for the battery.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

racal
Member
Posts: 72
Joined: Tue May 26, 2020 08:49

Re: [Mod] Signs Bot [signs_bot]

by racal » Post

I'm trying to farm/harvest a 3x3 flower bed using signs_bot but can't seem to do so. Here's my setup:
Image Isn't the set of commands just:
turn_right
cutting
But somehow the cutting command does not work; the bot would just stay there and do nothing. What am I missing?

Also, how do you detect the central flower using the node sensor? Found the answer on the wiki:
Node Sensor: Sends a signal when it detects a change (tree, cactus, flower, etc.) in front of the sensor (over 3 positions)
Thanks.

PS...

A couple of hiccups which I was able to solve:
  1. Just realized bots needed to be charged. I've tried out signs_bot before but don't recall them needing some form of fuel/power to run/start them. I guess you need to charge them (connect to a power grid/source) if you're using it with techage mod(?).
  2. You need to run signs_bot first (without commands/signs) before you pair it with a sensor to enable/trigger "on" on sensors.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

The Signs Bot has the same Ethereal problem with the flowers as Techage. It can't work, I have to fix that first...
racal wrote:
Wed Jul 08, 2020 09:45
  1. Just realized bots needed to be charged. I've tried out signs_bot before but don't recall them needing some form of fuel/power to run/start them. I guess you need to charge them (connect to a power grid/source) if you're using it with techage mod(?).
  2. You need to run signs_bot first (without commands/signs) before you pair it with a sensor to enable/trigger "on" on sensors.
2x Yes
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

racal
Member
Posts: 72
Joined: Tue May 26, 2020 08:49

Re: [Mod] Signs Bot [signs_bot]

by racal » Post

joe7575 wrote:
Wed Jul 08, 2020 10:22
The Signs Bot has the same Ethereal problem with the flowers as Techage. It can't work, I have to fix that first...
OK.

The dig command works well, though, as an alternative for the time being. :D

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

I fixed the flower issue. Update on GitHub

Instead of your own sign, you can also use the flower sign. Place it in front of the flower field. Image
Attachments
growlight.png
growlight.png (221.91 KiB) Viewed 3562 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

racal
Member
Posts: 72
Joined: Tue May 26, 2020 08:49

Re: [Mod] Signs Bot [signs_bot]

by racal » Post

How far can signs bots build/move -- how many mapblocks? Will they build/move on/through loaded/unloaded mapblocks?

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

It should also work in unloaded areas
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

racal
Member
Posts: 72
Joined: Tue May 26, 2020 08:49

Re: [Mod] Signs Bot [signs_bot]

by racal » Post

Couple of queries...

I'm trying to dig a 16 x 16 x 1 area (where 1 is the height of the area) using the "sign command" but the signs bot just ends up digging just half of the area. I've also tried laying blocks (same dimensions, 16 x 16 x 1) and it also ends up placing blocks almost half of the area. So, as a workaround, I just ended up running the signs bot twice, i.e. dig/lay blocks in a 16 x 8 x 1 fashion. At first I thought it was a bug then later realized the bot ends up losing power since techage mod is also installed.

Is there a way to increase the power the signs bot can hold? I'm trying to decipher which file/line to tweak to extend the signs bot power capacity. Is it this file/line?

local CYCLE_TIME = 4 in signs_bot/techage.lua

Second, I'm stumped on where to use/apply this command:

low_batt <percent>

Thanks.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

To increase the power capacity / endurance, change the line 26 in basis.lua

Code: Select all

signs_bot.MAX_CAPA = 600
But I will make it configurable.

The command low_batt <percent> is used to query the battery charge in percent. If the value falls below this, the bot switches off.

Here are the commands of a sign to dig a tunnel. The low_batt command ensures that a row is always completed and the sign is set up again.

Code: Select all

dig_sign 1
move 1
dig_left 1 0
dig_front 1 0
dig_right 1 0
dig_left 1 +1
dig_front 1 +1
dig_right 1 +1
place_sign 1
low_batt 7
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

racal
Member
Posts: 72
Joined: Tue May 26, 2020 08:49

Re: [Mod] Signs Bot [signs_bot]

by racal » Post

joe7575 wrote:
Tue Jul 21, 2020 11:58
To increase the power capacity / endurance, change the line 26 in basis.lua

Code: Select all

signs_bot.MAX_CAPA = 600
But I will make it configurable.
Got it, thanks.
joe7575 wrote:
Tue Jul 21, 2020 11:58
The command low_batt <percent> is used to query the battery charge in percent. If the value falls below this, the bot switches off.

Here are the commands of a sign to dig a tunnel. The low_batt command ensures that a row is always completed and the sign is set up again.

Code: Select all

dig_sign 1
move 1
dig_left 1 0
dig_front 1 0
dig_right 1 0
dig_left 1 +1
dig_front 1 +1
dig_right 1 +1
place_sign 1
low_batt 7
Sorry -- why did you use 7 in low_batt 7 in this case? How do you determine/estimate at what power percentage will the bot switch off? Is it: 1 action = 1 percent power usage?

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

racal wrote:
Thu Jul 23, 2020 15:05
Is it: 1 action = 1 percent power usage?
No, 1 action is one point from tha capa value
I don't remember, where the value 7 comes from, it is some kind of experience value :)
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

thomasj
New member
Posts: 6
Joined: Thu Feb 11, 2021 14:13

Re: [Mod] Signs Bot [signs_bot]

by thomasj » Post

When I want to use the Command: "rotate_item", I get an error: "Command Error"

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

thomasj wrote:
Sun May 09, 2021 12:45
When I want to use the Command: "rotate_item", I get an error: "Command Error"
Thanks for the bug report.
An update is available at GitHub and in a few hours on ContentDB.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

thomasj
New member
Posts: 6
Joined: Thu Feb 11, 2021 14:13

Re: [Mod] Signs Bot [signs_bot]

by thomasj » Post

joe7575 wrote:
Sun May 09, 2021 17:19
thomasj wrote:
Sun May 09, 2021 12:45
When I want to use the Command: "rotate_item", I get an error: "Command Error"
Thanks for the bug report.
An update is available at GitHub and in a few hours on ContentDB.
It works in my Singleplayer-World. I hope the Server-Admins will update it soon.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

New commands and signs


Image


By means of this "ready to use" signs, the bot can:

- change walking direction
- cut down trees
- sow and harvest crops (farming)
- pick flowers
- put items into and remove items from many nodes (chests, furnace, ...)
- load/unload carts (minecart)
- cook soup (xdecor)

This without any programming.

But with own signs with additional commands, the bot can:

- mining ores
- fill/empty the charcoal burner (techage)
- fill/empty the liquid filter (techage)
- make compost (compost)
- collect eggs (mobs_animal)
- start/stop/control machines (techage)
- build tunnels, houses, towers,...
Attachments
screenshot_20210919_133008.png
screenshot_20210919_133008.png (164.82 KiB) Viewed 3562 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

Diablosxm
Member
Posts: 20
Joined: Sat May 07, 2022 16:13
GitHub: Diablosxm
IRC: Diablosxm
In-game: Diablosxm
Contact:

Re: [Mod] Signs Bot [signs_bot]

by Diablosxm » Post

Hi , amazing mod really like this.
but possible to translate your tutorial video , pls and do more
thx

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

Diablosxm wrote:
Sat May 07, 2022 16:23
Hi , amazing mod really like this.
but possible to translate your tutorial video , pls and do more
thx
Thanks,
this would be a lot of work. Perhaps I can add subtitles in English...
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

Diablosxm
Member
Posts: 20
Joined: Sat May 07, 2022 16:13
GitHub: Diablosxm
IRC: Diablosxm
In-game: Diablosxm
Contact:

Re: [Mod] Signs Bot [signs_bot]

by Diablosxm » Post

Hi ,
It is amazing mod i like it . but i have a little problem with it. in my server i use both sign bot and doc mod from Wuzzy
https://content.minetest.net/packages/Wuzzy/doc/.

the server crash when i click on sign bot .
2023-03-18 12:13:05: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'doc' in callback on_playerReceiveFields(): ...minetest/minetest/bin/../builtin/common/misc_helpers.lua:480: table index is nil
2023-03-18 12:13:05: ERROR[Main]: stack traceback:
2023-03-18 12:13:05: ERROR[Main]: ...minetest/minetest/bin/../builtin/common/misc_helpers.lua:480: in function 'copy'
2023-03-18 12:13:05: ERROR[Main]: /opt/minetest/minetest/bin/../mods/doc/init.lua:824: in function 'get_sorted_entry_names'
2023-03-18 12:13:05: ERROR[Main]: /opt/minetest/minetest/bin/../mods/doc/init.lua:765: in function 'generate_entry_list'
2023-03-18 12:13:05: ERROR[Main]: /opt/minetest/minetest/bin/../mods/doc/init.lua:880: in function 'formspec_category'
2023-03-18 12:13:05: ERROR[Main]: /opt/minetest/minetest/bin/../mods/doc/init.lua:986: in function 'func'
2023-03-18 12:13:05: ERROR[Main]: ...est/minetest/bin/../builtin/profiler/instrumentation.lua:107: in function <...est/minetest/bin/../builtin/profiler/instrumentation.lua:100>
2023-03-18 12:13:05: ERROR[Main]: /opt/minetest/minetest/bin/../builtin/game/register.lua:446: in function </opt/minetest/minetest/bin/../builtin/game/register.lua:432>

br

Marc
Attachments
screenshot_20230318_123117.png
screenshot_20230318_123117.png (278.18 KiB) Viewed 1954 times

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Signs Bot [signs_bot]

by joe7575 » Post

Diablosxm wrote:
Sat Mar 18, 2023 21:36
Hi ,
It is amazing mod i like it . but i have a little problem with it. in my server i use both sign bot and doc mod from Wuzzy
Thanks for the report, should be fixed now.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests