Repository navigation
CustomMonsters RenderFlags
The mask the monster's body is drawn with. A script sets it in OnRender; without a
script it comes from the monster's config (<Render Flags="CHROME2|LIGHTMAP|BRIGHT" />).
The two never both apply: a monster with a script is driven only by Lua.
m.renderFlags = Enums.RenderFlags.METAL + Enums.RenderFlags.BRIGHT
m.bright = 1.0Plain addition is correct because every flag is a distinct bit - just build the mask from distinct names, never the same one twice.
| Flag | Effect |
|---|---|
COLOR |
untextured, flat body colour |
TEXTURE |
plain textured pass, the ordinary default |
CHROME |
environment / chrome reflection |
CHROME2 |
chrome variant; binds the chrome texture when the mesh has none |
CHROME3 |
as above, the "set item" effect |
CHROME4 |
as above, the "+13" effect |
CHROME5 |
soft light variant |
CHROME6 CHROME7
|
chrome variants |
CHROME8 |
lucky item effect |
CHROME9 |
chrome variant of its own, scrolled on two axes at once |
METAL |
metallic reflection, brighter than CHROME
|
OIL |
oily sheen |
LIGHTMAP |
modulate with the light map instead of alpha blending |
SHADOWMAP |
shadow pass |
BRIGHT |
additive blend; body light is scaled by alpha |
DARK |
subtractive blend |
EXTRA |
extra pass on top, to stack a second effect |
WAVE |
wave / distortion pass |
NODEPTH |
skip the depth test, so the model draws over everything |
DOPPELGANGER |
doppelganger tint |
MULTIPLY |
multiply the scene by the model: by the texture's alpha where it has one, by its colour where it has not |
HEIGHT_CLIP |
cut the model off at a height - see below |
Two rules about how the mask is read:
-
BRIGHT,DARK,MULTIPLYandLIGHTMAPare alternatives. The first found wins, in that order, and the rest are ignored. - Any of
CHROME*/METAL/OILmoves the whole draw onto the chrome path, where meshes marked as non-blending are skipped entirely.
With HEIGHT_CLIP in the mask, a triangle whose three corners all sit below a given height
is not drawn. The height is a world Z, taken from m.blendMeshTexCoordV, so it is the same
number a position uses - not a fraction of the model.
m.renderFlags = Enums.RenderFlags.TEXTURE + Enums.RenderFlags.HEIGHT_CLIP
m.blendMeshTexCoordV = m.positionZ + 80 -- only what is 80 units above its feet is drawnThat field is also the blend mesh's texture offset, so a monster that already animates its blend mesh with it cannot use both at once.
LIGHTMAP overwrites the body colour with white before anything is drawn. With it in
the mask, both <Glow ColorR/G/B> and m.bodyLightR/G/B are discarded and the
monster renders uncoloured.
That is why a monster with a <Glow> colour is drawn CHROME|BRIGHT by default. If a
glow colour does not show up, this is almost always the reason.
-
Monster scripts -
OnRender, wherem.renderFlagsis set - Adding a monster - the config the mask comes from without a script
MuLua Scripting Plugin | Home
🖼️ Lua UI
- File map
- Creating windows
- Client and server
- Designing a window
- Protocol
- Scrolling and scrollbars
- Controls
- Custom text
- Text input
- Debug console
- Bitmap Slicer
- Encrypting scripts
Maps
Monsters
Shared
Version 1.14 | 2026-09-09