How do I use schematics?

Post Reply
ChristienChapman
Member
Posts: 117
Joined: Sat May 28, 2022 00:04

How do I use schematics?

by ChristienChapman » Post

I have now realized why schematics are so good for servers. They are small and can hold big maps. I have decided to do this as well for my next big project. I need help though. How do I place schematic? minetest.place_schematic wont work so I need help. I have the schematics made and ready. Please help.
God bless you.

List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633

- > cdb_1d60e1a03f83

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: How do I use schematics?

by loosewheel » Post

It depends on the format of the schematic. If its a WorldEdit schematic you could make worldedit a dependency and use its api. I haven't used this but it looks like worldedit.deserialize might be it. If this is the format you can check the doc at https://github.com/Uberi/Minetest-World ... t%20API.md.

If this is not the format, and is was created by another mod, maybe that mod exposes a method to place it.

If not then you will have to write the code to place the schematic yourself. You will need to know the format of the schematic, and walk through setting all the relevant nodes from the schematic, generally from a base position. Or write a routine to convert the schematic to another format, then you can use the minetest.place_schematic, or WorldEdit, or whatever format you converted it to to place them.

ChristienChapman
Member
Posts: 117
Joined: Sat May 28, 2022 00:04

Re: How do I use schematics?

by ChristienChapman » Post

Okay cause my last release was over 30MB and I don't think anyone wants to play it or host a server of it because of the size. Pretty much half of the data was the world being prebuilt
God bless you.

List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633

- > cdb_1d60e1a03f83

ChristienChapman
Member
Posts: 117
Joined: Sat May 28, 2022 00:04

Re: How do I use schematics?

by ChristienChapman » Post

So I followed documentation but no map is being placed at 0 10 0. Please help...

Code: Select all

minetest.register_on_joinplayer(
	function(player)

minetest.chat_send_all("t")

worldedit.deserialize(worldedit.pos1[{x = 0, y = 10, z = 0}], "testWorld")



		
	end
)
God bless you.

List of releases:
Minetest Zombies Minigame - viewtopic.php?f=9&t=28442&p=412633#p412633

- > cdb_1d60e1a03f83

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: How do I use schematics?

by loosewheel » Post

If your schematic was saved with a recent version of Minetest which is using LuaJIT, it may not work at the moment. You could check the forum thread for that mod or the github repository.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests