[Mod] Find Biome [1.2.0] [findbiome]

Post Reply
User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

[Mod] Find Biome [1.2.0] [findbiome]

by Wuzzy » Post

Find biomes with a single command.

This is a mod for game developers. This will help you find biomes quickly. It adds two server commands:
  • findbiome <biome>: Find a biome and teleport to it
  • listbiomes: List all biomes
This is very helpful when you're tweaking biomes of your game and don't want to search all over the world. The biome finding functionality is also available to developers (see the readme file).

Note: To find biomes in v6 mapgen, you need to use the Biome Info API mod.

Limitations
It's rare, but the mod might not find your biome if it is very obcure, but even then it should be unlikely. If this happens, just move somewhere else and try again.

Mod infos:
Last edited by Wuzzy on Sun Mar 24, 2024 21:22, edited 14 times in total.

User avatar
Yvanhoe
Member
Posts: 140
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: [Mod] Find Biomes [0.1.0] [findbiomes]

by Yvanhoe » Post

That's great! Thanks!

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Find Biome [0.1.0] [findbiome]

by runs » Post

Cool for modders to test things. Or for a mod to teleport to biomes too.

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Find Biome [0.1.0] [findbiome]

by TumeniNodes » Post

Nice Wuzzy... thank you
A Wonderful World

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [Mod] Find Biome [0.1.0] [findbiome]

by CalebJ » Post

Awesome, Wuzzy! Thank you, I've been wanting something like this for a long time :)

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Find Biome [0.1.0] [findbiome]

by StarNinjas » Post

I.. I Like P-P- Potatoe? Thanks SO MUCH Wuzzy I have always dreamed of this!!!
Thanks Again

-J1
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Find Biome [0.1.0] [findbiome]

by Sokomine » Post

Sounds like a very useful mod. If you start a new world and are searching for a particular biome, that biome certainly wouldn't be the one you started in :-) So - thanks for the mod!
A list of my mods can be found here.

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Version 0.2.0

by Wuzzy » Post

Version 0.2.0 released!

Now with mapgen v6 support! But you need to use the biomeinfo mod for it to work.
For the other mapgens you don't need any other mod.

shacknetisp
Member
Posts: 32
Joined: Wed Feb 25, 2015 15:27
GitHub: linewriter1024
IRC: behalebabo
In-game: beha
Contact:

Re: [Mod] Find Biome [0.2.0] [findbiome]

by shacknetisp » Post

This is currently broken, attempt to use /findbiome in a biome-mapgen.

Code: Select all

minetest_findbiomes/init.lua:66: attempt to get length of global 'biome_ids' (a nil value)
Seems that bug was introduced when v6 support was added and variable scope was messed up.[/s]

Edit: It's been fixed in the latest commits.
Last edited by shacknetisp on Tue Aug 27, 2019 19:06, edited 1 time in total.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Find Biome [0.2.0] [findbiome]

by texmex » Post

Thanks!

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Version 1.0.0

by Wuzzy » Post

Version 1.0.0 released!

Changelog:
  • You can now find biomes not in the same height as you. Much more convenient that way!
  • No longer teleport outside the map
  • /findbiome now supports searching the special “default” biome (fallback biome in non-v6 mapgens), if it exists. There's no 100% chance it will find it (even if it exists in the world) and the algorithm isn't very smart, however. But it helps to see if your biomes still have large “holes”. The “default” biome is intentionally not listed in /listbiomes because it's just a fallback

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Find Biome [1.0.0] [findbiome]

by texmex » Post

Is this mod supposed to be only for direct player use or do you plan on adding API functions for other mods that may want to search for biomes (and return data only, not necessarily teleport the player).

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Find Biome [1.0.0] [findbiome]

by Wuzzy » Post

This mod is a fork from the mod “spawn” in Minetest Game. It finds a spawn position in an “easy” biome for new players. So if you need that, use that.

I do not plan to add an API.

User avatar
Hagrid669
New member
Posts: 4
Joined: Sun Mar 29, 2020 19:32

Re: [Mod] Find Biome [1.0.1] [findbiome]

by Hagrid669 » Post

Hi Wuzzy, nice and usefull mod. Thanks.
I'm using your mod to tune up biomes in a ocean-underwater game, and I'm getting problems in finding underwater biomes, such as corals. Is there anything can be adjusted in your code or does it depends on the minetest.get_biome_data(pos), that is not able to retrive underwater biomes (because they are not suitable for spawning)?.

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Find Biome [1.0.1] [findbiome]

by Wuzzy » Post

If I remember correctly, your current height at the time of using /findbiome matters. So try starting at ocean height to find ocean biomes.

User avatar
Hagrid669
New member
Posts: 4
Joined: Sun Mar 29, 2020 19:32

Re: [Mod] Find Biome [1.0.1] [findbiome]

by Hagrid669 » Post

Starting at sea level or even under seems not working as well :( I solved for now stretching underwater coral biomes up to water level +1, this way /findbiome does its job right. It's a great help in developing, thanks again.

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Find Biome [1.0.2] [findbiome]

by Wuzzy » Post

This mod has been migrated to Codeberg.org: https://codeberg.org/Wuzzy/minetest_findbiome

Also, a tiny update 1.0.2 was released, just clarifying license stuff.

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Version 1.1.0 released!

by Wuzzy » Post

Version 1.1.0 has been released!
This version is for developers, making the function "findbiome.find_biome" public. So biomes can be found by other mods as well.

Additionally, I updated the calculation of the map boundaries by using Minetest's builtin function instead, making it a little bit more accurate.

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

Re: [Mod] Find Biome [1.1.0] [findbiome]

by Josselin2 » Post

Minetest 5.8.0, new world with no mods except minetest_game and findbiome. Type

Code: Select all

/findbiome desert
Minetest crashes with this error:

Code: Select all

2024-02-12 14:19:22: WARNING[Server]: Undeclared global variable "DEFAULT_SEARCH_GRID_SIZE" accessed at .../net.minetest.Minetest/.minetest/mods/findbiome/init.lua:128
2024-02-12 14:19:22: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'findbiome' in callback on_chat_message(): /app/share/minetest/builtin/common/vector.lua:214: attempt to perform arithmetic on local 'b' (a nil value)
2024-02-12 14:19:22: ERROR[Main]: stack traceback:
2024-02-12 14:19:22: ERROR[Main]: 	/app/share/minetest/builtin/common/vector.lua:214: in function 'multiply'
2024-02-12 14:19:22: ERROR[Main]: 	.../net.minetest.Minetest/.minetest/mods/findbiome/init.lua:161: in function 'next_pos'
2024-02-12 14:19:22: ERROR[Main]: 	.../net.minetest.Minetest/.minetest/mods/findbiome/init.lua:199: in function 'search'
2024-02-12 14:19:22: ERROR[Main]: 	.../net.minetest.Minetest/.minetest/mods/findbiome/init.lua:242: in function 'find_biome'
2024-02-12 14:19:22: ERROR[Main]: 	.../net.minetest.Minetest/.minetest/mods/findbiome/init.lua:298: in function 'func'
2024-02-12 14:19:22: ERROR[Main]: 	/app/share/minetest/builtin/game/chat.lua:79: in function </app/share/minetest/builtin/game/chat.lua:52>
2024-02-12 14:19:22: ERROR[Main]: 	/app/share/minetest/builtin/common/register.lua:26: in function </app/share/minetest/builtin/common/register.lua:12>

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

Re: [Mod] Find Biome [1.1.0] [findbiome]

by TenPlus1 » Post

@Josselin2 - Edit the init.lua file and change line 128 from:

Code: Select all

res = DEFAULT_SEARCH_GRID_SIZE
to

Code: Select all

res = DEFAULT_SEARCH_GRID_RESOLUTION

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Find Biome [1.1.1] [findbiome]

by Wuzzy » Post

Sorry for the inconvenience. This bug is fixed now in the just-released version 1.1.1.

User avatar
SaKeL
Member
Posts: 743
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] Find Biome [1.1.1] [findbiome]

by SaKeL » Post

Nice mod Wuzzy! One suggestion I would have, the ocean/deep ocean biomes are still very hard to find. It does find some blobs of water underground somewhere but when I fly above the surface there are mostly no oceans at all. I think in this case the search would be more efficient from top to bottom (ymax to ymin) so it finds the oceans/deep oceans from the surface rather then underground cave what happen to be in the ocean biome.

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Find Biome [1.2.0] [findbiome]

by Wuzzy » Post

I've just released version 1.2.0. This update adds a new public function called "findbiome.list_biomes()" that allows you to get all biomes from Lua code.

Kindly contributed by Skivling.

@SaKeL: Yeah, this is tricky to figure out how to do it right, and tbh I don't really care enough right now to do it.

User avatar
SaKeL
Member
Posts: 743
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] Find Biome [1.2.0] [findbiome]

by SaKeL » Post

No worries its just a suggestion...still a good mod 😉

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests