Any information about the fun attribute is given here.
Pederont
Small-town resident Reactions:
Posts: 32 Joined: 10 Aug 2019, 07:01
Location: South Korea
Plugins: Showcase Store
Plugin Creator
Platform
Post
by Pederont » 27 May 2023, 09:05
Is it possible to trigger the random fun again till the condition is true?
I made a random spawn plugin that only spawns on empty land, but now it's spawnrate depends on the amount of empty land.
Code:
Select all Reset
"random fun":[{
"condition":{"type":"and", "inner":[{"type":"tree", "invert":true}, {"type":"building","invert":true},{"type":"zone", "invert":true}]},
"actions":[{"type":"build", "id":"$mokokoseed_pederont"}], "p":0.01
If my links doesn't work, turn off your ad blocker
I'm just a furry artist and graphic designer
Pederont
Small-town resident Reactions:
Posts: 32 Joined: 10 Aug 2019, 07:01
Location: South Korea
Plugins: Showcase Store
Plugin Creator
Platform
Post
by Pederont » 28 May 2023, 07:19
CommanderABab wrote: 28 May 2023, 03:50
Try a value of p closer to 1.
Doesn't that increases the entire spawnrate? I just want to keep spawnrate low but want it always spawn on empty tile when random fun triggers..
If my links doesn't work, turn off your ad blocker
I'm just a furry artist and graphic designer
JustAnyone
Honorary Contributor Reactions:
Posts: 3685 Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store
Platform
Post
by JustAnyone » 28 May 2023, 07:44
If I recall correctly, "p" is the probability for the random fun object to get called, not the action.
alfredparker360
Villager Reactions:
Posts: 10 Joined: 29 May 2023, 07:49
Post
by alfredparker360 » 30 May 2023, 07:49
Doesn't that raise the spawnrate overall? When random fun triggers, I only want to keep the spawn rate low and have it always spawn on an empty tile.
JustAnyone
Honorary Contributor Reactions:
Posts: 3685 Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store
Platform
Post
by JustAnyone » 04 Jun 2023, 08:48
And if that condition is true, then the action gets trig. gered, correct.