MESS 1.2 has been released! Created 5 months ago2023-11-30 00:26:27 UTC by Captain P Captain P

Created 5 months ago2023-11-30 00:26:27 UTC by Captain P Captain P

Posted 5 months ago2023-11-30 00:26:27 UTC Post #348117
MESS 1.2 has been released! :)

Besides a lot of small improvements and bugfixes, this update introduces a set of template entities and behaviors that are useful for advanced and novice mappers alike. There's an entity for triggering random targets, a multi-target variant of game_counter, an entity that can periodically trigger a target, a Counter-Strike specific entity that triggers its target when a new round starts, and so on. There's also a target pattern system that lets you write +door1 and train -> newpos instead of having to manually create a trigger_relay or trigger_changetarget. Advanced users can even make their own template entities and behaviors, and share them with others via .zip files.

Macro entities have also been improved: templates can now be given multiple names and macro entities can reference multiple templates, with custom weights, making it easier to create sets of related templates. Macro entities can also reference templates inside other maps, and macro_insert can now create multiple instances.

And if you're using TrenchBroom, you can add {_tb_group} to entity names and targetnames inside linked groups to produce unique names per group.
User posted image
User posted image
User posted image
Download links: Documentation: Notable changes & bugfixes:
  • Added a template entity library (mtl_trigger_random, mtl_trigger_counter, cs_trigger_roundstart, and more).
  • Added several template behaviors (target patterns, automatic multi_manager expansion, env_sprite angles fix, _tb_group support).
  • Templates can now have multiple names, and macro entities can reference multiple templates.
  • Macro entities can reference templates inside other maps.
  • Geometry scaling along individual axis.
  • Template properties now act as local variables.
  • macro_brush now also copies point entities from the selected template.
  • Several attribute-related scripting improvements (empty key removal, array keys, accessing parent entity attributes).
  • Automatic merging of brush entities.
  • Linux support (untested!).
  • MScript has been improved - it now supports functional programming.
  • Fixed that map files could not be read on certain systems, depending on culture settings.
  • Fixed incorrect handling of jmf worldspawn entities, and unwanted origin attributes.
  • Fixed that TrenchBroom map files could not be read (and vice versa).
Or go to the download page for a full list of changes and bugfixes.
Special thanks to Windawz, Loulimi and kimilil for their feedback, and all the others that contacted me about MESS during the past 3 years.
Posted 5 months ago2023-12-02 22:48:22 UTC Post #348138
MESS 1.2.1 is now available!

This is a hotfix that fixes a problem with the configuration system that prevented template entities and behaviors from being loaded. :roll:

It also adds a 'template_entities\custom' directory where custom template entities and behaviors can be stored without the risk of being overwritten by a future update.
Posted 5 months ago2023-12-09 00:53:09 UTC Post #348172
MESS 1.2.2 is available now

Another hotfix, this fixes an issue with the id() function not returning the targetname of the parent macro entity.

I've also added another template behavior for setting the speed of scrolling textures in brush entities other than func_conveyor.
Posted 2 weeks ago2024-05-08 18:39:20 UTC Post #348782
I don't feel like this qualifies for a Vault entry, so here it is instead, a menagerie of miscellaneous MESSy stuffs I made on MESS 1.2.2.
Contents
Item Description File type(s)
zhlt_strip strips stray zhlt keyvalues that might produce unintended results in your map .ted
speedfactor multiplies any speed keyvalue in entity by a factor. useful to quickly multiply values for a range of entities with finely-calibrated speed values. .ted
mtlx_decal_text translates to a bunch of infodecals representing stenciled text. besides letters and numbers, also transforms some text symbols to a bunch of other decals. .ted, .map
mtlx_multi_manager translates to a multi_manager. this entity facilitates easy selection of targets using JACK's dropdown textbox. Also shows the arrow connections. .ted
mtlx_trigger_sequential translates to a relay that fires specified targets in order, and can loop back at the end of the list e.g. this → t1, this → t2, this → t3, this → t1... .ted, .map
texture_scrollspeed_handler BUGFIX for the one included in MESS 1.2.2 .ted
note: mtlx stands for MESS template library extras, to compliment MESS' included mtl entities.
Links
Requirements
  • MESS 1.2.2 or above
Installation
  1. Dump contents of gist/zip file to <mess 1.2.2+ install path>/template_entities/custom/
  2. Run MESS once to update mess.fgd
  3. Restart JACK/Hammer to load the updated mess.fgd
LICENSE
Posted 1 week ago2024-05-16 14:59:42 UTC Post #348802
It's really cool to see what you're doing with MESS! Your feedback has also been very useful. Thanks! :)

A few notes:
  • zhlt_strip and speedfactor should probably use AFTER_MACRO_EXPANSION, to ensure that they're working with final values (instead of raw values that may contain unevaluated MScript expressions), and to ensure that they also apply to generated properties.
  • mtlx_decal_text.ted relies on an fgd-parsing fix/change that's only available in v1.2.3 (line 28, the help text/description part). Very cool entity - it makes me want real-time editor preview support for MESS...
  • In v1.2.3, MScript has bitwise operators, so texture_scrollspeed_handler should be easier to implement correctly. I'll rewrite the scrollspeed handler logic accordingly.
  • Also in v1.2.3, template entities can provide their own editor sprites/models, so mtlx_decal_text could have a model to help with orienting the text. Model pitch inversion is probably going to make that more complicated though...
  • mtlx_trigger_sequential is an interesting one - it's like mtl_trigger_counter but with implicit count values and support for delayed triggering. Now I'm thinking, if I had to add something like this to MESS... maybe I'd do it as a single-target-at-a-time mode for mtl_trigger_sequence, or maybe by adding a new target pattern for triggering something with a delay. Actually, the multi-target pattern already supports delays ("target1: 0.5, target2: 1.5"), I could just extend that for single targets (e.g. "+door:0.5" would send an 'on' signal to door, after 0.5 seconds).
Regarding MESS 1.2.3, the big stuff is done: conversion between .map, .rmf and .jmf files (including conversion of TrenchBroom groups/layers), with support for cordon areas and VIS group filtering. The only things left to do are a few template entity changes and of course the most 'fun' part: updating the documentation.
Posted 1 week ago2024-05-16 16:04:42 UTC Post #348803
Thanks for the feedback. I've amended zhlt_strip, speedfactor, and mtlx_decal_text.

The thing with multi-target patterns is that I haven't internalized how it works and so haven't been using it, hence why I cooked my own. Maybe I should make it split the entire pattern with semicolons and pass the rest of the multi pattern to the stock library.

AFTER_MACRO_EXPANSION also I don't fully understand hence why I missed it.

But yeah, looking forward to JACK FGD support and model() rewriting in the next update!
Posted 1 week ago2024-05-17 23:51:26 UTC Post #348806
The multi-target pattern is just a comma-separated list of targets, which gets translated to a multi_manager. So if a button targets door1,door2, MESS will generate a multi_manager named door1,door2, which triggers both door1 and door2. Delays can be specified with colons: door1:0.5,door2:1.5 will generate a multi_manager that triggers door1 after 0.5 seconds, and door2 after 1.5 seconds. Each target can also be a pattern, so +door1,-door1:5 will send an 'on' signal to door1 immediately, and then an 'off' signal after 5 seconds. So that pattern translates to a multi_manager and two trigger_relays.

As for rewrite rules, there are two moments when they can be applied:
  • Before macro expansion - this happens right after a map is read into memory. At this point maps still contain macro entities and entity properties can still contain unevaluated MScript expressions. The main use case for rewrite rules here is to turn template entities into macro entities and to link them to a specific template map.
  • After macro expansion - this happens just before the output map is written to a file. At this point, all macro entities have been processed, all template instances have been created and any expressions have been evaluated. Here, rewrite rules can be used to modify entity properties.
Posted 1 week ago2024-05-18 04:53:25 UTC Post #348807
Okay, I just figured out why I never get multi-target patterns; I can never get it to work for some reason. It just doesn't. 😭
Posted 1 week ago2024-05-19 23:34:36 UTC Post #348811
I just tested with v1.2.2 by creating a func_wall named my_wall (render mode: solid, FX amount: 255) and a func_button that targets hide my_wall, show my_wall:1. This created a multi_manager named hide my_wall, show my_wall:1, an env_render named hide my_wall and another env_render named show my_wall. The multi_manager triggered hide my_wall immediately, and show my_wall with a delay of 1 second, as expected.

Maybe you've been using this pattern in a template entity map that didn't allow any rewrite rules? That's what the map property _mess_allow_rewrite_rules with value {} does. I'm using that in several template entity maps to ensure that other scripts won't interfere with it, but it does mean that things like target patterns won't work, unless you invoke it manually by creating an instance of target_pattern_handler.map for a specific target.

If that's not it, could you share a test map with a multi-target pattern that doesn't work so I can have a look?
You must be logged in to post a response.