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

JoshMars
Member
Posts: 111
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

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

by JoshMars » Post

Jeija wrote:This is definitely not the right place to ask, JoshMars.
You should ask that in the IRC or in some topic in Modding General. You will propably need to iterate through a list of all players and calculate their distances to your position manually.
I was wondering for use with the microcontrollers...

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

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

by SAMIAMNOT » Post

Theres a site called mesecons.net It should have all the info you need.
I test mines.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

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

by DoyleChris » Post

Trying to figure out how to use a stick piston with a controller, to control a fuel-fired generator in Technic mode.
The generator will burn fuel all the time even when there isnt a load on it, so i want to setup a on demand setup.
I made a post in the Technic forum and Hybrid Dog said "you could try using a mesecons node detector and a piston moving en/disabling the cable connection".
I would like to try that but im not sure how to code the controller on how to detect the load of the technic system.

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

— place a node detector directing to the battery box
— press F5 and see the how the node at it's full state is called (sth like tech:lv_battery_box8)
— configure the detector to that node
— place a sticky piston directing to the cable connecting to the generator
— connect it with the detector (maybe add a not gate) and make it move the cable if the battery box is filled

l think to not waste fuel, adding a second node detector could help to avoid oscillating.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

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

by DoyleChris » Post

Is there a way to put it by the technic power switch, it shows you supply and demand.
WRight a IF/ELSE program, if demand > supply then Activate a Injector on a chest to send fuel. Then when genarator output is below 0 see if the switch still needs power if it does send another fuel.

User avatar
Samson1
Member
Posts: 95
Joined: Wed Apr 01, 2015 19:41
GitHub: MoJo4000
IRC: Samson1
In-game: Samson1

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

by Samson1 » Post

This is a very good all round mod also you can do more then you can with redstone but the thing is that redstone is much faster and had better controls. the switches are a but big and so are the buttons, and could you please make the pistons have an animation? it would make this mod so much better if you could:)

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

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

by benrob0329 » Post

The ony way that pistons could currently have an animation would be if they were entities, and that would increase bandwith and would be laggy.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

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

by DoyleChris » Post

Hybrid Dog wrote:— place a node detector directing to the battery box
— press F5 and see the how the node at it's full state is called (sth like tech:lv_battery_box8)
— configure the detector to that node
— place a sticky piston directing to the cable connecting to the generator
— connect it with the detector (maybe add a not gate) and make it move the cable if the battery box is filled

l think to not waste fuel, adding a second node detector could help to avoid oscillating.
So i created a MV Generator, Switch, Battery, Furnace.
I put the node detector on top of the battery right clicked and entered technic:mv_battery_box8
but when the battery starts droping in chatge nothing happens to the piston.

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

benrob0329 wrote:The ony way that pistons could currently have an animation would be if they were entities, and that would increase bandwith and would be laggy.
A long time ago they were objects. And the mese lamp looked like a fluorescent lamp l think.
DoyleChris wrote:So i created a MV Generator, Switch, Battery, Furnace.
I put the node detector on top of the battery right clicked and entered technic:mv_battery_box8
but when the battery starts droping in chatge nothing happens to the piston.
l thought about putting the detector next to the battery box, the red dot touches the node
Image
Attachments
screenshot_20150822_114430.png
screenshot_20150822_114430.png (382.88 KiB) Viewed 1025 times

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
hb.operandi
Member
Posts: 24
Joined: Mon Sep 14, 2015 19:47
In-game: Belle

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

by hb.operandi » Post

Does this mod have any compatibility issues with Pipeworks? Everytime I hit a switch or a lever, it disappears while playing the sound, comes back and flips green like it's on, then pop into my inventory.

Is there a config I need to change?
There is an art to flying, or rather a knack. Its knack lies in learning to throw yourself at the ground and miss. ... Clearly, it is this second part, the missing, that presents the difficulties."

my other life
http://hboperandi.blogspot.com/

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

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

by programmingchicken » Post

sounds like lag to me, turn off fancy settings.
<gamerdude> I apologize for the above content

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

programmingchicken wrote:sounds like lag to me, turn off fancy settings.
ln my opinion there's no real fancy

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

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

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

by programmingchicken » Post

ya there is, its all the amazing graphics settings that the average computer can't handle fast enough for minetest's fans' wants.
<gamerdude> I apologize for the above content

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

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

by DoyleChris » Post

Question about running a Injector. I have my Grinders and Furnaces all hooked up with pipeworks and running all of them from one chest and a injector. The problem is that if i use a Blinky light, it feeds the pipeworks with to many items and Minetest starts to delete them. So i was wondering if there was a way i can do volume control with mesecons, I tried the moremesecons with the Adjustable Blinky light but i cant get it to slow down enough and also the delayer..
Chest and injector
Chest and injector
Mesecon1.jpg (368.54 KiB) Viewed 1025 times
Grinders
Grinders
Mesecon.jpg (374.86 KiB) Viewed 1025 times

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

DoyleChris wrote:Question about running a Injector. I have my Grinders and Furnaces all hooked up with pipeworks and running all of them from one chest and a injector. The problem is that if i use a Blinky light, it feeds the pipeworks with to many items and Minetest starts to delete them. So i was wondering if there was a way i can do volume control with mesecons, I tried the moremesecons with the Adjustable Blinky light but i cant get it to slow down enough and also the delayer..
The attachment Mesecon1.jpg is no longer available
The attachment Mesecon.jpg is no longer available
this might help, you maybe want to put nodes that the water doesn't flow down
Image
Attachments
screenshot_20150904_163940.png
screenshot_20150904_163940.png (1008 KiB) Viewed 1025 times

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

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

by DoyleChris » Post

I dont know how you got water out of ny post.
The problem is the injector is feeding to many lump stacks to the grinders and furnace. Which cause a clog on the pipeworks.

bark
Member
Posts: 35
Joined: Thu Sep 24, 2015 13:25
In-game: bark

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

by bark » Post

Mods in use: [money] [mesecons]

I'm trying to accomplish something I could really use some help with. I want to sell privs to players using a luacontroller, three commandblocks and one button.
Example: "Hit this button to pay 50'000 credits and get the 'fly' priv".

My Luacontroller is connected to three commandblocks that does the following:
*port.c shows the balance of the players account.

Code: Select all

-- commandblock.c:
money @nearest

--returns the following:
"Account: <player>
Money: <amount> credits."
*port.b rejects the purchase because of insufficient funds

Code: Select all

-- commandblock.b
msg @nearest You have insufficient funds
*port.a accepts purchase

Code: Select all

--commandblock.a
money dec @nearest 50000
grant @nearest fly
To put it all together, I guess I need the luacontroller to:
1. Define "account-balance" as a value, and tell it to get it's number from port.c
2. Compare the numbers if it's equivalent to, or greater than the number

Code: Select all

-- 1. output-of-port.c = account-balance** or something **
-- 2.
if  account-balance >= 50000
	port.a = true
	else
	port.b = true
Can anyone help me achieve 1.? Or maybe I'm going about this all wrong? Any input is greatly appreciated!

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

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

by Jeija » Post

Announcement:
From now on use the RIGHT mouse button instead of the left one to toggle switches and levers and to press buttons. This change was made so that you can't accidentally toggle a switch/button/lever while digging it (or dig it while you only want to toggle it).

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

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

by rubenwardy » Post

Bug: A delayer doesn't turn on again if the input wire is triggered by a sticky piston:

Image

I'm trying to make a tick for a CPU clock.


EDIT: if you replace the delayer with a wire, it still breaks.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post


‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

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

by DoyleChris » Post

Is it possible with a tube detector to active a injector after 2 items pass by the detector.
Example detector connected to a controller then to a injector, a lump passes by the detector activates one port then a 2 goes by the same detector and trigger a second port connected to a AND gate to send the singnal to the injector.

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

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

by DoyleChris » Post

Here is a picture of what im trying to do.
Trying to get the detector to power line A on one lump pass then, line B on the second lump pass, then have a AND,OR gate or a controller trigger the Injector.
Untitled.jpg
Untitled.jpg (370.84 KiB) Viewed 1025 times

AceWill
Member
Posts: 30
Joined: Thu Oct 29, 2015 17:11

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

by AceWill » Post

DoyleChris wrote:Question about running a Injector. I have my Grinders and Furnaces all hooked up with pipeworks and running all of them from one chest and a injector. The problem is that if i use a Blinky light, it feeds the pipeworks with to many items and Minetest starts to delete them. So i was wondering if there was a way i can do volume control with mesecons, I tried the moremesecons with the Adjustable Blinky light but i cant get it to slow down enough and also the delayer..
Mesecon1.jpg
Mesecon.jpg

The closest I'be been able to get us having a single item injector for input connected to a detecting pipe on the output. It's agonizingly slow, but it does work. Every time an item passes through the pipe, the injector sends another item into the machine.

If you can't adjust the speed, adjust the number of items instead.


Alternatively, if you're up for a bit of programming, a luaController would do the job if set up correctly.

Something along the lines of "if A gets a signal, check if B is active. if B is not active, activate B. If B is active, send signal to C and deactivate B," with C connected to the injector and A connected to the detector. B doesn't really need to be connected to anything - it's just a counter. (even if it only counts to one.)

I would post the code, but I'm still a bit new to Lua.
Last edited by AceWill on Wed Nov 04, 2015 02:12, edited 2 times in total.

JoshMars
Member
Posts: 111
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

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

by JoshMars » Post

To the player detector I added support for multiple player detection. This is a badly needed feature, and as I am too lazy to do anything further to publish this, here it is:

This section was modified in the file .minetest/mods/mesecons/mesecons_detector/init.lua (github: https://github.com/Jeija/minetest-mod-m ... r/init.lua)

Code: Select all

-- returns true if player was found, false if not
local object_detector_scan = function (pos)
	local objs = minetest.get_objects_inside_radius(pos, mesecon.setting("detector_radius", 6))
	for k, obj in pairs(objs) do
		local isname = obj:get_player_name() -- "" is returned if it is not a player; "" ~= nil!
		local scanname = minetest.get_meta(pos):get_string("scanname")
		local sep = "," -- Begin code to split scaname into array
		local t={} ; i=1
		for str in string.gmatch(scanname, "([^"..sep.."]+)") do
			t[i] = str:gsub("%s+", "")
			i = i + 1
		end -- end split code
		for l = 1, i do 
			if (isname == t[l] and isname ~= "") or (isname  ~= "" and scanname == "") then -- player with scanname found or not scanname specified
				return true
			end
		end
	end
	return false
end
Last edited by JoshMars on Thu Jan 07, 2016 22:32, edited 1 time in total.

User avatar
Serh Arien
Member
Posts: 68
Joined: Tue Nov 03, 2015 19:53

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

by Serh Arien » Post

Hi everybody

I have a problem and i need your help :

I want to do an aventur maps : "Fort boyard". At the end, we need a code.

This code, i want to make it like the tv show ( on the floor)

so Is it possible to use pressure plates that we would connect to a Luacontroller which, when it will receive the energy of 3 plates (in the port a / c/ d), will give energi by the port b to the piston (only if a/c and d are right)

If you can help me, thanks to use simple word, i'm french
Attachments
image 1.png
image 1.png (466.6 KiB) Viewed 1025 times

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests