Just wanted to say this looks really good, I was looking for something like this about 6 months ago as my son was interested in learning a bit of simple programming.
I like that the robot UI and coding is done inside game, I did have him using the minecraft coding UI for a bit but he found the whole go out and back into the game to run program quiet distracting. This looks like a far better way to go, Ill see if I can get him interested in giving it a try.
Changed how the number values are set, to stop the scroll areas from jumping around. Now place the number item in the single slot. Also redesigned the form.
finnaly i can write overcomplicated programs in minetest without triing to check for spelling errors wich hapen all the time when im triing to code and gramarly does not work for code ...
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55
finnaly i can write overcomplicated programs in minetest without triing to check for spelling errors wich hapen all the time when im triing to code and gramarly does not work for code ...
Improved the item placement and added Use mod on_place setting, which is enabled by default. This attemps to use the mods on_place handler before doing a manual placement. Not all mods interpret the pointed_thing the same way. If nodes are not placing properly turn this off and use the place_substitute.lua file for substitutions.
Mine Shaft
Digs a mine shaft (glass is to see beneath). Place the robot in this position to start.
The first number value (currently set to 8) can be changed to the desired depth. Each level is 4 blocks high. 2 default:ladder and 1 default:torch are required for each level.
Two ladders on every level cannot be placed by the robot due to space confinement.
Remember to use persistence if the robot is going to go out of range.
Last edited by loosewheel on Fri Nov 12, 2021 15:34, edited 2 times in total.
Mine Level
Digs a level of the mine (glass is to see beneath). Place the robot in this position to start.
The first number value (currently set to 3) can be changed to the desired rings to dig. If setting to greater than 3 you'll probably have to do a lot of picking up, as the robot's storage won't be able to hold the items dug.
2021-11-14 11:16:29: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'lwscratch' in callback node_on_timer(): ...Craft/games/mesecraft/mods/ITEMS/lwscratch/robot_ops.lua:746: attempt to index local 'item' (a nil value)
2021-11-14 11:16:29: ERROR[Main]: stack traceback:
2021-11-14 11:16:29: ERROR[Main]: ...Craft/games/mesecraft/mods/ITEMS/lwscratch/robot_ops.lua:746: in function 'substitute_group'
2021-11-14 11:16:29: ERROR[Main]: ...Craft/games/mesecraft/mods/ITEMS/lwscratch/robot_ops.lua:801: in function 'robot_craft'
2021-11-14 11:16:29: ERROR[Main]: ...seCraft/games/mesecraft/mods/ITEMS/lwscratch/program.lua:1072: in function <...seCraft/games/mesecraft/mods/ITEMS/lwscratch/program.lua:1063>
2021-11-14 11:16:29: ERROR[Main]: ...seCraft/games/mesecraft/mods/ITEMS/lwscratch/program.lua:1737: in function 'run'
2021-11-14 11:16:29: ERROR[Main]: ...MeseCraft/games/mesecraft/mods/ITEMS/lwscratch/robot.lua:259: in function <...MeseCraft/games/mesecraft/mods/ITEMS/lwscratch/robot.lua:245>
2021-11-14 11:16:29: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'lwscratch' in callback node_on_timer(): ...Craft/games/mesecraft/mods/ITEMS/lwscratch/robot_ops.lua:746: attempt to index local 'item' (a nil value)
2021-11-14 11:16:29: ERROR[Main]: stack traceback:
2021-11-14 11:16:29: ERROR[Main]: ...Craft/games/mesecraft/mods/ITEMS/lwscratch/robot_ops.lua:746: in function 'substitute_group'
2021-11-14 11:16:29: ERROR[Main]: ...Craft/games/mesecraft/mods/ITEMS/lwscratch/robot_ops.lua:801: in function 'robot_craft'
2021-11-14 11:16:29: ERROR[Main]: ...seCraft/games/mesecraft/mods/ITEMS/lwscratch/program.lua:1072: in function <...seCraft/games/mesecraft/mods/ITEMS/lwscratch/program.lua:1063>
2021-11-14 11:16:29: ERROR[Main]: ...seCraft/games/mesecraft/mods/ITEMS/lwscratch/program.lua:1737: in function 'run'
2021-11-14 11:16:29: ERROR[Main]: ...MeseCraft/games/mesecraft/mods/ITEMS/lwscratch/robot.lua:259: in function <...MeseCraft/games/mesecraft/mods/ITEMS/lwscratch/robot.lua:245>
This should be fixed, but I don't know which item was being crafted when the error occurred to test it.
Improved support of param2 for placed nodes (pallet index is used as well). Nodes that use a color pallet will be removed from the robot's storage of any color, but the node placed will be the color of the node in the program sheet.
Added cassettes.
If a robot is left clicked with a cassette the robot's program is copied to the cassette. Then the cassette can be right clicked in the air and it's label can be changed, and it can be toggled read only. If read only left clicking a robot will not overwrite the cassette. Right click + sneak a robot to copy the program from the cassette to the robot. If a robot is owned by another player it cannot be copied from or to.
With update to version 0.2.0 some internal changes were made which may affect existing worlds. If you have robots and cassettes in existing worlds and want to keep them, you can do the following:
Before updating the mod, place new robots for every cassette you want to keep and copy the program from the cassette onto the robot. Leave these robots placed. Any robots in an inventory that you want keep, place them. Leave the world and update the mod. Go back into the world and copy the programs back onto the cassettes from the robots. Don't try and use or drop the cassette before this. Then the robots used to copy the program can be removed. Any robots placed out of inventories can just be dug and put back in.
If a robot's program is too large (this is in data, not commands) the program will not be remembered when its dug, and cannot be copied to a cassette. This is only likely to occur if the program sheet has inventory items that hold a lot of data. Most don't (for example, a robot with a program holds data).
│·······································
2022-01-06 22:13:44: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from│·······································
mod 'lwscratch' in callback item_OnPlace(): ...seCraft/games/mesecraft/mods/ITE│·······································
MS/lwscratch/encoder.lua:214: attempt to index local 'code' (a nil value) │·······································
2022-01-06 22:13:44: ERROR[Main]: stack traceback: │·······································
2022-01-06 22:13:44: ERROR[Main]: ...seCraft/games/mesecraft/mods/ITEMS/lw│·······································
scratch/encoder.lua:214: in function 'dencode_program' │·······································
2022-01-06 22:13:44: ERROR[Main]: ...MeseCraft/games/mesecraft/mods/ITEMS/│·······································
lwscratch/robot.lua:217: in function 'after_place_node' │·······································
2022-01-06 22:13:44: ERROR[Main]: /home/minetest/MeseCraft/builtin/game/it│·······································
em.lua:414: in function </home/minetest/MeseCraft/builtin/game/item.lua:293>
│·······································
2022-01-06 22:13:44: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from│·······································
mod 'lwscratch' in callback item_OnPlace(): ...seCraft/games/mesecraft/mods/ITE│·······································
MS/lwscratch/encoder.lua:214: attempt to index local 'code' (a nil value) │·······································
2022-01-06 22:13:44: ERROR[Main]: stack traceback: │·······································
2022-01-06 22:13:44: ERROR[Main]: ...seCraft/games/mesecraft/mods/ITEMS/lw│·······································
scratch/encoder.lua:214: in function 'dencode_program' │·······································
2022-01-06 22:13:44: ERROR[Main]: ...MeseCraft/games/mesecraft/mods/ITEMS/│·······································
lwscratch/robot.lua:217: in function 'after_place_node' │·······································
2022-01-06 22:13:44: ERROR[Main]: /home/minetest/MeseCraft/builtin/game/it│·······································
em.lua:414: in function </home/minetest/MeseCraft/builtin/game/item.lua:293>
This error appears to have occurred because the robot was in an inventory when the mod was updated to version 0.2.0. If this is not the case, if you know more about when it occurred would be a help. By the code flow 'code' shouldn't be nil, it should be a string of the encoded program. If for some reason the program wasn't stored, this should be picked up before trying to access this key. If its nil a program was detected, but its probably the old format and this key doesn't exist. If this is the case and you want to salvage the robot you would have to wind back to the mod version prior to 0.2.0 and follow the above procedure.
Can you include some kind of config file in which you are able to specify nodes that can not be dug by the robot? For instance if you are familiar with the maptools mod. There are blocks that can block the players movement called maptools:playerclip. The robot is able to dig through these. I would like to prevent this.
Can you include some kind of config file in which you are able to specify nodes that can not be dug by the robot? For instance if you are familiar with the maptools mod. There are blocks that can block the players movement called maptools:playerclip. The robot is able to dig through these. I would like to prevent this.
Are you only concerned with the nodes in the maptools mod, or an arbitrary list of nodes. A list would probably be implemented as a mod setting, comma separated list. The maptools mods uses a group 'unbreakable'. The robot can check for this group and not dig these nodes.
Due to actions by some members of the maintenance team of Minetest it appears obvious that this is not a FOSS project. ContentDB stopped updating from Github weeks ago. Continuing with the mod appears pointless as they are primarily inaccessible, and I have no interest contributing to an exclusive interest project. This mod was released under an open license so it can obviously be forked, if there is any interest to do so.
You picked a fine time to leave me loosewheel. https://www.youtube.com/watch?v=mJIn6gMlo6A j/k. This mod is brilliant. I wish that somehow these cassettes could be converted to text and shared on this forum between users and then put back on a cassette and used in game. We could come up with some really cool robot apps.