Fields
A package, each of its parts and the world declare their own fields: their public values,
which scripts read and write, such as a business's business.open and business.visitors, or
the world's power.on. There is no shared "business" component: every model carries its own.
Fields are the Fields section of the Inspector (a package or a part) and of the world's form.
In the file they are the fields list of the package's or the part's object.json, and of the
.world.
| Key | two names with a dot between them: business.open. A script declares it: writes business.open: bool. |
| Label | the field's name for people |
| Type | boolean (Yes / No), number (with Integer, Min, Max), string, time (a time of day; in the file, the minute of the day) |
| Start value | the value the object starts with |
- At most 32 fields per holder. A new field is named
building.field1on a building,part.field1on a part. - A script's card compares the fields its script reads and writes with the holder's: a missing field, another type, or a second writer is written in red, and Add the fields it uses adds what is missing with the types the script uses (Scripts).
- Play checks the same before it starts (Play); Kalem checks again when it binds a script and when every transaction ends (Contract fields).
- In Play, the fields' values are kept by the session in memory; they are not saved.