[Mod] Natural Biomes

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

I would also like to point out that 'air' nodes should either be set to 0 probability, or they should be converted to CONTENT_IGNORE. This allows trees to generate without deleting the ground or anything that is in the immediate vicinity, thus preventing the very unnatural cube of air into which a tree is placed.

Shad

Slightly
Member
Posts: 37
Joined: Sun May 15, 2022 22:29
In-game: Slightly

Re: [Mod] Natural Biomes

by Slightly » Post

Liil wrote:
Sat Nov 12, 2022 21:35

3. I cannot convert the files myself, because converting .mts to .lua is only possible on Linux.

I have been tweaking tree models and biomes for personal use on a Windows install and I have had good results using this tool to covert game models to lua. It's quite easy and gives good results. If needed, I can place an mts, then use this to convert it to lua. Or I can build a custom tree, etc. and convert that. https://github.com/CasimirKaPazi/schemtools

ShadMOrdre wrote:
Sun Nov 13, 2022 20:20
I would also like to point out that 'air' nodes should either be set to 0 probability, or they should be converted to CONTENT_IGNORE. This allows trees to generate without deleting the ground or anything that is in the immediate vicinity, thus preventing the very unnatural cube of air into which a tree is placed.

Shad
Definitely! I will add to this that, for some of my trees, I built them up on a couple of blocks so they sort of hang in the air. It made it easier to capture only what I wanted when marking the region to convert.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

liil,

I posted this tool a while back. I can't verify its functionality in newer versions, but it should let you save .mts files to lua tables. Files to be worked on should reside in the worlds/yourworldnamehere/schems folder.


Shad

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

Re: [Mod] Natural Biomes

by Liil » Post

Slightly wrote:
Mon Nov 14, 2022 20:23

I have been tweaking tree models and biomes for personal use on a Windows install and I have had good results using this tool to covert game models to lua. It's quite easy and gives good results. If needed, I can place an mts, then use this to convert it to lua. Or I can build a custom tree, etc. and convert that. https://github.com/CasimirKaPazi/schemtools
I have tried schemtools and saved the tree model to a .lua but the leaf decay does not work, even if I set param2 = 0. For example, the .lua file for the alder tree:

Code: Select all

local n1 = { name = "air", prob = 0 }
local n2 = { name = "naturalbiomes:alder_leaves", param2 = 0 }
local n3 = { name = "naturalbiomes:alder_trunk", param2 = 23 }
local n4 = { name = "naturalbiomes:alder_trunk", param2 = 1 }

return {
	yslice_prob = {
		
	},
	size = {
		y = 15,
		x = 8,
		z = 7
	}
,
	data = {
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 

n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n2, n2, n2, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 

n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n2, n2, n2, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n2, n2, n2, n2, n2, n1, n1, 
n1, n1, n2, n2, n2, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 

n1, n1, n1, n3, n1, n1, n1, n1, 
n1, n1, n1, n3, n1, n1, n1, n1, 
n1, n1, n1, n3, n1, n1, n1, n1, 
n1, n1, n1, n3, n1, n1, n1, n1, 
n1, n1, n1, n3, n1, n1, n1, n1, 
n1, n1, n1, n3, n1, n1, n1, n1, 
n1, n2, n2, n3, n2, n2, n1, n1, 
n1, n1, n2, n4, n2, n1, n1, n1, 
n1, n1, n1, n4, n1, n1, n1, n1, 
n1, n2, n2, n4, n2, n2, n1, n1, 
n2, n2, n2, n4, n2, n2, n2, n1, 
n1, n2, n2, n4, n2, n2, n1, n1, 
n1, n1, n2, n2, n2, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 

n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n2, n2, n2, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n2, n2, n2, n2, n2, n1, n1, 
n1, n1, n2, n2, n2, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 

n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n2, n2, n2, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 

n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n2, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 
n1, n1, n1, n1, n1, n1, n1, n1, 

}
}
cdb_xMf8awymgVmp

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Natural Biomes

by TenPlus1 » Post

Code: Select all

default.register_leafdecay({
	trunks = {"naturalbiomes:alder_trunk"},
	leaves = {"naturalbiomes:alder_leaves"},
	radius = 3
})

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

Re: [Mod] Natural Biomes

by Liil » Post

TenPlus1 wrote:
Sun Nov 20, 2022 17:44

Code: Select all

default.register_leafdecay({
	trunks = {"naturalbiomes:alder_trunk"},
	leaves = {"naturalbiomes:alder_leaves"},
	radius = 3
})
Is already present as leafdecay.lua and registed in init.lua

I also got help from Sfence and his tool sfence.help: https://github.com/sfence/sfence_help

With this tool, it was possible to convert the files from .mts to .lua and fix the leaf decay param problem. But his tool works only on linux. With windows, the converted .mts files dont work. The next problem is, that the converted schematics converted on Linux had the problem that the trunks point all in one direction.

I hope that one day someone will make it possible in handle_schematics or schemedit to add the information for the leaf decay, without having to edit the .mts files and convertig them.
cdb_xMf8awymgVmp

Josselin2
Member
Posts: 102
Joined: Thu May 28, 2020 15:32
GitHub: axcore
In-game: Josselin
Location: Tunnelers' Abyss

Re: [Mod] Natural Biomes

by Josselin2 » Post

This code snippet will auto-magically update all naturalbiomes leaves in all schematics in the /schematics folder.

* Add the code snippet to naturalbiomes' init.lua
* Create a world with naturalbiomes enabled. Start the world, then stop it
* Remove the code snippet from init.lua
* Start a new world with naturalbiomes enabled, leaf decay now works

That is not the end of your problems, though, because some of your bushes (for example med_bush) only have a stem at the bottom. Removing the stem will activate leaf decay for the first three levels, but not for the rest of the bush. Bushes like that will need to be redesigned, perhaps with a second stem node that can be placed all the way up the middle of the bush.

Code: Select all

-- fix schematics --------------------------------------------------------------------------------

local mod_path = minetest.get_modpath(modname)

-- Get a list of files in the /schematics folder
for _, filename in ipairs(minetest.get_dir_list(mod_path .. "/schematics", false)) do

    -- Filter out everything that isn't an .mts file
    if string.match(filename, "^.+(%..+)$") == ".mts" then

        local full_path = mod_path .. "/schematics/" .. filename
        
        schem_table = minetest.read_schematic(full_path, {})
        -- Sanity check - is this a minetest schematic?
        if schem_table ~= nil and schem_table.size ~= nil and schem_table.data ~= nil then

            local data_table = {}
            local overwrite_count = 0

            -- Check everything item in the .data list, looking for naturalbiomes leaves
            for _, mini_table in ipairs(schem_table.data) do

                if string.match(mini_table.name, "naturalbiomes:.*_leaves") and
                        mini_table.param2 == 1 then

                    -- Leaves detected, and param2 is not 0, so change it
                    mini_table.param2 = 0
                    -- Don't overwrite an original .mts file unless we have found broken leaves
                    overwrite_count = overwrite_count + 1

                end

                table.insert(data_table, mini_table)

            end

            if overwrite_count then
            
                schem_table.data = data_table
                
                local mts_data = minetest.serialize_schematic(schem_table, "mts", {})
                local mts_output = io.open(full_path, "w")
                if not mts_data or not mts_output then

                    minetest.log("Can't overwrite .mts file: " .. full_path)

                else

                    mts_output:write(mts_data)
                    mts_output:flush()
                    mts_output:close()
                    minetest.log(
                        "Updated " .. full_path .. " with " .. tostring(overwrite_count) ..
                                "changes"
                    )

                end

            end

        end

    end
    
end

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

Liil,

I previously posted a link to my lib_tool_schematics mod. Sorry for suggesting a broken mod.

I've now updated the mod. Please take a look. It is a state based tool, punch to change state, right click place to set options or commit the configured action. The mod allows you to select between the mod folder and world folder for schematics, allows you to select from the files in those locations, allows to place the schematic inworld, or to convert the schematic between lua to mts, and mts to lua. Options also exist to set rotation, offset, and whether schematic is placed centered on the position, or the default schematic is placed from southwest corner.

In this update, I also include your acacia tree, in both the original .mts, and a converted .lua version.

To address the issue you are having with param2 = 1, I looked at, and fixed my own leaf decay code. Here is the issue you face.

When a player places a leaf node, the param2 value is set to 1, so that leafdecay ignores those leaf nodes purposely placed by a player. The leaf decay code requires that the leaf node have the group "leafdecay_drop" and that the leaf node defines at least a drop for the leaf node itself, and for a sapling more rarely. In my gal mod, I copy the leaf .after_place_node event code from default straight into the leaf node definition, instead of overriding the node after. After the leaf node is registered, I then register the leaf decay, again using my own local copy of the default.register_leaf_decay function.

I think that by setting the leaf nodes to param2 = 0 will fix your issue, since param2=1 is used to define user placed nodes that ignore leaf decay.


Shad

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

Re: [Mod] Natural Biomes

by Liil » Post

Thanks for your work but i dont understand how to use this tool. What do I have to do to convert the .mts to .lua to fix the leaf decay (Param2 = 0) and convert it back?

/mts2lua does not work.

How to select a file?
cdb_xMf8awymgVmp

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

Liil,

I wrote a brief howto on the tools mod topic, here

I'm willing to answer any questions you might still have otherwise.

Naturalbiomes has quickly become one of my new favorites. I just want to help with the issues you're facing.


The solution provided by Josselin2 might be the quickest fix for you, as hand editing lua schematics is tedious at best.


Shad

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

Re: [Mod] Natural Biomes

by Liil » Post

Josselin2 wrote:
Fri Nov 25, 2022 07:35
This code snippet will auto-magically update all naturalbiomes leaves in all schematics in the /schematics folder.

* Add the code snippet to naturalbiomes' init.lua
* Create a world with naturalbiomes enabled. Start the world, then stop it
* Remove the code snippet from init.lua
* Start a new world with naturalbiomes enabled, leaf decay now works
When I do this, this is the result:
ModError: Failed to load and run script from F:\minetest-5.6.1-win64\bin\..\mods\naturalbiomes\init.lua:
decompressZlib: inflate failed
stack traceback:
[C]: in function 'orig_reg_fn'
F:\minetest-5.6.1-win64\bin\..\builtin\game\register.lua:506: in function 'register_decoration'
...est-5.6.1-win64\bin\..\mods\naturalbiomes/wetsavanna.lua:205: in main chunk
[C]: in function 'dofile'
F:\minetest-5.6.1-win64\bin\..\mods\naturalbiomes\init.lua:34: in main chunk
Für mehr Details siehe debug.txt.
cdb_xMf8awymgVmp

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

Re: [Mod] Natural Biomes

by Liil » Post

This mod has been updated to V1.41, I added a heath biome, inspired by the Lüneburger Heide: https://duckduckgo.com/?t=ffab&q=L%C3%B ... &ia=images

If you are using my mod animalworld, black grouse and vipers will now appear in this biome.

Image
cdb_xMf8awymgVmp

Josselin2
Member
Posts: 102
Joined: Thu May 28, 2020 15:32
GitHub: axcore
In-game: Josselin
Location: Tunnelers' Abyss

Re: [Mod] Natural Biomes

by Josselin2 » Post

Liil wrote:
Fri Nov 25, 2022 20:33
When I do this, this is the result:
Sounds like an issue with the Windows Minetest build, minetest.serialize_schematic() should not crash like that.

Anyway, the conversion works just fine on Linux. Try grabbing the schematics from my fork https://github.com/axcore/naturalbiomes, it's identical to your original except that I applied the snippet to fix the leaves.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

Josselin2,

There are known issues between Windows' use of carriage return / line feed and Linux' use of just line feed in text files. How this affects converting lua tables into .mts files shouldn't be an issue but....

Please ensure that the code you use to create the .mts from lua is copied from the saveschems mod, and not custom. I am on Windows, and the code from saveschems is used in the lib_tool_schematics tool I previously posted. The .mts file and .lua Acacia tree that I also included in the mod schem folder were created with the tool, on Windows. I'm currently running sfans 5.7.0-02c293e build that they posted in that topic.

I'll test your schemconvert tool to see if I get the same issues as Liil.

Shad

Josselin2
Member
Posts: 102
Joined: Thu May 28, 2020 15:32
GitHub: axcore
In-game: Josselin
Location: Tunnelers' Abyss

Re: [Mod] Natural Biomes

by Josselin2 » Post

ShadMOrdre wrote:
Sat Nov 26, 2022 07:58
Please ensure that the code you use to create the .mts from lua is copied from the saveschems mod, and not custom.
Code in the saveschems mod and my schemconvert mod seems to be identical, apart from these lines:

saveschems:

Code: Select all

local file, err = io.open(filename, "wb")
schemconvert:

Code: Select all

local mts_output = io.open(output_path, "w")
If your schemconvert fails, perhaps you can try changing the w to wb, and see if that instantly resolves the error.

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Natural Biomes

by LMD » Post

You need wb on Windows when writing binary data as otherwise Windows will normalize ASCII LF to ASCII CRLF line feeds, completely breaking your binary data.
My stuff: Projects - Mods - Website

Josselin2
Member
Posts: 102
Joined: Thu May 28, 2020 15:32
GitHub: axcore
In-game: Josselin
Location: Tunnelers' Abyss

Re: [Mod] Natural Biomes

by Josselin2 » Post

LMD wrote:
Sat Nov 26, 2022 09:55
You need wb on Windows when writing binary data as otherwise Windows will normalize ASCII LF to ASCII CRLF line feeds, completely breaking your binary data.
Will schematics written on Linux with just w work on Windows? I don't have a Windows box so I can't test this for myself.

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Natural Biomes

by LMD » Post

Josselin2 wrote:
Sat Nov 26, 2022 11:00
LMD wrote:
Sat Nov 26, 2022 09:55
You need wb on Windows when writing binary data as otherwise Windows will normalize ASCII LF to ASCII CRLF line feeds, completely breaking your binary data.
Will schematics written on Linux with just w work on Windows? I don't have a Windows box so I can't test this for myself.
I don't use Windows either. Again it depends on the binary flag - this time when reading. If you open a file using just "r" in Windows, it will be opened in text mode, and LF will be converted to CRLF when reading. If you open files written using "wb" on Windows or "w" on Linux using "rb" on Windows, it will work fine.

TL;DR: Use "wb" and "rb" when working with binary files on Windows, otherwise it most likely not work.

Side note: The PNG header contains CRLF to check against this.
My stuff: Projects - Mods - Website

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

For consistency, it should be done as the saveschems mod. Why? To not do so would introduce an entire body of .mts files that simply crash Windows.

Saveschems method accommodates both Linux and Windows, without crashing either and .mts files work for all platforms.

Expecting the average Windows user to know this issue, and to then have to work around it would essentially make the mod unused at best.

All other mods that work with .mts files expect the 'saveschems' behavior, without introducing the unconventional requirement that Windows users rewrite their copy of the mod to accommodate this.

Shad

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Natural Biomes

by Blockhead » Post

There's literally never a good reason to not use binary mode whenever the software might run on Windows in my opinion, and sometimes even when you don't expect it because it might happen anyway. It's better to know your end of line explicitly than just rely on the operating system to do what you expect. It also means you don't get different files created by the Windows and Linux versions, they should have the exact same hash. The unfortunate part is when you mess up and have to deal with brokenness because you didn't do it right the first time. I honestly consider the automatic newline translation to be a misfeature of Windows, but that's hardly the only concession we have to make to Windows, there are plenty of other problems that have been caused in the engine that only manifest on Windows for instance due to MS' terrible C/C++ library implementation.

AAAAnyway, can't whoever wants to help Liil out properly just take a bit more time to make a pull request instead of offering a plethora of schematic mod suggestions?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

Ok, got them all sorted out.

A note about nodes in schematics, and the use of param2, which simply defines the nodes rotation.

There are 4 x 6 rotations equating to param2 = 0 to param2 = 23.

For all nodes that have a single texture applied to all sides, such as dirt and stone, or nodes like dirt with grass, param2 = 0 should just be understood to mean a node placed inworld with no rotation. The default placement. Param2 should never be anything else for these nodes.

For all nodes defined like a tree trunk, with 4 sides and a top and bottom, param2 only needs to be 0, 4, or 8. Param2 = 0 is the default placement, with up being up. Param2 = 4 rotates up/down to be oriented as north/south. Param2 = 8 rotates up/down to east/west. This accommodates all tree trunk nodes and logs.

Things change for wall mounted, but this applies to all basic nodes. Stairs and slabs can also be minimized to just a few param2 values to provide the shape, without the multiple rotations that provide the shape in that "direction".

Anyway, back to naturalbiomes. Blockhead, why not just provide a pull request? That would be too easy. How are we supposed to learn if we always do things the "right" way? ;)

In the pull request, Liil, I'll provide both the lua and mts files. I actually converted all 56 schems, rocks and ruins included. The mts files I generated for the trees are around 20 bytes smaller, while the rocks and ruins mts files are actually about 10 bytes larger. But that's the devil in the details.

In the meantime, here are the updated mts files, imported onto dry grass.

Shad
Attachments
screenshot_20221126_223445.jpg
screenshot_20221126_223445.jpg (419.61 KiB) Viewed 1195 times
screenshot_20221126_223424.jpg
screenshot_20221126_223424.jpg (270.34 KiB) Viewed 1195 times

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Natural Biomes

by ShadMOrdre » Post

Yeah, like I said, issuing a git pull request would be too easy. I'm having issues with github, and cannot create a new repository from the command line without some guidance from someone better versed in the ways of git.

So, here is a zip. No one likes them. Sorry I cannot do better at this time, but I've spent 4 times as many hours this evening trying to get a git repo setup, than the time it took me to actually convert these schematics.

The .lua files were opened in Notepad++ on Windows, trimmed of extraneous tabs and white space to reduce the node references to a single line table entry, and then globally replaced the param2 values and set air nodes to 0 probability, to remove the empty cube of air into which the schems generate. Note that the .lua files will use CR/LF and not LF.

For my test, I simply replaced the .mts files in the mod folder with these .mts files, and started a new world, as well as manually imported several, seen in the screenshots above.

I include all 56 updated .mts files, and their .lua counterparts.

Shad
Attachments
schematics.zip
(54.82 KiB) Downloaded 26 times

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Natural Biomes

by Blockhead » Post

ShadMOrdre wrote:
Sun Nov 27, 2022 07:36
Anyway, back to naturalbiomes. Blockhead, why not just provide a pull request? That would be too easy. How are we supposed to learn if we always do things the "right" way? ;)
..on the contrary, if we never learn how to do things the right way, how will we ever learn to improve?
ShadMOrdre wrote:
Sun Nov 27, 2022 09:10
Yeah, like I said, issuing a git pull request would be too easy. I'm having issues with github, and cannot create a new repository from the command line without some guidance from someone better versed in the ways of git.
Unless you download the GitHub command line application, then making a repository on a remote HTTPS server is literally not built into the ordinary git software. Technically if you have SSH to a site then an SSH remote can work as that's just a username@hostname:directory/name, but most git hosters don't give you SSH access. Instead what you do is you make a fork or a new repository using the web interface. For your own new work you git init && git add && git commit && git push to it. For forks you git clone the fork. The process doesn't happen entirely on the command line and typically starts on the website.
ShadMOrdre wrote:
Sun Nov 27, 2022 09:10
So, here is a zip. No one likes them. Sorry I cannot do better at this time, but I've spent 4 times as many hours this evening trying to get a git repo setup, than the time it took me to actually convert these schematics.
Going against the grain again, I think. Try some tutorials and user friendly GUI buttons next time instead of your own initiative and elbow grease. (refer to above comment again)
ShadMOrdre wrote:
Sun Nov 27, 2022 09:10
The .lua files were opened in Notepad++ on Windows, trimmed of extraneous tabs and white space to reduce the node references to a single line table entry, and then globally replaced the param2 values and set air nodes to 0 probability, to remove the empty cube of air into which the schems generate. Note that the .lua files will use CR/LF and not LF.

For my test, I simply replaced the .mts files in the mod folder with these .mts files, and started a new world, as well as manually imported several, seen in the screenshots above.

I include all 56 updated .mts files, and their .lua counterparts.

Shad
Thank you Shad. That should be enough to help Liil at least, and more than just comments. Is there a reason your forum PMs aren't on? I wouldn't mind having a direct line of communication so I can send particular stuff specifically meant to you, to you, instead of posting it here on the forums for all to see, because that can be handy for everyone. If I need to send that kind of message, shall I drop you an email at your git commit log email? Drop in and leave a mail message on your favourite Minetest server maybe?

Edit for anyone reading this later: Shad has his reasons for needing to do it on the command line, but it's never going to be easy to do that sort of thing...
Last edited by Blockhead on Mon Nov 28, 2022 03:25, edited 1 time in total.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

Re: [Mod] Natural Biomes

by Liil » Post

Thanks for help to all here, I will test the new schematics tomorrow.

Edit: I have tested it, it works. Thank you very much. I have adjusted the leaf decay rates so that a single tree of every species will loose all its leaves, when the trunks are destroyed.

Now I need the same fix for livingfloatlands. What do you all think, will there be an editor that also works for windows in the future, or an option to place leaves with activated leaf decay param?
cdb_xMf8awymgVmp

User avatar
Liil
Member
Posts: 127
Joined: Thu Dec 03, 2020 15:29

Re: [Mod] Natural Biomes

by Liil » Post

A new type of biome has been added: The Bushland:

Image
Image

This biome connects the tropical bamboo forests and the temperate heath biome and can also be found in higher latitudes. Before this biome was implemented, tropical and heath regions could meet, this biome connects them and makes the biome transition more realistic.

If you are using animalworld, you can find the robin there.
cdb_xMf8awymgVmp

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests