I've been making sections of wall, road/paths, roof, corridors, etc. ie things which are basically repetitive, but randomly change orientation or location. Therefore I can't easily use //copy //move or //rotate, as the orientation can't be defined, and would like to use player location to positioning much more easily.
I like to essentially develop a script to ease most of the work, as below, but have a couple of problems:
One problem is I can't figure out how WE translates and rotates a schem file relative to the pos locations when WE loads it. It doesn't seem to depend on the pos1/pos2 orientation, or player yaw.
Secondly I also can't figure out how to reset pos1/2 to exactly mark the just loaded section so I can then rotate it appropriately
I'd therefore like a shorthand (ideally a short chat command or hotkey) way of doing essentially the following sequence:-
set pos1 to player current location (possibly with a defined offset - in case the player can't stand exactly where needed eg for foundations etc)
set rotation based on player yaw (direction facing)
set pos2 (if needed) based on above location and rotation.
move the player forward far enough to move out of the load zone (ideally set from the schem file size, but otherwise could probably be a set amount - eg 1 or 2 nodes.
load so minX,minY,minZ for the schem file is at pos1
If needed rotation based on player direction (as above).
Ideally I would like to be able to extract the dimensions from the file so I could x/y/z offset it (useful if foundations etc required, so player can't stand at location of origin)
[then move to next location and repeat]...
I'm guessing some sort of //lua <code> would do it, but perhaps better would be defining my own chat command which loads the lua sequence from a file I can edit while in a game (since I don't want to reload the map each time I make a small edit, and can't copy and paste to the chat bar).
If anyone's done basically all this so I can copy code, I'd really appreciate it, else a few pointers to get me started would be much appreciated...
Also:-
sfan5 wrote:WorldEdit attempts to create the schems dir with mkdir. If this fails there is no portable way left of creating a directory.
Would it be possible to not fail silently - ie warn that the file was not created (or if somewhere random then note where). On my Ubuntu 14.04 if there is no pre-existing schem folder WE fails, but still produces a chat message implying that the file was saved.
[EDIT: actually looked at the code in the worldedit_commands/init.lua and realised that it is actually making a folder and warning, and turns out it works on a blank world, some must be some sort of mod conflict, I'll have a little play and see if I can figure it out.]