Understanding ABM chance
Understanding ABM chance
I don't remember if I asked this already. I try to get ABM working but it' very weird. No matter what chance I set (even 200-300), it always works on every node when I start the game.
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj
Actually the issue is that ABMs are being run far too often when the server starts.bgsmithjr wrote:that's a bug? It seems right to me.To have an interval you have to have a starting point.
WorldEdit 1.0 released
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
The reason is that minetest simulates the "lost" time when loading an existing world. Maybe it should be possible to switch this behaviour off with a flag in the ABM definition.Temperest wrote:Actually the issue is that ABMs are being run far too often when the server starts.bgsmithjr wrote:that's a bug? It seems right to me.To have an interval you have to have a starting point.
It is intended behaviour that when a MapBlock becomes part of the active area, the time of it not being active while the server has been running is calculated and an estimate is made to roughly trigger as many of the ABMs as would have been triggered during the time. This is preferred behaviour for things like grass growth.
It could be a bug if all of the ABMs are triggered immediately when you shut down the server and start it again. However, this isn't clear based on what you said.
It could be a bug if all of the ABMs are triggered immediately when you shut down the server and start it again. However, this isn't clear based on what you said.
You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.
-
- Member
- Posts: 4534
- Joined: Mon Oct 03, 2011 17:58
- GitHub: Jordach
- IRC: Jordach
- In-game: Jordach
- Location: Blender Scene
You just blew my mind.bgsmithjr wrote:You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.
I have 2-3 trees with leaves. Chance is 300. At the server start all of the trees grow infinitely up (to the ABM range), and 100% of leaves turn into blossom. What am I doing wrong?bgsmithjr wrote:You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.
Last edited by neko259 on Mon Apr 02, 2012 17:54, edited 1 time in total.
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj
Sorry for showing off, poster, but what I was supposed to say was that..neko259 wrote:I have 2-3 trees with leaves. Chance is 300. At the server start all of the trees grow infinitely up (to the ABM range), and 100% of leaves turn into blossom. What am I doing wrong?bgsmithjr wrote:You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.
Maybe you forgot that hidden blocks also have the code applied.
like for ever dirt you add a grass block, then you would have more blocks than you intended because you only wanted the ones on top.
-
- Member
- Posts: 4534
- Joined: Mon Oct 03, 2011 17:58
- GitHub: Jordach
- IRC: Jordach
- In-game: Jordach
- Location: Blender Scene
Should be that.
I have a easy example:
Say I have this 16 by 16 chunk.
Then say a flower grows.
Then I leave the chunk for TWO MINETEST HOURS.
I load that very chunk again, from what it seems, the chunk now has more flowers.
Minetest does this to ensure abms work (just like a pseudo random nuber generator,) like time has flown there when it has not.
I have a easy example:
Say I have this 16 by 16 chunk.
Then say a flower grows.
Then I leave the chunk for TWO MINETEST HOURS.
I load that very chunk again, from what it seems, the chunk now has more flowers.
Minetest does this to ensure abms work (just like a pseudo random nuber generator,) like time has flown there when it has not.
You should post a snippet of your code so people can actually look at it and tell you. Because with the information you provide, all anyone can tell you is how they work.neko259 wrote:I still wait for the final answer: when will I be able to get rid of manual chance checks? Now if I remove them, on the server start I get huge lags and ABM working for EVERY block and ruining all it's work.
Which everyone keeps repeating over again to you.
https://bitbucket.org/neko259/natureGatharoth wrote:You should post a snippet of your code so people can actually look at it and tell you. Because with the information you provide, all anyone can tell you is how they work.neko259 wrote:I still wait for the final answer: when will I be able to get rid of manual chance checks? Now if I remove them, on the server start I get huge lags and ABM working for EVERY block and ruining all it's work.
Which everyone keeps repeating over again to you.
Look into any of the code with growing.
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj
Who is online
Users browsing this forum: Google [Bot] and 29 guests