]> git.lizzy.rs Git - worldedit.git/blob - ChatCommands.md
WorldEdit GUI support for new //cylinder functionality
[worldedit.git] / ChatCommands.md
1 Chat Commands\r
2 -------------\r
3 For more information, see the [README](README.md).\r
4 \r
5 Many commands also have shorter names that can be typed faster. For example, if we wanted to use `//move ? 5`, we could instead type `//m ? 5`. All shortened names are listed below:\r
6 \r
7 | Short Name | Original Name      |\r
8 |:-----------|:-------------------|\r
9 | `//i`      | `//inspect`        |\r
10 | `//rst`    | `//reset`          |\r
11 | `//mk`     | `//mark`           |\r
12 | `//umk`    | `//unmark`         |\r
13 | `//1`      | `//pos1`           |\r
14 | `//2`      | `//pos2`           |\r
15 | `//fp`     | `//fixedpos`       |\r
16 | `//v`      | `//volume`         |\r
17 | `//s`      | `//set`            |\r
18 | `//r`      | `//replace`        |\r
19 | `//ri`     | `//replaceinverse` |\r
20 | `//hspr`   | `//hollowsphere`   |\r
21 | `//spr`    | `//sphere`         |\r
22 | `//hdo`    | `//hollowdome`     |\r
23 | `//do`     | `//dome`           |\r
24 | `//hcyl`   | `//hollowcylinder` |\r
25 | `//cyl`    | `//cylinder`       |\r
26 | `//hpyr`   | `//hollowpyramid`  |\r
27 | `//pyr`    | `//pyramid`        |\r
28 \r
29 ### `//about`\r
30 \r
31 Get information about the mod.\r
32 \r
33     //about\r
34 \r
35 ### `//inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>`\r
36 \r
37 Enable or disable node inspection.\r
38 \r
39     //inspect on\r
40     //inspect off\r
41     //inspect 1\r
42     //inspect 0\r
43     //inspect true\r
44     //inspect false\r
45     //inspect yes\r
46     //inspect no\r
47     //inspect enable\r
48     //inspect disable\r
49     //inspect\r
50 \r
51 ### `//reset`\r
52 \r
53 Reset the region so that it is empty.\r
54 \r
55     //reset\r
56 \r
57 ### `//mark`\r
58 \r
59 Show markers at the region positions.\r
60 \r
61     //mark\r
62 \r
63 ### `//unmark`\r
64 \r
65 Hide markers if currently shown.\r
66 \r
67     //unmark\r
68 \r
69 ### `//pos1`\r
70 \r
71 Set WorldEdit region position 1 to the player's location.\r
72 \r
73     //pos1\r
74 \r
75 ### `//pos2`\r
76 \r
77 Set WorldEdit region position 2 to the player's location.\r
78 \r
79     //pos2\r
80 \r
81 ### `//p set/set1/set2/get`\r
82 \r
83 Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
84 \r
85     //p set\r
86     //p set1\r
87     //p set2\r
88     //p get\r
89 \r
90 ### `//fixedpos set1 x y z`\r
91 \r
92 Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`).\r
93 \r
94     //fixedpos set1 0  0 0\r
95     //fixedpos set1 -30 5 28\r
96     //fixedpos set2 1004 -200 432\r
97 \r
98 ### `//volume`\r
99 \r
100 Display the volume of the current WorldEdit region.\r
101 \r
102     //volume\r
103 \r
104 ### `//deleteblocks`\r
105 \r
106 Delete the MapBlocks (16x16x16 units) that contain the selected region. This means that mapgen will be invoked for that area. As only whole MapBlocks get removed, the deleted area is usually larger than the selected one. Also, mapgen can trigger mechanisms like mud reflow or cavegen, which affects nodes (up to 112 nodes away) outside the MapBlock, so dont use this near buildings. Note that active entities are not part of a MapBlock and do not get deleted.\r
107 \r
108     //deleteblocks\r
109 \r
110 ### `//set <node>`\r
111 \r
112 Set the current WorldEdit region to `<node>`.\r
113 \r
114     //set air\r
115     //set cactus\r
116     //set Blue Lightstone\r
117     //set dirt with grass\r
118 \r
119 ### `//mix <node1> ...`\r
120 \r
121 Fill the current WorldEdit region with a random mix of `<node1>`, `...`.\r
122 \r
123     //mix air\r
124     //mix cactus stone glass sandstone\r
125     //mix Bronze\r
126     //mix default:cobble air\r
127 \r
128 ### `//replace <search node> <replace node>`\r
129 \r
130 Replace all instances of `<search node>` with `<replace node>` in the current WorldEdit region.\r
131 \r
132     //replace Cobblestone air\r
133     //replace lightstone_blue glass\r
134     //replace dirt Bronze Block\r
135     //replace mesecons:wire_00000000_off flowers:flower_tulip\r
136 \r
137 ### `//replaceinverse <search node> <replace node>`\r
138 \r
139 Replace all nodes other than `<search node>` with `<replace node>` in the current WorldEdit region.\r
140 \r
141     //replaceinverse Cobblestone air\r
142     //replaceinverse flowers:flower_waterlily glass\r
143     //replaceinverse dirt Bronze Block\r
144     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
145 \r
146 ### `//hollowsphere <radius> <node>`\r
147 \r
148 Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
149 \r
150     //hollowsphere 5 Diamond Block\r
151     //hollowsphere 12 glass\r
152     //hollowsphere 17 mesecons:wire_00000000_off\r
153 \r
154 ### `//sphere <radius> <node>`\r
155 \r
156 Add sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
157 \r
158     //sphere 5 Diamond Block\r
159     //sphere 12 glass\r
160     //sphere 17 mesecons:wire_00000000_off\r
161 \r
162 ### `//hollowdome <radius> <node>`\r
163 \r
164 Add hollow dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
165 \r
166     //hollowdome 5 Diamond Block\r
167     //hollowdome -12 glass\r
168     //hollowdome 17 mesecons:wire_00000000_off\r
169 \r
170 ### `//dome <radius> <node>`\r
171 \r
172 Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
173 \r
174     //dome 5 Diamond Block\r
175     //dome -12 glass\r
176     //dome 17 mesecons:wire_00000000_off\r
177 \r
178 ### `//hollowcylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
179 \r
180 Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>`, base radius `<radius1>` (and top radius `[radius2]`), composed of `<node>`.\r
181 \r
182 Despite its name this command allows you to create cones (`radius2` = 0) as well as any shapes inbetween (0 < `radius2` < `radius1`).\r
183 Swapping `radius1` and `radius2` will create the same object but upside-down.\r
184 \r
185     //hollowcylinder x +5 8 Bronze Block\r
186     //hollowcylinder y 28 10 glass\r
187     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
188     //hollowcylinder ? 2 4 default:stone\r
189 \r
190     //hollowcylinder y 10 10 0 walls:cobble\r
191     //hollowcylinder x 6 0 5 Dirt\r
192     //hollowcylinder z 20 10 20 default:desert_stone\r
193 \r
194 ### `//cylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
195 \r
196 Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>`, base radius `<radius1>` (and top radius `[radius2]`), composed of `<node>`.\r
197 Can also create shapes other than cylinders, e.g. cones (see documentation above).\r
198 \r
199     //cylinder x +5 8 Bronze Block\r
200     //cylinder y 28 10 glass\r
201     //cylinder z -12 3 mesecons:wire_00000000_off\r
202     //cylinder ? 2 4 default:stone\r
203 \r
204     //cylinder y 10 10 0 walls:cobble\r
205     //cylinder x 6 0 5 Dirt\r
206     //cylinder z 20 10 20 default:desert_stone\r
207     \r
208 ### `//hollowpyramid x/y/z? <height> <node>`\r
209 \r
210 Add hollow pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
211 \r
212     //hollowpyramid x 8 Diamond Block\r
213     //hollowpyramid y -5 glass\r
214     //hollowpyramid z 2 mesecons:wire_00000000_off\r
215     //hollowpyramid ? 12 mesecons:wire_00000000_off\r
216 \r
217 ### `//pyramid x/y/z? <height> <node>`\r
218 \r
219 Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
220 \r
221     //pyramid x 8 Diamond Block\r
222     //pyramid y -5 glass\r
223     //pyramid z 2 mesecons:wire_00000000_off\r
224     //pyramid ? 12 mesecons:wire_00000000_off\r
225 \r
226 ### `//spiral <length> <height> <spacer> <node>`\r
227 \r
228 Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
229 \r
230     //spiral 20 5 3 Diamond Block\r
231     //spiral 5 2 1 glass\r
232     //spiral 7 1 5 mesecons:wire_00000000_off\r
233 \r
234 ### `//copy x/y/z/? <amount>`\r
235 \r
236 Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.\r
237 \r
238     //copy x 15\r
239     //copy y -7\r
240     //copy z +4\r
241     //copy ? 8\r
242 \r
243 ### `//move x/y/z/? <amount>`\r
244 \r
245 Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.\r
246 \r
247     //move x 15\r
248     //move y -7\r
249     //move z +4\r
250     //move ? -1\r
251 \r
252 ### `//stack x/y/z/? <count>`\r
253 \r
254 Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.\r
255 \r
256     //stack x 3\r
257     //stack y -1\r
258     //stack z +5\r
259     //stack ? 12\r
260 \r
261 ### `//stack2 <count> <x> <y> <z>`\r
262 \r
263 Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`.\r
264 \r
265     //stack2 5 3 8 2\r
266     //stack2 1 -1 -1 -1\r
267 \r
268 ### `//scale <factor>`\r
269 \r
270 Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin.\r
271 \r
272     //scale 2\r
273     //scale 1\r
274     //scale 10\r
275 \r
276 ### `//transpose x/y/z/? x/y/z/?`\r
277 \r
278 Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
279 \r
280     //transpose x y\r
281     //transpose x z\r
282     //transpose y z\r
283     //transpose ? y\r
284 \r
285 ### `//flip x/y/z/?`\r
286 \r
287 Flip the current WorldEdit region along the x/y/z/? axis.\r
288 \r
289     //flip x\r
290     //flip y\r
291     //flip z\r
292     //flip ?\r
293 \r
294 ### `//rotate x/y/z/? <angle>`\r
295 \r
296 Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).\r
297 \r
298     //rotate x 90\r
299     //rotate y 180\r
300     //rotate z 270\r
301     //rotate ? -90\r
302 \r
303 ### `//orient <angle>`\r
304 \r
305 Rotate oriented nodes in the current WorldEdit region around the Y axis by angle `<angle>` (90 degree increment)\r
306 \r
307     //orient 90\r
308     //orient 180\r
309     //orient 270\r
310     //orient -90\r
311 \r
312 ### `//fixlight`\r
313 \r
314 Fixes the lighting in the current WorldEdit region.\r
315 \r
316     //fixlight\r
317 \r
318 ### `//drain`\r
319 \r
320 Removes any fluid node within the current WorldEdit region.\r
321 \r
322     //drain\r
323 \r
324 ### `//hide`\r
325 \r
326 Hide all nodes in the current WorldEdit region non-destructively.\r
327 \r
328     //hide\r
329 \r
330 ### `//suppress <node>`\r
331 \r
332 Suppress all <node> in the current WorldEdit region non-destructively.\r
333 \r
334     //suppress Diamond Block\r
335     //suppress glass\r
336     //suppress mesecons:wire_00000000_off\r
337 \r
338 ### `//highlight <node>`\r
339 \r
340 Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
341 \r
342     //highlight Diamond Block\r
343     //highlight glass\r
344     //highlight mesecons:wire_00000000_off\r
345 \r
346 ### `//restore`\r
347 \r
348 Restores nodes hidden with WorldEdit in the current WorldEdit region.\r
349 \r
350     //restore\r
351 \r
352 ### `//save <file>`\r
353 \r
354 Save the current WorldEdit region to "(world folder)/schems/`<file>`.we".\r
355 \r
356     //save some random filename\r
357     //save huge_base\r
358 \r
359 ### `//allocate <file>`\r
360 \r
361 Set the region defined by nodes from "(world folder)/schems/`<file>`.we" as the current WorldEdit region.\r
362 \r
363     //allocate some random filename\r
364     //allocate huge_base\r
365 \r
366 ### `//load <file>`\r
367 \r
368 Load nodes from "(world folder)/schems/`<file>`.we" with position 1 of the current WorldEdit region as the origin.\r
369 \r
370     //load some random filename\r
371     //load huge_base\r
372 \r
373 ### `//lua <code>`\r
374 \r
375 Executes `<code>` as a Lua chunk in the global namespace.\r
376 \r
377     //lua worldedit.pos1["singleplayer"] = {x=0, y=0, z=0}\r
378     //lua worldedit.rotate(worldedit.pos1["singleplayer"], worldedit.pos2["singleplayer"], "y", 90)\r
379 \r
380 ### `//luatransform <code>`\r
381 \r
382 Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
383 \r
384     //luatransform minetest.add_node(pos, {name="default:stone"})\r
385     //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})\r
386 \r
387 ### `//mtschemcreate <file>`\r
388 \r
389 Save the current WorldEdit region using the Minetest Schematic format to "(world folder)/schems/`<file>`.mts".\r
390 \r
391     //mtschemcreate some random filename\r
392     //mtschemcreate huge_base\r
393 \r
394 ### `//mtschemplace <file>`\r
395 \r
396 Load nodes from "(world folder)/schems/`<file>`.mts" with position 1 of the current WorldEdit region as the origin.\r
397 \r
398     //mtschemplace some random filename\r
399     //mtschemplace huge_base\r
400 \r
401 ### `//mtschemprob start/finish/get`\r
402 \r
403 After using `//mtschemprob start` all nodes punched will bring up a text field where a probablity can be entered.\r
404 This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will display the probabilities saved for the nodes.\r
405 \r
406     //mtschemprob get\r
407 \r
408 ### `//clearobjects`\r
409 \r
410 Clears all objects within the WorldEdit region.\r
411 \r
412     //clearobjects\r
413     \r
414 ### `//shift x/y/z/?/up/down/left/right/front/back [+|-]<amount>`\r
415 \r
416 Shifts the selection area by `[+|-]<amount>` without touching its contents. The shifting axis can be absolute (`x/y/z`) or \r
417 relative (`up/down/left/right/front/back`). \r
418 \r
419                 //shift left 5\r
420 \r
421 ### `//expand [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
422 \r
423 Expands the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be expanded in the\r
424 opposite direction over the same axis by `[reverse-amount]`.\r
425 \r
426                 //expand right 7 5\r
427                 \r
428 ### `//contract [+|-]x/y/z/?/up/down/left/right/front/back <amount> [reverse-amount]`\r
429 \r
430 Contracts the selection by `<amount>` in the selected absolute or relative axis. If specified, the selection can be contracted in the\r
431 opposite direction over the same axis by `[reverse-amount]`.\r
432 \r
433                 //expand right 7 5\r
434                 \r
435 ### `//outset [hv] <amount>`\r
436 \r
437 Expands the selection in all directions by `<amount>`. If specified, the selection can be expanded horizontally in the x and z axes `[h]`\r
438 or vertically in the y axis `[v]`.\r
439 \r
440                 //outset v 5\r
441                 \r
442 ### `//inset [hv] <amount>`\r
443 \r
444 Contracts the selection in all directions by `<amount>`. If specified, the selection can be contracted horizontally in the x and z axes `[h]`\r
445 or vertically in the y axis `[v]`.\r
446 \r
447                 //outset v 5\r