[Mod] Schematic Editor [1.8.0] [schemedit]

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

[Mod] Schematic Editor [1.8.0] [schemedit]

by Wuzzy » Post

Create, edit and save schematics.

Download: From the ContentDB.
Alternatively, from here: https://codeberg.org/Wuzzy/minetest_sch ... /1.8.0.zip

A schematic is a data structure in Minetest which contains data to place a pre-defined structure in the world, like trees or buildings.

This mod also supports the advanced schematic features such as per-node probabilities, force-placed nodes, and Y slice probabilities. Server commands: placeschem (place schematic), mts2lua (convert .mts to .lua file).

This mod is for modders and advanced users, the goal of this mod is to become the #1 schematic editing tool.
If you don't understand anything of this, you should read the Minetest Lua API documentation on schematics.

To learn how to use this mod, see the README.md and USAGE.md files.
Note: This mod is a fork from advschem by octacian.
Last edited by Wuzzy on Sun Dec 24, 2023 00:20, edited 22 times in total.

u19503

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by u19503 » Post

I was already waiting for this to be released :)
I'm sure farlands will benefit alot from this
Thanks wuzzy :)

User avatar
v-rob
Developer
Posts: 969
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by v-rob » Post

So, I'm guessing this saves the blocks only, and not the air, correct? If so, then I'm going to love this.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
TumeniNodes
Member
Posts: 2941
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] Schematic Editor [1.0.0] [schemedit]

by TumeniNodes » Post

Awesome Wuzzy! I have to check this out
A Wonderful World

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by Wuzzy » Post

v-rob wrote:So, I'm guessing this saves the blocks only, and not the air, correct? If so, then I'm going to love this.
Both.
By default, the air is saved as air. If you want a node to not replace anything when the schematic is placed, you can place the new schematic void at this position. The schematic void will never be saved, it is a placeholder for the absense of a block to place (not air!).

This is important for trees and the like.

I recommend to use this mod in combination with WorldEdit to place large amounts of schematic voids.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by sofar » Post

s/octarian/octacian/. Interesting, this is certainly a very useful thing. I'll have to test this :)

User avatar
v-rob
Developer
Posts: 969
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by v-rob » Post

Wuzzy wrote:
v-rob wrote:So, I'm guessing this saves the blocks only, and not the air, correct? If so, then I'm going to love this.
Both.
By default, the air is saved as air. If you want a node to not replace anything when the schematic is placed, you can place the new schematic void at this position. The schematic void will never be saved, it is a placeholder for the absense of a block to place (not air!).

This is important for trees and the like.

I recommend to use this mod in combination with WorldEdit to place large amounts of schematic voids.
Oh, YES! I've been waiting for this for a while.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by burli » Post

Is it possible to store schematics as Lua table instead of MTS?

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by hajo » Post

burli wrote:Is it possible to store schematics as Lua table instead of MTS?
possible - almost certainly (eg. encoded as a binary blob)

Some of the obvious questions in that regard are
* why ?
* what would be the advantage ?
* how to ...
* who will do the coding ?
* when will it be ready / usable / bugfree ?

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by burli » Post

hajo wrote:
burli wrote:Is it possible to store schematics as Lua table instead of MTS?
* why ?
Because it is impossible to edit or check binary files. Right now I had a case with a bug an some schematic files and I could only indirectly find out.
hajo wrote: * what would be the advantage ?
Counterquestion: what is the advantage of binary files? Save a few bytes? I a century where we deal with terabytes of disk space and and internet connections with over 100MBit or even GBit? Even with a 10MBit connection you wouldn't notice the difference between MTS files or Lua tables

Edit: btw, the coding is already done. Just look at duanes schematic saver

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by burli » Post

successfully added the code from duanes schematic safe mod. Now this mod stores both formats.

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by Wuzzy » Post

Burli, I have no idea what you're talking about. This mod hasn't changed at all.
Are you maybe in the wrong thread?
o_O

If you have some good code to share for this mod, please post it. I'll probably merge it.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by burli » Post

I didn't add it to your repo. Just a local copy of your editor. As I said I add the serialize function from duanes schematic saver and now this editor can save schematics as lua table.

I'm not 100% happy with the code. I will make some changes, than I will share the code, if it is ok for duane.

Lua tables are more useful than mts files

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by burli » Post

This is the license of the mod. Don't know if you are happy with it

https://github.com/duane-r/schematic_sa ... er/LICENSE

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by Wuzzy » Post

I would prefer it more if I wouldn't be forced to change the license, but if your code is good, I probably won't mind that much.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by burli » Post

I just include the serialize.lua file and use it to save a lua table after you saved the mts file. I think it is possible to use the code directly from duanes mod. But that would mean you have to install and activate both mods.

Don't know what's better

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by octacian » Post

Nice! I'm really happy to see the improvements that have been made here and will be using this mod for any future MT projects of my own that require the use of schematics. Personally, I've been spending less and less time working on MT-related projects as I am now working on my own game, so I'm happy to see that Wuzzy was able to make something even better based off of what I'd begun, especially considering that I haven't done a very good job of maintaining it so far, and probably wouldn't be able to in the future either.

With that in mind, I'd like to thank you Wuzzy for being so kind as to put a credit link in the main post and know that I will be closing the issues on that repository and adding a README with a link to here. Also, I may move the repository off of GitHub at some point soon to an archive platform I'm working on, so...
sofar wrote: s/octarian/octacian/...
What does that mean?
Last edited by octacian on Tue Mar 13, 2018 22:35, edited 1 time in total.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by sofar » Post

octacian wrote:
sofar wrote: s/octarian/octacian/...
What's that supposed to mean? lol
http://www.grymoire.com/Unix/Sed.html

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by octacian » Post

sofar wrote:
octacian wrote:
sofar wrote: s/octarian/octacian/...
What does that mean?
http://www.grymoire.com/Unix/Sed.html
Ah, now I understand. Reminds me, I've been meaning to learn about Sed for a long time, but never got around to it...
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by texmex » Post

Thank you for this mod Wuzzy and octacian, it's very useful.

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by texmex » Post

Having worked with this tool for some time now, I have a suggestion. I find myself WorldEdit'ing away previously placed void blocks just to be able to see the schematic clearly when working on it. A setting in the Schematic Creator formspec for hiding void blocks would come very handy. Any comments, Wuzzy?

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by Wuzzy » Post

Good idea! I agree it can be a bit unwieldy with all those void blocks.
I'm thinking about maybe a way of toggling schematic void visibility on and off with a single button. Or something like this.

But do note this mod is not meant to replace WorldEdit. WorldEdit is not the enemy. I think this mod quite nicely can work together with WorldEdit.

Note all my Minetest projects are more or less “on hold” for now.

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by texmex » Post

Wuzzy wrote:Good idea! I agree it can be a bit unwieldy with all those void blocks.
I'm thinking about maybe a way of toggling schematic void visibility on and off with a single button. Or something like this.
Yes, this is exactly what I need.
Wuzzy wrote:But do note this mod is not meant to replace WorldEdit. WorldEdit is not the enemy. I think this mod quite nicely can work together with WorldEdit.
It does and I use them well in conjunction.
Wuzzy wrote:Note all my Minetest projects are more or less “on hold” for now.
Just a reminder for later then. :)

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by Lone_Wolf » Post

Love the mod!
Any chance you could allow the user to set a custom file destination?
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

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

Re: [Mod] Schematic Editor [1.0.0] [schemedit]

by Wuzzy » Post

Note that anything outside the world directory is taboo, this is a restriction dictated by Minetest's mod security system.
And I don't plan to violate that, I don't want my mod to be able to write on any directory.

The only leeway I might have is changing the directory inside the world directory, but this doesn't seem too helpful.

Maybe this should first be discussed with Minetest developers, the mod security system only allows us to write into a very few specific locations.

Please tell me your specific use case for this feature, and how you would use it. Maybe I'll understand your motivation then.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests