-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leaves don't seem to decay? #3
Comments
Yes it is a known problem. Leaf decay only works for some bushes. The problem is also mentioned in the forums, but no solution at this moment, because nobody knows how to change leaf param type from 2 to 0. |
It looks like you are not calling function |
The problem is when I look into a .mts file from another mod, they have a clear code that can be edited. |
I have been able to covert it by using mod schemedit and mod sfence_help. I copied I imported a new schematic file by schemedit mod node, dig the trunk, and leaves decays. |
Thank you for help, I will fix this in the next update. |
I converted the .mts to lua and replaced the param2 =1 by param2 = 0 but after converting back to .mts and replacing the old .mts with the new ones, I got this error when starting a game with the mod: ModError: Failed to load and run script from F:\minetest-5.6.1-win64\bin..\mods\naturalbiomes\init.lua: When I replace the new(fixed) .mts with the old, all works fine, but the fixed/converted .mts create errors. |
I tried to update and push the alder tree and alp pine trees https://github.com/sfence/naturalbiomes/tree/try_some_mts_update and it works fine (leaves are placed with param2=0, and the world is loading). After register_leafdecay is added, it decays well. I am running it under Linux, minetest 5.6.0. So you can try my versions. Are updated *.mts files from my branch working on your computer? |
You can use lua version of the schematic as well: Can help with debugging. |
I have tried it with fresh converted (/mts2lua) files, but I still get an ERROR when logging into a new world with the mod activated: |
You probably only change .mts to .lua, but dofile should be added too. This is code which works for me: The schematic should be a schematic mts file or lua table with a schematic definition. Function |
Hmm still get the error. here is the changed code in the alderswamp.lua: |
to much arguments... in grow function you can replace: in decoration registration replace: Maybe, if you have discord, it will be a better way to discuss this there (use a private message on minetest forum to send me a discord contact in that case: https://forum.minetest.net/memberlist.php?mode=viewprofile&u=25513 ) |
I replaced the code like you said and the ERROR does not appear again. But the schematics dont spawn anymore in a new world now. The trees are gone: https://ibb.co/fYR8dGr |
In the code, I post here for schematic =, I have used .lua for the alpine tree with excessing space, not for the alder tree. Did you replace lua file with a valid existing one for the alder tree, you are experimenting with? This happens to me too, when the name of a lua file was bad. |
ModError: Failed to load and run script from F:\minetest-5.6.1-win64\bin..\mods\naturalbiomes\init.lua: |
missing ending " on do
|
minetest.register_decoration({ ModError: Failed to load and run script from F:\minetest-5.6.1-win64\bin..\mods\naturalbiomes\init.lua: |
missing comma on the end of the line in the table definition. |
No ERROR message now, but empty biome without trees again. |
Looks like some problem in updated lua file. Can you send me that file? |
Its not even an updated file, it happens also with a fresh converted file. Here is the link for a fresh converted one, dont click on the advertisement(Fileupload): https://www.file-upload.net/download-15037065/naturalbiomes_aldertree_0_270.lua.html |
I am sorry. I did some error when testing the loading schema from lua file for the alppine2 tree, so I beleave it works. Good is that I see the same problem as you. Try to add function:
and use it instead of dofile for load schematic from lua. if you fall to situation, the you will want to release this mod with this function, it is a good idea to define it in mod namespace...
and I files use it with in biome files:
|
There is also a problem, that saplings grow hard/forced and are not centered. (overwrite nearby flora and sometimes ground nodes like dirt etc.) See https://github.com/runsy/cool_trees/blob/master/cherrytree/init.lua#L64 if you correctly move the corner of the place area, the trunk should grow on the place where the sapling is. |
Can you write an example with a tree for adding function? I am not skilled in programming at all, so I dont know how to add all things like "(file) "(file, "rb"" etc. Where do i have to place this? In a sepratae .lua, or in the biome files? |
I used the code for placement from the cherrytree for the sapling. The result is, that the saplings dont sprout anymore. It is right that the trees dont grow centered, this is possible to fix, but the replacement of nodes and decoration in the range of the grown tree, is a problem of the schematic it seems. It acts like a forced placement. I will try to recreate the schematic of the alder tree later with schemedit instead of handle_schematics maybe, this works. |
This is FORCE placement of the schematic: This is SOFT placement of the schematic: The only difference is in the last parameter of the place_schematic function. |
Please, try this mts file. It is an updated alder tree schema. If it will be ok, you can send me an archive of modified lua versions of the schematic, and I will convert them to mts files for you, and send them back. So, it will not require some bigger code changes. The cherry tree is only an example of how to place schematic soft and with moved trunk offset. Not good for copying into your code, only good to look at how to use it. But schema name and position change have to be changed individually for every tree. |
This new .mts works fine. How did you add the leaf decay? I think it would be better if I can do it myself, because I cannot ask you to convert for me every single file, also for future mods. |
leaves is list of tree leaves ndoe names and potencionaly tree fruit node names etc. Is based on the node timer and the check is started by trunk dig. |
I am using /mts2lua and /lua2mts to convert mts files, but now I test it under windows, and it looks like it does not work on windows for some reason. /lua2mts command use minetest.serialize_schematic function to save schematic. handle_schematic and schemaedit uses different methods to create .mts file, so it can work for you on windows. |
I tried to install Ubuntu on a notebook yesteday, but I had no success. After entering the desktop after installation, it feezed. I will try again today. Until this works, it would be nice if you can convert those for me: |
Sorry, I did not send you the right correted schems (param2=0}) again, the schems corrected: |
Second try: First I miss that no param is edidted in lua files. :D |
Thank you, it works :) |
Until theres a schematic editor that supports the change of param type before saving schematics, this mods helps: https://content.minetest.net/packages/Liil/winuserleafdecay/ |
So I've been noticing that leaves from naturalbiomes trees don't seem to "decay".
The text was updated successfully, but these errors were encountered: