Messages

Message systems are a somewhat common design pattern.

In TPP messages are sent from the engine to the lua vm to communicate events or other information.

There is no direct equivalent from lua to engine, instead direct engine module function calls are used or game object commands.

For the TPP Lua modules subscribe to whatever message it's interested with a function to be called.

```
   function this.Messages()
       return Tpp.StrCode32Table{
           [message Class]={
               {msg='msgName', func=this.functionName(params)}
           }
       }
   }

```

The messages pass through TppMain.OnMessage which dispatches to the subscribed modules.

A breakdown of some messages by message class with parameter information can be found in the Infinite Heavens MGS\_TPP\mod\modules\IHLookup.lua messageSignatures table.

Following is an uncategorised list of message names:

* AbortFromWormhole
* AbortFromWormholeStart
* AimedFromPlayer
* AntiSniperNoticed
* ArrivedAtLandingZoneWaitPoint
* AssignedStaff
* AvatarEditEnd
* BattleFx\_on
* BonusPopupAllClose
* brake\_room
* BreakGimmick
* BreakGimmickBurglarAlarm
* BringPlayerEvent
* BuddyAppear
* BuddyArrived
* BuddyPuppyFind
* BuildingBurn
* BulletGuardArmor
* BurglarAlarmTrap
* CalcDogFultonPercent
* CalcFultonPercent
* CalledFromStandby
* CallMenuMessage\_HideCallMenu
* CallMenuMessage\_RescueBoyGo
* CallMenuMessage\_RescueBoyWait
* CallMenuMessage\_ShowCallMenu
* CancelReinforce
* Carried
* CBoxSlideEnd
* cdtstacoaton
* ChangeAsset
* ChangeBgmPhase
* ChangedStaffListTab
* changekaz
* ChangeLife
* ChangePhase
* ChangePhaseForAnnounce
* ChangeRPG
* ChangeToEnable
* ChangeWeather
* ChangeWeathre
* CheckEventDoorNgIcon
* Clock
* CommandPostAnnihilated
* CompletedPlatform
* ComradeFultonDiscovered
* ConfigurationUpdated
* Conscious
* Continue
* ConversationEnd
* CqcContinuePass
* CqcHoldReleseChild
* CqcHoldStart
* CreateSandStorm
* crtnburn
* crtnhide
* Customize\_Abort
* Customize\_ChangePart
* Customize\_End
* Customize\_Start
* Damage
* dds3\_demo10\_StandIdle
* Dead
* DeadInFOB
* demoInterruptionMessage
* DemoPauseSkip
* DemoSkipped
* DemoSkipStart
* DescendToLandingZone
* DestroySandStorm
* DirectMotion
* Disable
* DisablePhantomRoom
* DisableTranslate
* DisconnectFromKonami
* DisconnectFromNetwork
* DisconnectFromPsn
* DiscoveredBySniper
* DiscoveredObject
* DiscoverFraud
* DiscoveryHostage
* DispFobResultAtkGet
* DispFobResultFobGet
* DispFobResultFobLost
* DispFobResultWinlose
* DispFobResultWormHole
* DisplayTimerLap
* DisplayTimerTimeUp
* DlcStatusChanged
* DM\_door
* DM\_enemy
* DM\_mask\_off
* DM\_mask\_on
* DM\_thm\_off
* DogBiteConnect
* Down
* DownSectionLv
* Dying
* DyingAll
* EmblemEditEnd
* EnableCQC
* EndAnnounceLog
* EndCallVioce2
* EndCarryAction
* EndChapterTelop
* EndCyprusTitle
* EndDlcAnnounce
* EndFadeIn
* EndFadeOut
* EndInvestigate
* EndLogin
* EndMissionTelopDisplay
* EndMissionTelopFadeOut
* EndOnlineStore
* EndReloginSync
* EndResultBlockLoad
* EndTelopCast
* Enter
* EspionageBoxGimmickOnGround
* EspionageRadioCandidate
* EspionageRadioPlay
* EventGimmickFinish
* Exit
* Finish
* FinishInterpCameraToDemo
* FinishMotion
* FinishMovingOnRoute
* FinishMovingToPosition
* FinishOpeningDemoOnHeli
* FinishRain
* FinishReflexMode
* FireSkullFace
* FobPeerNameResolved
* Fulton
* FultonFailed
* FultonFailedEnd
* FultonInfo
* GameOverAbortMission
* GameOverAbortMissionGoToAcc
* GameOverByCrime
* GameOverContinue
* GameOverOpen
* GameOverRestart
* GameOverRestartFromHelicopter
* GameOverReturnToMission
* GameOverReturnToTitle
* GameStart
* GetInEnemyHeli
* GetIntel
* GzEndingFinish
* GzSaveDataLoaded
* HeadShot
* HeadShotDistance
* HeliDoorClosed
* Holdup
* HostageUnlock
* IconClimbOnShown
* IconCrawlStealthShown
* IconFultonShown
* IconMBCBoxShown
* IconOk
* IconRideHelicopterStartShown
* IconSwitchShown
* IconTBoxOnShown
* IconToiletOnShown
* IconWormholeOnShown
* IdoorHide
* IdoorUnHide
* InAnimalLocator
* InLocator
* InSight
* IntelIconInDisplay
* Interrogate
* InterrogateEnd
* InterrogateSetMarker
* InterrogateUpHero
* Interrupt
* IntoWormhole
* InvitationAccept
* InvitationAcceptByOther
* InvitationAcceptWithoutSignIn
* Kill\_Fx
* LandedAtLandingZone
* LandingFromHeli
* LiquidChangePhase
* LiquidDefeatedByCqcInStartRoom
* LiquidEnterCombatPhaseTwo
* LiquidGhostKnockout
* LiquidPutInHeli
* LookingTarget
* LostContainer
* LostControl
* LostHostage
* lostquiendrool
* MapUpdate
* MB\_DEVICE
* MbDvcActAcceptMissionList
* MbDvcActCallBuddy
* MbDvcActCallRescueHeli
* MbDvcActCloseTop
* MbDvcActDecideDevelopEquip
* MbDvcActDecideSupportEquip
* MbDvcActEndTutorial
* MbDvcActHeliLandStartPos
* MbDvcActOpenDevelopEquip
* MbDvcActOpenMenu
* MbDvcActOpenMissionList
* MbDvcActOpenStaffList
* MbDvcActOpenTop
* MbDvcActRunDevelopEquip
* MbDvcActSelectAvatarMenu
* MbDvcActSelectCboxDelivery
* MbDvcActSelectItemDropPoint
* MbDvcActSelectLandPoint
* MbDvcActSelectLandPointEmergency
* MbDvcActSelectLandPointTaxi
* MbDvcActSelectNonActiveMenu
* MbDvcActWatchPhoto
* MgoConfigurationUpdated
* MissionPrep\_Abort
* MissionPrep\_ChangeEditTarget
* MissionPrep\_End
* MissionPrep\_EndEdit
* MissionPrep\_EndItemSelect
* MissionPrep\_EndSlotSelect
* MissionPrep\_EndSortieTimeSelect
* MissionPrep\_EnterWeaponChangeMenu
* MissionPrep\_ExitWeaponChangeMenu
* MissionPrep\_StartEdit
* MissionPrep\_StartItemSelect
* MissionPrep\_StartSlotSelect
* MissionPrep\_StartSortieTimeSelect
* MonologueEnd
* MotherBaseCurrentClusterActivated
* MotherBaseCurrentClusterDeactivated
* MotherBaseCurrentClusterLoadStart
* MsfSalute
* MtqfB1DoorOpen
* NameEntryClose
* Neutralize
* NeutralizeFob
* nil
* NotHaveStaffToReceiveFulton
* NoticeSneakMotherBase
* NoticeSneakSupportedMotherBase
* NoticeVehicleInvalid
* NotifyChangedPlayerRailAction
* NotifyCyprusMotionEvent
* NotifyCyprusTargetHit
* NotifyStartWarningFlare
* nwvocn
* nwvocn02
* Observed
* OnActivatePlaced
* OnAddTacticalActionPoint
* OnAmmoLessInMagazine
* OnAmmoStackEmpty
* OnBehind
* OnBinocularsMode
* OnBreakPlaced
* OnChangeLargeBlockState
* OnChangeSmallBlockState
* OnComeOutSupplyCbox
* OnCrawl
* OnElude
* OnEquipHudClosed
* OnEquipItem
* OnEquipWeapon
* OnInjury
* OnPickUpCollection
* OnPickUpPlaced
* OnPickUpSupplyCbox
* OnPickUpWeapon
* OnPlayerElude
* OnPlayerGatling
* OnPlayerHeliHatchOpen
* OnPlayerMachineGun
* OnPlayerMortar
* OnPlayerPipeAction
* OnPlayerSearchLight
* OnPlayerStaminaOut
* OnPlayerToilet
* OnPlayerTrashBox
* OnPlayerUseBoosterScope
* OnRequested
* OnScriptBlockStateTransition
* OnVehicleDrive
* OnVehicleRide\_Start
* OnWalkerGearDrive
* OpenWormhole
* OutFromWormhole
* p21\_010000\_casttelop\_on
* p21\_010000\_cyprtitle\_on
* p21\_010000\_epigraph\_on
* p21\_010000\_focusdistanceoff\_ps3xbox360
* p21\_010000\_iconon01
* p21\_010000\_missiontelop\_on
* p21\_010000\_openeyelids
* p21\_010000\_telop\_game\_off
* p21\_010000\_telop\_game\_on
* p21\_010000\_telop\_kde\_off
* p21\_010000\_telop\_kde\_on
* p21\_010000\_telop\_kjp\_off
* p21\_010000\_telop\_kjp\_on
* p21\_010050\_001\_react000\_start\_recognition
* p21\_010050\_001\_start\_recognition
* p21\_010050\_chaptertelop\_on
* p21\_010050\_cmn\_react000\_start\_recognition
* p21\_010050\_cmn\_react001\_start\_recognition
* p21\_010050\_cmn\_react002\_start\_recognition
* p21\_010050\_start\_recognition
* p21\_010100\_iconon01
* p21\_010100\_iconon02
* p21\_010200\_iconon01
* p21\_010230\_iconon01
* p21\_010240\_iconon01
* p21\_010270\_iconon01
* p21\_010360\_iconon01
* p21\_010370\_padon
* p21\_010420\_playercrawling
* p21\_010440\_iconon01
* p21\_010440\_iconon02
* p21\_010490\_EneChange
* p21\_020010\_iconon01
* p21\_020030\_ChangeGameMot
* p31\_010010\_BackGroundChange
* p31\_020025\_003\_prsDead
* p31\_0400140\_Player\_setpos01
* p31\_0400140\_Player\_setpos02
* p31\_040130\_DemoEnd\_hyu
* p31\_050026\_cabl\_off01
* p41\_020020\_envModel\_visOff
* p41\_020020\_envModel\_visOn
* p51\_010060\_mtbs\_bord\_on
* p51\_010145\_001\_stageObj\_ON
* p51\_010145\_002\_stageObj\_ON
* p51\_010145\_004\_stageObj\_ON
* p51\_010145\_005\_stageObj\_ON
* p51\_010145\_hyu\_warp
* p51\_010270\_001\_HBDbox\_on
* PauseMenuAbortMission
* PauseMenuAbortMissionGoToAcc
* PauseMenuCheckpoint
* PauseMenuFinishFobManualPlaecementMode
* PauseMenuGotoMGO
* PauseMenuOpenStore
* PauseMenuRestart
* PauseMenuRestartFromHelicopter
* PauseMenuReturnToMission
* PauseMenuReturnToTitle
* PauseMenuSkipTutorial
* PazGotPicture
* PazHasAimedDefault
* PazHideIcon
* PazInAngle
* PazOutAngle
* PazPerceiveSnake
* PazRelaxEndTiming
* PazShowIcon
* PazSnakeIsMoving
* PazSnakeIsStopping
* PlacedIntoVehicle
* Play
* PlayerCallEnd\_PLM0020\_005
* PlayerCatchFulton
* PlayerCureComplete
* PlayerCureCompleteMotEnd
* PlayerCureStart
* PlayerDamaged
* PlayerFulton
* PlayerFultoned
* PlayerGetAway
* PlayerGetNear
* PlayerHeliGetOff
* PlayerHeliWarpToFobStart
* PlayerHideHorse
* PlayerHoldWeapon
* PlayerIsWithinRange
* PlayerOverrideOff
* PlayerOverrideOn
* PlayerShowerEnd
* PlayerSwitchStart
* PlayerTapCqc
* PlayerTapHeadShot
* PlayerTapHeadShotFar
* PlayerTapRocketArm
* Playing
* PlayInit
* PopupClose
* PressedCarryIcon
* PressedCarryNgIcon
* PressedFultonIcon
* PressedFultonNgIcon
* PressStart
* PushEndLoadingTips
* PutMarkerWithBinocle
* QuestAreaAnnounceLog
* QuestAreaAnnounceText
* QuestIconInDisplay
* QuestStarted
* QuietEraseMarker
* QuietFinishReflex
* qwvocn
* radio\_off
* radio\_on
* RadioEnd
* refresh\_player
* ReinforceRespawn
* RequestAppearReinforce
* RequestAvatarEdit
* RequestedHeliTaxi
* RequestLoadReinforce
* RequestPlayRecordClearInfo
* RequestSaveMbManagement
* RequestSavePersonal
* RespawnChange
* RespawnClientPlayer
* RespawnClose
* Restraint
* Returned
* Ride\_WalkerGear
* RideHeli
* RideHelicopter
* RideHelicopterWithHuman
* RideOk
* RouteEventFaild
* RoutePoint2
* Sahelan1stRailGun
* SahelanAllDead
* SahelanAttackedToHeli
* SahelanBlastDamageToWeakPoint
* SahelanChangePhase
* SahelanEnableHeliAttack
* SahelanEnableSuportAttack
* SahelanGrenadeExplosion
* SahelanHeadBroken
* SahelanPartsBroken
* SahelanPatrolMissile
* SahelanReturned1stRailGun
* SahelanSearchMissileToHeli
* SahelanStopped
* SahelanVulcunStartToHeli
* SahelanVulcunStopToHeli
* SaluteRaiseMorale
* ScaredEnd
* ScaredStart
* SessionDeleteMember
* SessionDisconnectFromHost
* SetMarkerBySearch
* SignInUserChanged
* Skip
* SleepingComradeRecoverd
* SmokeDiscovered
* SpecialActionEnd
* StageBlockCurrentSmallBlockIndexUpdated
* Start
* start\_endroll01
* start\_endroll02
* StartCarryIdle
* StartCastTelopLeft
* StartCastTelopRight
* StartDlcAnnounce
* StartedCombat
* StartedDiscovery
* StartedMoveToLandingZone
* StartedPullingOut
* StartedSearch
* StartedSmokeAction
* StartEventDoorPicking
* StartFobMission
* StartInvestigate
* StartMGO
* StartMissionTelop
* StartMissionTelopBgFadeOut
* StartMissionTelopFadeIn
* StartMissionTelopFadeOut
* StartPlayerBrainFilter
* StartRain
* subEventName
* SubtitlesEndEventMessage
* SuppressorIsBroken
* svs\_zombi\_01
* SwitchGimmick
* TapCqc
* TapHeadShotFar
* TapHoldup
* TapRocketArm
* TelopTypingEnd
* TitleMenu
* TitleMenuReady
* TppAnimalBlock
* TppEndingAllStaffFinish
* TppEndingFinish
* TppEndingHistoryFinish
* TppEndingHistoryStart
* TppEndingMainStaffFinish
* TppEndingMainStaffStart
* TrophyInstalled
* TrophySpaceChecked
* Unconscious
* Unlocked
* UpdatedPandemic
* UpSectionLv
* UserNotSignedIn
* Vanished
* VehicleAction
* VehicleBroken
* VideoPlay
* VideoStopped
* visibleOnNPC
* Volgin\_Start
* VolginAttack
* VolginChangePhase
* VolginDamagedByType
* VolginDestroyedFactoryWall
* VolginDestroyedTunnel
* VolginGameOverAttackSuccess
* VolginLifeStatusChanged
* WalkerGearBroken
* WarningGimmick
* WarpEnd
* WaterFall
* WeaponPutPlaced
* WeatherForecast
* weatherTagChange\_kypr\_default
* weatherTagChange\_kypr\_drizzle
* WormHoleTimerTimeUp
* ZombBiteConnect

#### Semi-Organized Notes About Events

Sender → MessageID → Arguments

* **GameObject**
	+ **1746381789**
		- *Description*
			* called when two tires on a vehicle (including 6-wheel trucks) are shot out, no other unknown event is raised when all tires are shot out
			* presumably, denotes reduced handling
		- *Args*
			* arg0: gameId -- the affected vehicle
			* arg1: unknown -- example value: 1936681293
* **Radio**
	+ **3116057018**
		- *Description*
			* called when using the Inf-Scope to view a target with radio information set, which changes the information you'll receive when you use the Intel radio
		- *Args*
			* arg0: gameId -- the object to receive radio information about
			* arg1: conversation type -- unknown enum?
				+ **3:** heavy machine gun (stationary turret)
				+ **4:** mortar
				+ **6:** communications equipment (blue radios)
				+ **8:** power generator (GZ)
				+ **9:** comms equipment
				+ **11:** searchlight
				+ **18:** dumpster
				+ **19:** metal drum (explosive)
				+ **20:** portable toilet
				+ **27:** military four-wheel drive
				+ **31:** walker gear
				+ **44:** raven (bird)
				+ **54:** Nubian Goat
				+ **65:** Soviet soldier
* **Block**
	+ TBD
* **Player**
	+ **2990447840**
		- *Description*
			* called twice when opening the iDROID in the ACC, once with the arg0=0 and a second time shortly after with arg0=1
			* while in the field, only called one time always with arg0=0 -- after menu fully closes
		- *Args*
			* arg0: number
	+ **2307345963**
		- *Description*
			* called twice when opening the iDROID in the ACC, once with the arg0=1 and a second time shortly after with arg0=0
			* while in the field, only called one time always with arg0=0 -- after menu fully closes
		- *Args*
			* arg0: number
	+ **316563185**
		- *Description*
			* occurs when the <Call Radio> button is held and the menu opens
		- *Args*
			* arg0: number -- seemingly always 0
	+ **4213428578**
		- *Description*
			* occurs when the <Call Radio> button is released and the menu closes
		- *Args*
			* arg0: number -- seemingly always 0
	+ **2533923076**
		- *Description*
			* occurs when a wolf-type animal begins a lunge at the player
		- *Args*
			* arg0: number -- seemingly always 0
			* arg1: gameId -- the gameId of the instigating animal
	+ **2526961808**
		- *Description*
			* occurs every game tick while being lunged at by an animal, beginning with Message **2533923076**, concludes with a **DogBiteConnect** Message or ???
		- *Args*
			* arg0: number -- seemingly always 0

## sources

https://github.com/unknown321/mgsvdump/blob/master/tpp/sequences/messages\_for\_sequences.lua