Skip to content

Trigger Conditions

gwagwaflamingo edited this page May 21, 2024 · 2 revisions

Trigger Conditions

We need to take soil samples. And barometric readings! Metallurgical analyses! I just don't have enough hands to do everything. -Nairin

This article is a work in progress.

Basic Logic

무조건 | True

No conditioning. Always proceed.

AllOf

Nests multiple conditions in a group, and will be true only if all conditions inside are true.

<condition name="AllOf">	
  <group>
<condition name="DungeonCheckPlayTime" playSeconds="70" operator="LessEqual"/>
<condition name="몬스터가죽어있으면" arg1="201" />
  </group>
  <action name="DungeonMissionComplete" missionID="24094006" />
  <transition state="전투_종료"/>
</condition>

AnyOf

Nests multiple conditions in a group, and will be true if any of the conditions inside are true.

<condition name="AnyOne">
  <group>
      	<condition name="오브젝트가반응했으면" arg1="10002128" arg2="0" />
          <condition name="오브젝트가반응했으면" arg1="10002129" arg2="0" /> 
  </group>
  <transition state="씨앗패턴3_종료"/>
</condition>

랜덤조건 - Random Condition

Weighted chance.

Args Name Type Default Description
arg1 weight int Weight chance

DayOfWeek

True if the day of the week is [weekday], with 1 being Sunday and 7 Saturday. [weekday] can be a list separated by commas.

Args Name Type Default Description
dayOfWeeks weekday int Day of the week. (1-7)

WaitTick

Will be true once [ticks] have passed.

Args Name Type Default Description
waitTick ticks int Amount of ticks to wait.

WaitAndResetTick

Like WaitTick, but the condition will continuously loop for as long as the state is active and hasn't transitioned to a different one.

Args Name Type Default Description
waitTick ticks int Amount of ticks to wait.

User Detection

CheckUser

True if at least one user is detected in the field.

CheckUserCount

True is the amount of users in the field is equal to [count].

Args Name Type Default Description
checkCount count int Amount of users to check for.

유저를감지했으면 - User Detected

True if an user is detected in the area of the TriggerBox with the defined TriggerObjectID [boxId]. If [jobId] is specified, the user's job id must match it.

Args Name Type Default Description
arg1 boxId int TriggerBox TriggerObjectID
arg2
<Optional>
jobId int Job ID of user. At times seen in the wild as blank.

여러명의유저를감지했으면 - Count Users

Like User Detected, but with multiple users. True if the amount of users in TriggerBox [boxId] is [operator] [count].

Args Name Type Default Description
arg1 boxId int TriggerBox TriggerObjectID
arg2 count int Amount of users to be counted.
arg3
<Optional>
operator string Equal Logic operation. Can be:
LessEqual, Less,
Equal,
Greater, GreaterEqual

CountUsers

Like 여러명의유저를감지했으면. However, different from CountUsers, it is unclear if 여러명의유저를감지했으면 can have the arg userTagID. True if the amount of users in TriggerBox [boxId] is [operator] [count]. If [tagId] is defined, only users with that tagId will be counted.

Args Name Type Default Description
arg1 boxId int TriggerBox TriggerObjectID
arg2 count int Amount of users to be counted.
arg3 operator string Equal Logic operation. Can be:
LessEqual, Less,
Equal,
Greater, GreaterEqual (seen in the wild as >= as well)
userTagID
<Optional>
tagId int User tag symbol ID.

퀘스트유저를감지하면 - Quest User Detected

True if an user, whose quest [questId]'s quest state is [questState], is detected in TriggerBox [boxId]. If [jobId] is specified, the user's job id must match it.

Args Name Type Default Description
arg1 boxId int TriggerBox TriggerObjectID
arg2 questId int Quest ID. Can be a range.
arg3 questState int Quest ID's state. Can be a range if questId is a range.
arg4
<Optional>
jobId int blank Job ID of user.

CheckAnyUserAdditionalEffect

True if any user in TriggerBox [boxId] has additional [additionalEffectID] of level [level].

Args Name Type Default Description
triggerBoxID boxId int TriggerBox TriggerObjectID
additionalEffectID additionalId int Additional effect id
level level int Level of additional effect

NPC

NPC를감지했으면 - NPC Detected

True if an NPC spawned by an EventSpawnPointNPC of SpawnPointID [spawnPointId] is detected in TriggerBox [boxId].

Args Name Type Default Description
arg1 boxId int TriggerBox TriggerObjectID
arg2 spawnPointId int EvenSpawnPointNPC SpawnPointID

CheckNpcHp

True if an NPC's, spawned by EventSpawnPointNPC [spawnPointId], health is [operator] [amount]. If [relative] is true, it will check for the overall percentage rather than a static value.

Args Name Type Default Description
spawnPointId spawnPointId int EvenSpawnPointNPC SpawnPointID
value amount int Amount of health to be checked for.
compare operator string Logic operation. Can be:
lowerEqual, lower,
higher, higherEqual
isRelative relative bool Speculation. Whether it should check for the percentage of the health. Seen in the wild only as true.

CheckNpcDamage

True if an NPC's, spawned by EventSpawnPointNPC [spawnPointId], health is [operator] [damageRate].

Args Name Type Default Description
spawnPointID spawnPointId int EvenSpawnPointNPC SpawnPointID
damageRate damageRate float Amount of the npc's health that has been dealt damage, ranging from 0 to 1.
operator operator string GreaterEqual Logic operation. Can be:
LessEqual, Less,
Equal,
Greater, GreaterEqual

몬스터가전투상태면 - Monster In Combat

True if an NPC spawned by EventSpawnPointNPC [spawnPointId] is in combat mode; i.e its AI is activated and it is not doing its normal actions.

Args Name Type Default Description
arg1 spawnPointId int EvenSpawnPointNPC SpawnPointID

CheckNpcAdditionalEffect

True if an NPC spawned by EventSpawnPointNPC [spawnPointId] has additional [additionalEffectID] of level [level].

Args Name Type Default Description
spawnPointID spawnPointId int EvenSpawnPointNPC SpawnPointID
additionalEffectID additionalId int Additional effect id
level level int 1 Level of additional effect

몬스터가죽어있으면 | NpcIsDead - Monster Dead

True if an NPC's, spawned by EventSpawnPointNPC [spawnPointId], death is [bool]. It is important to note that the alias NpcIsDead is seen only in a single map, whom doesn't exist in the GMS2 client.

Args Name Type Default Description
arg1 spawnPointId int EvenSpawnPointNPC SpawnPointID
arg2
<Optional>
bool bool 1 Speculation. Most of the time not declared. Seen in the wild only as 0, in maps unreleased in GMS2 client.

NpcIsDeadByStringID

True if an NPC of stringID [stringId] dies.

Args Name Type Default Description
stringID stringId string NPC stringID. A npc's stringID is defined in its npc xml, an attribute that is normally not defined.

NPC AI

CheckNpcExtraData

True if an NPC's, spawned by EventSpawnPointNPC [spawnPointId], extraData of [key] is [operator] [value].

Args Name Type Default Description
spawnPointID spawnPointId int EvenSpawnPointNPC SpawnPointID
extraDataKey key string NPC AI extraData key
extraDataValue value int Value to be compared to.
operator operator string unknown Seen in the wild only as GreaterEqual. Logic operation. Possibly can be:
LessEqual, Less,
Equal,
Greater, GreaterEqual

Trigger action dependant

시간이경과했으면 - Time Expired

True if timer of [timerID] has expired.

Args Name Type Default Description
arg1 timerId int Timer ID

UserValue

True if trigger variable [key] is [operator] [value].

Args Name Type Default Description
key var string Variable name
value value int Variable value to be checked
arg3
<Optional>
operator string Equal Logic operation. Can be:
LessEqual, Less,
Equal,
Greater, GreaterEqual (seen in the wild as >= as well)

WaitSecondsUserValue

Similar to WaitTick. Will be true once the amount of time defined in UserValue [key] has passed. All examples of this condition can be seen in the Kritias puzzle chests, where the value of TimeEventLifeTime comes from seemingly nowhere. This implies server timeEvents themselves set the UserValue [key], just how they set the key defined in the timeEvent.

Args Name Type Default Description
key var string Variable name

(WIP) ScoreBoardCompare

See trigger action ScoreBoardCreate. Not to be confused with Scoreboard Widgets. Information regarding Shadow Expedition needed.

(WIP) ShadowExpeditionReachPoint

TBA. Information regarding Shadow Expedition needed.

PVP존이종료했으면 - PVP Zone Ended

True if the PVP zone in TriggerBox TriggerObjectID has ended. Paired with trigger action PVP존을설정한다 (Set Pvp Zone).

Args Name Type Default Description
arg1 boxId int TriggerBox TriggerObjectID

Field

오브젝트가반응했으면 - Object Interacted

True if InteractObject of [interactID]'s state matches [state]

Args Name Type Default Description
arg1 interactID int MS2InteractActor interactID
Can be an array.
arg2
<Optional>
state int 2 Interact object's state.

DetectLiftableObject

True if liftable detected in TriggerBox [boxId] is of ItemID [itemId].

Args Name Type Default Description
triggerBoxIDs boxId int TriggerBox TriggerObjectID
itemID itemId int MS2Liftable ItemID

Field Game

IsPlayingMapleSurvival

True if a FieldGame of MapleSurvivalTeam is ongoing.

CheckSameUserTag

Related to FieldGame GuildVsGame. See trigger action UserTagSymbol. True if everyone in [boxId] has the same UserTag.

Args Name Type Default Description
triggerBoxID boxId int TriggerBox TriggerObjectID

GuildVsGameScoredTeam

Related to FieldGame GuildVsGame. True if the team [teamId] was the one that scored in the last GuildVsGameScoreByUser action.

Args Name Type Default Description
teamID teamId int 0-draw; 1-blue; 2-red

GuildVsGameWinnerTeam

Related to FieldGame GuildVsGame. True if the team [teamId] is the one with the most score.

Args Name Type Default Description
teamID teamId int 0-draw; 1-blue; 2-red

Widgets

WidgetCondition checks on the state of a previously created widget. Its behavior depends heavily on its type and arguments. General structure is as follows:

Args Name Type Default Description
arg1 type string Can be SceneMovie, ScoreBoard, Round, TypingGame, RainbowMonster, Guide, OxQuiz, OxQuizUGC, SurvivalContents
arg2 condition string Depends on type.
arg3
<Optional>
param varies Depends on param.

SceneMovie

The conditions for SceneMovie can be as follows:

IsStop

Args Name Type Default Description
arg3 bool bool Speculation. Seen in the wild only as 1.

True if whether the SceneMovie widget has stopped is [bool].

Guide

The conditions for Guide can be as follows:

IsTriggerEvent

Args Name Type Default Description
arg3 guideEvent int ServerTrigger guide event.

True if the ServerTrigger [guideEvent] has been sent. Normally guides are fully client-sided, but can communicate with the server with the ServerTriggerEvent action.

ScoreBoard

The conditions for ScoreBoard can be as follows:

Compare

Args Name Type Default Description
arg3 comparison string (operator,int) Syntax is "(operator),(integer)". e.g.: ">=,1500"

True if whether the Scoreboard score is [comparison].

SurvivalContents

The conditions for SurvivalContents can be as follows:

TimeOver

True if the timer for the current storm step has reached 0.

OxQuiz

The conditions for OxQuiz can be as follows:

Correct

True if the answer for the current PickQuiz is 1.

Incorrect

True if the answer for the current PickQuiz is 0.

OxQuizUGC

The conditions for OxQuizUGC can be as follows:

IsStarted

True if the host has started the OX Quiz.

IsCanceled

True if the host has cancelled the OX quiz.

IsQuizSubmit

True if the host has submitted the question.

IsRemoveWall

Unclear.

IsAnswerSubmit

True if the host has selected an answer for the question.

Correct

True if the answer for the question was 1.

Incorrect

True if the answer for the question was 0.

IsFinished

True if the game has ended, either by going through all rounds or the host ending it early.

RainbowMonster

The conditions for RainbowMonster can be as follows:

IsMissionSuccess

Args Name Type Default Description
arg3 value int Seen in the wild only as a range, but likely can be a single value as well.

True if the score for all groups is [value].

Round

The conditions for SceneMovie can be as follows:

IsStop

Args Name Type Default Description
arg3 bool bool Speculation. Seen in the wild only as 1.

True if whether the SceneMovie widget has stopped is [bool].


Dungeon

IsDungeonRoom

True if the instance is part of a dungeon room session. For example, this is used mainly for cinematics that use maps that are also used by dungeons.

CheckDungeonLobbyUserCount

True if the amount of users in the field is equal to the amount of users the dungeon was created for.

(WIP) DungeonVariable

i dont know man. uservalues but for dungeons? only 1 dungeon + a develop concept uses this but uh. idk how either work !!

DungeonLevel

True if the category of the dungeon matches. Unclear where value comes from; may be taken from groupType.

Args Name Type Default Description
level category int Seen in the wild only as 2 (hard dungeon (presumed)) and 3 (chaos raid)

DungeonMaxUserCount

True if the maxUserCount of the dungeon room is equal to [value].

Args Name Type Default Description
value value int

DungeonCheckState

True if the dungeon room's state matches that of checkState.

Args Name Type Default Description
checkState checkState string Seen in the wild only as Fail, such as when the party leader gives up on the dungeon.

DungeonTimeOut

True if the dungeon timer has timed out.

DungeonCheckPlayTime

True if the dungeon room play time is [operator] [playSeconds].

Args Name Type Default Description
playSeconds playSeconds int Dungeon play time in seconds.
operator
<Optional>
operator string GreaterEqual Logic operation. Can be:
LessEqual, Less,
Equal,
Greater, GreaterEqual

DungeonID

True is the dungeon room's id matches that of [dungeonId]

Args Name Type Default Description
dungeonID dungeonId int Dungeonroom ID.

DungeonFirstUserMissionScore

True if the mission score of the first user that entered the dungeon is [operator] [score].

Args Name Type Default Description
score score int Mission score.
operator
<Optional>
operator string GreaterEqual Logic operation. Can be:
LessEqual, Less,
Equal,
Greater, GreaterEqual

DungeonRoundRequire

True if the requirement of [round] for the dungeon's roundID has been met.

Args Name Type Default Description
round round int undefined Round data index

Wedding & Typing

My tactical officer has a working hypothesis, but she needs more samples for analysis. -Veliche

The section below documents conditions dependant on features that may not be fully implemented in the GMS2 client.

WidgetCondition Round

Seen only in Black Onyx, serves as the rounds system for the typing minigame. It is difficult to tell how exactly this system works, as not only most of the maps that use it were scrapped, but the only usage of it was configured to have only one round and to never punish the user for failing. The conditions for Round can be as follows:

GameClear

Presumably true if WidgetAction Round RoundResult 1 has been sent the amount of times defined by Widget Action SettingFinalRound.

GameClear

Presumably true if WidgetAction Round RoundResult 01 has been sent the amount of times defined by Widget Action SettingAllowedFailCount.

CurrentRound

Args Name Type Default Description
arg3 comparison string (operator int) Syntax is "(operator) (integer)". e.g.: "= 3"

True if the counter for the current round is [comparison].

WidgetCondition TypingGame

The conditions for TypingGame can be as follows:

CurrentRound

Args Name Type Default Description
arg3 bool bool

True if whether the player answered the widget correctly is [bool].

WeddingEntryInField

True if whether both the groom and the bride are in the field is [bool].

Args Name Type Default Description
entryType entryType string Seen in the wild only as GroomBride.
isInField bool bool Bool.

WeddingMutualAgreeResult

Related to the trigger action WeddingMutualAgree. True if whether both the groom and the bride completed the Agree correctly is [bool].

Args Name Type Default Description
agreeType agreeType string Can be partnerName, endActing or startActing.
success bool bool Bool.

WeddingHallState

True if whether the wedding properly completed is [bool].

Args Name Type Default Description
hallState agreeType string Seen in the wild only as weddingComplete.
success
<Optional>
bool bool 1 Bool.

Future Content

I need more data! I'm going to work on a patch. Help me test it out later! - Nairin

The section below documents conditions that are seen only in newer clients and may not work.

(WIP) Random

TBA. Seen only in Blue Rook.

(WIP) CheckUserAdditionalCountInRose

TBA. Custom logic for the spotlight mechanic in Theater of Red Roses.

(WIP) CheckNpcSlaveCount

Seen only in Blue Rook. Unclear.

Args Name Type Default Description
spawnPointID spawnPointId int undefined EvenSpawnPointNPC SpawnPointID
count amount int undefined INFO
summonGroup summonGroup int undefined Summon group.

DungeonMaxUserCount

Seen only in Theater of Red Roses. Unclear if there's a difference between this DungeonMaxUserCount. The dungeon may be checking for either maxUserCount or for the amount of users the session was created for.

Args Name Type Default Description
checkCount value int undefined

Removed Content

I did some digging, and I found... absolutely nothing. I've never seen anything like it! -Schatten

The section below documents conditions seen only in older maps, clients and documentation, and may no longer work.

보너스게임보상받은유저를감지했으면 - Received Bonus Game Reward

Seen only in maps that have since been overwritten and no longer interact with these outdated scripts. An example is Happy Spin/해피스핀 (80000003).
True if an user wins a BonusGame in TriggerBox TriggerObjectID.

Args Name Type Default Description
arg1 boxId int unknown TriggerBox TriggerObjectID
arg2 bool bool 1 Speculation.

타임이벤트가발동했으면 - Time Event Triggered

Seen only in old clients. Could possibly work with modern server TimeEvents?

Args Name Type Default Description
arg1 timeEventId int unknown Time event ID.
8-Puzzron's Cave
9-Red Arena
10-Blood Mine
11-Trap Master
12-Ludibrium Escape
13-Crazy Runners
14-Sole Survivor
15-Spring Beach
arg2 timeAdvance int 0 Amount of seconds before the exact time event.
arg3 unknown int 0 Unknown. Amount of seconds.

시간표확인 - Check Timetable

Seen only in old clients. Paired with trigger action 시간표를설정한다 (Create Timetable). Like server TimeEvents, but if they were gross and created by triggers.

월드이벤트가진행중이면 - World Event Ongoing

Documented in TriggerEditor.xml, but not seen in the wild. Documentation for it reads: "#1#번 월드이벤트가 진행중이면" ("If World Event #1# is in progress").

(WIP) OnDetectUser

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnSensorCube

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnAlways

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnMonsterBattle

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnMonsterDead

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnSwitchCube

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnHitBySkillCube

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnBreakableCube

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

(WIP) OnTimer

Seen only in the CBT theoretical house dungeons. It is unclear if it was ever in a truly implemented state and not just a concept, as even in its oldest state it was commented out.

Clone this wiki locally