[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Hello o/
What an absolute monster of a thread... so forgive me if it has already been discussed but the search feature is not very helpful.
I ran into a mesecon issue in Minetest Extended so I posted there, and was kindly informed of the existence of this thread.
Basically, I've had heaps of fun playing with this mod and one thing leading to another, I've built a clock and two registers. However, the clock just stops from time to time because its FPGA overheats. I've added an extra delayer to my clock to slow it down, but it's kind of a bummer I have to half the frequency.
Would it help if I used standalone logic gates instead of a FPGA or will I still have intermittent faceplants down the line?
Now, to share the fun, here's the faulty clock:
And the two registers:
Thanks in advance!
What an absolute monster of a thread... so forgive me if it has already been discussed but the search feature is not very helpful.
I ran into a mesecon issue in Minetest Extended so I posted there, and was kindly informed of the existence of this thread.
Basically, I've had heaps of fun playing with this mod and one thing leading to another, I've built a clock and two registers. However, the clock just stops from time to time because its FPGA overheats. I've added an extra delayer to my clock to slow it down, but it's kind of a bummer I have to half the frequency.
Would it help if I used standalone logic gates instead of a FPGA or will I still have intermittent faceplants down the line?
Now, to share the fun, here's the faulty clock:
And the two registers:
Thanks in advance!
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Would you direct me to a circuit design for the registers or latches?
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Essentially everything in Mesecons overheats at some point if it switches too much. The idea is that rouge circuits shouldn't be able to slow down a server, so they break at too high a speed. So, I would guess that a delayer or some other way to slow it down would be your only bet. Perhaps you could chain delayers in parallel in some way so that if one is delaying, another starts delaying in a tiered way to slow down the circuit, but not so much as a single delayer would. Alternatively, you could look in the code and change the amount of time the delayer delays.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Of course! But I don't have a document or anything, I just followed Ben Eater's explanations about his breadboard 8-bit computer. You can find the first video he made about register logic here, and his D flip-flop video here.
I use 3 FPGAs for each bit:
- One for the logic needed between the bus, the load signal and the flip-flop input and output
- One for the D flip-flop
- One for the "tri state transceiver" which is just an and gate in my case (we can't have 3 states anyway), but I still used an FPGA for space management reasons.
Also added pretty lights to see what's stored from afar:
Next step would be an adder, hopefully this isn't too hard to reproduce.
I see, thanks a lot for the explanation and suggestions. I'm probably not going to touch the code, it's not that big a deal tbh. At least for now. xDv-rob wrote: ↑Wed Dec 23, 2020 05:15Essentially everything in Mesecons overheats at some point if it switches too much. The idea is that rouge circuits shouldn't be able to slow down a server, so they break at too high a speed. So, I would guess that a delayer or some other way to slow it down would be your only bet. Perhaps you could chain delayers in parallel in some way so that if one is delaying, another starts delaying in a tiered way to slow down the circuit, but not so much as a single delayer would. Alternatively, you could look in the code and change the amount of time the delayer delays.
- Desour
- Member
- Posts: 1473
- 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]
@nisaea:
There are setting for configuring the cooldown:
mesecon.overheat_max (max allowed heat),
mesecon.cooldown_time (how long it takes to cool down from max heat to 0, in seconds) and
mesecon.cooldown_granularity (defines how often the cooldown step is done, don't set this too low)
If you set the latter two high/low enough, overheats will get very unlikely or impossible: devices can only get active once every step. how long one minetest step is, is also controlled by some setting
Anyways, you might still want to keep the overheating and add some delay.
Delayers aren't the only way of delaying. Gates always have a delay of exactly two steps. One can place multiple diode gates after another and the delay in steps is always the same. Delayers on the other hand are not exact in terms of steps, which can result in signals that are only one step long, such signals can result in fast blinking in some circuits.
Btw. there still much potential to build your memory smaller, even without fpgas. ;)
There are setting for configuring the cooldown:
mesecon.overheat_max (max allowed heat),
mesecon.cooldown_time (how long it takes to cool down from max heat to 0, in seconds) and
mesecon.cooldown_granularity (defines how often the cooldown step is done, don't set this too low)
If you set the latter two high/low enough, overheats will get very unlikely or impossible: devices can only get active once every step. how long one minetest step is, is also controlled by some setting
Anyways, you might still want to keep the overheating and add some delay.
Delayers aren't the only way of delaying. Gates always have a delay of exactly two steps. One can place multiple diode gates after another and the delay in steps is always the same. Delayers on the other hand are not exact in terms of steps, which can result in signals that are only one step long, such signals can result in fast blinking in some circuits.
Btw. there still much potential to build your memory smaller, even without fpgas. ;)
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Thanks a lot, that's very helpful info!
I'm just enjoying the learnign experience and trial and error process ^^ maybe I'll check out how other people did it later.
Yeah, ik I'm probably not doign a very good job, but I'm very new to Minetest, and never played Minecraft or build a circuit irl so... even if it's not perfect I'm already pretty proud it works tbh x) (plus I'm playign on minetest extended so I don't have things like digilines or those lua thingies)DS-minetest wrote: ↑Thu Dec 24, 2020 00:17Btw. there still much potential to build your memory smaller, even without fpgas. ;)
I'm just enjoying the learnign experience and trial and error process ^^ maybe I'll check out how other people did it later.
- 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]
For more Ben eaters build check the Mesecons Computer Builds: viewtopic.php?f=12&t=24034nisaea wrote: ↑Thu Dec 24, 2020 00:36Thanks a lot, that's very helpful info!
Yeah, ik I'm probably not doign a very good job, but I'm very new to Minetest, and never played Minecraft or build a circuit irl so... even if it's not perfect I'm already pretty proud it works tbh x) (plus I'm playign on minetest extended so I don't have things like digilines or those lua thingies)DS-minetest wrote: ↑Thu Dec 24, 2020 00:17Btw. there still much potential to build your memory smaller, even without fpgas. ;)
I'm just enjoying the learnign experience and trial and error process ^^ maybe I'll check out how other people did it later.
There are prebuild machines and downloads of them
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Old Phantasy Star Online player here.
I recalled the image of a Mese Crystal when suddenly the currency "Meseta" from PSO popped into my mind. Is there a conspiracy here? They look too similar.
I recalled the image of a Mese Crystal when suddenly the currency "Meseta" from PSO popped into my mind. Is there a conspiracy here? They look too similar.
- 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]
Mese in minetest_game is based on a finnish(?) programming joke so it's somewhat plausible that PSO devs extrapolated from that, but It being a yellow diamond is too much of a coincidence. Either it's pure chance, or someone wasn't truthful about where 'mese' came from lol.
I'm betting on pure chance since the world is huge and the combination of yellow gem + 'mese' isn't weird or esoteric, just unlikely.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
If I recall, Meseta originated in Phantasy Star for the Master System. I hardly played those classic RPG's so I don't know if the Meseta shape and colour originated there.PolySaken wrote: ↑Sun Dec 27, 2020 10:36Mese in minetest_game is based on a finnish(?) programming joke so it's somewhat plausible that PSO devs extrapolated from that, but It being a yellow diamond is too much of a coincidence. Either it's pure chance, or someone wasn't truthful about where 'mese' came from lol.
I'm betting on pure chance since the world is huge and the combination of yellow gem + 'mese' isn't weird or esoteric, just unlikely.
That double pyramid shape (what is the actual name?) of the crystal is common enough. Yellow is close enough to gold so I can see why they went with that colour. PS originated in Japan so Meseta does follow their language character structure. It may have been one of those cool coincidences. Or maybe one of the Japanese devs had a Finnish (?) dev friend. Perhaps the joke was even floating around the programming world back in the late 80's.
No matter really, just a fun thing to note. :)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
I've made the Snake game on Mesecons-luacontroller. It works: see this video.
Also, I've built it on the "Crimea HiTech&magic" server, works ok. Main controller. You can edit any gameplay parameters and screen size.
Pixel controller. Each one must have it's own coordinates x1, x2, x3 and y; also edit ports to which ones you use.
Indicator. Indicates game events: apples, bombs, new levels and death. Edit ports locals to whatever you need:
Inputs. Also edit ports.
On/off switch.
LCD digiline channel is "lcd"
Also, I've built it on the "Crimea HiTech&magic" server, works ok. Main controller. You can edit any gameplay parameters and screen size.
Spoiler
Code: Select all
--SNAKE game for luacontroller in MINETEST
--gameplay constants
local apple_probability = 0.05
local bomb_probability = 0.05
local level_time = 50
local max_level = 100
local speed = 3
--screen_size
local screen_size = {12, 12}
--aliases for more readability
local X = 1
local Y = 2
if event.type == "program" then
mem.var = {
["on"] = false,
["snake"] = {},
["length"] = 3,
["level"] = 1,
["apples"] = {},
["bombs"] = {},
["blink"] = false,
["command"] = "no",
["direction"] = "right",
["dead"] = false,
["reason"] = "no",
["time"] = 0,
["interval"] = 1,
["score"] = 0,
["hiscore"] = 1000
}
digiline_send("lcd", "Snake controller ready. Hi-score: " .. mem.var.hiscore .. ".")
end
if event.type == "digiline" and event.channel == "snake_controller" then
--on/off switch
if event.msg == "on" then
mem.var.on = true
mem.var.time = 0
mem.var.level = 1
mem.var.interval = 0.5 * speed/math.sqrt(mem.var.level)
mem.var.score = 0
mem.var.snake = {{6, 5}, {5, 5}, {4, 5}, {3, 5}, {2, 5}}
mem.var.length = 5
mem.var.bombs = {}
mem.var.apples = {}
mem.var.direction = "right"
interrupt(0.21, "game_loop")
mem.var.blink = true
mem.var.dead = false
digiline_send("lcd", "GO")
--interrupt(0.3, "blink")
elseif event.msg == "off" then
mem.var.on = false
if mem.var.score > mem.var.hiscore then
mem.var.hiscore = mem.var.score
digiline_send("new_record", true)
digiline_send("indicator", "level")
end
mem.var.score = 0
digiline_send("lcd", "Snake stopped. Hi-score: " .. mem.var.hiscore .. ".")
--clear screen
digiline_send("screen", "clear")
--commands to the snake
elseif event.msg == "up" then
if mem.var.direction == "left" or mem.var.direction == "right" then
mem.var.command = "up"
end
elseif event.msg == "down" then
if mem.var.direction == "left" or mem.var.direction == "right" then
mem.var.command = "down"
end
elseif event.msg == "left" then
if mem.var.direction == "up" or mem.var.direction == "down" then
mem.var.command = "left"
end
elseif event.msg == "right" then
if mem.var.direction == "up" or mem.var.direction == "down" then
mem.var.command = "right"
end
end
end
--main game loop
if event.type == "interrupt" and mem.var.on then
if event.iid == "game_loop" and not mem.var.dead then
--aliases to simplify the code
local head = mem.var.snake[1]
local tail = {mem.var.snake[mem.var.length][X], mem.var.snake[mem.var.length][Y]}
--apply previously pressed command
if mem.var.command == "left" or mem.var.command == "right" or mem.var.command == "up" or mem.var.command == "down" then
mem.var.direction = mem.var.command
mem.var.command = "no"
end
--shift all snake except for the head
for key, value in ipairs(mem.var.snake) do
local index = mem.var.length - key + 1
if index ~= 1 then
mem.var.snake[index][X] = mem.var.snake[index - 1][X]
mem.var.snake[index][Y] = mem.var.snake[index - 1][Y]
end
end
--shift head
if mem.var.direction == "right" then
mem.var.snake[1][X] = head[X] + 1
elseif mem.var.direction == "down" then
mem.var.snake[1][Y] = head[Y] + 1
elseif mem.var.direction == "left" then
mem.var.snake[1][X] = head[X] - 1
elseif mem.var.direction == "up" then
mem.var.snake[1][Y] = head[Y] - 1
end
head = mem.var.snake[1]
--make sure the head is in iside the screen
--to make it simple, our screen is toroid
if head[X] < 1 then mem.var.snake[1][X] = screen_size[X] end
if head[Y] < 1 then mem.var.snake[1][Y] = screen_size[Y] end
if head[X] > screen_size[X] then mem.var.snake[1][X] = 1 end
if head[Y] > screen_size[Y] then mem.var.snake[1][Y] = 1 end
--check if the snake bites itself
for hkey, body in ipairs(mem.var.snake) do
if head[X] == body[X] and head[Y] == body[Y] and hkey ~= 1 then
--snake dies
mem.var.reason = "bite itself"
mem.var.dead = true
digiline_send("indicator", "bomb")
end
end
--check apples
for key, value in ipairs(mem.var.apples) do
if head[X] == value[X] and head[Y] == value[Y] then
mem.var.length = mem.var.length + 1
mem.var.snake[mem.var.length] = {}
mem.var.snake[mem.var.length][X] = tail[X]
mem.var.snake[mem.var.length][Y] = tail[Y]
table.remove(mem.var.apples, key)
mem.var.score = mem.var.score + mem.var.length * mem.var.level
digiline_send("indicator", "apple")
end
end
--check bombs
for key, value in ipairs(mem.var.bombs) do
if head[X] == value[X] and head[Y] == value[Y] then
table.remove(mem.var.snake, mem.var.length)
mem.var.length = mem.var.length - 1
table.remove(mem.var.bombs, key)
digiline_send("indicator", "bomb")
if mem.var.length < 1 then
--snake dies
mem.var.reason = "ate to many bombs"
mem.var.dead = true
end
end
end
--create new apple
if math.random() < apple_probability then
local new_apple = {math.random(1, screen_size[X]), math.random(1, screen_size[Y]), ["ok"] = true}
--check if it is inside the snake
for key, value in ipairs(mem.var.snake) do
if new_apple[X] == value[X] and new_apple[Y] == value[Y] then
new_apple["ok"] = false
end
end
--check if it is inside another apple
for key, value in ipairs(mem.var.apples) do
if new_apple[X] == value[X] and new_apple[Y] == value[Y] then
new_apple["ok"] = false
end
end
--check if it is inside a bomb
for key, value in ipairs(mem.var.bombs) do
if new_apple[X] == value[X] and new_apple[Y] == value[Y] then
new_apple["ok"] = false
end
end
if new_apple["ok"] then
table.insert(mem.var.apples, {new_apple[X], new_apple[Y]})
end
end
--create new bomb
if math.random() < bomb_probability then
local new_bomb = {math.random(1, screen_size[X]), math.random(1, screen_size[Y]), ["ok"] = true}
--check if it is inside the snake
for key, value in ipairs(mem.var.snake) do
if new_bomb[X] == value[X] and new_bomb[Y] == value[Y] then
new_bomb["ok"] = false
end
end
--check if it is inside an apple
for key, value in ipairs(mem.var.apples) do
if new_bomb[X] == value[X] and new_bomb[Y] == value[Y] then
new_bomb["ok"] = false
end
end
--check if it is inside another bomb
for key, value in ipairs(mem.var.bombs) do
if new_bomb[X] == value[X] and new_bomb[Y] == value[Y] then
new_bomb["ok"] = false
end
end
if new_bomb["ok"] then
table.insert(mem.var.bombs, {new_bomb[X], new_bomb[Y]})
end
end
--LCD monitoring
local message = "Snake"
if mem.var.dead then
digiline_send("lcd", "Snake died: " .. mem.var.reason .. ". \nScore: " .. mem.var.score .. ", \nHi-score: " .. mem.var.hiscore)
if mem.var.score > mem.var.hiscore then
mem.var.hiscore = mem.var.score
digiline_send("new_record", true)
end
mem.var.score = 0
interrupt(10, "end")
else
digiline_send("lcd", "Level: " .. mem.var.level .. ", \nLength: " .. mem.var.length .. ", \nScore: " .. mem.var.score .. ", \nHi-score: " .. mem.var.hiscore .. ".")
end
--tic tac
mem.var.time = mem.var.time + 1
if mem.var.time >= level_time then
mem.var.level = mem.var.level + 1
mem.var.time = 0
mem.var.bombs = {}
mem.var.apples = {}
mem.var.interval = 0.5 * speed/math.sqrt(mem.var.level)
mem.var.score = mem.var.score + mem.var.level
digiline_send("indicator", "level")
if mem.var.level >= max_level then
mem.var.dead = true
digiline_send("lcd", "Level " .. max_level .. ". Score: " .. mem.var.score .. " Hi-score: " .. mem.var.hiscore .. ".")
if mem.var.score > mem.var.hiscore then
mem.var.hiscore = mem.var.score
digiline_send("new_record", true)
end
mem.var.score = 0
interrupt(10, "end")
end
end
--part of blink code
--clear screen
local screen = {}
for xkey = 1, screen_size[X] do
for ykey = 1, screen_size[Y] do
screen[xkey] = {}
screen[xkey][ykey] = false
end
end
--draw snake
for key, value in ipairs(mem.var.snake) do
screen[value[X]][value[Y]] = true
end
--draw apples
for key, value in ipairs(mem.var.apples) do
screen[value[X]][value[Y]] = true
end
--draw bombs
for key, value in ipairs(mem.var.bombs) do
if mem.var.blink then
screen[value[X]][value[Y]] = true
end
end
--send info to the screen controllers
digiline_send("screen", screen)
interrupt(mem.var.interval, "blink")
-- interrupt(mem.var.interval, "game_loop")
elseif event.iid == "blink" then
--clear screen
local screen = {}
for xkey = 1, screen_size[X] do
for ykey = 1, screen_size[Y] do
screen[xkey] = {}
screen[xkey][ykey] = false
end
end
--draw snake
for key, value in ipairs(mem.var.snake) do
screen[value[X]][value[Y]] = true
end
--draw apples
for key, value in ipairs(mem.var.apples) do
screen[value[X]][value[Y]] = true
end
--send info to the screen controllers
digiline_send("screen", screen)
--repeat screen refresh
-- mem.var.blink = not mem.var.blink
interrupt(mem.var.interval, "game_loop")
-- interrupt(0.333, "blink")
elseif event.iid == "end" then
digiline_send("screen", "clear")
digiline_send("lcd", "Stopped. Pull the lever to restart. Hi-score: " .. mem.var.hiscore .. ".")
end
end
Spoiler
Code: Select all
--light controller: controls 3 pixels at once
--local constants: connecting lights with ports
--coordinates of current controller
local x1 = 1
local x2 = 2
local x3 = 3
local y = 1
--ports for it's lights
local lights = {
[x1] = "c",
[x2] = "b",
[x3] = "a"
}
--message is just a 2D table with booleans
if event.type == "digiline" then
if event.channel == "screen" and event.msg ~= "clear" then
port[lights[x1]] = event.msg[x1][y]
port[lights[x2]] = event.msg[x2][y]
port[lights[x3]] = event.msg[x3][y]
end
if event.channel == "clear" or event.msg == "clear" then
port = {["a"] = false, ["b"] = false, ["c"] = false, ["d"] = false}
end
end
Spoiler
Code: Select all
--Snake indicator
local bomb = "a"
local apple = "d"
local level = "b"
if event.type == "digiline" and event.channel == "indicator" then
if event.msg == "bomb" then
port[bomb] = true
interrupt(1.5)
elseif event.msg == "apple" then
port[apple] = true
interrupt(1.5)
elseif event.msg == "level" then
port[level] = true
interrupt(1.5)
end
end
if event.type == "interrupt" then
port.a = false
port.b = false
port.c = false
port.d = false
end
Code: Select all
--Snake inputs
--edit pin names to correct values
if event.type == "on" then
if event.pin.name == "A" then
digiline_send("snake_controller", "left")
elseif event.pin.name == "B" then
digiline_send("snake_controller", "up")
elseif event.pin.name == "C" then
digiline_send("snake_controller", "right")
elseif event.pin.name == "D" then
digiline_send("snake_controller", "down")
end
end
Spoiler
Code: Select all
--Snake switch
--edit pin name to correct value
local pin = "D"
if event.type == "on" and event.pin.name == pin then
digiline_send("snake_controller", "on")
end
if event.type == "off" and event.pin.name == pin then
digiline_send("snake_controller", "off")[/spoiler]
end
Nobody understands me... — вРН БШ ЯЙЮГЮКХ?
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Hello dear mesecons users, I run a survival server which features mesecons, and a player requested me to add a recipe so that sticky blocks can be crafted. My question is, why does the sticky block not have a recipe ?
I know they can be used to make machines that move in the air which seems fine, but I am worried that they could be used to build "lag machines", can the sticky block be used to make a machine that lags the server ?
I know they can be used to make machines that move in the air which seems fine, but I am worried that they could be used to build "lag machines", can the sticky block be used to make a machine that lags the server ?
- 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]
It can make a lag machine actualy, but yeah, I should say, ask the player how many they want and then just /give it to them, then they cant do something else.Minix wrote: ↑Sun Feb 28, 2021 18:47Hello dear mesecons users, I run a survival server which features mesecons, and a player requested me to add a recipe so that sticky blocks can be crafted. My question is, why does the sticky block not have a recipe ?
I know they can be used to make machines that move in the air which seems fine, but I am worried that they could be used to build "lag machines", can the sticky block be used to make a machine that lags the server ?
I could maybe try to make an difficult mod which will remove lag machines or things that look like lag machines, but at least they can only stick an certain amount of block i though.
but yeah mesecons in general is an lag maker.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Thanks, I will have to do some testing on a server then.
- Desour
- Member
- Posts: 1473
- 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]
Maybe I forgot it or I didn't test correctly, but I didn't know that pistons actually have a delay of only one step when turned on:
- Attachments
-
- screenshot_20210408_005953.png (60.1 KiB) Viewed 2726 times
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
Bug in mesechest init.lua starting at line 117 you are registering crafts for default:mesechest when it is just "mesechest" same for default:mesechest_locked is just "mesechest_locked"
hence the crafts don't register for the chests
Wrong thread sorry.
hence the crafts don't register for the chests
Wrong thread sorry.
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
this but didn't happen under 5.2.0 server, but now 2nd time in 3 days under 5.4.1 version
by reading the lines there I don't see any, that was the reason at other problems ... so
any idea why under 5.4.1 the version, still same from 10.04.2021 is not stable under 5.4.1 ?
added:
at 3rd time this crash I know when:
I had to types of settings: a switching station each on a mv and a hv cable, was taken off the cable when
a) a player detector went off, and via mesecon piston set off, push back
b) a button was turned off, that forced the piston to take switching station away
crash in all cases when piston pushed back, taking the switching station with, off the cable
Code: Select all
2021-06-14 18:14:48: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'technic' in callback environment_Step(): /home/thomas/.minetest/mods/mesecons/mesecons_mvps/init.lua:221: attempt to index a nil value
2021-06-14 18:14:48: ERROR[Main]: stack traceback:
2021-06-14 18:14:48: ERROR[Main]: /home/thomas/.minetest/mods/mesecons/mesecons_mvps/init.lua:221: in function 'mvps_move_objects'
2021-06-14 18:14:48: ERROR[Main]: ...thomas/.minetest/mods/mesecons/mesecons_pistons/init.lua:116: in function 'action_off'
2021-06-14 18:14:48: ERROR[Main]: /home/thomas/.minetest/mods/mesecons/mesecons/internal.lua:213: in function </home/thomas/.minetest/mods/mesecons/mesecons/internal.lua:206>
2021-06-14 18:14:48: ERROR[Main]: .../thomas/.minetest/mods/mesecons/mesecons/actionqueue.lua:93: in function 'execute'
2021-06-14 18:14:48: ERROR[Main]: .../thomas/.minetest/mods/mesecons/mesecons/actionqueue.lua:84: in function <.../thomas/.minetest/mods/mesecons/mesecons/actionqueue.lua:61>
2021-06-14 18:14:48: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:422: in function </usr/local/share/minetest/builtin/game/register.lua:406>
2021-06-14 18:14:48: ERROR[Main]: stack traceback:
any idea why under 5.4.1 the version, still same from 10.04.2021 is not stable under 5.4.1 ?
added:
at 3rd time this crash I know when:
I had to types of settings: a switching station each on a mv and a hv cable, was taken off the cable when
a) a player detector went off, and via mesecon piston set off, push back
b) a button was turned off, that forced the piston to take switching station away
crash in all cases when piston pushed back, taking the switching station with, off the cable
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
-
- Member
- Posts: 79
- Joined: Sun May 03, 2020 05:38
- GitHub: ChrysoliteAzalea
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
I'd like to ask to correct info on the site mesecons.net
It says that functions can be sent through Digilines, although it can be forbidden in the future updates. However, it's already forbidden (there is code in Mesecons that removes functions from messages).
It says that functions can be sent through Digilines, although it can be forbidden in the future updates. However, it's already forbidden (there is code in Mesecons that removes functions from messages).
cdb_JQUaRqvA1Vho
-
- Member
- Posts: 79
- Joined: Sun May 03, 2020 05:38
- GitHub: ChrysoliteAzalea
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
I also noticed that, after the Luacontroller is restarted, all functions are wiped from the mem table. I wonder, is it a security function (for example, to prevent griefers from inserting hidden malicious code into controller memory)?
cdb_JQUaRqvA1Vho
- 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]
At first to note: I am not an owner of the site.Chrysolite Azalea wrote: ↑Fri Jul 16, 2021 20:24I'd like to ask to correct info on the site mesecons.net
There is a way to get it to work.Chrysolite Azalea wrote: ↑Fri Jul 16, 2021 20:24It says that functions can be sent through Digilines, although it can be forbidden in the future updates. However, it's already forbidden (there is code in Mesecons that removes functions from messages).
If you let a lua controller send a msg via digilines. Then let an other one check the event.data or so to match that text and then execute a function.
P.s. I will edit this msg with the setup + code for this msg
-
- Member
- Posts: 79
- Joined: Sun May 03, 2020 05:38
- GitHub: ChrysoliteAzalea
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
I doubt it's a good idea to let controllers execute any code that isn't explicitly written in the controller code window, since it can let griefers inject hidden malicious code inside the system that can be very hard to detect (for example, if the attacker managed to reprogram the Luacontroller, player can find that controller and remove malicious code, but if it's passed through Digiline, it would be much harder to find out what's wrong).Miniontoby wrote: ↑Mon Jul 19, 2021 16:05At first to note: I am not an owner of the site.Chrysolite Azalea wrote: ↑Fri Jul 16, 2021 20:24I'd like to ask to correct info on the site mesecons.net
There is a way to get it to work.Chrysolite Azalea wrote: ↑Fri Jul 16, 2021 20:24It says that functions can be sent through Digilines, although it can be forbidden in the future updates. However, it's already forbidden (there is code in Mesecons that removes functions from messages).
If you let a lua controller send a msg via digilines. Then let an other one check the event.data or so to match that text and then execute a function.
P.s. I will edit this msg with the setup + code for this msg
cdb_JQUaRqvA1Vho
- 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]
Tell me: WHAT MALICIOUS CODE CAN GRIEFERS INSERT/USE???Chrysolite Azalea wrote: ↑Tue Jul 20, 2021 17:44I doubt it's a good idea to let controllers execute any code that isn't explicitly written in the controller code window, since it can let griefers inject hidden malicious code inside the system that can be very hard to detect (for example, if the attacker managed to reprogram the Luacontroller, player can find that controller and remove malicious code, but if it's passed through Digiline, it would be much harder to find out what's wrong).
Because I dont see a way how you can do bad stuff with these lua controllers..
- jwmhjwmh
- Developer
- Posts: 125
- Joined: Sun Jul 18, 2021 14:10
- GitHub: TurkeyMcMac
Question: rules function purity
(Hopefully this is the right topic for this question.)
When a function is used as the value of <node-definition>.mesecons.conductor.rules, does this function need to be pure? I have a mod where this is not completely the case. The return value of the function can change when the position of the conductor changes*. This means that the return value stays the same for a given call to turnon/turnoff, but not across all calls. Will my mod reliably work into the future? I hope it does, as I don't think there's another way to accomplish the same thing if not.
* The node finds its own position through a lookup table where keys are the combined values of param1 and param2. The conductors it connects to work similarly and also change their returned rules when its position changes.
EDIT: I have now made the conducting node immovable, although digging the node and replacing it can still reuse the same values of param1 and param2.
When a function is used as the value of <node-definition>.mesecons.conductor.rules, does this function need to be pure? I have a mod where this is not completely the case. The return value of the function can change when the position of the conductor changes*. This means that the return value stays the same for a given call to turnon/turnoff, but not across all calls. Will my mod reliably work into the future? I hope it does, as I don't think there's another way to accomplish the same thing if not.
* The node finds its own position through a lookup table where keys are the combined values of param1 and param2. The conductors it connects to work similarly and also change their returned rules when its position changes.
EDIT: I have now made the conducting node immovable, although digging the node and replacing it can still reuse the same values of param1 and param2.
- pampogokiraly
- Member
- Posts: 293
- Joined: Wed Jan 08, 2020 22:21
- In-game: i_love_mesecon
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
quick question... why is there no xnor gate? I know it is inside the fpga, but it's still weird that there is a standalone gate for every one of them except for the xnor one...
All praise the Bacon God! The one and only god in MineTest
Who is online
Users browsing this forum: No registered users and 34 guests