write scienfic languae and create разделы like intro, features and drawbacks on next info without new: MESS is a Half-Life level compile tool that helps automating various tasks. It provides a templating system and several macro entities for creating template instances, which can be customized with a basic scripting system. And with entity rewrite rules, templates can be used as if they were actual entities.

Here are some of the things that MESS can do:

Duplicating complex entity setups as if they were a single entity.
Covering terrain and other surfaces with props.
Turning a single brush into multiple entities. MESS is a Half-Life level compile tool that helps automating various tasks. It provides a templating system and several macro entities for creating template instances, which can be customized with a basic scripting system. Here are some of the things you can do with it:
Duplicating complex entity setups as if they were a single entity.
Covering terrain and other surfaces with props.
Turning a single brush into multiple entities. Anything between the macro_template brushes is part of the landmine template. When MESS processes the map, a copy of the landmine template is created for each macro_insert. Because the env_explosion magnitude uses the expression {damage or 100}, landmines have a default magnitude of 100, but each macro_insert can override that with the custom damage attribute.

Also note the use of the {id()} expression: this gives the entities of each landmine distinct names. Otherwise, each trigger would active all explosions, instead of only the explosion it belongs to.

Here is another MESS entity in action, macro_cover: This is what a MESS template looks like and how it can be used:

Landmine template  This entity randomly places template instances across its non-NULL surfaces. The 6 templates here all have the same name, so each time a random one is selected. The orientation and scale of each instance has also been randomized with expressions. How to use MESS
Macro entities
Almost everything in MESS involves templates. A template can be a separate map, or it can be created with the following entities (for more detailed information, see macro entities.md):

macro_template - Anything inside the bounding box of this entity becomes part of a template. Templates are removed from the map, but instances can then be created in various other places by other macro entities.
macro_remove_if - Used inside templates. When an instance of a template is created, anything inside the bounding box of this entity is excluded from that instance if the removal condition is true.
The following entities can be used to create one or more template instances:

macro_insert - A point entity that creates a single template instance. The attributes of this entity are visible to script expressions in the selected template, so each instance can be made unique. Useful for duplicating complex entity setups.
macro_cover - A brush entity that creates multiple template instances, using them to cover its non-NULL faces. Useful for covering terrain with props.
macro_fill - A brush entity that creates multiple template instances inside its brushes. Useful to fill an area with particles or other things.
There is also one more entity that uses templates in a slightly different way:

macro_brush - A brush entity that creates copies of its own brushwork, with each copy taking on the textures and entity attributes of a brush or entity in the selected template. Useful for creating fences, or for adding visual effects to triggers.
Entity rewrite rules
Rewrite rules can be used to modify entity attributes before macro processing occurs. This makes it possible to create custom entities for template maps. For more detailed information, see entity rewrite rules.md.

For example, the landmines above were created with a macro_insert entity that referenced the landmine template. To modify the landmine's damage, SmartEdit mode had to be disabled so a custom attribute could be added. With entity rewrite rules, it's possible to create a monster_landmine entity with a proper damage attribute.

Entity rewrite rules are created by adding specially formatted comments to an .fgd file, right before the entity type that they apply to:

// @MESS REWRITE:
// "classname": "macro_insert"
// "template_map": "{dir()}\landmine.rmf"
// @MESS;
@PointClass = monster_landmine
[
    damage(integer) : "Damage" = 100
]
The above rules will turn any monster_landmine entity into a macro_insert entity, with its template_map attribute set to reference the landmine template map. The resulting macro entity is then processed by MESS as usual.

Scripting
Below is a quick overview of MESS' scripting capabilities. For more detailed information, see scripting system.md.

Embedding expressions in attribute values
Any entity attribute can be customized with embedded expressions. These expressions are surrounded by curly braces. For example, the value corner{4 + 5} contains the expression 4 + 5, which evaluates to 9, so the final value becomes corner9.

Referencing attributes of instance-creating entities
When a macro entity creates a template instance, its attributes are made visible to expressions in the selected template. This means that expressions inside a template can produce different results depending on the attributes of the macro entity that uses that template.

This is why, in the above landmine example, each macro_insert can specify its own landmine damage: the damage in {damage or 100} refers to the damage attribute of the current macro_insert entity.

SmartEdit mode
Disabling SmartEdit mode allows new attributes to be added, which is very useful for customizing templates. That's how, in the landmine example, the custom damage attribute was added.

But there's another reason why disabling SmartEdit mode is useful: just as Half-Life itself, MESS only recognizes internal attribute names, and these are only shown when SmartEdit mode is disabled.

Commonly used functions
Finally, here are some of the most commonly used functions that can be used in MESS expressions:

iid() - Returns the unique numeric ID of the current instance.
id() - Returns either the targetname of the instance-creating entity, or the unique instance ID. This is a more convenient way of writing {targetname or iid()}.
rand(min, max) - Returns a random number between min and max.
randi(min, max) - Returns a random integer number between min (inclusive) and max (exclusive).
rand and randi can be called with no arguments: rand will then return a number between 0 and 1, and randi will return either 0 or 1. They can also be called with only one argument, which will then be used as max value (min will be set to 0).