[Mod] Circuits - Mesecons alternative [circuits]

User avatar
qwertymine3
Member
 
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

[Mod] Circuits - Mesecons alternative [circuits]

by qwertymine3 » Tue Feb 28, 2017 21:49

An alternative circuitry mod to mesecons.

I am looking for constructive feedback on what should be added to or changed in this mod.
Please keep in mind the style of this mod - I am not looking to re-make mesecons with lua-controllers and logic gates as basic nodes - logic should be build from primative nodes. Also please check planned features before suggesting something that I'm planning.
Image
Planned addtions/changes
* Move some nodes out of this mod into seperate sub-mods
* Some kind of node for precision in tick timing?
* Add pistons (please suggest other world interaction nodes)
* Force-load circuits?

Basic info for use
There are 12 ticks per second.
Inverters invert the incoming signal with a 1 tick delay (like minecraft redstone torches).
Coloured wire only connects to wire of the same colour - the mese coloured wire connects to all colours.
Buttons are powered for 1 second - the number of ticks is not guarenteed.

Additional use instructions
Nodes are only availiable in creative mode.
The wrench must be used to rotate nodes, as the screwdriver doesn't update the nodes.
DO NOT use the wrench on chests - all items will be lost.
Circuits are not forceloaded - make sure no circuits are running when you leave an area.
Wire networks are limited to 50 nodes (including things connected to the wire).

Downloads
https://github.com/Qwertymine/circuits/archive/master.zip
Github Page
https://github.com/Qwertymine/circuits

Depends
Must be added to the 'trusted mods list' in settings - as this mod requires bitops.
Default (textures)
Luajit (Bitops)

License
This is licensed under the MIT license
+ License
Last edited by qwertymine3 on Wed Mar 01, 2017 15:47, edited 2 times in total.
Avatar by :devnko-ennekappao:
 

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] Circuits - Mesecons alternative [circuits]

by octacian » Wed Mar 01, 2017 06:35

This honestly looks pretty cool! Will likely also help with the development of my mod, MicroExpansion, as XtremeHacker and I are currently at loss as to how to implement the technic-like power cables. And wow, it takes a long time to read enough to figure it out; neither one of us are done yet xD

One suggestion: please don't divide this mod into a modpack. If you want to allow for enabling or disabling certain portions, at least do something like I did for MicroExpansion and digicompute with a module system built right into the mod.

Why: using a modpack clutters /mods and everything else related and also prevents this mod from being included in another modpack.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

User avatar
cx384
Member
 
Posts: 492
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Circuits - Mesecons alternative [circuits]

by cx384 » Wed Mar 01, 2017 11:15

Code: Select all
2017-03-01 12:08:10: ACTION[Server]: singleplayer places node circuits:button_on at (346,20,-3)
2017-03-01 12:08:14: ACTION[Server]: singleplayer digs circuits:button_on at (346,20,-3)
2017-03-01 12:08:14: WARNING[Server]: Undeclared global variable "bit" accessed at /.../.minetest/mods/circuits/connection.lua:249
2017-03-01 12:08:14: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'circuits' in callback node_on_dig(): Runtime error from mod 'circuits' in callback node_on_destruct(): /.../.minetest/mods/circuits/connection.lua:249: attempt to index global 'bi
2017-03-01 12:08:14: ERROR[Main]: ' (a nil value)
2017-03-01 12:08:14: ERROR[Main]: stack traceback:
2017-03-01 12:08:14: ERROR[Main]:    /.../mods/circuits/connection.lua:249: in function 'get_connected_in_dir'
2017-03-01 12:08:14: ERROR[Main]:    /.../.minetest/mods/circuits/connection.lua:295: in function 'get_all_connected'
2017-03-01 12:08:14: ERROR[Main]:    /.../.minetest/mods/circuits/connection.lua:216: in function 'disconnect_all'
2017-03-01 12:08:14: ERROR[Main]:    /.../.minetest/mods/circuits/util.lua:92: in function </.../.minetest/mods/circuits/util.lua:90>
Can your read this?
 

User avatar
rubenwardy
Moderator
 
Posts: 5544
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Circuits - Mesecons alternative [circuits]

by rubenwardy » Wed Mar 01, 2017 15:19

Please do use separate mods for nonessential items such as lua controllers, as it makes dependencies nicer, and means the user can enable and disable without using settings. The ui problem of /mods is a ui problem of /mods, and shouldn't get in the way of making dependencies cleaner and modular
 

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] Circuits - Mesecons alternative [circuits]

by octacian » Wed Mar 01, 2017 15:33

rubenwardy wrote:Please do use separate mods for nonessential items such as lua controllers, as it makes dependencies nicer, and means the user can enable and disable without using settings. The ui problem of /mods is a ui problem of /mods, and shouldn't get in the way of making dependencies cleaner and modular


Yes, but again, what if someone wanted to put this in a modpack? Well, not happening. It's already a modpack. I've had to fight with mesecons over that before. At one point I remember actually going and moving it to one mod for something I was doing. And wow, I really don't wanna do it again.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

User avatar
qwertymine3
Member
 
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Circuits - Mesecons alternative [circuits]

by qwertymine3 » Wed Mar 01, 2017 15:41

cx384 wrote:
Code: Select all
2017-03-01 12:08:10: ACTION[Server]: singleplayer places node circuits:button_on at (346,20,-3)
2017-03-01 12:08:14: ACTION[Server]: singleplayer digs circuits:button_on at (346,20,-3)
2017-03-01 12:08:14: WARNING[Server]: Undeclared global variable "bit" accessed at /.../.minetest/mods/circuits/connection.lua:249
2017-03-01 12:08:14: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'circuits' in callback node_on_dig(): Runtime error from mod 'circuits' in callback node_on_destruct(): /.../.minetest/mods/circuits/connection.lua:249: attempt to index global 'bi
2017-03-01 12:08:14: ERROR[Main]: ' (a nil value)
2017-03-01 12:08:14: ERROR[Main]: stack traceback:
2017-03-01 12:08:14: ERROR[Main]:    /.../mods/circuits/connection.lua:249: in function 'get_connected_in_dir'
2017-03-01 12:08:14: ERROR[Main]:    /.../.minetest/mods/circuits/connection.lua:295: in function 'get_all_connected'
2017-03-01 12:08:14: ERROR[Main]:    /.../.minetest/mods/circuits/connection.lua:216: in function 'disconnect_all'
2017-03-01 12:08:14: ERROR[Main]:    /.../.minetest/mods/circuits/util.lua:92: in function </.../.minetest/mods/circuits/util.lua:90>

Thank you for actually trying the mod.
This mod requires bitops (Luajit) (Which is not in the secure environment for some reason).
I had turned off mod security a while ago, as it was breaking some old mods - and forgot to turn it back on.

I updated this now to correctly load this in the secure environment - but this mod needs to be added to the 'trusted mods' list in settings to work.
Avatar by :devnko-ennekappao:
 

User avatar
cx384
Member
 
Posts: 492
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Circuits - Mesecons alternative [circuits]

by cx384 » Wed Mar 01, 2017 16:56

qwertymine3 wrote:Thank you for actually trying the mod.
This mod requires bitops (Luajit) (Which is not in the secure environment for some reason).
I had turned off mod security a while ago, as it was breaking some old mods - and forgot to turn it back on.

I updated this now to correctly load this in the secure environment - but this mod needs to be added to the 'trusted mods' list in settings to work.


Thank you for the information.
Nice mod, I have already build my first clock with 7 cables and one inverter.(but it was laggy like mesecons)
I think this mod will be a great addition/alternative for mesecons.
qwertymine3 wrote:please suggest other world interaction nodes

– node breaker/digger,placer
– node detector ( should also detect meta data, light level, rotation... )
– object scanner
– mesecon signal detector
– sound player ( which can play any existing sound in minetest )
– right,left clicker ( which can click any craftitem/node/tool on a target for a specific time ( I don't know if this is possible ))
Can your read this?
 

User avatar
texmex
Member
 
Posts: 1062
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Circuits - Mesecons alternative [circuits]

by texmex » Mon Mar 06, 2017 13:58

Hey qwerty! I've tried this mod out but lightly since I'm not that good with logic functions. But it works quite well with what is is right now. The usecase for my players would be block manipulation (pistons, crafters, diggers etc) and lights (solar panels etc). Door and trapdoor triggers would also be great.

Some thoughts:
  • I like that the wire is thick, thus that it not looks strange standing on its own in mid air.
  • I like that all components are made up of existing textures. Though I guess it's the result of rapid development I think you should keep them like that. They look good and they immediately feel at home in the MT universe.
  • The buttons could be developed further. In creative they're hard to toggle without also digging them. It'd be useful if their placement was similar to the pressure plate, so that you could place another block in between the button and the wire. Doing so would enable embedding buttons in walls and such.
  • Personally I'd like for the power in the circuits to not come from the supposed infinite powers of mese but from a finite power source such as a steam engine or similar. One could imagine an opt-in option called "circuites_require_powersource".

I really want this to be something different from mesecons, a fresh start. Please don't delve into code-like formspecs but keep it simple with basic in-world components. :)
 

User avatar
texmex
Member
 
Posts: 1062
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Circuits - Mesecons alternative [circuits]

by texmex » Tue Mar 28, 2017 13:02

Is there anything us players can do to help with further development of this mod?
 

User avatar
bigfoot
Member
 
Posts: 203
Joined: Fri Sep 02, 2016 23:31
Location: Somewhere between polar bears and penguins.
GitHub: bigfoot547
IRC: bigfoot547 or bigfoot
In-game: bigfoot547 or bigfoot

Re: [Mod] Circuits - Mesecons alternative [circuits]

by bigfoot » Tue Mar 28, 2017 15:52

texmex wrote:Is there anything us players can do to help with further development of this mod?

Make a PR? I'd help ;).
God's not dead, He's surely alive!
My Stuff | My User Page | Check out my website!
<bigfoot547> I major in existing. | <RedPanda246> Not every day is good, but there is good in every day.
Stay elusive ⓐⓝⓓ ⓣⓐⓛⓚ ⓘⓝ ⓒⓘⓡⓒⓛⓔⓢ!
 

User avatar
texmex
Member
 
Posts: 1062
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Circuits - Mesecons alternative [circuits]

by texmex » Tue Mar 28, 2017 17:01

bigfoot547 wrote:
texmex wrote:Is there anything us players can do to help with further development of this mod?

Make a PR? I'd help ;).

Players aren't usually skilled in coding, if you hadn't noticed. xD
 

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

Re: [Mod] Circuits - Mesecons alternative [circuits]

by Fixer » Tue Mar 28, 2017 23:40

More alternatives - the better. I hope t does not lag that much, hope...
 

User avatar
DS-minetest
Member
 
Posts: 1025
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Circuits - Mesecons alternative [circuits]

by DS-minetest » Wed Mar 29, 2017 13:37

texmex wrote:
bigfoot547 wrote:
texmex wrote:Is there anything us players can do to help with further development of this mod?

Make a PR? I'd help ;).

Players aren't usually skilled in coding, if you hadn't noticed. xD

You can not only make PRs for code but also for styling things like textures, nodeboxes, models, sounds, documentation and co.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
texmex
Member
 
Posts: 1062
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Circuits - Mesecons alternative [circuits]

by texmex » Thu Mar 30, 2017 08:11

That's true. I do those kind of PRs already, but with this project I'm not sure what the author see as the next step (if there is a next step).
 

User avatar
qwertymine3
Member
 
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Circuits - Mesecons alternative [circuits]

by qwertymine3 » Mon Apr 03, 2017 12:51

texmex wrote:Is there anything us players can do to help with further development of this mod?


Do my coursework for me ;).
I've been quite busy recently - and in what spare time I've had, I've been taking a break from minetest modding.

That said, over easter I will have a lot of free time, so I should be able to get a good amount of work done on this mod.

texmex wrote:I'm not sure what the author see as the next step (if there is a next step).

The next step for this mod is world interaction - namely pistons (but I'm also considering other interaction nodes).

I have a reasonable plan for how to impliment them - however I do not know what the precise behaviour should be.
Here are a few questions that you could help me with:
1. What nodes should a piston be able to push? Is it worth trying to restict the nodes that can be pushed as some mods have issues if nodes are pushed?
2. What should happen if a door is pushed with a node at each face? The naive approach would have the node on the top of the door not move - and to fix this I would need to override some mtg nodes?
3. What should happen to entities (both on the pushed nodes and infront)?
4. What should happen to wall mounted nodes on pushed nodes? The naive approach would not move the wallmounted node - but checking for them would make the code much more expensive?
5. What should happen to pushed pistons? Extended and retracted? Sticky and non-sticky?
6. What should happen to pushed nodes which will power something in the next tick? Should their update be moved to their new position - or should it be invalidated? What would be more useful?
7. Should I try to define the update order of pistons - currently they would update in order of distance from the power source, but this is not guarenteed?

I'm also thinking about more wire primatives - levers and some form of wire which can go through walls.
I am not sure how to design the lever node box/mesh, and would happly accept pr's for this - if you have any non-lever ideas for a toggleable input - I would also be happy to look at them.

I am not sure how the 'through wire' work - but unless someone has a fantastic idea on how to do them - I'll leave discussing this until a later date.


You can also help by finding bugs and play-testing it.
IDK what happens if a wire is triggered which goes over into un-loaded areas. I'm pretty certain that it just updates the loaded wire - but it may also crash.
Also I have put a 50 node restriction on the size of a network (wires and all things attached to it), is this a good idea - or should I remove it?
Avatar by :devnko-ennekappao:
 

User avatar
qwertymine3
Member
 
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Circuits - Mesecons alternative [circuits]

by qwertymine3 » Mon Apr 03, 2017 12:53

texmex wrote:That's true. I do those kind of PRs already, but with this project I'm not sure what the author see as the next step (if there is a next step).

Also if you are willing to be dissapointed - I may be willing to privately share some more exotic and unlikely future ideas with you - but this should really wait for the main mod to be finished.
Avatar by :devnko-ennekappao:
 

User avatar
qwertymine3
Member
 
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Circuits - Mesecons alternative [circuits]

by qwertymine3 » Mon Apr 03, 2017 12:59

bigfoot547 wrote:
texmex wrote:Is there anything us players can do to help with further development of this mod?

Make a PR? I'd help ;).

Thanks for offering your help - I don't think that this mod is quite ready for PRs yet though.

The internal API is not stable, and will be refactored as I continue to work on this.
That said - if you could look at the code and suggest what would make the internal APIs easier to work with (mainly for adding nodes).
Also I have some ideas on how I want to re-design the internal API, which it owuld be nice to discuss with someone.
Avatar by :devnko-ennekappao:
 

User avatar
qwertymine3
Member
 
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Circuits - Mesecons alternative [circuits]

by qwertymine3 » Mon Apr 03, 2017 13:03

Fixerol wrote:More alternatives - the better. I hope t does not lag that much, hope...

I will have to dissapoint you - the visual lag caused by both this and mesecons is due how the minetest engine handles mesh updates.
In terms of server lag, mesecons has had years to optimise their code - while I haven't - so this mod would be the one found wanting.

That said - if the re-coloured node variants in 0.4.16 dev allow for the mesh update to be skipped - I may be able to fix the lag, if you know please tell me.
Avatar by :devnko-ennekappao:
 

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

Re: [Mod] Circuits - Mesecons alternative [circuits]

by Fixer » Wed Apr 05, 2017 19:39

Visual lag can be mitigated by "mesh_generation_interval" in minetest.conf for 0.4.15-dev+
 

User avatar
RSLRedstonier
Member
 
Posts: 449
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [Mod] Circuits - Mesecons alternative [circuits]

by RSLRedstonier » Thu Dec 28, 2017 18:53

octacian wrote:
rubenwardy wrote:Please do use separate mods for nonessential items such as lua controllers, as it makes dependencies nicer, and means the user can enable and disable without using settings. The ui problem of /mods is a ui problem of /mods, and shouldn't get in the way of making dependencies cleaner and modular


Yes, but again, what if someone wanted to put this in a modpack? Well, not happening. It's already a modpack. I've had to fight with mesecons over that before. At one point I remember actually going and moving it to one mod for something I was doing. And wow, I really don't wanna do it again.


you might not know this but you can actually nestle mod packs in side of other mod packs which is what I'm doing for my skyfactory mod pack/subgame which is basically a mod pack of modded mod packs inside other modded mod packs which allows for billions of items and about 400 mb in total storage
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 

User avatar
RSLRedstonier
Member
 
Posts: 449
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [Mod] Circuits - Mesecons alternative [circuits]

by RSLRedstonier » Thu Dec 28, 2017 18:57

cx384 wrote:– right,left clicker ( which can click any craftitem/node/tool on a target for a specific time ( I don't know if this is possible ))


this actually is possible as the mesecons node breaker can left click any item to use its left click function not just break the block and the deployer will right click any item or block.
I know the point of this mod is to provide an alternative to mesecons I'm just pointing out that it is in theory possible to have a block that could right click or left click any item placed into it like Minecraft's autonomous activator mod
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: [Mod] Circuits - Mesecons alternative [circuits]

by Sires » Tue Jan 02, 2018 18:58

I would like to see "animated piston heads" just like the ones in minecr***, even if it's an optional thing because it may lag in lots of blocks(maybe ya could put some limits as 10 or 15 blocks). I would help if you plan adding this
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: [Mod] Circuits - Mesecons alternative [circuits]

by Sires » Tue Jan 02, 2018 19:15

Here comes my "world interaction nodes suggestions":
->Mover, it's a non-solid node that just moves one block forward to where it's pointing any entities inside it when powered
->Thrower, it's like the mover but when powered by different wire colors it throws the entities in different amount of blocks, example: Green wire throws the entities in 5 blocks, Blue/Purple throws in 7, Light Blue/Light Purple throws in 6 etc..
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

User avatar
RSLRedstonier
Member
 
Posts: 449
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [Mod] Circuits - Mesecons alternative [circuits]

by RSLRedstonier » Tue Jan 02, 2018 19:19

Sires wrote:minecr***

why does every body bleep out part of the name Minecraft?
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: [Mod] Circuits - Mesecons alternative [circuits]

by Sires » Tue Jan 02, 2018 20:06

RSLRedstonier wrote:
Sires wrote:minecr***

why does every body bleep out part of the name Minecraft?

Because:
Shhhh! It's a badword!! No swearing plz

:P
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: Exabot [Bot], Teslov and 3 guests