MZ A Fun Dive into the "Invisible Monster" Design

Alright, let’s talk about this super cool "invisible monster" I cooked up for my game! Originally, it was meant to be a gnarly, blood-soaked creature, but making walking sprites was a total nightmare. So, I brainstormed and landed on something wild: a monster with no physical form, entirely driven by a state machine. No sprite, just pure mechanics messing with the player’s head!


This monster has three forms—Student, Janitor, and Waiter(actually w**re in game)—and it switches between them based on the player’s actions every few seconds, counted as one action turn. The Waiter only shows up later in the story, adding a spicy twist.


Since pasting images is a hassle, I’ll paint the picture with words. The game’s set in a hotel-like map where players solve puzzles and explore, zipping between corridors and rooms. That’s the main stage for this chapter.


Student Morph​


When the player’s chilling in a room, the monster’s in Student mode, prowling outside the hotel. Picture it draped in chains and books, clanking like a walking library. Every time the player makes noise—like smashing a plate or interacting with stuff (adding to the "whisper value")—the monster zeroes in. There’s a "distance value" (0 is in-your-face, 9 is far off) that shifts constantly. If the player makes noise, the monster tries knocking on a door. If it’s super close (distance 0), it bangs on your room’s door, cue the jump scare!


Janitor Morph​


Try leaving the room, and the mess you made inside (tracked as "dirtiness value") gets locked in. That triggers the Janitor morph. The dirtier you are, the faster this guy closes the distance, like a cleaning fanatic on your tail! But if you duck back into a room, it switches to Student mode. If the monster catches you (distance 0) and you’ve got a light on—room lamp or handheld—it gets spooked, adding to its "fear-of-light value." Once that value maxes out, the monster stops fearing light and flips to Waiter mode.


Oh, and here’s a kicker: if the Student knocks on your room’s door while you’re inside, it also turns into the Waiter.


Waiter(*****) Morph​


The Waiter is intense. It knocks on doors like it’s demanding room service, whether you’re in a room or not, and it doesn’t care about your whisper value. Catch probability skyrockets! If you’re outside, it closes the distance, but unlike the Janitor, the dirtier you are, the slower it moves. And yeah, it’s immune to light now.

If a room you dirtied up has trash, the next turn flips the monster to Janitor mode, whether you’re inside or out. The Janitor keeps closing in but doesn’t knock, so you’re safe in a room even if the distance is low. When it switches back to Student, it uses the Janitor’s close distance as a starting point. Also, if you leave a room while the monster’s a Student, it stays Student until the next turn, giving you a brief "safe window" before the Janitor kicks in.

Deep Dive: Student Morph Approach Mechanics​


The Student’s approach is the trickiest part, driven by two random numbers:
  • Move Direction: 1 or else(most 2)
  • Move Distance: 1 unit, 2 units, 3 units (only distance wall).
After rolling these, the monster’s state gets processed. I set up "distance walls":
  • At distance 0 (too close), it’s forced to move 3 units away, direction locked to "away," no random roll.
  • At distance 9 (too far), it moves 3 units closer, direction locked to "approach."

This keeps things controlled. The monster tends to hover in a range, not moving consistently, probably because RPG Maker MZ’s random number system isn’t as jumpy as Perlin noise. Even with refreshes, it feels sticky. So, I added a "lockdown value" to track how long it lingers in a distance range. There’s an approach lockdown (distances 0-2, cap 3) and an away lockdown (7-9, cap 2). Hit the cap, and it’s forced to distance 5. These are separate counters to avoid conflicts. By tweaking lockdown and move distance, I can make the monster pop up more or less often, creating a "feels random but kinda predictable" vibe. Since each turn is like 30-60 seconds, even frequent encounters don’t feel annoying—they’re challenging and fun!


Picture this: you’re sneaking through puzzles in Student mode, accidentally smash a plate (whisper value spikes), and realize the monster’s closing in. You bolt out of the room, and next turn, it’s a Janitor, hot on your heels, shrinking the distance fast. You duck into another room, but it’s not always safe—those lockdown and wall mechanics keep things spicy but fair. This setup gives players freedom to puzzle-solve (no other characters on the map!) while the invisible monster keeps them paranoid. They can’t fully crack the state machine, so they lean on plot hints ("correct info") to dodge it.


The Fun Part: Outsmarting the Monster​


You might think players are just sitting ducks, but the three-morph cycle flips that. Let’s break it down:


  • State Machine: Morphs switch based on player actions every few seconds, so players can time their moves to mess with it.
  • Student: Wanders, knocks on noise, hits your door and becomes Waiter. Sets distance.
  • Janitor: Always chases, faster with higher dirtiness, fears light until it doesn’t, then turns Waiter.
  • Waiter: Knocks constantly, chases slower with higher dirtiness. Trash in a room flips it to Janitor next turn.

Imagine this: you use the Janitor to spook it with light, then slip into a room to push the distance out. In Student mode, if the distance is far (say, 6-9), you’ve got time to puzzle without worrying about noise. If it gets close and knocks, it turns Waiter. You make yourself super dirty, leave trash in the room, and when the Waiter barges in, the next turn it’s a Janitor. Since you’re filthy, the Waiter was slow chasing you outside, and by the time it’s a Janitor, you’re back in a room, forcing it to Student mode. Now you’re not just running scared—you’re toying with the monster! Players can use known info to bait morph switches, playing a cat-and-mouse game. Each dodge feels like a win, turning fear into a rush of outsmarting death.

Welcome to provide feedback.

lazy to write with English so I give chinese document 2 grok and just translate
All workable on RPG Maker MZ, may able to work on ruby series, but better dont 🙁

I gonna post event text here, but very sorry only Chinese. Log may unreadable(?

◆Wait:60 frames
◆Control Variables:#0107 回合计数 += 1
◆Script:console.warn('当前回合:'+$gameVariables.value(107))
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :这个回合值计算怪物的行动回合
◆Comment:++++++++++++++++++++++++++++++++++++++++++
◆Comment:下面写逻辑
: :需要把一些状态值清空
◆Comment:++++++++++++++++++++++++++++++++++++++++++
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :怪物的移动方向
: :正常的距离/靠近远离决定刷新,1是靠近,2是远离
: :要不概率太低了
◆Wait:1 frame
◆Control Variables:#0105 距离移动选择 = Random 1..2
◆Wait:1 frame
◆Control Variables:#0105 距离移动选择 = Random 1..2
◆Wait:1 frame
◆Control Variables:#0105 距离移动选择 = Random 1..2
◆Wait:1 frame
◆Control Variables:#0105 距离移动选择 = Random 1..2
◆Wait:1 frame
◆Control Variables:#0105 距离移动选择 = Random 1..2
◆Comment:++++++++++++++++++++++++++++++++++++++++++
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :下面写刷新逻辑
◆If:学生形态:玩家所在位置 is ON
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :意味着有一个回合距离值为0还在继续尝试靠近,激活了保护界
: :此时这个回合不会刷新随机值,下个回合会强行离远3个距离值
◆
:Else
◆If:学生形态:过于遥远 is ON
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :与”玩家所在位置刚好相反“,距离值为9却继续尝试离远
: :下个回合会强行拉近3个距离值
◆
:Else
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :改为一次移动不超过2点
◆Wait:1 frame
◆Control Variables:#0104 学生形态:远近变化 = Random 1..2
◆Wait:1 frame
◆Control Variables:#0104 学生形态:远近变化 = Random 1..2
◆Wait:1 frame
◆Control Variables:#0104 学生形态:远近变化 = Random 1..2
◆
:End
◆
:End
◆Comment:++++++++++++++++++++++++++++++++++++++++++
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :下面写刷新逻辑
◆Script:/*
: :这是注释
: :
: :6/12
: :给所有距离值低于3的相关逻辑打上了防禁锢变量
: :当防禁锢变量抵达3(三个回合)的时候,距离强制重置为5
: :因为默认为0,需要先重置为0
: :*/
◆If:距离移动选择 = 1
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :这是要靠近
: :但如果距离值只有1,那靠近就最大不能大于1
: :如果距离值是0,这个回合必须强制为远离
◆Comment:log:需要一段逻辑,保证3次之内怪物必须里的足够远
◆If:防距离禁锢(接近) ≥ 3
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :强制重置为距离值等于5
: :为了避免莫名其妙的bug...
◆Script:console.error('似乎因为长时间距离过近,被强行拉远了')
◆Control Variables:#0101 怪物属性:距离值 = 5
◆Comment:归零
◆Control Variables:#0108 防距离禁锢(接近) = 0
◆Script:console.log('当前防禁锢数值为'+$gameVariables.value(108))
◆
:Else
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :防禁锢为0或不到3的时候正常判断距离值
◆If:怪物属性:距离值 ≤ 0
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :太近了,必须强制进行一次远离
: :如果已经拦截系统,这里要进行撤离
: :
◆If:学生形态:玩家所在位置 is ON
◆Comment:拦截后强行改为远离+3
◆Control Variables:#0101 怪物属性:距离值 = 0
◆Control Variables:#0104 学生形态:远近变化 = 3
◆Control Variables:#0101 怪物属性:距离值 += 学生形态:远近变化
◆Control Switches:#0306 学生形态:玩家所在位置 = OFF
◆Script:console.log('!!!!!!!似乎距离太近了!这个回合不刷新随机数!!!!!!!!')
◆Script:console.log('——————成功让怪物撤离的更远了!——————')
◆Control Variables:#0108 防距离禁锢(接近) += 1
◆Script:console.log('太近了!防禁锢数值为'+$gameVariables.value(108))
◆
:Else
◆Comment:未拦截,下个回合必须停止
◆Control Switches:#0306 学生形态:玩家所在位置 = ON
◆Control Variables:#0108 防距离禁锢(接近) += 1
◆Script:console.log('太近了!防禁锢数值为'+$gameVariables.value(108))
◆
:End
◆
:Else
◆If:怪物属性:距离值 = 1
◆Control Variables:#0104 学生形态:远近变化 = 1
◆Control Variables:#0108 防距离禁锢(接近) += 1
◆Script:console.log('太近了!防禁锢数值为'+$gameVariables.value(108))
◆
:End
◆If:怪物属性:距离值 = 2
◆Control Variables:#0104 学生形态:远近变化 = 2
◆Control Variables:#0108 防距离禁锢(接近) += 1
◆Script:console.log('太近了!防禁锢数值为'+$gameVariables.value(108))
◆
:End
◆If:怪物属性:距离值 = 3
◆Control Variables:#0104 学生形态:远近变化 = 3
◆
:End
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :靠近是”距离值-远近变化”
: :当距离不那么近的时候,不会强行拉远,只会正常执行距离被远近变化减去的逻辑
◆Comment:
◆Control Variables:#0101 怪物属性:距离值 -= 学生形态:远近变化
◆Script:console.log('本次移动是靠近玩家,怪物在没有触发门限移动后的距离值为'+$gameVariables.value(101))
◆
:End
◆
:End
◆
:Else
◆Comment:——————————————————————————————————————————————————————————————————————————————————
: :远离,只要不是1就远离,因为概率太高了所以只刷2数
: :最远不可以超过9,超过9的时候不可以有远近变化
: :78有距离控制墙
: :如果超过或等于9,这个回合什么都别做,下个回合必然靠近
◆If:防距离禁锢(远离) ≥ 3
◆Comment:在这里指2个回合离得太远被拉回来(这个情况应该不会因为太近而突然触发一个数值吧?)
: :还是最好分开变量处理,以免万一...
◆Control Variables:#0101 怪物属性:距离值 = 5
◆Control Variables:#0109 防距离禁锢(远离) = 0
◆Script:console.error('似乎因为长时间距离过远,被强行缩近了')
◆
:Else
◆If:怪物属性:距离值 ≥ 9
◆Comment:如果已经拦截系统,这里要进行靠近
◆If:学生形态:过于遥远 is ON
◆Comment:拦截后强行改为靠近+3
◆Control Variables:#0104 学生形态:远近变化 = 3
◆Control Variables:#0101 怪物属性:距离值 -= 学生形态:远近变化
◆Control Switches:#0307 学生形态:过于遥远 = OFF
◆Script:console.log('!!!似乎距离太远了!这个回合不刷新随机数!!!')
◆Script:console.log('——————怪物靠得更近了!——————')
◆Control Variables:#0109 防距离禁锢(远离) += 1
◆Script:console.log('太远了!防禁锢数值为'+$gameVariables.value(109))
◆
:Else
◆Comment:未拦截需要拦截
◆Control Switches:#0307 学生形态:过于遥远 = ON
◆Script:console.log('太远了!防禁锢数值为'+$gameVariables.value(109))
◆
:End
◆
:Else
◆If:怪物属性:距离值 = 8
◆Control Variables:#0104 学生形态:远近变化 = 1
◆Control Variables:#0109 防距离禁锢(远离) += 1
◆Script:console.log('太远了!防禁锢数值为'+$gameVariables.value(109))
◆
:End
◆If:怪物属性:距离值 = 7
◆Control Variables:#0104 学生形态:远近变化 = 2
◆Control Variables:#0109 防距离禁锢(远离) += 1
◆Script:console.log('太远了!防禁锢数值为'+$gameVariables.value(109))
◆
:End
◆Control Variables:#0101 怪物属性:距离值 += 学生形态:远近变化
◆Script:console.log('本次移动是远离玩家,怪物在没有触发门限移动后的距离值为'+$gameVariables.value(101))
◆
:End
◆
:End
◆
:End
◆Comment:远离是
: :距离-远近变化
◆Script:console.log('当前怪物的距离值为'+$gameVariables.value(101))
: :console.log('如果105变量数值为1,怪物就是在靠近了,数值是'+$gameVariables.value(105))
: :console.log('当前怪物将要移动的距离为:'+$gameVariables.value(104))

If u can understand wth Im doing than welcome copy.

Original thread: https://forums.rpgmakerweb.com/threads/a-fun-dive-into-the-invisible-monster-design.178287/