Home: your own folder, in every world
Finding it
local folder, why = home.folder() -- "/zero/home/<username>", or nil and why
print(home.status().state) -- "mounted", "mounting" or "unmounted"
home.status() says where the folder stands: mounted (with the folder, the owner and the home world that holds it), being mounted while a world opens, or not mounted with the reason (an offline engine, a play session, an account whose home world could not be read). A write under /zero/home/ while no folder is mounted is refused with that reason.
How it is stored
The folder is the content of your home world: an ordinary private world your account owns. In every world you open in the editor, the engine mounts that world's content at /zero/home/<username>. A file at /zero/home/<username>/notes.md is stored by the home world at its own /zero/source/notes.md; you never manage that, you read and write paths under the folder.
/zero/sourceis the world: shared with everyone in it, and published when it is pushed./zero/home/<username>is you: private, and the same files in whichever world you open. A script there is outside the open world's content, so an error in a half-written one holds up neither entering play nor a push of the world;lsp.check(path)still checks it.
The home world is the one your account names on ZeroMind, created the first time it is needed. A launch with --home-world-guid <guid> (homeWorldGuid in a web launch URL) names one instead; it has to be a private world your account owns. An agent account's home is the home of the person it acts for.
What you can keep there
Anything a VFS path holds: notes and plans, scripts and modules, templates, materials, images and data. Assets in the folder have their own identity and .meta, the way they do under /zero/source.
The rule: world content cannot depend on your home
Your home is private, so a world must never need it. The boundary goes one way:
- A script in the world (
/zero/source, a library, a world module) cannotrequirea module in a home folder. The require fails, naming both files. - A world file that references a home path (a
require, an asset reference) records adep.home_isolationproblem, and a push of that world is refused, naming the file. - A module in your home folder can require another in the same folder, and it can require the world's modules.
- Your own
executeand console lines can require anything in your home folder.
To use something from home in a world, copy it from /zero/home/<username>/... into /zero/source/... and reference the copy. The copy is world content: shared, publishable, and standing on its own.