[Mod] basic_machines [basic_machines]

Post Reply
User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

[Mod] basic_machines [basic_machines]

by rnd » Post

Basic_machines is a lightweight minetest automation mod/logic/electronics building. It has little impact on server performance. Relies only on default game.

License:
Sourcecode: GPL
Textures: CC BY-SA

Dependence: default

download: https://github.com/ac-minetest/basic_machines/

WIKI: https://github.com/ac-minetest/basic_machines/wiki

Where to play:
  • Noob Academy
  • The Sea is My Life - Build and survive in a water world based on Ocean Experiment
  • Extreme Survival Minetest City - Try to build a city amid the hoards of mobs!
  • T.T.Survival Server - A lightweight Survival Server
  • Cash's World - A mobile device friendly world
----------------------------------------------------------------------------------------------------------------------------------------------

installation: copy "basic_machines" folder into your minetest /mods directory and add mod using menus (or edit /worlds/$WORLD/world.mt to include line "load_mod_basic_machines = true").

use instructions:
Craft mover (basic_machines:mover) with 6 mese crystals,2 stone, 1 wood. Set it up by punching (1. punch mover,2. punch source1, 3. punch source2, 4. punch target) to define box where to dig from and where to put.
Or set up by right click. For mover to work it needs nearby battery. Read ingame help (HELP button inside mover gui) for more info.

Craft keypad with stick and wood block. Set up by right click and enter target machine coordinate. Or setup interactively, by punch, then punch target machine.

Included machines
mover, keypad, detector, distributor, light block, recycler, grinder, battery, generator, clock generator, enviroment block, ball spawner



Examples:
factory complex powered solely by one generator, uses movers to transfer power crystals to batteries
and one detector to act as a clock for operations. It does: auto tree farming, lava stone generating, grinds stone into sand, smelts sand into glass

Image

close up of tree farm ( one mover refuels battery from generator, one mover digs trees, one mover picks up saplings & apples, one mover plants saplings, distributor forwards activation signal from detector and activates all machines )
Image

closeup of stone generator (one mover refuels battery from generator, one mover digs stone)
Image
Attachments
tree_farm.jpg
tree_farm.jpg (126.3 KiB) Viewed 3586 times
stone_generator.jpg
stone_generator.jpg (120.43 KiB) Viewed 3586 times
factory_tree_stone_sand_glass.jpg
factory_tree_stone_sand_glass.jpg (159.09 KiB) Viewed 3586 times
Last edited by rnd on Tue Nov 08, 2016 09:45, edited 23 times in total.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
programmingchicken
Member
Posts: 540
Joined: Sat Apr 18, 2015 02:20
GitHub: pchicken
IRC: chicken pchicken
Location: not here
Contact:

Re: basic_machines

by programmingchicken » Post

Is the keypad in the mod? Because your post only says movers are in the mod.
<gamerdude> I apologize for the above content

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

Mod contains mover ( very versatile machine) and keypad ( used for activation and can work like blinky plant)

Update:

mover:
-updated texture: now with orientation compass on top
updated gui: with help and better messages, radio button using internal inventory to select mode of operation

-keypad:
better messages and shows how many cycles left when operating
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

update:

-detector block can now detect nodes/players at specified location and trigger machines.It has
a customizable radius setting from 0 to 5. It has a builtin NOT mode. This is the only block with abm, its set to 5 seconds
- keypad can be set to turn machines on or off
- added light block, can be turned on or off
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

updates:
-better detector, can look inside chests to check for materials
-markers that show up when you right click machines, they timeout after 10 seconds

Screenshots
Here detector is set up to detect any player near position ( marker 1) and open door at position (marker 2)

Image

setup details
Image
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

update:
-distributor, passes input signal to up to 2 outputs. can negate signals
-ttl ( time to live ) for all signals, preventing problems like infinite recursion

Distributor setup (2 lights as output), input is keypad
Image

Distributor passing signal from keypad onto 2 lights
Image
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

Use of mover as teleporter ( from "Sea is my life" ocean server)
Only admin can set up long range teleporters/machines ( range > 5 )

Image

Exchange shop made only with basic_machines
Mover picking up 2 minegeld and putting it in shop storage chest is highlighted.
5 extra parts ( detector, 2 movers, 1 fuel chest, distributor) could be hidden away somewhere in 10 radius

Image
Attachments
mover_as_shop.jpg
mover_as_shop.jpg (86.21 KiB) Viewed 3586 times
mover_as_teleport.jpg
mover_as_teleport.jpg (71.97 KiB) Viewed 3586 times
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: basic_machines

by Fixer » Post

Please add something like this http://hgrm.sndimg.com/HGRM/2011/07/26/ ... 3x4_lg.jpg and even this http://blomandblom.com/wp-content/uploa ... 08x513.jpg as switches, that detectors will use as input, could be cool.

Also, ability to detect mobs by detector would be very handy! I got some very nice ideas about them :D

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: basic_machines

by Fixer » Post

Also, I found a bug with two doors near each other (symmetrical) and two detectors, one door will turn correctly if used by detector or opened by hand, but another door on open by hand will rotate 180 deg and start turning spontaneously under detector control.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

added toggle mode (2) for keypads - punching keypad turns it on/off
ability for mover to pick up items and put in chest ( like sand tube in pipeworks). Now you can finally do proper tree farms that pick up saplings automatically.

I would add detect mobs by detector but i dont see yet how to distinguish mobs from items lying around, they are both lua entities as in local lua_entity = obj:get_luaentity() ...

about bug: how does detector open door? if detector is activated if will activate target machine ( maybe target and source were same?) not sure what you mean
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: basic_machines

by Fixer » Post

I would add detect mobs by detector but i dont see yet how to distinguish mobs from items lying around,
Just add "Mob/objects" that will detect mobs and other lua entities.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

added:
- mover can dig blocks and return proper drops ( wheat plant drops seeds and wheat...)
- mover can exchange items between chests and blocks with inventory ( like furnaces, shops, ...)
- detector can detect mobs or objects lying on ground
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: basic_machines

by maikerumine » Post

Recycler may be broken.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: basic_machines

by Fixer » Post

And please add more explanation into HELP buttons. And update your first post.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

added
- recycler: basically inverts crafting with a small loss of ingredients
- power outlet: power mover using free available power from nearby technic electric network
- several modifications of gui and functionality of machines (mover can move items between node inventories, ...)
for more info see first post and wiki
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
kaadmy
Member
Posts: 706
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

Re: basic_machines

by kaadmy » Post

rnd wrote:added
- recycler: basically inverts crafting with a small loss of ingredients
[...]
Finally! I have been waiting for that soo long :)
Never paint white stripes on roads near Zebra crossings.

Pixture

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: basic_machines

by Fixer » Post

New problem with farming, maike changed default farming to farming by TenPlus1 on ESM City, and my machines are not working correctly with them for some reason, can you look at it? (seeds are not growing anymore)

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: basic_machines

by Fixer » Post


User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: basic_machines

by maikerumine » Post

Grinder code is not in master. I had to comment out line 7 of init.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

updates (added screenshots to first post):

new machines: grinder, battery, generator
updated: mover, detector, distributor, recycler, lights
external machines: standard furnace ( unmodified code) can now be powered by battery with accelerated smelting speed ( 2x speed boost)

most machines can be upgraded ( expensive ) to enhance abilities, use less energy, add more range, ...
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: basic_machines

by maikerumine » Post

rnd wrote:updates (added screenshots to first post):

new machines: grinder, battery, generator
updated: mover, detector, distributor, recycler, lights
external machines: standard furnace ( unmodified code) can now be powered by battery with accelerated smelting speed ( 2x speed boost)

most machines can be upgraded ( expensive ) to enhance abilities, use less energy, add more range, ...
+9*10^1000
THANK YOU for all the hard work you put into your mod, it is a server mist have for sure!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

performance update:

new machine: clock generator ( only active machine that works in background, expensive)
detector: no longer background active, must be activated, burn-out against too fast activation protection
keypad: can no longer be activated by signal, burn-out against too fast activation protection
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

CWz
Member
Posts: 197
Joined: Tue Dec 24, 2013 17:01
GitHub: chaoswormz
IRC: CWz
In-game: CWz
Location: Banana Land

Re: basic_machines

by CWz » Post

Code: Select all

2016-04-24 14:43:53: ERROR[Main]: ServerError: Runtime error from mod '' in callback environment_Step(): ...s/tt_survival/worldmods/basic_machines/technic_power.lua:157: attempt to call upvalue 'machines_activate_furnace' (a nil value)
2016-04-24 14:43:53: ERROR[Main]: stack traceback:
2016-04-24 14:43:53: ERROR[Main]:       ...s/tt_survival/worldmods/basic_machines/technic_power.lua:157: in function 'action_on'
2016-04-24 14:43:53: ERROR[Main]:       ...wz/worlds/tt_survival/worldmods/basic_machines/mover.lua:728: in function 'use_keypad'
2016-04-24 14:43:53: ERROR[Main]:       ...wz/worlds/tt_survival/worldmods/basic_machines/mover.lua:694: in function 'func'
2016-04-24 14:43:53: ERROR[Main]:       /home/cwz/minetest2/bin/../builtin/game/misc.lua:34: in function </home/cwz/minetest2/bin/../builtin/game/misc.lua:11>
2016-04-24 14:43:53: ERROR[Main]:       /home/cwz/minetest2/bin/../builtin/game/register.lua:369: in function </home/cwz/minetest2/bin/../builtin/game/register.lua:349>
the battery + keypad + furnace combo causes this crash.

EDIT: heh seems i the issue is an unupdated minetest game. so just updated furnace.lua and now everything works
Last edited by CWz on Sun Apr 24, 2016 19:11, edited 1 time in total.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

problem is outdated furnace code used on server, its missing
"on_metadata_inventory_put" for node "default:furnace", hence the error caused by

Code: Select all

local machines_activate_furnace = minetest.registered_nodes["default:furnace"].on_metadata_inventory_put; -- this function will activate furnace
This is present in current 0.4.13dev. Added patch checks for presence, if not there furnaces wont auto start.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: basic_machines

by rnd » Post

updated:
- wiki https://github.com/ac-minetest/basic_machines/wiki

keypad: can now work as a keyboard or text writer/setting changer device
enviroment block: can change physics settings & skybox for nearby players
ball_spawner: spawn an energy ball that can activate stuff and bounce around when moved with https://github.com/ac-minetest/basic_ma ... wiki/mover mover
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests