Layers
Each cloud layer, such as ground fog or high cirrus, is a file in plugins/MythicSeasons/cloud-layers/, and the list clouds.layers decides which layers a world draws.
- The layer name is the file name without
.yml:a-z,0-9,_and-, with capitals read as small letters. - The eight shipped files are copied when missing and never overwritten. A deleted one comes back at the next load, so take the layer out of
clouds.layersinstead. /ms reloadreads the folder again. Only the shader looks of styles need a restart.
The layer file
A layer file is flat YAML, and only type is required.
| Key | What it does |
|---|---|
type |
What decides where the layer has cloud, see Layer Types. A file without it is skipped. |
color and the settings on Layer Options |
Look, height, detail and distance. |
toggle, toggle-default |
The name players use to hide the layer with /togglecloudlayer, see Player toggles. |
style |
A look from the cloud-styles folder, see Styles. |
shape |
A form for a flat band, see Shapes. |
- Settings take every value form of a season block, and an operator such as
"*2"works on the built-in default.max-distancetakes a formula ofview-distanceinstead, and shape numbers must be plain numbers. trueandfalse(andyes,no,on,off) work only forvisible-from-inside. Elsewhere they log a warning and keep the default, so turn the floor above the terrain off withground-clearance: -1.
Choosing the layers
clouds.layers is a YAML list of layer names, not case-sensitive. It can sit in six places:
| Place | Path | Applies to |
|---|---|---|
atmosphere.yml |
clouds.layers |
Every world and season. Shipped: [cumulus] |
atmosphere.yml |
worlds.<world>.clouds.layers |
One world |
atmosphere.yml |
season-adjustments.<season>.clouds.layers |
One season |
| A season file | atmosphere.clouds.layers |
The season |
| A season file | atmosphere.worlds.<world>.clouds.layers |
One world during the season |
A profile in atmosphere-profiles/ |
clouds.layers |
What uses the profile: a season (atmosphere.profile), a world (worlds.<world>.profile) or the atmosphereprofile mechanic |
- The last place in the order on Per-world overrides that sets the list replaces the others whole, so a season file's list wins over
worlds.<world>inatmosphere.yml(the shipped seasons set none). To give one world its own list in every season, give it a profile. []draws no clouds.- A single name without brackets is a list of one, but
"cumulus, cirrus"in quotes is one name that matches no file.
worlds:
resource_world:
clouds:
layers: [cumulus, cirrus]
In
atmosphere.yml:resource_worlddraws high cirrus over the weather's clouds.
The order of the list
The order does not decide which layer is drawn in front. It matters here:
| What | Which layer |
|---|---|
In-cloud checks: incloud of the Atmosphere condition, the <mythicseasons.incloud>, <mythicseasons.cloudbase> and <mythicseasons.cloudtop> placeholders, and the atmosphere-cloud-enter and atmosphere-cloud-exit triggers |
The first layer with opacity: 1.0 (the first solid layer), by the shape it draws, even while clouds.enabled is false or a player hides the layer or uses quality off. |
| Rain, snow and thunder that players see | Only where the first solid layer draws cloud above the player, see Weather. |
The see-through window around a player near or inside cloud (near-opacity, near-distance, near-dome-size) |
The first solid layer |
Skipping faces hidden behind cloud or terrain (clouds.occlusion-culling) |
Only the first solid layer hides faces behind it. Terrain hides faces of every layer. |
The haze around a player inside fog (haze-shells, haze-distance, haze-opacity) |
The first layer with haze-shells above 0 |
| Draw position | All layers but the first solid one are drawn half a cloud block plus up to one block off on x, y and z, so no two flicker on one plane. |
- With no solid layer in the list,
incloudanswers false, cloud base and top read -1, there is no see-through window and rain follows the simulated clouds alone. Putcumulusbefore any other solid layer, and keep fog and cirrus see-through. - The
Clouds:line of/ms atmosphere statsshows the height range the first solid layer draws where you stand.
Changing one layer
A season, world or profile changes one layer's settings under cloud-layers.<layer>, without touching its file.
| Place | Path |
|---|---|
atmosphere.yml |
worlds.<world>.cloud-layers.<layer> |
atmosphere.yml |
season-adjustments.<season>.cloud-layers.<layer> |
| A season file | atmosphere.cloud-layers.<layer> |
| A season file | atmosphere.worlds.<world>.cloud-layers.<layer> |
| A profile, also one forced with the mechanic | cloud-layers.<layer> |
atmosphere:
cloud-layers:
cumulus:
coverage: "*1.6"
forms-at:
START: 0.3
MIDDLE: 0.2
END: 0.3
In a season file: cumulus
coveragetimes 1.6, andforms-atfrom 0.3 down to 0.2 in mid-season and back.
- The layer file applies first, then the blocks in the order on Per-world overrides. An operator works on the value reached so far.
- The shipped seasons set cumulus
forms-at,full-atandlift(winter onlyfull-atandlift), and these win overworlds.<world>. To change them for one world, use a world profile or the season file'satmosphere.worlds.<world>block. - A block for a layer without a file, or one not in the list at that moment, does nothing and logs nothing.
cloud-layersis not accepted at the top ofatmosphere.yml./ms atmosphere profile [world]lists each drawn layer's settings and where each value comes from.
What can change
| Setting | In a season, world or profile |
|---|---|
type, color, voxel-size, max-distance, thickness, top-clearance, visible-from-inside, toggle, toggle-default and the choice of style |
No, file only. In a block they are ignored with a warning. |
| Every other setting on Layer Options | Yes |
The numbers of a shape |
Yes, under cloud-layers.<layer>.shape, see Shapes. The rest of the shape is file only. |
The variables of a style |
Yes, under cloud-layers.<layer>.style.<variable>, see Styles. |
Season blends
During a transition between seasons, every number of a layer both seasons draw moves evenly, cloud-layers values, shape numbers and style variables included. The list and the direction of a shape switch at the halfway point.
Creating a layer
- Copy the shipped file closest to what you want under a new name, such as
morning-mist.yml.cumulus.ymllists every setting.ground-fog.yml,cirrus.ymlandmars-dust.ymlare bands. - Edit its settings.
- Add the name to a
clouds.layerslist. - Run
/ms reloadand check the layer with/ms atmosphere profile. TheRenderer:line of/ms atmosphere statsends with each layer's faces in your view.
type: surface-humidity
toggle: fog
forms-at: 0.8
full-at: 1.0
opacity: 0.3
color: "E8EDF2"
voxel-size: 16
voxel-height: 8
max-distance: 256
thickness: 16
ground-clearance: 0
ground-clearance-cap: 2032
ground-grid: 32
cloud-layers/morning-mist.yml: ground mist from 80 percent humidity, hidden with the shipped fog by/togglecloudlayer fog.
- Without a
thicknessof 0 or more, a layer only exists inside the simulated clouds. A band needs a floor (ground-clearance,top-clearanceormin-y), or it sits at y-512, out of sight, see Height and position. - For a guided walk-through, see Custom Cloud Layer.
Console messages
A missing file or an unknown type is reported once until the next /ms reload. Messages about keyframes, formulas and other value forms are on Profiles, those about shapes on Shapes.
| Message | Meaning |
|---|---|
clouds.layers lists '<name>', but there is no cloud-layers/<name>.yml; skipping it |
A listed layer has no file, or its file was skipped. |
cloud-layers/<file>: layer names may only use a-z, 0-9, _ and -, skipping it |
Other characters in the file name. |
cloud-layers/<file> has no type, skipping it |
No type, or a YAML error (see the lines above it). |
cloud layer '<name>' has type '<type>', which is not a known cloud layer type; skipping it |
An unknown type, or one whose plugin has not registered it. |
cloud-layers/<file> color: '<value>' is not a hex colour, ignoring |
A colour that is not hex. |
cloud-layers/<file> voxel-size: <n> is not a power of two, using <m> |
The voxel-size was rounded down. |
<where>: unknown cloud layer setting '<key>', ignoring |
A typo in a layer file or a cloud-layers block. |
<where>: '<key>' can only be set in the layer's own file in the cloud-layers folder, ignoring |
A file-only setting in a block. |
<name>: 'clouds.<key>' moved into the cloud layer files: set it in cloud-layers/<layer>.yml |
An old layer setting under clouds. Move it into a layer file. |
<name>: '<path>' must hold settings as cloud-layers.<layer>.<setting> (the list of layers to draw is clouds.layers), ignoring |
cloud-layers holds a plain value or a list instead of settings. |
more than 256 cloud layer names were loaded since the server started, skipping it until a restart |
A server run loads at most 256 different layer names. |