Modder feedback needed: MT Schematic (.mts) file paths

What directory should MT schematic filenames be relative to?

It's fine as it is right now
8
89%
It should be relative to the user path
1
11%
It should be relative to the mod path (breaks current mods)
0
No votes
 
Total votes : 9

hmmmm
Member
 
Posts: 47
Joined: Tue Apr 02, 2013 04:04

Modder feedback needed: MT Schematic (.mts) file paths

by hmmmm » Sat Jan 03, 2015 18:38

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.

Is the schematic file loading fine as-is? Should it be relative to the user path? How about the modpath?
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

Re: Modder feedback needed: MT Schematic (.mts) file paths

by Casimir » Sat Jan 03, 2015 19:39

As far as I understand it gets currently loaded the same way as textures, models and sounds. I don't understand exactly what you want to change. Can you please try to explain it to me?
And why can't the schematics be in plain text (and then get converted on startup)?
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero

Re: Modder feedback needed: MT Schematic (.mts) file paths

by HeroOfTheWinds » Sat Jan 03, 2015 19:47

Indeed, I have had no problems with the way things are set up, and in most cases they are loaded relative to the modpath anyway, since most lua files tend to be in the top directory of the mod's folder. Of course, it could be a problem for some people if they don't follow the usual mod structure conventions, but usually the only people who do that wouldn't use schematics...

I think the user path would be the worst choice. That would add needless confusion when so much of the current modding api uses relative paths.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Modder feedback needed: MT Schematic (.mts) file paths

by paramat » Sat Jan 03, 2015 19:56

Seems okay as it is, no problems for me.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Modder feedback needed: MT Schematic (.mts) file paths

by Sokomine » Sat Jan 03, 2015 20:59

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 :-)
A list of my mods can be found here.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 9 guests

cron