ABM works unstable/incorrect
ABM works unstable/incorrect
A lot of people already talked about this but no one dared to write
abm works unstable/incorrect, ive checked at servers with 30 players and 5 players, without lags, the same. It works wrong (at single it works)
Instead 5 sec of signal - we have 10, 15 or even 30 seconds (by random)
Any idea how to fix it?
abm works unstable/incorrect, ive checked at servers with 30 players and 5 players, without lags, the same. It works wrong (at single it works)
Instead 5 sec of signal - we have 10, 15 or even 30 seconds (by random)
Any idea how to fix it?
Re: ABM works unstable/incorrect
Here you read about abmfirefox wrote:and what abm is that?
- Pyrollo
- Developer
- Posts: 385
- Joined: Mon Jan 08, 2018 15:14
- GitHub: pyrollo
- In-game: Naj
- Location: Paris
Re: ABM works unstable/incorrect
Yes but can you give the definition of your ABM ? Usually it works.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
Re: ABM works unstable/incorrect
Im here to report about problem, isn't about giving definition to you.Pyrollo wrote:Yes but can you give the definition of your ABM ? Usually it works.
Re: ABM works unstable/incorrect
so you did. and what shall we do now?bosapara wrote:Im here to report about problem, isn't about giving definition to you.Pyrollo wrote:Yes but can you give the definition of your ABM ? Usually it works.
abms work fine in singleplayer and multiplayer, no problems detected.
so it have something to do with the specific abm you are using.
so which abm is it exactly? we need the code.
✨🏳️🌈♣️✨
Re: ABM works unstable/incorrect
firefox wrote:so you did. and what shall we do now?bosapara wrote:Im here to report about problem, isn't about giving definition to you.Pyrollo wrote:Yes but can you give the definition of your ABM ? Usually it works.
abms work fine in singleplayer and multiplayer, no problems detected.
so it have something to do with the specific abm you are using.
so which abm is it exactly? we need the code.
Code doesnt metter. Works wrong even default lava + water.
Delay that happens by random 'crash' all idea of ABM.
Re: ABM works unstable/incorrect
my minetest runs at 30fps
flooding a mountain with lava and water dropped it to 22fps, which was to be expected.
yet the lavacooling worked correctly and there was no significant delay or changes in the flowing speed of liquids.
i cannot reproduce the problem. which version of minetest are you using?
also, did you activate any external mods?
flooding a mountain with lava and water dropped it to 22fps, which was to be expected.
yet the lavacooling worked correctly and there was no significant delay or changes in the flowing speed of liquids.
i cannot reproduce the problem. which version of minetest are you using?
also, did you activate any external mods?
✨🏳️🌈♣️✨
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: ABM works unstable/incorrect
I need a test case so I can try and reproduce this (and also make sure there's no silly mistakes being made)
Lava and water flow isn't an ABM
Lava and water flow isn't an ABM
- Pyrollo
- Developer
- Posts: 385
- Joined: Mon Jan 08, 2018 15:14
- GitHub: pyrollo
- In-game: Naj
- Location: Paris
Re: ABM works unstable/incorrect
I was here to try to help you. Forget it.bosapara wrote:Im here to report about problem, isn't about giving definition to you.Pyrollo wrote:Yes but can you give the definition of your ABM ? Usually it works.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: ABM works unstable/incorrect
Lock the thread and redirect this to the Github issues, where bug reporting belongs.
Re: ABM works unstable/incorrect
Easy way to proof my report - visit 'jozet.duckdns.org:30000' and check lava+water or clockgen from basic_machines mod (it give 1 signal at 5 seconds and can activate something)rubenwardy wrote:I need a test case so I can try and reproduce this (and also make sure there's no silly mistakes being made)
Lava and water flow isn't an ABM
About stone and water. I mean stone generator with lava and water
\games\minetest_game\mods\default\functions.lua
Code: Select all
default.cool_lava = function(pos, node)
if node.name == "default:lava_source" then
minetest.set_node(pos, {name = "default:obsidian"})
else -- Lava flowing
minetest.set_node(pos, {name = "default:stone"})
end
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.25})
end
if minetest.settings:get_bool("enable_lavacooling") ~= false then
minetest.register_abm({
label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"},
neighbors = {"group:cools_lava", "group:water"},
interval = 1,
chance = 2,
catch_up = false,
action = default.cool_lava,
})
end
- Hume2
- Member
- Posts: 710
- Joined: Tue Jun 19, 2018 08:24
- GitHub: Hume2
- In-game: Hume2
- Location: Czech Republic
Re: ABM works unstable/incorrect
It's because of the chance = 2. It means that it will be run each second only in 50% chance.bosapara wrote:rubenwardy wrote:Code: Select all
default.cool_lava = function(pos, node) if node.name == "default:lava_source" then minetest.set_node(pos, {name = "default:obsidian"}) else -- Lava flowing minetest.set_node(pos, {name = "default:stone"}) end minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25}) end if minetest.settings:get_bool("enable_lavacooling") ~= false then minetest.register_abm({ label = "Lava cooling", nodenames = {"default:lava_source", "default:lava_flowing"}, neighbors = {"group:cools_lava", "group:water"}, interval = 1, chance = 2, catch_up = false, action = default.cool_lava, }) end
If you lack the reality, go on a trip or find a job.
Re: ABM works unstable/incorrect
Its clear. In result we have isnt 1-2 sec, from 1 to 5, or even moreHume2 wrote:It's because of the chance = 2. It means that it will be run each second only in 50% chance.bosapara wrote:rubenwardy wrote:Code: Select all
default.cool_lava = function(pos, node) if node.name == "default:lava_source" then minetest.set_node(pos, {name = "default:obsidian"}) else -- Lava flowing minetest.set_node(pos, {name = "default:stone"}) end minetest.sound_play("default_cool_lava", {pos = pos, max_hear_distance = 16, gain = 0.25}) end if minetest.settings:get_bool("enable_lavacooling") ~= false then minetest.register_abm({ label = "Lava cooling", nodenames = {"default:lava_source", "default:lava_flowing"}, neighbors = {"group:cools_lava", "group:water"}, interval = 1, chance = 2, catch_up = false, action = default.cool_lava, }) end
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: ABM works unstable/incorrect
50% chance doesn’t mean result in 1-2 seconds. You may have a non-result streak of several seconds.
Re: ABM works unstable/incorrect
Alright, lets talk about clock gen. There are 1 exact signal at 5 seconds, nothing different means.texmex wrote:50% chance doesn’t mean result in 1-2 seconds. You may have a non-result streak of several seconds.
But it works incorrect too.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: ABM works unstable/incorrect
I’ve no idea what clock gen is, sorry.
Re: ABM works unstable/incorrect
texmex wrote:I’ve no idea what clock gen is, sorry.
Ok, doesnt metter. Just if we will use stone generator ABM with chance 1, it will work unstable.
The same happens with any ABM.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: ABM works unstable/incorrect
AFAIK, ABMs are always slightly delayed depending on the workload of the specific server step where they are executed. Depending on the number of other active ABMs running at the same time and other jobs, this delay fluctuates from not noticeable to very laggy. Besides that, to my knowledge ABMs are in general quite unoptimized in them features C++ implementation, which is why all timing depending features should avoid the altogether. Don’t use them if possible.
Last edited by texmex on Wed Sep 26, 2018 08:26, edited 1 time in total.
- Gael de Sailly
- Member
- Posts: 845
- Joined: Sun Jan 26, 2014 17:01
- GitHub: gaelysam
- IRC: Gael-de-Sailly
- In-game: Gael-de-Sailly gaelysam
- Location: Voiron, France
Re: ABM works unstable/incorrect
@bosapara: all that you describe in your first post is an expected behaviour, and is explained by the "chance" parameter. If chance = X and delay = Y, your ABM has 1/X chance to be executed every Y seconds, to add randomness.
If you want it to be executed at every time, use chance = 1, or remove the chance parameter (which does the same).
If you want it to be executed at every time, use chance = 1, or remove the chance parameter (which does the same).
Stop crying foul, man. Test it and then give feedback. You should also understand that ABMs were first made to handle randomly occurring events, consider node timers if you want a more precise timing.bosapara wrote:Ok, doesnt metter. Just if we will use stone generator ABM with chance 1, it will work unstable.
The same happens with any ABM.
Just realize how bored we would be if the world was perfect.
Re: ABM works unstable/incorrect
Wipe your eyes and try to read this topic again.Gael de Sailly wrote: Stop crying foul, man.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: ABM works unstable/incorrect
You don’t seem to understand what ABMs do. Read all the answers, again.
Re: ABM works unstable/incorrect
it's like the truth, + random delay, even without lags on the servertexmex wrote:AFAIK, ABMs are always slightly delayed depending on the workload of the specific server step where they are executed. Depending on the number of other active ABMs running at the same time and other jobs, this delay fluctuates from not noticeable to very laggy. Besides that, to my knowledge ABMs are in general quite unoptimized in them features C++ implementation, which is why all timing depending features should avoid the altogether. Don’t use them if possible.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: ABM works unstable/incorrect
"Code doesn't matter" :D
Clock generator has chance 1: https://github.com/ac-minetest/basic_ma ... .lua#L1424
ABMs aren't meant to be reliable, use a node timer, globalstep timer or maybe 'minetest.after'
Clock generator has chance 1: https://github.com/ac-minetest/basic_ma ... .lua#L1424
ABMs aren't meant to be reliable, use a node timer, globalstep timer or maybe 'minetest.after'
Re: ABM works unstable/incorrect
Ouch:/ it explains all my bad expectations. Thanx for explaining.paramat wrote: ABMs aren't meant to be reliable
Alright, I'll knowparamat wrote:se a node timer, globalstep timer or maybe 'minetest.after'
Who is online
Users browsing this forum: Google [Bot] and 5 guests