hmmmm wrote:To the people currently using Minetest schematics (NOT worldedit schematics): is anybody having problems with the file path? Currently, schematics are loaded relative to the current working directory, which seems wrong to me but I haven't heard any complaints about this particular thing.
No, no problem with that. The relative path can easily be obtained through the lua api without problem, and that's often done in mods. The schematics work fine as far as I can tell. Changing it might only lead to confusion regarding existing mods.
What we need is more advertisement for this useful feature. I'm afraid many modders don't know that schematics exist and how useful they are!
hmmmm wrote:Is the schematic file loading fine as-is? Should it be relative to the user path? How about the modpath?
The modpath is usually what we all work with.
Casimir wrote:And why can't the schematics be in plain text (and then get converted on startup)?
I'm very glad that they are not! The .mts format is pretty nice and useful and compact. Right now, mg_villages uses the schematics' file format and imports them, but does not use place_schematic, as that does not work too well in the mapgen-voxelmanip-situation where land has to be raised or lowered in order to fit to the buildings, and where other mapgens and mods might have further ideas about how the landscape ought to be modified.
The schematics as such are very fine. An option to import them into a lua voxelmanip datastructure would be helpful, but that can be done (and is done in mg_villages) in lua already thanks to minetest.decompress.
What we do need eventually are some api functions for importing diffrent file formats into a Minetest world. Apart from the .mts format, there are also the various WorldEdit formats. Support for reading, writing and placing them ought to be part of builtin, since it's a quasi-standard.
What all those formats lack is information about how deep the structure is burried and how it is orientated (where is it facing?). In most situations, players are standing around somewhere, looking into a more or less random direction, and if they want to spawn a building, they expect it to spawn into the direction they're looking at, not somewhere inpredictable (from the ingame point of view).
That's all not a big deal as such, but there's no point in everyone re-inventing the wheel each time a schematic is to be placed, so we ought to settle on some common functions for that. I hope to get mg_villages so far as to be able to offer some useful general functions. Right now, most of the code works, but there are some pretty dirty parts. WorldEdit may also require some re-work in order to work smoothly as standalone import functions.
None of this has anything directly to do with how schematics are working inside the engine. They work just fine. What we now need are some libraries around them, and that we (the modders) can do while hmmmm works on further improving the mapgen part of the engine :-)