Moud

Building in the editor#

The editor is where you lay out a scene by hand: parts, lights, zones, cameras and the joints between them. What you build is saved into the scene's .scene file and loaded like anything a script adds. See Places, modules, scenes and scripts for the files, and Physics for what each joint does once the place plays.

This page covers undo, copying, moving a selection, building with blocks, joining parts, editing with others in Team Create and choosing the code editor scripts open in. Each other editor feature is described on the page of the thing it builds.

Undo, copy and paste#

Every change you make to the scene is one step in the history: a property typed or dragged, a gizmo drag, a rename, a drop in the Explorer, a paste, a group, a delete, an animation key, a Minecraft world imported as the terrain. Ctrl+Z undoes the last step, and Ctrl+Y or Ctrl+Shift+Z does it again.

Before you press either, the Edit menu tells you what it would do, such as Undo Move Crate or Redo Rename Lamp. A move, rotate, scale, delete or rename of one thing names that thing. A step that touched several says how many, or just what it did.

Undo also puts the selection back to what it was before the step, and redo to what it was when you undid it. The thing that changed is then the one the Properties panel shows, so you can see what the undo did without looking for it.

The history belongs to the scene that is open. Opening another scene, or restoring a backup, starts a new one. Save and Save As keep it, so you can save and still undo past the save.

Undoing back to where you last saved counts as saved: the Unsaved mark in the status bar and the dot on the scene tab go away, and closing or switching scenes does not ask. Redoing or making another change brings them back.

Things point at each other through reference properties, such as a weld's part0 and part1 or a model's primaryPart. The editor keeps those links when it puts things back:

  • Undoing a delete points the restored things at what they pointed at, and points everything that pointed at them back at them.
  • Group and Ungroup keep every link into and out of what they move.
  • A duplicate, or a copy pasted in the same scene, points at the same things outside the copy as the original. Links inside the copy point inside the copy.

Copy puts the selection on the clipboard as scene text, so it can be pasted into another scene or after a restart. Links to things outside the copy are only kept while the scene you copied from is open. Paste (Ctrl+V) puts the copy next to the selected object, in its parent. Where it lands depends on the mouse:

  • Over the viewport, the copy sits on whatever is under the mouse: the bottom of its box on the surface, its middle under the pointer. The things in it keep their places around each other. With snapping on, it moves across by whole grid steps, so a copy of something on the grid stays on it.
  • Anywhere else, such as the Explorer or the Edit menu, it goes where the original was, one grid step along X and Z, or one stud with snapping off, so you can see it. Pasting the same copy again moves each one a step further.

Paste Into (Ctrl+Shift+V) puts it inside the selected object, exactly where the original was. The pasted things are selected.

Selecting something in the viewport opens its parents in the Explorer and scrolls to it. F frames the selection from anywhere in the editor except a text field.

Playing and coming back#

Playing (F6) runs the place from what is in the editor, saved or not. Stopping puts the scene back as it was before you played, with the same selection and the same history, and nothing a script made is left behind. Blocks go back too: whatever a game or a player broke or built while playing is undone when you stop. If the scene file changed on disk while you played, the editor asks what to do about it as soon as you are back, as below.

When the scene file changes on disk#

The editor checks the open scene file every second. It never loads it again by itself. When another program has changed it, a window names the scene and offers two ways on:

  • Reload from disk loads the file and starts the history again. If you had unsaved changes, the window says they will be lost, and a copy of the scene as you had it goes into .moud/backups.
  • Keep mine, or Escape, keeps what is in the editor. The next save replaces the file, and the version it replaces is kept in .moud/backups.

The window comes once for each change on disk. After you answer it, it stays away until the file changes again. File > Scene Backups... lists both kinds of copy.

Building with blocks#

The terrain is part of the scene. Its blocks are saved next to the scene file, as main.polar for main.scene, when you save. Every change to them is a step in the same history as everything else.

G, or Walk and build in the Build tab, puts you in the world as yourself, in creative, at the editor camera. Place and break blocks as you would in Minecraft. G or Escape brings the editor back where you stood, with the same selection and history. Each stroke, from pressing a mouse button to letting go, is one undo step, so a wall drawn in one drag undoes in one Ctrl+Z.

Hold Alt while building for the build options:

  • Fast place places on every block the crosshair crosses while you hold the button, with no delay between blocks.
  • Bulldozer does the same for breaking.
  • Replace swaps the block you point at for the one in your hand instead of placing next to it. Stairs, slabs, walls and fences change material and keep their shape, so oak stairs become stone brick stairs facing the same way.
  • Long reach reaches 64 blocks, as far as the game allows.
  • Angel placement places into the air in front of you when you point at nothing.
  • Exact pick makes the middle button copy the block with its state, so the stair you pick is placed facing the way it faced.
  • No updates stops neighbours reacting: sand stays up, water does not flow.
  • Mirror X and Mirror Z copy every block you place or break across the point you stood on when you turned them on.

The Blocks tool in the viewport toolbar works on a box of blocks without leaving the camera. Drag across blocks to select a box, and Shift+click to stretch it. Then:

  • Fill fills the box with the block named in the field. A state works too: minecraft:oak_stairs[facing=east].
  • Hollow builds walls, a floor and a roof, with air inside.
  • Replace swaps every block in the box that isn't air.
  • Clear turns the box into air.
  • Copy and Cut keep the box. Paste puts it down with its lowest corner at the lowest corner of the box you have selected, turned by the angle on the button next to it.

Each of these is one undo step.

The Build panel#

Building by hand is fine for a doorway or a wall. For a hillside, a cave or a town square, the Build panel works on many blocks at once: a brush that shapes the ground under the mouse, and region tools that fill, copy and move whole boxes of blocks.

Build in the top bar, or Ctrl+Shift+B, switches the editor to building. The Explorer and Properties make way for Build on the left and Blocks on the right, and History joins Output and Assets at the bottom. Build again brings the part panels back.

The Build panel has three modes: Terrain for the brush, Region for boxes of blocks, and Hand for building by hand. Tab over the viewport steps through them.

Shaping terrain#

Terrain shapes blocks with a brush where the mouse points. Hold the mouse button and drag to paint a stroke. The tool decides what the stroke does, and 1 to 8 pick it:

  • Add builds blocks up and Remove carves them away. Holding Ctrl swaps one for the other, so you can dig a hole and fill it back without changing tool.
  • Grow raises the surface with the block already there and Erode wears it down. Ctrl swaps these too. Grass stays on top: the block buried under new grass turns to dirt.
  • Smooth rounds off bumps and fills small holes. Holding Shift smooths with any tool, which is the quickest way to tidy the edge of a stroke you just made.
  • Flatten levels everything under the brush to the height the stroke started at.
  • Paint changes the surface blocks and adds none.
  • Replace swaps blocks for the material, and stairs, slabs, walls and fences keep their shape.

Under Brush are the brush's shape (sphere, cube or cylinder), its size, its strength, and its falloff, which is how the strength fades towards the edge. A soft falloff makes gentle slopes, and a hard one makes cliffs. You change the two you reach for most without leaving the viewport: Ctrl+scroll, or [ and ], for the size, and Alt+scroll for the strength.

Placement holds the plane lock, which keeps the brush from climbing onto what it just built. Stroke keeps the brush at the depth the stroke started at, so dragging over blocks it just built does not pile them up towards the camera. Level keeps it at one height, for floors and paths.

Affects limits the brush to the surface, or to the kind of block the stroke started on. Use the second to paint over a patch of grass without touching the stone around it.

Material lists the blocks the brush places. With more than one, each has a bar that sets how often it is used, and Mix says how they share the space:

  • Random scatters them, for a gravel path with a few stones in it.
  • Clumps gathers each into patches a few blocks wide, for moss on a rock face.
  • Layers stacks them in flat bands, thicker for the blocks with longer bars, for cliffs of rock strata.

Clumps and layers follow the world rather than the stroke, so two strokes side by side line up. Region fills use the same mix.

Regions#

Region works on a box of blocks instead of a brush. You select a box first, then act on it.

These tools make or change the selection, or work at a click:

  • Select drags a box. Shift+click stretches it to where you click.
  • Magic selects the box around every touching block of the kind you click, such as a whole boulder of stone.
  • Move drags the box and its blocks somewhere else.
  • Line places a line of the material between two clicks, as thick as the brush.
  • Flood fills the hole you click with the material. It spreads sideways and down like water, but never up, so it fills a pit or a moat to its rim. If it would leak out of the loaded world or past 200,000 blocks, it stops without changing anything.
  • Extrude grows the flat surface of the block you click by one layer outward: every touching block of the same kind on that face. Ctrl+click pulls it in by one layer.
  • Pick takes the block you click as the material.

Once you have a selection, the buttons below act on it at once. Mirror flips it across the axis you face, Rotate turns it a quarter turn, and Stack repeats it once more along the way you look, which builds a long fence or a row of pillars a press at a time.

The selection's size and corner can be typed in, for a box that has to be exact. Fill, Hollow, Walls, Replace and Clear fill it with the material, or empty it. Copy and Cut keep the box, and Paste shows it under the mouse until you click where it goes, turned by the angle chosen above it.

The keyboard moves the selection, which is easier than dragging when it has to land on an exact block:

Key
Arrow keys nudge the selection one block, away from or across the camera
Page Up, Page Down move it up or down
Alt held with either the blocks inside move with it
Escape cancel a paste, a line or the selection

Hand is the building by hand described above, with its options.

Choosing blocks#

The Blocks panel on the right is where you choose the material. It has a search field, your favourites, the blocks you used last, every block, and the game's own categories. / jumps to the search field.

Click a block to use it, and Shift+click to mix it in with the material you already have. F over a block adds it to your favourites. Drag the blocks you use most onto the nine quick slots at the bottom, and Alt+1 to 9 picks them. The middle mouse button over the viewport picks the block you point at, with its state, so a stair you pick is placed facing the way it faced.

The viewport shows the tool and the block in use at the top, and the keys that matter at the bottom. Every stroke and every region change is one step in History, and clicking a step goes back to it.

Block changes made in play mode are never saved. A game that wants to keep blocks keeps them itself (see Blocks).

The Explorer#

The Explorer shows the scene as a tree, each object inside its parent, in the order they are kept in the scene file. Scripts see the same order in children(), and some things depend on it: a CameraPath follows its attachments in that order, and a UIListLayout uses it for siblings with the same layoutOrder.

Inserting objects#

Everything in a scene starts as an object you insert: a part, a light, a script, a ScreenGui. You insert from the Insert Object popup, which opens at the cursor from three places: the + at the top of the Explorer, the + that shows on the row under the mouse, and Insert object... in a row's right-click menu.

Where the new object goes depends on where you opened the popup. From a row's + or its menu, it goes inside that row. From the + at the top, it goes inside the selected row, or at the top of the scene when nothing is selected.

The popup is built for typing. Its search field already has the keyboard, so type part of a class name, such as light, and the list narrows to the classes that match. The arrow keys move the highlight, Enter inserts the highlighted class, and Esc closes the popup without inserting anything.

With nothing typed, the classes are grouped by category, with what you inserted last at the top under Frequently used. The popup also looks at the parent and puts the groups that fit it first: interface classes inside a ScreenGui or a Frame, constraints, movers and effects inside a part, and sound effects inside a Sound. The line at the bottom says what the highlighted class does, so you can find a class without knowing its name. Classes that addons add are listed under Other.

Dragging rows#

Drag a row, or several selected rows, and drop it:

  • on the middle of a row to put it inside that object, at the end. The row is outlined.
  • on the top or bottom edge of a row to put it just before or after that object, in the same parent. A line shows where it goes. On the bottom edge of an open row with children, the line is indented and the drop goes first inside it.
  • below the last row to put it at the end of the scene, outside everything.

Dragged things keep their place in the world, and several dragged together keep their order. One drop is one step in the history, however many rows it moved, and undo puts each back at its old place among its old siblings.

Other steps keep the order too. Undoing a delete puts things back where they were among their siblings, not at the end. Group puts the new model where the first grouped object was, with the objects inside in the order they had. Ungroup puts the children where the group was. Duplicate puts the copies just after the originals, and Paste just after the selected object.

Filtering#

The field at the top keeps the rows whose name contains what you type, along with their parents so you can see where they are. Case does not matter. A word starting with t: or c: filters by class instead, the way Godot's scene tree does:

Filter Shows
crate everything whose name contains crate
t:Part parts, and every class built on Part, such as MeshPart and Seat
t:light every class whose name contains light: PointLight, SpotLight, AreaLight, Lighting
t:Sound,Zone sounds and zones
t:Part t:Attachment parts and attachments, the same as t:Part,Attachment
t:Part door parts whose name contains door

The words that are not classes are read together, so red door matches Red Door 2 but not Door Red.

Moving several things at once#

Select several things with Ctrl or Shift click, or drag a box over them, and the move, rotate and scale gizmos work on all of them together. A script doing what the rotate gizmo does to a selection would look like this:

luau
--!strict
-- server
local world = game.world
local picked = { world:find("crate") :: Part, world:find("barrel") :: Part, world:find("lamp post") :: Part }

-- the middle of the box around all three is where they turn about
local low: Vector3? = nil
local high: Vector3? = nil
for _, part in picked do
    local at = part.worldCframe.position
    local lo, hi = at - part.size / 2, at + part.size / 2
    low = if low then vec3(math.min(low.x, lo.x), math.min(low.y, lo.y), math.min(low.z, lo.z)) else lo
    high = if high then vec3(math.max(high.x, hi.x), math.max(high.y, hi.y), math.max(high.z, hi.z)) else hi
end
local pivot = ((low :: Vector3) + (high :: Vector3)) / 2

local turn = cframe.angles(0, math.rad(45), 0)
for _, part in picked do
    part.worldCframe = cframe(pivot.x, pivot.y, pivot.z) * turn * cframe(-pivot.x, -pivot.y, -pivot.z) * part.worldCframe
end

The gizmo sits at the selection's pivot. The pivot button in the viewport toolbar, next to the World/Local button, says where that is:

  • Centre. The middle of the box around everything selected, the parts' corners included. This is the default.
  • Active. The origin of the object selected last, the one the Properties panel shows.
  • Each. Rotate and scale work about each object's own origin. The gizmo is drawn at the centre.

An object's origin is the point its cframe sits on, which is its pivot when it has one. With one thing selected, the gizmo is always at its origin.

  • Move moves everything by the same amount. With snapping on, the amount snaps to the grid step, so things that sat on the grid stay on it.
  • Rotate turns the selection about the pivot. Each object's position swings round the pivot and its own rotation turns by the same angle. With Each, every object turns in place. The angle snaps to the angle step.
  • Scale stretches the gaps between the objects and the pivot, and the size of each part and zone, along the gizmo's axes. On World the axes are the world's; on Local and Parent they are those of the active object or its parent. A part turned against those axes grows along its own sides as closely as a box can. The factor snaps to steps of 0.1. With one part selected, scale shows the face handles instead.

Parts, models, lights, cameras, zones, attachments and anything else with a cframe can be moved this way. What is inside a moved object goes with it. Scaling also spreads out and resizes what is inside, so a model grows as one.

  • A locked part in the selection stays where it is. If the only things selected are locked, no gizmo is drawn.
  • Something selected together with one of its parents moves once, with the parent.
  • One drag is one step in the history, labelled Move, Rotate or Scale, however many things it moved. One undo puts them all back.
  • The change goes to the server the same way a change typed in the Properties panel does, so everyone editing the place sees it.
  • Holding Shift as the drag starts copies the selection first and leaves the copies behind.

Joining parts#

The constraint tool joins two parts by clicking them. Open it with the hinge button in the viewport toolbar, with J while the viewport has the mouse, or with Edit > Constraint Tool.

While the tool is on, a button next to it names the kind of joint it makes. Click it to pick another:

Kind Makes What the two clicks mean
WeldConstraint one weld the two parts. They stay together as they are
HingeConstraint two attachments and a hinge the second part turns about the first point, on the axis sticking out of the face you clicked
PrismaticConstraint two attachments and a slider the second part slides along the axis sticking out of the first face
BallSocketConstraint two attachments and a ball socket the second part turns any way about the first point
RopeConstraint two attachments and a rope the two points may get no further apart than they are now
SpringConstraint two attachments and a spring the two points are pulled or pushed back to the distance they are at now
RodConstraint two attachments and a rod the two points stay exactly as far apart as they are now

Picking another kind drops a first click you had made.

The two clicks#

  1. Click the first part. For a weld the part is all that counts. For every other kind, where you click on it is the first point.
  2. Click the second part. The joint is made, and the tool is ready for the next pair.

A line follows the mouse from the first point, and the text by the cursor says what the next click does. The part under the mouse is highlighted, and so is the point you would click, with a short line out of the face it is on.

  • Clicking the first part again does nothing. The point turns red and the text asks for a different part.
  • Escape drops the first click. Pressed again, with nothing clicked, it leaves the tool for Move.
  • Clicking in the constraint tool does not change the selection. A click with Alt held, or while you are turning the camera, is ignored.
  • Locked parts cannot be clicked, and neither can parts a script made, since they are not part of the scene.
  • Nothing stops you joining an anchored part. As in a script, the joint pins that end to the world, and a joint between two anchored parts does nothing while the place plays. See the rules every constraint follows.

Where the points go#

Each click puts an Attachment inside the part you clicked, where you clicked on its surface. The constraint goes inside the first part, next to its attachment. The attachments are named Attachment, Attachment2 and so on, and the constraint after its class, so nothing already in the part is renamed or replaced.

An attachment's X axis, its rightVector, points straight out of the face you clicked. Its Y axis follows the part's own up, or the part's back when you clicked the top or bottom face. The editor draws the X axis long and the Y axis short and faint.

How the second point is turned depends on the kind:

  • Hinge, slider and ball socket. The second attachment takes the first one's rotation, so both share the axis. Its position is where you clicked the second part. When the place plays, the joint pulls that point onto the first one, so click the second part where the two should meet.
  • Rope, spring and rod. Each attachment faces out of its own face. The length is the distance between the two points when you clicked: length for a rope and a rod, freeLength for a spring. A rope is made just taut, a rod keeps that exact gap, and a spring rests at it.

With the Snap button on, the point jumps to the grid step across the face you are on, and stays inside it. Holding Ctrl turns snapping the other way, as it does when you move a part. A slanted or curved face is not snapped. When the mouse is over a part that casts do not hit, the point is the middle of the part, with its X axis toward the camera.

A new constraint is selected, so the Properties panel shows it at once. Set a hinge's motor or a rope's thickness there. Every property is described in Physics.

Welding the selection#

Ctrl+W, or Edit > Weld Selected, welds the selected parts together without the tool:

  • The part selected first is the one the others are welded to. Each other part gets one WeldConstraint, inside the first part.
  • A pair that already has a weld between them is skipped. With every pair welded, nothing is made and the editor says so.
  • Only parts count. A model or a folder in the selection is not looked into, and fewer than two parts is refused.
  • Locked parts are welded too; locking only stops clicks in the viewport.
  • The selection stays as it was.

To weld one part to several, click it first and add the rest with Ctrl or Shift click. A box selection picks up parts in no order you control.

Undo#

Each joint is one step in the history, labelled with what it made: Add HingeConstraint, Weld, Weld 3. Undo removes the constraint and both its attachments together. Redo puts all three back and points the constraint at the attachments again.

Seeing constraints#

Joints are drawn in pink over the viewport:

  • a weld as a line between the middles of its two parts, with a circle at each end,
  • any other constraint as a line between its two attachments, with a circle at each end, and hinges and sliders with their axis through attachment0,
  • every attachment inside a part as its two axes.

A selected joint or attachment is drawn brighter.

Helpers (H) shows these along with zones, lights, sounds, cameras and spawns. The Constraints toggle beside it shows only the joints and attachments, for when the other helpers are in the way. They always show while the constraint tool is on. Neither toggle is kept when you close the editor.

This drawing is for editing. To see a rope, spring or rod while the place plays, turn on its visible; see Physics.

The same joints from a script#

The tool writes nothing a script cannot. These make the same kinds of joint:

luau
--!strict
-- server
local world = game.world
local cart = world:find("cart") :: Part
local wheel = world:find("wheel") :: Part
local seat = world:find("seat") :: Part
local beam = world:find("beam") :: Part
local lamp = world:find("lamp") :: Part

-- Weld, or Ctrl+W: one weld inside the first part
cart:add("WeldConstraint", { part0 = cart, part1 = seat })

-- Hinge: the cart's right face points along +X, so the point needs no turn,
-- and the wheel's point takes the same rotation at the same spot
local a0 = cart:add("Attachment", { cframe = cframe(1, -0.2, 1.1) }) :: Attachment
local a1 = wheel:add("Attachment", { cframe = wheel.worldCframe:inverse() * a0.worldCframe }) :: Attachment
cart:add("HingeConstraint", { attachment0 = a0, attachment1 = a1 })

-- Rope: each point faces out of its own face, and the length is the gap between them
local under = beam:add("Attachment", { cframe = cframe(0, -0.25, 0) * cframe.angles(0, 0, -math.pi / 2) }) :: Attachment
local over = lamp:add("Attachment", { cframe = cframe(0, 0.25, 0) * cframe.angles(0, 0, math.pi / 2) }) :: Attachment
beam:add("RopeConstraint", {
    attachment0 = under,
    attachment1 = over,
    length = under.worldCframe.position:distance(over.worldCframe.position),
})
  • wheel.worldCframe:inverse() * a0.worldCframe is the first point's place and rotation seen from the wheel, which is what the tool gives a hinge's second point when both clicks land on the same spot.
  • The two rope points are turned a quarter turn about Z, one down out of the beam's bottom and one up out of the lamp's top.

See Welds and Constraints for every property these take.

Team Create#

Team Create lets several people edit one place at the same time, each from their own editor. It needs nothing new from the editor itself: a scene edit already goes to the server first and comes back from it, so an edit from a second person travels the same way as yours. What Team Create adds is a way in for the others, a copy of the place's files on their computer, and enough of each other in view that two people do not pull the same part in two directions.

One computer runs the place, the host. Everyone else joins it, the way a player joins a game.

Starting a session#

The Team Create window sits under the Explorer. On the computer that opened the place it has a Start Team Create button, which opens the place to the network and shows the address to give the others, such as 192.168.1.20:25565. Copy puts it on the clipboard.

Who may come in is decided in File > Project Settings... > Permissions, or Permissions... in the same window. Each collaborator is a Minecraft name with one of two roles:

  • Can edit changes the scene and the place's files, like you.
  • View only sees everything and moves around, but every change they try is refused with "you can only view this place", and the play button is off for them.

Changes to the list apply right away, so you can let someone in while they wait. Only the owner can change it: the person who opened the place, or an operator of a dedicated server. The list lives on the host, in .moud/team.json at the root of the place:

json
{
  "collaborators": [
    { "name": "Alex", "role": "edit" },
    { "name": "Sam", "role": "view" }
  ]
}

A name that is not on the list is turned away while the place is in edit mode, and Team Chat tells the owner who tried. A dedicated server that runs the place in edit mode is a session too, with no button to press: collaborators join it by its address.

When the host plays with an account Mojang can not check, such as an offline account, the session can not check the people joining either, and anyone who types a listed name gets in. Host from a real account when the network is not your own.

Joining#

In the project hub, Join Team Create asks for the address. The place's files land in a working copy in your projects folder, Moud/Team Create/<address>. As you join, that copy is made the same as the host's: missing or different files are fetched, files the host does not have are removed, and the status bar counts them in. The editor opens once they are there.

Everything in the place is shared except .moud, version control and build folders, and the .polar terrain files, since the terrain stays on the host's server. From then on the copy is kept in step both ways. Saving a file in your code editor sends it to the host within a couple of seconds, and a file the host or another collaborator changes is written into your copy.

Seeing each other#

The Team Create window lists everyone in the session, each with their skin's face in a ring of their colour, their role, and what they have selected or are editing. That colour follows them around:

  • What they have selected is outlined in it, as a box in the viewport and a frame around the row in the Explorer.
  • Their camera is a small frustum with their name on it.
  • Clicking a name takes your camera to theirs. The eye button follows their camera until you press it again, or right or middle click in the viewport.

Right clicking a name also offers Select the same, which selects what they have selected.

Two people, one part#

While someone drags a part or types into one of its properties, the part is theirs for that moment. Their name sits on its row in the Explorer, its box is drawn thicker, and anything you do to it is refused with "Alex is editing Crate", a move, a property, a rename or a delete alike. It is free again a moment after they let go.

The host's server decides. When two edits to the same thing cross on the way, the first one to arrive is kept and the second person's editor is put back to what the server has.

Undo stays your own. The history holds only the steps you made, so Ctrl+Z never takes back someone else's work, and the Edit menu still names your last step. Undoing a move puts the part back where you had it, even if someone has moved it since. A step whose thing someone else deleted is skipped.

Scripts#

Scripts open in your own code editor, so two people do not type into one file at once. Opening a script from the Explorer or the Assets panel claims it: the script's row shows your name to the others, and the Team Create window says you are editing it. Save as often as you like, each save goes to the host.

Anyone else who opens it is told who has it. The host does not take their saves: their version goes into .moud/drafts in their working copy, and the host's copy comes back over it, so nothing typed is lost and nothing is overwritten. The claim ends when its holder leaves, after ten minutes without a save, or when they pick Stop editing on their own name in the Team Create window. The owner can Take back a script someone forgot to let go of.

Team Chat#

Team Chat is a tab next to Output. Messages there reach the people editing the place and never the players. It also says who joined or left, who changed someone's role, and who started or stopped a playtest. Playing runs the whole server, so pressing it in one editor plays the place in all of them.

Version history#

Every minute while the scene keeps changing, the host keeps a copy of it next to its backups, with who changed what since the copy before. File > Version History... lists them newest first: when, each person who changed the scene, how many changes they made and the names of what they touched.

Pick one and press Restore to put the scene back the way it was then, for everyone. The scene is unsaved until someone saves it, and the file on disk keeps what was there before. The last twenty copies are kept, and File > Scene Backups... on the host lists the same files.

Choosing the code editor#

Double clicking a script, Open in code editor, and the file links in Output and Export open the script in a code editor at the line that matters. File > Code Editor... picks which one. The choice belongs to your computer, not the place: it is kept in ~/.moud/preferences.json and every place you open uses it. A launcher in a Flatpak or a snap changes both, see Sandboxed launchers.

Choice What runs
Auto the first of Zed, VS Code, VSCodium, Cursor and Sublime Text that is installed, then Notepad on Windows, the default text editor on macOS, or xdg-open on Linux
Zed zed <place> <file>:<line>
VS Code, VSCodium, Cursor code <place> --goto <file>:<line>, with codium or cursor
Sublime Text subl <place> <file>:<line>
IntelliJ IDEA, WebStorm idea <place> --line <line> <file>, with webstorm
System default xdg-open <file> on Linux, open -t <file> on macOS, start "" <file> on Windows, with no line
Custom command your own command

The dialog shows the command it would run for place.toml, and Test runs it. When the editor you chose is not installed, Output says so and names the program it looked for.

Each editor is looked for on your PATH first, then where its installer puts it: ~/.local/bin, /snap/bin and Flatpak on Linux, the app bundles in /Applications and Homebrew on macOS, and %LOCALAPPDATA%\Programs and Program Files on Windows. JetBrains IDEs are found through the launcher scripts Toolbox makes. If yours lives somewhere else, put its folder on your PATH or use a custom command with the full path.

A custom command is split into words the way a shell would, with double or single quotes keeping spaces together, but no shell runs it, so pipes and ~ mean nothing. These are filled in:

  • {file}, the full path of the script,
  • {line}, the line, 1 when there is none,
  • {folder}, the place's root folder.

With no {file} in it, the path goes on the end.

text
"C:\Program Files\Notepad++\notepad++.exe" -n{line} "{file}"
kitty -e nvim +{line} {file}
emacsclient -n +{line} {file}

Sandboxed launchers#

A launcher installed as a Flatpak or a snap, such as Prism Launcher or the Modrinth App, runs Minecraft in a sandbox, and Moud runs in there with it. When the sandbox can not reach your home folder, Moud keeps its settings in the launcher's data folder, ~/.var/app/<app id>/data/moud or ~/snap/<name>/common/moud, and new projects go in projects inside it.

Code editors start through flatpak-spawn --host when the launcher may talk to org.freedesktop.Flatpak, and Moud looks for them on your computer, not in the sandbox. Without it, or in a snap, scripts open in the default app for their file type and Output says so once. Browse... in Export and in Import a Minecraft world opens Moud's own file browser, which only sees what the sandbox sees.

The game log names what is limited when Moud starts, with the command that lifts it. Restart the launcher after running it:

text
flatpak override --user --filesystem=home --talk-name=org.freedesktop.Flatpak org.prismlauncher.PrismLauncher

Talking to org.freedesktop.Flatpak lets the launcher start any program on your computer, so grant it only to a launcher you trust.