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 ? :endmessageGetR1 = 0 ? :EventsGetOxygenLevel < 90 ? SetMessagePermit 0GetOxygenLevel < 90 ? SetMessage GetR1 1TRUE ? SetR1 0endmessage:GetOxygenLevel < 90 ? SetMessagePermit 1Stop
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 0012 00 02 00 07 00 01 00 00 00 00 00 04 00 01 00 B8 00 08 00B5 00 02 00 06 00 01 00 5A 00 00 00 04 00 01 00 31 00 02 00 00 00 00 00B5 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 0001 00 02 00 04 00 01 00 1A 00 02 00 00 00 00 0009 00 04 00B5 00 02 00 06 00 01 00 5A 00 00 00 04 00 01 00 31 00 02 00 01 00 00 0000 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 1TRUE ? SetR1 0}TRUE ? :Next Init/:TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :WaitForToolstore/ WaitForToolstore:{GetToolStoresBuilt = 0 ? StopTRUE ? SetMessagePermit 0TRUE ? SetMessage 6 1TRUE ? SetCameraGotoTutorial 1}TRUE ? :Next WaitForToolstore/:TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :PlayMessage1/ PlayMessage1:{GetMessageTimer > 0 ? StopTRUE ? SetMessagePermit 1}TRUE ? :Next PlayMessage1/:TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :WaitForCrystal/ WaitForCrystal:{GetCrystalsCurrentlyStored = GetR1 ? StopTRUE ? SetMessagePermit 0TRUE ? SetR1 GetCrystalsCurrentlyStoredTRUE ? SetMessage GetR1 1}TRUE ? :Next WaitForCrystal/:TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :PlayMessage2/ PlayMessage2:{GetMessageTimer > 0 ? StopTRUE ? SetMessagePermit 1TRUE ? SetR3 3GetCrystalsCurrentlyStored > 4 ? :cestfiniStopcestfini:TRUE ? SetTimer1 0}TRUE ? :Next PlayMessage2/:TRUE ? AddR6 1 TRUE ? SetR2 1 TRUE ? AddR2 GetR3 GetR2 != GetR6 ? :PauseBaforeEnd/ PauseBaforeEnd:{GetTimer1 < 5000 ? StopTRUE ? 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
- Level01 (with Material Collecting Objective)
- Level03 (with Material Collecting Objective)
- Level04 (with Building Objective)
- Level05 (with Building Objective)
- Level07 (with Finding Object Objective)
- Level11 (with Material Collecting Objective)
- Level12 (with Material Collecting Objective)
- Level15 (with Material Collecting Objective)
- Level16 (with Material Collecting Objective)
- Level25 (with Material Collecting Objective)