NamelessName Posted May 3, 2020 Share Posted May 3, 2020 (edited) They should spawn in the same amount as now BUT with both variants spawning 50/50. So if 50% of grass geckos spawn then 50% grass tufts are RANDOMLY removed from the world (but can still spawn everwhere and not just savanna). - Grass Geckos and Grass Tufts, (Grass geckos can spawn WITH grass tufts. But that removes grass from all other places but savanna which is bad). - Juicy Berry Bushes and Berry Bushes, - Twiggy Trees and Saplings. Ive never seen this mod BUT ive seen it requested and wished numerous times. Whoever uploads the mod I assume will gain alot of cred. EDIT: I would do it if I knew how. Seems almost impossible to figure out so far and I think that's why no one has done it. I imagine we can look at prefabswaps.lua and figure it out? Edited May 3, 2020 by NamelessName Link to comment Share on other sites More sharing options...
NamelessName Posted May 3, 2020 Author Share Posted May 3, 2020 (edited) Someone who can do this request please? Edited May 3, 2020 by NamelessName Link to comment Share on other sites More sharing options...
rawii22 Posted May 10, 2020 Share Posted May 10, 2020 Are you asking for the grass not to disappear when the gekko spawns? If so, this should be a very simple fix. In the prefab file for grass, they call the transition from grass to a grass gecko a morph. In the function onmorphtimer in grass.lua, they call inst:Remove() on the grass after spawning a grass gekko, so I'm pretty sure we could circumvent this somehow by adding a prefab post init. The fn() function for this doesn't directly call onmorphtimer so you might have to do some maneuvering to work the altered code in. Buuut, I still don't know if that's what you're asking... If you want equal probabilities of berry bushes to juicy berry bushes and twiggy trees vs sapplings, then I think you might be interested in scripts/map/rooms and terrain_grass and terrain_forest. You might also find the other rooms interesting since they list the probabilities of having certain plants and animals. My brother and I attempted to make changes to probabilities when we started working on a wheat mod, so I'll post our worldmodgenmain.lua here to give you an example of how to do this. Link to comment Share on other sites More sharing options...
NamelessName Posted May 10, 2020 Author Share Posted May 10, 2020 (edited) 12 hours ago, rawii22 said: Are you asking for the grass not to disappear when the gekko spawns? If so, this should be a very simple fix. In the prefab file for grass, they call the transition from grass to a grass gecko a morph. In the function onmorphtimer in grass.lua, they call inst:Remove() on the grass after spawning a grass gekko, so I'm pretty sure we could circumvent this somehow by adding a prefab post init. The fn() function for this doesn't directly call onmorphtimer so you might have to do some maneuvering to work the altered code in. Buuut, I still don't know if that's what you're asking... If you want equal probabilities of berry bushes to juicy berry bushes and twiggy trees vs sapplings, then I think you might be interested in scripts/map/rooms and terrain_grass and terrain_forest. You might also find the other rooms interesting since they list the probabilities of having certain plants and animals. My brother and I attempted to make changes to probabilities when we started working on a wheat mod, so I'll post our worldmodgenmain.lua here to give you an example of how to do this. Thank you man. I will take a look at it. Its nice to see some examples. What I wanted to figure out was how to spawn every version with equal probabilities Edited May 10, 2020 by NamelessName Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now