[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Desour » Post

@Tedypig: Welcome back! Maybe it was the change of this PR: https://github.com/minetest-mods/mesecons/pull/250
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Tedypig
Member
Posts: 286
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear
Location: Largo, FL, USA

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Tedypig » Post

No, that's not it. I have only been gone since late 2017-early 2018ish and it worked then. All I know is it's annoying it doesn't work anymore. I can still harvest automatically using node breakers, but re-planting hundreds of seeds is quite a pain. My main source of income on economy servers is farming seconded by mining, I guess I will just replace all my farms with giant holes in the ground...

neoh4x0r
Member
Posts: 82
Joined: Wed Aug 29, 2018 20:16
GitHub: neoh4x0r

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by neoh4x0r » Post

DS-minetest wrote:@Tedypig: Welcome back! Maybe it was the change of this PR: https://github.com/minetest-mods/mesecons/pull/250
Tedypig wrote:No, that's not it. I have only been gone since late 2017-early 2018ish and it worked then. All I know is it's annoying it doesn't work anymore. I can still harvest automatically using node breakers, but re-planting hundreds of seeds is quite a pain. My main source of income on economy servers is farming seconded by mining, I guess I will just replace all my farms with giant holes in the ground...
Tl;DR Make sticky piston stick falling things as well (#436) probably broke it...

EDIT: a quick update, sticky pistons never call check_for_falling (after that fix)
The point is that now sticky pistons, also stick the falling item (and they don't actually fall).

Code: Select all

local function piston_off(pos, node)
-	piston_remove_pusher(pos, node)
+	piston_remove_pusher(pos, node, not pistonspec.sticky)
I'll bet it was this commit (posted 10 months ago):
Make sticky piston stick falling things as well (#436)
https://github.com/minetest-mods/meseco ... 6528b44911
Pull request:
https://github.com/minetest-mods/mesecons/pull/436

A comment from another issue (adds some validity to this):
Falling nodes don't fall if ghoststone below get activated #290
https://github.com/minetest-mods/meseco ... -381419364
@alxki commented on Apr 15, 2018
I've the same problem with pistons. If a piston pushes a sand node over an edge,
the sand node didn't fall. It's only working when the sand node is placed above the piston
and the piston retracts.
(The key part is: sand node didn't fall. It's only working when the sand node is placed above the piston
and the piston retracts
)

The commit mentioned (in #436) [which is unrelated to the comment] changed the way that falling nodes were detected:

Code: Select all

-local function piston_remove_pusher(pos, node)
+local function piston_remove_pusher(pos, node, check_falling)
-	minetest.check_for_falling(pusherpos)
+
+	if check_falling then
+		minetest.check_for_falling(pusherpos)
+	end
+end
+
+local function piston_after_dig(pos, node)
+	piston_remove_pusher(pos, node, true)
+end
The after_dig_node specification was changed to piston_after_dig (which was originally piston_remove_pusher.

I'll bet that the pistons are calling the original function: piston_remove_pusher(pos, node) and that the check_falling parameter is always false (since it doesn't pass in a value).

valah
Member
Posts: 13
Joined: Fri Dec 27, 2019 21:21
In-game: Valah
Location: Parthenay france

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by valah » Post

hi, i just get the mod and install it in a test game.
I woul'd like to know if it's possible to get a player pseudo (as a message or à variable)and write it on a lcd or use it in a var ?
I try things with object detector but it doesn't work.
and how do we know the function or syntax we can use ?
Last edited by valah on Mon Mar 23, 2020 18:04, edited 1 time in total.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Miniontoby » Post

What is an pseudo and please let on your spelling of words as at
install ir in a
I think that it has to be "it", but please let on it.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

valah
Member
Posts: 13
Joined: Fri Dec 27, 2019 21:21
In-game: Valah
Location: Parthenay france

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by valah » Post

ok i edited my message.
The "pseudo" is the player username.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Miniontoby » Post

Oh, I know (because I use it a lot) that there is a mod named digistuff (made by cheapie) where you have an digilines player detector that send an by you set message on an by you set channel.

Maybe try it.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

valah
Member
Posts: 13
Joined: Fri Dec 27, 2019 21:21
In-game: Valah
Location: Parthenay france

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by valah » Post

hi, yes i think i can use it

thanks a lot for your help

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Miniontoby » Post

No problem.

And if you want some help with the mod then please send me an PM or ring me at the #miniontoby freenode irc channel
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by PolySaken » Post

Is there a name or precedent for a 3-input logic gate with a logic expression of (val1 and val2 and not val3) or (val1 and val3 and not val2) or (val2 and val3 and not val1) where val1, val2, and val3 are inputs? I needed it for a project and thought it might be useful to add.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Miniontoby » Post

I think you can name it an XAND??
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Desour » Post

PolySaken wrote:Is there a name or precedent for a 3-input logic gate with a logic expression of (val1 and val2 and not val3) or (val1 and val3 and not val2) or (val2 and val3 and not val1) where val1, val2, and val3 are inputs? I needed it for a project and thought it might be useful to add.
Standard mesecons currently has no 3-input gates. There are just some basic normal gates.
If you need something specialized, you normally build it yourself.
There are also mods that add more gates.
If you want the circuit to be in one node, you can use eg. an fpga or a gal.
Also note that in mesecons wires act as a sort of or gate, you can for example build a big AND-gate like this:

Code: Select all

AnwnO
  w
Bnw
  w
Cnw         where w = wire, n = not gate from left to right, ABC = inputs, O = output

@Miniontoby:
XAND is normally called XNOR.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

neoh4x0r
Member
Posts: 82
Joined: Wed Aug 29, 2018 20:16
GitHub: neoh4x0r

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by neoh4x0r » Post

PolySaken wrote:Is there a name or precedent for a 3-input logic gate with a logic expression of (val1 and val2 and not val3) or (val1 and val3 and not val2) or (val2 and val3 and not val1) where val1, val2, and val3 are inputs? I needed it for a project and thought it might be useful to add.
As DS-minetest said there are only 2-input gates (in mesecons) [other mods could add more features like using the top/bottom face as inputs, outputs, etc]

The expression you mentioned:
ABC' + AB'C + A'BC


Is already in SOP form (sum of products) and is the minimal expression (it cannot be simplified any further using switching boolean algebra).
It can also be expressed as sum of min terms: SUM(3,5,6) [used in the k-map]

You can see this here:
http://www.32x8.com/sop3_____A-B-C_____ ... 5831392720

To implement this with only 2-gate and's and or's you would need two AND gates per-expression and 2 final OR gates to combine the expressions.

If you don't already have the complements (NOT A, NOT B, NOT C) as inputs:
You would need to additional connect inputs to a NOT gate before connecting them to the AND gates.

Code: Select all

A------------- NOT-------(A')
Repeat for each expression (making sure to complement inputs as needed, see above)

Code: Select all

A------------- 
              |---AND----
              |         |       
B-------------|         |---AND----(ABC')
                        |       
C'----------------------|
Combine each expression (above) using 2 or gates

Code: Select all

(ABC')-------- 
              |---OR----
              |         |       
(AB'C)--------|         |---OR----(ABC'+AB'C+A'BC)
                        |       
(A'BC)------------------|
Last edited by neoh4x0r on Sat Mar 28, 2020 10:20, edited 3 times in total.

neoh4x0r
Member
Posts: 82
Joined: Wed Aug 29, 2018 20:16
GitHub: neoh4x0r

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by neoh4x0r » Post

DS-minetest wrote: @Miniontoby:
XAND is normally called XNOR.
I think you mean NAND.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by PolySaken » Post

I ended up just making my own mod solution, but thanks anyway
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Desour » Post

neoh4x0r wrote:
DS-minetest wrote: @Miniontoby:
XAND is normally called XNOR.
I think you mean NAND.

Code: Select all

NAND:
  |A'|A
--+--+--
B'|X |X
--+--+--
B |X |

XNOR:
  |A'|A
--+--+--
B'|X |
--+--+--
B |  |X


What you would probably want from a XAND:
  |A'|A
--+--+--
B'|X |
--+--+--
B |  |X

^ This is a XNOR.
Spoiler
As you can always describe any combinational circuit in DNF (sum of products), it is possible to keep the depth at 2 (in mesecons):
  1. Build a big output wire.
  2. For each minterm:
    1. Build NOT the minterm:
      This a disjunction (ORing) of literals (input or NOT input). Just connect the inputs with NOT and DIODE gates to one big wire.
    2. NOT the NOT of the minterm, you'll get the minterm. Connect the minterm with the output wire (you don't need another DIODE as the signal comes from a NOT).
  3. ...
  4. Profit!
However, this is probably not useful as the circuit might become a bit bigger like this.
Creating a new node just for this seems a bit overacted.
You can easily program this formula into an fpga (in basic mesecons), copy the program with an fpga controller and rotate the fpga with a screwdriver.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

creepergo_kaboom
New member
Posts: 3
Joined: Wed May 06, 2020 03:37
GitHub: something
IRC: something
In-game: creepergo_kaboom

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by creepergo_kaboom » Post

if mumbo jumbo plays minetest he would be proud
(and happy☺)

creepergo_kaboom
New member
Posts: 3
Joined: Wed May 06, 2020 03:37
GitHub: something
IRC: something
In-game: creepergo_kaboom

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by creepergo_kaboom » Post

of this mod

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Miniontoby » Post

creepergo_kaboom (*please use one post*) I understand and I really like him and I am a pro at this stuff and I made my own mumbo jumbo sun.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

thomz92
Member
Posts: 34
Joined: Fri May 15, 2020 03:08

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by thomz92 » Post

I have the "Petz" mod by runs installed, but the animals don't seem to activate the pressure plates when they walk over them. Does anyone know why this would be?

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by PolySaken » Post

thomz92 wrote:
Mon May 25, 2020 10:43
I have the "Petz" mod by runs installed, but the animals don't seem to activate the pressure plates when they walk over them. Does anyone know why this would be?
The pressure plates seem to use very weird and redundant code, but from what I can tell the animals are probably too far above the pressure plate to activate it. the code specifies that an entity must be below the center of the block to activate the plate.
If petz animals are centered at a height of more than one half-block they won't be able to activate it.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by runs » Post

PolySaken wrote:
Mon May 25, 2020 12:05
thomz92 wrote:
Mon May 25, 2020 10:43
I have the "Petz" mod by runs installed, but the animals don't seem to activate the pressure plates when they walk over them. Does anyone know why this would be?
The pressure plates seem to use very weird and redundant code, but from what I can tell the animals are probably too far above the pressure plate to activate it. the code specifies that an entity must be below the center of the block to activate the plate.
If petz animals are centered at a height of more than one half-block they won't be able to activate it.
Indeed the petz have the center the gravity not centered, but low, tends to the bottom half the node. But the size maybe would be important.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by PolySaken » Post

I guess they could also be below the plate. The pressure plate code says that it has to be below the center of the plate, and above he center of the node below. (I have no idea why, jeija could have just used a radius of 1.5 for detecting entities, and then check if their x and z coords are on the plate)
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

The pressure plate code could indeed be improved, parts of the code are 8 years old. Someone could make a PR.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Linuxdirk » Post

DS-minetest wrote:
Thu May 28, 2020 22:43
The pressure plate Most of the code could indeed be improved, parts of the code are 8 years old. Someone could make a PR.
FTFY, and yes, that would be awesome. But at least the mod works as expected (most of the time)!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 9 guests