Page 1 of 4

[Mod] Schematic Editor [1.8.0] [schemedit]

Posted: Wed Sep 20, 2017 13:24
by Wuzzy
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.

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

Posted: Wed Sep 20, 2017 14:03
by u19503
I was already waiting for this to be released :)
I'm sure farlands will benefit alot from this
Thanks wuzzy :)

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

Posted: Wed Sep 20, 2017 14:29
by v-rob
So, I'm guessing this saves the blocks only, and not the air, correct? If so, then I'm going to love this.

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

Posted: Wed Sep 20, 2017 16:12
by TumeniNodes
Awesome Wuzzy! I have to check this out

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

Posted: Wed Sep 20, 2017 19:32
by Wuzzy
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.

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

Posted: Wed Sep 20, 2017 20:01
by sofar
s/octarian/octacian/. Interesting, this is certainly a very useful thing. I'll have to test this :)

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

Posted: Wed Sep 20, 2017 21:11
by v-rob
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.

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

Posted: Tue Oct 24, 2017 09:02
by burli
Is it possible to store schematics as Lua table instead of MTS?

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

Posted: Tue Oct 24, 2017 11:06
by hajo
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 ?

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

Posted: Tue Oct 24, 2017 11:42
by burli
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

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

Posted: Thu Nov 23, 2017 14:16
by burli
successfully added the code from duanes schematic safe mod. Now this mod stores both formats.

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

Posted: Thu Nov 23, 2017 17:35
by Wuzzy
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.

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

Posted: Thu Nov 23, 2017 17:48
by burli
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

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

Posted: Thu Nov 23, 2017 18:05
by burli
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

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

Posted: Fri Nov 24, 2017 05:27
by Wuzzy
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.

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

Posted: Fri Nov 24, 2017 07:55
by burli
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

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

Posted: Tue Mar 13, 2018 19:56
by octacian
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?

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

Posted: Tue Mar 13, 2018 21:50
by sofar
octacian wrote:
sofar wrote: s/octarian/octacian/...
What's that supposed to mean? lol
http://www.grymoire.com/Unix/Sed.html

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

Posted: Tue Mar 13, 2018 22:31
by octacian
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...

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

Posted: Fri Apr 20, 2018 09:07
by texmex
Thank you for this mod Wuzzy and octacian, it's very useful.

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

Posted: Mon Apr 23, 2018 15:25
by texmex
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?

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

Posted: Thu Apr 26, 2018 01:47
by Wuzzy
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.

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

Posted: Thu Apr 26, 2018 07:23
by texmex
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. :)

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

Posted: Wed May 16, 2018 22:55
by Lone_Wolf
Love the mod!
Any chance you could allow the user to set a custom file destination?

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

Posted: Thu May 17, 2018 14:53
by Wuzzy
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.