MESS 1.2
This version introduces a template entity library and a set of template behaviors that make MESS more useful for non-technical mappers. It also makes sharing of custom template entities easier and generally just contains a lot of quality-of-life updates and bugfixes.
New features:
- Added a small template entity library (mtl_trigger_random, mtl_trigger_counter, and more).
- Added several template behaviors, including a 'target pattern' behavior that automatically generates intermediate entities like trigger_relay or trigger_changetarget for patterns like '+target' and 'target -> newdestination'.
- Custom template entities and behaviors can be shared via .zip files.
- Special support for TrenchBroom linked groups: adding
{_tb_group}
to an entity name or targetname will produce a unique name for each group instance. - Templates can now be given multiple names, and macro entities can reference multiple templates, with custom selection weights.
- Macro entities can now reference templates inside another (template) map.
Other changes:
- Migrated to .NET 6, which enables Linux support.
- macro_template and template map properties now act as local variables that are accessible to entities inside that template.
- macro_insert can now create multiple instances.
- Geometry scaling along specific axis.
- Improved error reporting somewhat.
- Information and errors are now also logged to a file ({inputPath}.mess.log).
- Attributes with an empty key are now removed.
- Special attribute lookups are now case-insensitive (angles, scale, etc.).
- Support for handling entities with inverted pitch rotation.
- Most settings can now be specified via a .config file, which simplifies command-line usage.
- macro_brush entities now also copy point entities from the selected template.
- Entity attributes whose value is a single MScript expression can now pass MScript values along, such as arrays or objects.
- The templates directory has been split up into a template_entities and template_maps directory.
- mess.fgd is now auto-generated based on .ted files in the template_entities directory.
- Rewrite directives can now be applied to specific entity types, or to all entities that match a specific condition.
- Attributes whose key is an MScript array are now split up into multiple attributes.
- Maps and templates can now be attached to any entity by using the special
_mess_attached_template_map
and_mess_attached_template_name
attributes. - Rewrite rules can now be applied either before or after macro entity processing.
- The .map file writer now uses lowercase 'e' for numbers with scientific notation (to avoid triggering a bug in TrenchBroom 2023.1).
- Certain entity attributes can now be 'lifted', which makes them available to expressions in other attributes.
- REPL mode now uses colors.
- Brush-based entities can now be merged by using the special
_mess_merge_entity_id
and_mess_merge_entity_master
attributes. - All special attributes now have a _mess prefix.
- Any entity can now conditionally be removed with the special
_mess_remove_if
attribute.
MScript changes:
- New language features: anonymous functions, arrays and objects.
- New functions for functional programming (map, filter, reduce, sort, reverse).
- New functions for working with global variables. Global variables can be set via the .config file and via the command-line.
- New type-conversion functions (num, vec, str).
- New string member functions (trimming, splitting, joining, and more).
- Support for character escape sequences in string literals.
- New debug-related functions (trace, assert).
- New functions for obtaining attributes of the current instance-creating macro entity.
- Function for obtaining the unique ID of the macro entity that is creating the current instance (parentid).
- REPL mode now stores the last result in a special variable named
_
(underscore). - .mscript files can be used to provide utility functions for template entities and behaviors.
Bugfixes:
- Fixed that .map files could not be read depending on system culture settings.
- Fixed incorrect handling of the worldspawn entity in .jmf files.
- Fixed that the .jmf loading code would add 'origin' attributes to all entities.
- Fixed that the REPL mode couldn't handle Unicode characters.
- Fixed incorrect calculation of angles attributes.
- Fixed that entities in a brush template would get different instance IDs.
- Fixed that .map files with comments (such as generated by TrenchBroom) could not be read.
- Fixed an fgd setting that prevented TrenchBroom from reading mess.fgd.
- Fixed an MScript parsing precedence issue with conditional operations.
- Fixed that duplicate attribute keys would cause an error.
- Fixed a macro_brush positioning issue when used inside a brush template.
- Fixed that macro_cover would sometimes position instances incorrectly.
- Fixed that MScript didn't allow variable names starting with an underscore.
- Fixed that the MScript == operator would treat certain values of different types as equal.
- Fixed that the rewrite directive parser could get stuck.
- Fixed that the classname of macro_template entities was hiding the classname of the macro entity that was creating the current instance.
- Fixed that the map file extension check was case-sensitive.