put in linebreaks

haui 2024-06-14 07:24:37 +02:00
parent c37470d5f8
commit a71eacd0b9

16
Home.md

@ -5,16 +5,30 @@ This is a place to store knowledge about modding and/in minetest/voxelibre.
## Random tickspeed in Voxelibre:
hi folks! came here to ask a question but first: everyone who plays this game and those who help develop it are saints in my book. Just wanted to get that out there.
That said, I feel like random tick speed is pretty high. Everything grows insanely fast and although I appreciate not waiting a ton, it might get old. Anyone know how to change that?
marinerdev: mods/ITEMS/mcl_farming/shared_functions.lua
marinerdev: function mcl_farming:add_plant
marinerdev: well function mcl_farming:add_plant(identifier, full_grown, names, interval, chance)
marinerdev: it passes in interval and chance to the abm it creates
marinerdev: so chance is 1 in chance. if you pass 2, it'll happen 50% of the time, 4 and 25% of the time
marinerdev: interval is how frequently that chance is attempted
marinerdev: as we don't really have a random tick speed under the cover
marinerdev: we've kind of chosen to keep faster growth speeds, but it is customisable this way
marinerdev: so in carrots.lua, are the bottom, you have: mcl_farming:add_plant("plant_carrot", "mcl_farming:carrot", {"mcl_farming:carrot_1", "mcl_farming:carrot_2", "mcl_farming:carrot_3", "mcl_farming:carrot_4", "mcl_farming:carrot_5", "mcl_farming:carrot_6", "mcl_farming:carrot_7"}, 25, 20)
marinerdev: so in carrots.lua, are the bottom, you have: mcl_farming:add_plant("plant_carrot", "mcl_farming:carrot",
{"mcl_farming:carrot_1", "mcl_farming:carrot_2", "mcl_farming:carrot_3", "mcl_farming:carrot_4", "mcl_farming:carrot_5", "mcl_farming:carrot_6", "mcl_farming:carrot_7"}, 25, 20)
marinerdev: so, it's a 1 in 20 chance, every 25 seconds
marinerdev: of course, you could just modify the add_plant, and multiply the chance by 0.75 for 25% slower growth
marinerdev: chance = chance * 0.75,
marinerdev: for everything