NERPs intermittent message setup

This article is an unfinished work in progress or contains transferred information that needs to be rewritten or reformatted to fit our standards. Please excuse the mess and do not mark for deletion.

Intermittent Message Setup is a common setup in Mission Objective Scripts. The purpose of this setup is to give a message to the player when triggered by a certain action or Parameter. Many of the original Levels include some form of this setup.

Simple Setup

A simple Intermittent Message Setup, simply has a message triggered after a specific Parameter is equal to a value. For modding purposes, this is the suggested method of the setup. An example from Mission 4: A Breath Of Fresh Air is to have messages pop when the Oxygen Supply reaches a certain level:

 GetMessageTimer = 0 ? :endmessage
 GetR1 = 0 ? :Events
 GetOxygenLevel < 90 ? SetMessagePermit 0
 GetOxygenLevel < 90 ? SetMessage GetR1 1
 TRUE ? SetR1 0
 endmessage:
 GetOxygenLevel < 90 ? SetMessagePermit 1
 Stop

This makes it so that when the Oxygen supply goes below 90%. The important bit of the script would be the line "GetOxygenLevel < 90 ? SetMessagePermit 1" The rest is simply setting it up so that it shows the message once and only once when it first reaches that level. As soon as the message is done, it can be closed, and it will not pop up again, as designated in the ":endmessage ... endmessage:" parameter section. When in the encrypted script it translates to:

 6B 00 02 00 07 00 01 00 00 00 00 00 04 00 01 00 B0 00 08 00
 12 00 02 00 07 00 01 00 00 00 00 00 04 00 01 00 B8 00 08 00
 B5 00 02 00 06 00 01 00 5A 00 00 00 04 00 01 00 31 00 02 00 00 00 00 00
 B5 00 02 00 06 00 01 00 5A 00 00 00 04 00 01 00 10 00 02 00 12 00 02 00 01 00 00 00
 01 00 02 00 04 00 01 00 1A 00 02 00 00 00 00 00
 09 00 04 00
 B5 00 02 00 06 00 01 00 5A 00 00 00 04 00 01 00 31 00 02 00 01 00 00 00
 00 00 02 00

Each line corresponds to the line of readable script to make it more easily decipherable.

Complex Setup

If you want to have multiple messages pop up during a mission, you will have to use the more complex method. It works much the same way as the simple setup does with messages triggered by various Parameters, but in a carefully organized series. An example of this setup can be seen in the Level 1 script, which has a message pop after every time you collect a crystal. (Note: To avoid confusion, you should look at the NRM file rather than the NRN file for encrypting purposes)

 TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :Init/ Init:
 {
 	TRUE ? SetMessagePermit 1
 	TRUE ? SetR1 0
 }
 TRUE ? :Next Init/:
 
 TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :WaitForToolstore/ WaitForToolstore:
 {
 	GetToolStoresBuilt = 0 ? Stop
 	TRUE ? SetMessagePermit 0
 	TRUE ? SetMessage 6 1
 	TRUE ? SetCameraGotoTutorial 1
 }
 TRUE ? :Next WaitForToolstore/:
 
 TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :PlayMessage1/ PlayMessage1:
 {
 	GetMessageTimer > 0 ? Stop
 	TRUE ? SetMessagePermit 1
 }
 TRUE ? :Next PlayMessage1/:
 
 TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :WaitForCrystal/ WaitForCrystal:
 {
 	GetCrystalsCurrentlyStored = GetR1 ? Stop
 	TRUE ? SetMessagePermit 0
 	TRUE ? SetR1 GetCrystalsCurrentlyStored
 	TRUE ? SetMessage GetR1 1
 }
 TRUE ? :Next WaitForCrystal/:
 
 TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :PlayMessage2/ PlayMessage2:
 {
 	GetMessageTimer > 0 ? Stop
 	TRUE ? SetMessagePermit 1
 	
 	TRUE ? SetR3 3
 	GetCrystalsCurrentlyStored > 4 ? :cestfini
 	Stop
 cestfini:
 	TRUE ? SetTimer1 0
 }
 TRUE ? :Next PlayMessage2/:
 
 TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :PauseBaforeEnd/ PauseBaforeEnd:
 {
 	GetTimer1 < 5000 ? Stop
 	TRUE ? SetLevelCompleted
 }
 TRUE ? :Next PauseBaforeEnd/:

Though organized slightly differently from the simple setup, they practically perform the same function, but with multiple messages for multiple circumstances.

Examples of Levels that Include this Setup