Minecraft: Automating creation with WorldEdit


Possible future candidate for an adventure map

From my point of view, creating a tool, that would perform your desired action efficiently, is often better than just doing mentioned thing.
In last few days I've developed a small tool that translates given commands into series of WorldEdit plugin commands, and provides simple interface for writing dynamic scripts that modify world contents, even without having access to server to be able to import JS scripts.
Since game handles input nicely, a single message can be sent every 200..300ms, meaning that subset of commands needed to change selection bounds and perform desired operation over it often takes less than a second to perform, in comparison to minute-measured time needed to do same manually.
This opens rather interesting perspectives of automating creation of typical structures, as well as making it possible to push procedurally generated content into game easily.
Yesterday I've spent some time to port part of RPG05's dungeon generator for use with this, and this is the result.


Result, as presented in-game

Current script is 350 lines long, 200 of those being the actual maze generator, and 150 being 'wrapper' that decides room materials and their content depending on generator output.
Without having much (see: currently any) optimization put in, it takes it from 2 to 6 seconds to generate contents of every room, taking it only several minutes to get final result seen on image.
Decisions of block kind and room contents are made semi-randomly, with separate cases for specific conditions (for example, 'dead' end rooms have chances to have largely different content, from grass and bookshelves to monster spawners).


Result, roof removed

The largest trouble met so far is rewards. Specifically, adding chests with collectable items - plugin currently does not seem to allow creating chests with items in them.

Overall, from my experience and feedback of other people, it turns out pretty fun so far, and I hope to find time to make multiple procedural content generators in future, possibly adding additional variety to this already randomized game.

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.