Giter Club home page Giter Club logo

schemtools's Introduction

Schemtools

This mod contains some commands to create and handle schematics. You can select a world area, save it as a lua table and turn that table into a binary mts format. The lua format is handy because you can edit it by hand. Normal workflow would be to build your object in minetest, save it as lua, edit the lua file and then convert to mts.

Schemtools is mostly just the two mods schematic_save and saveschems combined.

local n1 = { name = "default:sand" }
local n2 = { name = "default:river_water_source" }
local n3 = { name = "default:river_water_flowing", param2 = 7 }
...

return {
	yslice_prob = {

	},
	size = {
		y = 14,
		x = 15,
		z = 11
	}
	,
	data = {
		n1, n1, n1, n1, n1, n1, n2, n2, n2, n2, n2, n2, n2, n2, n2, n3, n3, 
		n4, n4, n4, n4, n4, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, 
		n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, n5, 
		...
	}
}

To use the file directly use dofile(path), which will give you the table.

Usage

Some commands begin with "st" (schemtools) to distinguish them form the original worldedit ones.

Set position

Go to a spot and type "/stp1", then another and type "/stp2". The volume in between is your schematic. By default air won't be placed.

Save to lua

Then type in "/stsave ". The schematic will be saved in your world directory, with a ".lua" suffix. You can then copy it to an appropriate file and add register_decoration code.

Convert to mts

To use a binary format type "/lua2mts ", where file is the one you previously created. The resulting mts file will also be saved in the world folder.

Almost all code is taken from:

World Edit

Schematic Saver

Saveschems (for lua2mts)

schemtools's People

Contributors

casimirkapazi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

tumeninodes

schemtools's Issues

lua to mts error

main fuction has more than 65536 constants. Lua created with mts2lua script from "schemedit"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.