Difference between revisions of "NERPs documentation"
m (→Additional functions: doing two bits of work) |
(Added an INCOMPLETE Icon Functions section.) |
||
Line 6: | Line 6: | ||
Effects written //Like this are Karl White's original comments. These should probably be saved in some form, though not used as the main definitions. | Effects written //Like this are Karl White's original comments. These should probably be saved in some form, though not used as the main definitions. | ||
As for how to use these functions, [[Writing NERP Scripts|this]] page details that | As for how to use these functions, [[Writing NERP Scripts|this]] page details that. | ||
==Comparison operators== | ==Comparison operators== | ||
Line 333: | Line 333: | ||
|- | |- | ||
|} | |} | ||
===Additional functions=== | ===Additional functions=== | ||
Line 344: | Line 345: | ||
| GetObjectiveShowing | | GetObjectiveShowing | ||
| Gets whether the objective screen is being displayed or not. This includes the initial objective at the beginning of the level and being opened mid-level. | | Gets whether the objective screen is being displayed or not. This includes the initial objective at the beginning of the level and being opened mid-level. | ||
|- | |- | ||
| <code>34 00 02 00</code> | | <code>34 00 02 00</code> | ||
Line 353: | Line 350: | ||
| Used to get the number of minifigures on a map. | | Used to get the number of minifigures on a map. | ||
|- | |- | ||
|} | |} | ||
===Timer functions=== | ===Timer functions=== | ||
Timers run in milliseconds (contray to Karl's comments below), do not reset when Restart Level is selected (but will reset to 0 if the level is exited and re-selected via the menu), and seem to have a maximum of 32000. (Higher values can be incorporated by using a register to count the number of times 30000 has ticked over). | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 512: | Line 458: | ||
| SetMessageWait | | SetMessageWait | ||
| | | | ||
|- | |- | ||
| <code>5C 00 02 00</code> | | <code>5C 00 02 00</code> | ||
Line 560: | Line 494: | ||
| GetCrystalRefineriesBuilt | | GetCrystalRefineriesBuilt | ||
| //Has a crystal refinery been built | | //Has a crystal refinery been built | ||
|- | |- | ||
| <code>6B 00 02 00</code> | | <code>6B 00 02 00</code> | ||
Line 615: | Line 525: | ||
| <code>72 00 02 00</code> | | <code>72 00 02 00</code> | ||
| GetTutorialBlockIsGround | | GetTutorialBlockIsGround | ||
| //Is there ground at tutorial block x | | This returns a non-zero value (not sure exactly what value) if the tutorial block is ground: this does not include hiddern caverns or visible walls. As such, it can be used for a 'has this wall been dug' or 'is this cavern accessible yet' check. Karl's comment: //Is there ground at tutorial block x | ||
|- | |- | ||
| <code>73 00 02 00</code> | | <code>73 00 02 00</code> | ||
| SetCameraGotoTutorial | | SetCameraGotoTutorial | ||
| //Make camera look at a particular tutorial block | | //Make camera look at a particular tutorial block | ||
|- | |- | ||
| <code>77 00 02 00</code> | | <code>77 00 02 00</code> | ||
Line 648: | Line 546: | ||
| GetTutorialBlockIsPath | | GetTutorialBlockIsPath | ||
| Defines whether the tutorial block at a specified square is a power path. | | Defines whether the tutorial block at a specified square is a power path. | ||
|- | |- | ||
| <code>7E 00 02 00</code> | | <code>7E 00 02 00</code> | ||
Line 672: | Line 558: | ||
| GetVehicleTransportsBuilt | | GetVehicleTransportsBuilt | ||
| | | | ||
|- | |- | ||
| <code>88 00 02 00</code> | | <code>88 00 02 00</code> | ||
| SetTutorialBlockIsGround | | SetTutorialBlockIsGround | ||
| | | This will demolish all walls at tutorial block X. It cannot be used to create ground over lava or water. If used on a tile in a hiddern cavern, it will open that cavern. | ||
|- | |- | ||
| <code>89 00 02 00</code> | | <code>89 00 02 00</code> | ||
| SetTutorialBlockIsPath | | SetTutorialBlockIsPath | ||
| | | Sets just one tutorial block as a Power Path. Plays up a lot and seems to always have a STOP hanging off the end of it. Do not expect this function to behave itself. | ||
|- | |- | ||
| <code>8A 00 02 00</code> | | <code>8A 00 02 00</code> | ||
Line 719: | Line 577: | ||
| <code>8C 00 02 00</code> | | <code>8C 00 02 00</code> | ||
| CameraZoomIn | | CameraZoomIn | ||
| | | Zooms in the camera. Usual numbers are between 0 and 100. | ||
|- | |- | ||
| <code>8D 00 02 00</code> | | <code>8D 00 02 00</code> | ||
| CameraZoomOut | | CameraZoomOut | ||
| | | Zooms out the camera. Usual numbers are between 0 and 100. | ||
|- | |- | ||
| <code>8E 00 02 00</code> | | <code>8E 00 02 00</code> | ||
Line 747: | Line 605: | ||
| <code>93 00 02 00</code> | | <code>93 00 02 00</code> | ||
| GetMinifigureInRapidRider | | GetMinifigureInRapidRider | ||
| | | | ||
|- | |- | ||
Line 1,329: | Line 1,163: | ||
| | | | ||
|} | |} | ||
===Icon Functions=== | |||
Generally speaking, any icon function has two things: SET and GET. | |||
The Get function gets the total amount of times the icon has been clicked: eg GetFenceIconClicked . | |||
The Set function sets that value to a specificed value: eg SetToolStoreIconClicked 0 would reset that counter. | |||
There are also Flash functions, but these have not been tested. | |||
(will finish this a little later) | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value | |||
! Function | |||
! Action | |||
|- | |||
| {{nowrap|<code>33 00 02 00</code>}} | |||
| GetTeleportIconClicked | |||
| | |||
|- | |||
|- | |||
| <code>35 00 02 00</code> | |||
| GetBuildIconClicked | |||
| Gets whether the build menu icon has been clicked or not. | |||
|- | |||
| <code>36 00 02 00</code> | |||
| SetBuildIconClicked | |||
| Sets a value for the accompanying Get function. | |||
|- | |||
| <code>37 00 02 00</code> | |||
| SetTeleportIconClicked | |||
| Sets a value for the accompanying Get function. | |||
|- | |||
| <code>38 00 02 00</code> | |||
| SetToolStoreIconClicked | |||
| Sets a value for the accompanying Get function. | |||
|- | |||
| <code>39 00 02 00</code> | |||
| GetToolStoreIconClicked | |||
| Gets whether the Tool Store build menu icon has been clicked or not. | |||
|- | |||
| <code>3A 00 02 00</code> | |||
| FlashToolStoreIcon | |||
| Flashes the Tool Store build menu icon. | |||
|- | |||
| <code>3B 00 02 00</code> | |||
| FlashBuildIcon | |||
| Flashes the build menu icon. | |||
|- | |||
| <code>3C 00 02 00</code> | |||
| FlashTeleportIcon | |||
| | |||
|- | |||
| <code>3D 00 02 00</code> | |||
| SetGoBackIconClicked | |||
| Sets a value for the accompanying Get function. | |||
|- | |||
| <code>3E 00 02 00</code> | |||
| GetGoBackIconClicked | |||
| Gets whether the back icon has been clicked or not. | |||
|- | |||
| <code>3F 00 02 00</code> | |||
| FlashGoBackIcon | |||
| Flashes the back icon. | |||
|- | |||
| <code>40 00 02 00</code> | |||
| SetDigIconClicked | |||
| | |||
|- | |||
| <code>41 00 02 00</code> | |||
| GetDigIconClicked | |||
| | |||
|- | |||
| <code>42 00 02 00</code> | |||
| FlashDigIcon | |||
| | |||
|- | |||
| <code>59 00 02 00</code> | |||
| GetMountIconClicked | |||
| //Has mount icon been clicked | |||
|- | |||
| <code>5A 00 02 00</code> | |||
| SetMountIconClicked | |||
| //Manually set value of above | |||
|- | |||
| <code>5B 00 02 00</code> | |||
| FlashMountIcon | |||
| //Flash the mount icon | |||
|- | |||
| <code>65 00 02 00</code> | |||
| FlashLayPathIcon | |||
| //Flash the lay path icon | |||
|- | |||
| <code>66 00 02 00</code> | |||
| SetLayPathIconClicked | |||
| //Set a value for click flag | |||
|- | |||
| <code>67 00 02 00</code> | |||
| GetLayPathIconClicked | |||
| //Has it been clicked | |||
|- | |||
| <code>68 00 02 00</code> | |||
| GetTeleportPadIconClicked | |||
| //Has teleport icon been clicked | |||
|- | |||
| <code>69 00 02 00</code> | |||
| SetTeleportPadIconClicked | |||
| //Reset value to summat | |||
|- | |||
| <code>6A 00 02 00</code> | |||
| FlashTeleportPadIcon | |||
| //Flash teleport minifigure icon | |||
|- | |||
| <code>74 00 02 00</code> | |||
| FlashDynamiteIcon | |||
| //Make the dynamit icon flash | |||
|- | |||
| <code>75 00 02 00</code> | |||
| GetDynamiteClicked | |||
| //Has this icon been clicked | |||
|- | |||
| <code>76 00 02 00</code> | |||
| SetDynamiteClicked | |||
| //Has my life really become this dull? | |||
|- | |||
| <code>7B 00 02 00</code> | |||
| GetGunstationIconClicked | |||
| Defines whether the Mining Laser build menu icon has been clicked. | |||
|- | |||
| <code>7C 00 02 00</code> | |||
| SetGunstationIconClicked | |||
| | |||
|- | |||
| <code>7D 00 02 00</code> | |||
| FlashGunStationIcon | |||
| Flashes the Mining Laser build menu icon. | |||
|- | |||
| <code>94 00 02 00</code> | |||
| GetDismountIconClicked | |||
| | |||
|- | |||
| <code>95 00 02 00</code> | |||
| SetDismountIconClicked | |||
| | |||
|- | |||
| <code>96 00 02 00</code> | |||
| FlashDismountIcon | |||
| | |||
|- | |||
| <code>97 00 02 00</code> | |||
| GetGetToolIconClicked | |||
| | |||
|- | |||
| <code>98 00 02 00</code> | |||
| SetGetToolIconClicked | |||
| | |||
|- | |||
| <code>99 00 02 00</code> | |||
| FlashGetToolIcon | |||
| | |||
|} | |||
==Labels== | ==Labels== |
Revision as of 17:49, 5 May 2019
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.
This is an extremely WIP page to document all NERPs code from LEGO Rock Raiders for Windows. Do not document what a function does unless it's been tested and its use is 100% clear. Many of these are obvious from their names, but have been left as "unknown" for now simply because they haven't been tested.
Use information from Addict's old NERPs reference and the old rru-stuff.org NERPs function list to help build this page, though ultimately that just helps give a rough idea of what things are; everything needs to be further tested and verified for this article.
Effects written //Like this are Karl White's original comments. These should probably be saved in some form, though not used as the main definitions.
As for how to use these functions, this page details that.
Comparison operators
Value | Function | Action |
---|---|---|
01 00 01 00
|
+[verify] | Unknown |
02 00 01 00
|
#[verify] | Unknown |
03 00 01 00
|
/[verify] | Unknown |
04 00 01 00
|
? | Acts like an "if" clause, using the format Expression ? Action .Basically: if(Expression) Action(), or "if Expression is true, then perform Action." Example usage: GetCrystalsCurrentlyStored > 24 ? SetLevelCompleted which states that if 25 or more energy crystals are stored, the current mission will be set to complete.Not to be confused with the C++ ternary operator ?: .
|
05 00 01 00
|
> | Is greater than |
06 00 01 00
|
< | Is less than |
07 00 01 00
|
= | Is equal to |
08 00 01 00
|
>= | Is greater than or equal to |
09 00 01 00
|
<= | Is less than or equal to |
0A 00 01 00
|
!= | Is not equal to |
Function calls
Function calls are defined in the executable file. All functions end with a value of 02 00
. There are a grand total of 293 known functions.
Expressions
Value | Function | Action |
---|---|---|
00 00 02 00
|
Stop | Ends the script for the current tick (Requires no condition) |
01 00 02 00
|
True | Returns true |
02 00 02 00
|
False | Returns false |
03 00 02 00
|
Null | Returns null (possibly useless) |
Random functions
Value | Function | Action |
---|---|---|
04 00 02 00
|
GetRandom | |
05 00 02 00
|
GetRandom10 | Returns a random number between 0 and 10 inclusive |
06 00 02 00
|
GetRandom100 | Returns a random number between 0 and 100 inclusive |
07 00 02 00
|
GetRandomTrueFalse | Randomly returns 0 (FALSE) or 1 (TRUE); as such, it can be used to randomly add 0 or 1 to a number |
Goal functions
Value | Function | Action |
---|---|---|
08 00 02 00
|
SetLevelCompleted | Win the level, and eventually go to the scoreboard. |
09 00 02 00
|
SetLevelFail | Fail the level. |
0A 00 02 00
|
SetGameCompleted | |
0B 00 02 00
|
SetGameFail | |
0C 00 02 00
|
GetCrystalsPickedUp | |
0D 00 02 00
|
GetCrystalsCurrentlyStored | Returns the number of energy crystals currently stored. Should be followed by a symbol and a value – for collection objectives, this will by default be a greater than sign and a value one less than the desired goal. |
0E 00 02 00
|
GetCrystalsUsed | //CRYSTALS USED FOR CONSTRUCTIONS ETC |
0F 00 02 00
|
GetCrystalsStolen |
Register functions
Value | Function | Action |
---|---|---|
11 00 02 00
|
GetR0 | All of the following return the value of their respective register. |
12 00 02 00
|
GetR1 | |
13 00 02 00
|
GetR2 | |
14 00 02 00
|
GetR3 | |
15 00 02 00
|
GetR4 | |
16 00 02 00
|
GetR5 | |
17 00 02 00
|
GetR6 | |
18 00 02 00
|
GetR7 | |
19 00 02 00
|
SetR0 | All of the following return the value of their respective register. x is any numerical value. |
1A 00 02 00
|
SetR1 | |
1B 00 02 00
|
SetR2 | |
1C 00 02 00
|
SetR3 | |
1D 00 02 00
|
SetR4 | |
1E 00 02 00
|
SetR5 | |
1F 00 02 00
|
SetR6 | |
20 00 02 00
|
SetR7 | |
21 00 02 00
|
AddR0 | Addition functions. All of them add x to their respective registers. x is any numerical value |
22 00 02 00
|
AddR1 | |
23 00 02 00
|
AddR2 | |
24 00 02 00
|
AddR3 | |
25 00 02 00
|
AddR4 | |
26 00 02 00
|
AddR5 | |
27 00 02 00
|
AddR6 | |
28 00 02 00
|
AddR7 | |
29 00 02 00
|
SubR0 | Subtraction functions. All of them subtract x from their respective registers. x is any numerical value |
2A 00 02 00
|
SubR1 | |
2B 00 02 00
|
SubR2 | |
2C 00 02 00
|
SubR3 | |
2D 00 02 00
|
SubR4 | |
2E 00 02 00
|
SubR5 | |
2F 00 00 00
|
SubR6 | |
30 00 02 00
|
SubR7 |
Message Functions
Value | Function | Action |
---|---|---|
31 00 02 00
|
SetMessagePermit | Determines whether messages in the text panel and accompanying sound file will be allowed or not. Setting this to 0 allows messages, 1 disables them, unlike a usual boolean |
10 00 02 00
|
SetMessage | This is used to actually send a message. Unlike most commands it requires two numbers; SetMessage NUM1 NUM2. NUM1 is the message number as defined by NERPMessageFile in the .cfg . NUM2 controls the "Next" arrow that appears in tutorials by the text box; 0 => enable arrow, 1 => disable arrow. Generally this and the above function are the only ones you need. |
55 00 02 00
|
SetIconPos | //Sets position of icons displayed with message |
56 00 02 00
|
SetIconSpace | //Sets spacing of icons displayed with message |
57 00 02 00
|
SetIconWidth | //Sets width of icons displayed with message |
58 00 02 00
|
SetMessageWait | |
6B 00 02 00
|
GetMessageTimer | //Gets how much longer a wav accompanying a message will last |
6C 00 02 00
|
SetMessageTimerValues | //Set defaults (see example) |
C8 00 02 00
|
AdvanceMessage | |
D1 00 02 00
|
GetMessagesAreUpToDate |
Additional functions
Value | Function | Action |
---|---|---|
32 00 02 00
|
GetObjectiveShowing | Gets whether the objective screen is being displayed or not. This includes the initial objective at the beginning of the level and being opened mid-level. |
34 00 02 00
|
GetMiniFiguresOnLevel | Used to get the number of minifigures on a map. |
Timer functions
Timers run in milliseconds (contray to Karl's comments below), do not reset when Restart Level is selected (but will reset to 0 if the level is exited and re-selected via the menu), and seem to have a maximum of 32000. (Higher values can be incorporated by using a register to count the number of times 30000 has ticked over).
Value | Function | Action |
---|---|---|
43 00 02 00
|
GetTimer0 | //get current time in seconds |
44 00 02 00
|
GetTimer1 | |
45 00 02 00
|
GetTimer2 | |
46 00 02 00
|
GetTimer3 | |
47 00 02 00
|
SetTimer0 | //set current time in seconds |
48 00 02 00
|
SetTimer1 | |
49 00 02 00
|
SetTimer2 | |
4A 00 02 00
|
SetTimer3 |
Additional functions (continued)
Value | Function | Action |
---|---|---|
4B 00 02 00
|
GetBarracksBuilt | //Number of barracks |
4C 00 02 00
|
GetOreRefineriesBuilt | //Number of Ore Refineries |
4D 00 02 00
|
GetToolStoresBuilt | //Number of Tool Stores |
4E 00 02 00
|
GetStudCount | //Number of studs |
4F 00 02 00
|
GetTeleportsBuilt | //Number of teleport pads |
50 00 02 00
|
GetMiniFigureSelected | //Is a minifigure selected? |
51 00 02 00
|
GetSmallDiggerSelected | //Is a small digger selected |
52 00 02 00
|
GetMiniFigureInSmallDigger | //Is there a minifigure in a small digger somewhere |
53 00 02 00
|
GetTrainFlags | |
54 00 02 00
|
SetTrainFlags | |
55 00 02 00
|
SetIconPos | //Sets position of icons displayed with message |
56 00 02 00
|
SetIconSpace | //Sets spacing of icons displayed with message |
57 00 02 00
|
SetIconWidth | //Sets width of icons displayed with message |
58 00 02 00
|
SetMessageWait | |
5C 00 02 00
|
SetTutorialPointer | //Make a pointer appear above tutorial block number x |
5D 00 02 00
|
GetTutorialFlags | //Get the current tutorial flags |
5E 00 02 00
|
SetTutorialFlags | //Sets tutorial flags (0 = allow any click anywhere anytime 3 = Disallow invalid clicks) |
5F 00 02 00
|
SetRockMonster | //Make a rock monster appear at block x,y |
60 00 02 00
|
GetOrePickedUp | //How much ore is currently being carried |
61 00 02 00
|
GetOreCurrentlyStored | //How much ore is stored |
62 00 02 00
|
GetOreUsed | //ORE USED FOR CONSTRUCTIONS ETC //How much ore has been used??? |
63 00 02 00
|
GetOreStolen | //How much ore has been stolen??? |
64 00 02 00
|
GetCrystalRefineriesBuilt | //Has a crystal refinery been built |
6B 00 02 00
|
GetMessageTimer | //Gets how much longer a wav accompanying a message will last |
6C 00 02 00
|
SetMessageTimerValues | //Set defaults (see example) |
6D 00 02 00
|
GetTutorialBlockClicks | //Has the block at tutorial block number x been clicked |
6E 00 02 00
|
SetTutorialBlockClicks | //Reset this value |
6F 00 02 00
|
GetTutorialCrystals | //How many crystals are at this tutorial block |
70 00 02 00
|
SetTutorialCrystals | //Set this value |
71 00 02 00
|
GetPathsBuilt | //How many paths have been built |
72 00 02 00
|
GetTutorialBlockIsGround | This returns a non-zero value (not sure exactly what value) if the tutorial block is ground: this does not include hiddern caverns or visible walls. As such, it can be used for a 'has this wall been dug' or 'is this cavern accessible yet' check. Karl's comment: //Is there ground at tutorial block x |
73 00 02 00
|
SetCameraGotoTutorial | //Make camera look at a particular tutorial block |
77 00 02 00
|
AddPoweredCrystals | //Why am I writing all of this? |
78 00 02 00
|
GetGraniteGrinderSelected | //Has the granite grinder been selected |
79 00 02 00
|
GetChromeCrusherSelected | //Has the chrome crusher(large digger) been selected |
7A 00 02 00
|
GetTutorialBlockIsPath | Defines whether the tutorial block at a specified square is a power path. |
7E 00 02 00
|
GetGunstationsBuilt | Defines how many Mining Lasers have been built on a map. |
7F 00 02 00
|
SetOreAtIconPositions | |
80 00 02 00
|
GetVehicleTransportsBuilt | |
88 00 02 00
|
SetTutorialBlockIsGround | This will demolish all walls at tutorial block X. It cannot be used to create ground over lava or water. If used on a tile in a hiddern cavern, it will open that cavern. |
89 00 02 00
|
SetTutorialBlockIsPath | Sets just one tutorial block as a Power Path. Plays up a lot and seems to always have a STOP hanging off the end of it. Do not expect this function to behave itself. |
8A 00 02 00
|
CameraLockOnObject | Specify a number, which locks the camera to the object list item. *Need to test this a bit more* |
8B 00 02 00
|
CameraUnlock | Unlocks the camera from being locked onto an object. |
8C 00 02 00
|
CameraZoomIn | Zooms in the camera. Usual numbers are between 0 and 100. |
8D 00 02 00
|
CameraZoomOut | Zooms out the camera. Usual numbers are between 0 and 100. |
8E 00 02 00
|
CameraRotate | |
8F 00 02 00
|
GetCameraAtTutorial | |
90 00 02 00
|
GetSelectedRecordedObject | |
91 00 02 00
|
GetSmallHelicopterSelected | |
92 00 02 00
|
GetRapidRiderSelected | |
93 00 02 00
|
GetMinifigureInRapidRider | |
9A 00 02 00
|
GetAnyKeyPressed | |
9B 00 02 00
|
SetPauseGame | |
9C 00 02 00
|
GetGetLaserIconClicked | |
9D 00 02 00
|
SetGetLaserIconClicked | |
9E 00 02 00
|
FlashGetLaserIcon | |
9F 00 02 00
|
SetRockMonsterAtTutorial | |
A0 00 02 00
|
GetCallToArmsButtonClicked | |
A1 00 02 00
|
GetRockMonstersDestroyed | |
A2 00 02 00
|
SetGetPusherIconClicked | |
A3 00 02 00
|
GetGetPusherIconClicked | |
A4 00 02 00
|
FlashGetPusherIcon | |
A5 00 02 00
|
GetRockMonsterRunningAway | |
A6 00 02 00
|
SetCallToArms | |
A7 00 02 00
|
FlashPowerstationIcon | |
A8 00 02 00
|
SetPowerStationIconClicked | |
A9 00 02 00
|
GetPowerStationIconClicked | |
AA 00 02 00
|
GetPowerStationsBuilt | |
AB 00 02 00
|
SetAttackDefer | |
AC 00 02 00
|
SetRockMonsterPainThreshold | |
AD 00 02 00
|
SetRockMonsterHealth | |
AE 00 02 00
|
SetGameSpeed | |
AF 00 02 00
|
FlashBarracksIcon | |
B0 00 02 00
|
SetBarracksIconClicked | |
B1 00 02 00
|
GetBarracksIconClicked | |
B2 00 02 00
|
GetRecordObjectAtTutorial | |
B3 00 02 00
|
GetHiddenObjectsFound | |
B4 00 02 00
|
SetHiddenObjectsFound | |
B5 00 02 00
|
GetOxygenLevel | |
B6 00 02 00
|
FlashGeodomeIcon | |
B7 00 02 00
|
GetGeodomeIconClicked | |
B8 00 02 00
|
SetGeodomeIconClicked | |
B9 00 02 00
|
GetGeodomeBuilt | |
BA 00 02 00
|
AddStoredOre | |
BB 00 02 00
|
GenerateSlug | |
BC 00 02 00
|
GetSlugsOnLevel | |
BD 00 02 00
|
GetMonstersOnLevel | |
BE 00 02 00
|
SetCongregationAtTutorial | |
BF 00 02 00
|
SetObjectiveSwitch | |
C0 00 02 00
|
GetObjectiveSwitch | |
C1 00 02 00
|
GetGraniteGrindersOnLevel | |
C2 00 02 00
|
GetSmallDiggersOnLevel | |
C3 00 02 00
|
GetDocksBuilt | |
C4 00 02 00
|
GetRapidRidersOnLevel | |
C5 00 02 00
|
GetUnitAtBlock | |
C6 00 02 00
|
GetSmallHelicoptersOnLevel | |
C7 00 02 00
|
GetRecordObjectAmountAtTutorial | |
C8 00 02 00
|
AdvanceMessage | |
C9 00 02 00
|
AllowCameraMovement | |
CA 00 02 00
|
ClickOnlyObjects | |
CB 00 02 00
|
ClickOnlyMap | |
CC 00 02 00
|
ClickOnlyIcon | |
CD 00 02 00
|
DisallowAll | |
CE 00 02 00
|
SupressArrow | Defines whether the continue arrow in the text panel is displayed or not. Setting this to 1 prevents the arrow from appearing while 0 sets it to appear. |
CF 00 02 00
|
GetMinifigureInGraniteGrinder | |
D0 00 02 00
|
GetMinifigureInChromeCrusher | |
D1 00 02 00
|
GetMessagesAreUpToDate | |
D2 00 02 00
|
SetCrystalPriority | |
D3 00 02 00
|
MakeSomeoneOnThisBlock-PickUpSomethingOnThisBlock | |
D4 00 02 00
|
SetTrainIconClicked | |
D5 00 02 00
|
GetTrainIconClicked | |
D6 00 02 00
|
FlashTrainIcon | |
D7 00 02 00
|
SetTrainDriverIconClicked | |
D8 00 02 00
|
GetTrainDriverIconClicked | |
D9 00 02 00
|
FlashTrainDriverIcon | |
DA 00 02 00
|
SetTrainPilotIconClicked | |
DB 00 02 00
|
GetTrainPilotIconClicked | |
DC 00 02 00
|
FlashTrainPilotIcon | |
DD 00 02 00
|
SetTrainSailorIconClicked | |
DE 00 02 00
|
GetTrainSailorIconClicked | |
DF 00 02 00
|
FlashTrainSailorIcon | |
E0 00 02 00
|
GetSmallTruckSelected | |
E1 00 02 00
|
GetMinifigureInSmallTruck | |
E2 00 02 00
|
GetMinifigureInSmallHelicopter | |
E3 00 02 00
|
SetBarracksLevel | |
E4 00 02 00
|
SetDocksLevel | |
E5 00 02 00
|
SetGeoDomeLevel | |
E6 00 02 00
|
SetPowerStationLevel | |
E7 00 02 00
|
SetToolStoreLevel | |
E8 00 02 00
|
SetGunstationLevel | |
E9 00 02 00
|
SetTeleportPadLevel | |
EA 00 02 00
|
SetSuperTeleportLevel | |
EB 00 02 00
|
SetUpgradeStationLevel | |
EC 00 02 00
|
GetBarracksSelected | |
ED 00 02 00
|
GetDocksSelected | |
EE 00 02 00
|
GetGeoDomeSelected | |
EF 00 02 00
|
GetPowerstationsBuilt | |
F0 00 02 00
|
GetToolStoreSelected | |
F1 00 02 00
|
GetGunstationSelected | |
F2 00 02 00
|
GetTeleportPadSelected | |
F3 00 02 00
|
GetSuperTeleportSelected | |
F4 00 02 00
|
GetUpgradeStationSelected | |
F5 00 02 00
|
SetUpgradeBuildingIconClicked | |
F6 00 02 00
|
GetUpgradeBuildingIconClicked | |
F7 00 02 00
|
FlashUpgradeBuildingIcon | |
F8 00 02 00
|
GetBuildingsTeleported | |
F9 00 02 00
|
SetBuildingsTeleported | |
FA 00 02 00
|
CameraLockOnMonster | |
FB 00 02 00
|
SetMonsterAttackPowerstation | |
FC 00 02 00
|
ClickOnlyCalltoarms | |
FD 00 02 00
|
FlashCallToArmsIcon | |
FE 00 02 00
|
SetRecordObjectPointer | |
FF 00 02 00
|
GetGetSonicBlasterIconClicked | |
00 01 02 00
|
SetGetSonicBlasterIconClicked | |
01 01 02 00
|
FlashGetSonicBlasterIcon | |
02 01 02 00
|
GetDropSonicBlasterIconClicked | |
03 01 02 00
|
SetDropSonicBlasterIconClicked | |
04 01 02 00
|
FlashDropSonicBlasterIcon | |
05 01 02 00
|
GetMonsterAtTutorial | |
06 01 02 00
|
SetMonsterAttackNowt | |
07 01 02 00
|
GetPlaceFenceIconClicked | |
08 01 02 00
|
SetPlaceFenceIconClicked | |
09 01 02 00
|
FlashPlaceFenceIcon | |
0A 01 02 00
|
GetLevel1BarracksBuilt | |
0B 01 02 00
|
GetLevel1DocksBuilt | |
0C 01 02 00
|
GetLevel1GeodomeBuilt | |
0D 01 02 00
|
GetLevel1PowerdtationsBuilt | |
0E 01 02 00
|
GetLevel1ToolStoresBuilt | |
0F 01 02 00
|
GetLevel1GunstationsBuilt | |
10 01 02 00
|
GetLevel1TeleportsBuilt | |
11 01 02 00
|
GetLevel1VehicleTeleportsBuilt | |
12 01 02 00
|
GetLevel1UpgradeStationsBuilt | |
13 01 02 00
|
GetLevel2BarracksBuilt | |
14 01 02 00
|
GetLevel2DocksBuilt | |
15 01 02 00
|
GetLevel2GeodomeBuilt | |
16 01 02 00
|
GetLevel2PowerstationsBuilt | |
17 01 02 00
|
GetLevel2ToolStoresBuilt | |
18 01 02 00
|
GetLevel2GunstationsBuilt | |
19 01 02 00
|
GetLevel2TeleportsBuilt | |
1A 01 02 00
|
GetLevel2VehicleTeleportsBuilt | |
1B 01 02 00
|
GetLevel2UpgradeStationsBuilt | |
1C 01 02 00
|
GetPoweredBarracksBuilt | |
1D 01 02 00
|
GetPoweredDocksBuilt | |
1E 01 02 00
|
GetPoweredGeodomeBuilt | |
1F 01 02 00
|
GetPoweredPowerStationsBuilt | |
20 01 02 00
|
GetPoweredTeleportsBuilt | |
21 01 02 00
|
GetPoweredGunstationsBuilt | |
22 01 02 00
|
GetPoweredTeleportsBuilt | |
23 01 02 00
|
GetPoweredVehicleTeleportsBuilt | |
24 01 02 00
|
GetPoweredUpgradeStationsBuilt |
Icon Functions
Generally speaking, any icon function has two things: SET and GET. The Get function gets the total amount of times the icon has been clicked: eg GetFenceIconClicked . The Set function sets that value to a specificed value: eg SetToolStoreIconClicked 0 would reset that counter.
There are also Flash functions, but these have not been tested.
(will finish this a little later)
Value | Function | Action |
---|---|---|
33 00 02 00
|
GetTeleportIconClicked | |
35 00 02 00
|
GetBuildIconClicked | Gets whether the build menu icon has been clicked or not. |
36 00 02 00
|
SetBuildIconClicked | Sets a value for the accompanying Get function. |
37 00 02 00
|
SetTeleportIconClicked | Sets a value for the accompanying Get function. |
38 00 02 00
|
SetToolStoreIconClicked | Sets a value for the accompanying Get function. |
39 00 02 00
|
GetToolStoreIconClicked | Gets whether the Tool Store build menu icon has been clicked or not. |
3A 00 02 00
|
FlashToolStoreIcon | Flashes the Tool Store build menu icon. |
3B 00 02 00
|
FlashBuildIcon | Flashes the build menu icon. |
3C 00 02 00
|
FlashTeleportIcon | |
3D 00 02 00
|
SetGoBackIconClicked | Sets a value for the accompanying Get function. |
3E 00 02 00
|
GetGoBackIconClicked | Gets whether the back icon has been clicked or not. |
3F 00 02 00
|
FlashGoBackIcon | Flashes the back icon. |
40 00 02 00
|
SetDigIconClicked | |
41 00 02 00
|
GetDigIconClicked | |
42 00 02 00
|
FlashDigIcon | |
59 00 02 00
|
GetMountIconClicked | //Has mount icon been clicked |
5A 00 02 00
|
SetMountIconClicked | //Manually set value of above |
5B 00 02 00
|
FlashMountIcon | //Flash the mount icon |
65 00 02 00
|
FlashLayPathIcon | //Flash the lay path icon |
66 00 02 00
|
SetLayPathIconClicked | //Set a value for click flag |
67 00 02 00
|
GetLayPathIconClicked | //Has it been clicked |
68 00 02 00
|
GetTeleportPadIconClicked | //Has teleport icon been clicked |
69 00 02 00
|
SetTeleportPadIconClicked | //Reset value to summat |
6A 00 02 00
|
FlashTeleportPadIcon | //Flash teleport minifigure icon |
74 00 02 00
|
FlashDynamiteIcon | //Make the dynamit icon flash |
75 00 02 00
|
GetDynamiteClicked | //Has this icon been clicked |
76 00 02 00
|
SetDynamiteClicked | //Has my life really become this dull? |
7B 00 02 00
|
GetGunstationIconClicked | Defines whether the Mining Laser build menu icon has been clicked. |
7C 00 02 00
|
SetGunstationIconClicked | |
7D 00 02 00
|
FlashGunStationIcon | Flashes the Mining Laser build menu icon. |
94 00 02 00
|
GetDismountIconClicked | |
95 00 02 00
|
SetDismountIconClicked | |
96 00 02 00
|
FlashDismountIcon | |
97 00 02 00
|
GetGetToolIconClicked | |
98 00 02 00
|
SetGetToolIconClicked | |
99 00 02 00
|
FlashGetToolIcon |
Labels
These were on the old wiki on a page "Special Parameters" but I have no idea what any of it means
These are labels, an extremely useful way to organise code. They function like GOTOs in other languages. It so happens that DDI consistently used the same labels which confused everyone. But now in this enlightened era we can make our own labels.
Labels function like bookmarks, a way for the script to jump to a certain point (bookmark), skipping everything else along the way; hence why a lot of DDI's labels are called Skip, or worse, SkippedSkip.
To go to a label, one uses
:label
except that keep in mind that nearly every line needs a condition, and going to labels are no exception, so you really need
TRUE ? :label
The actual label is defined with a colon afterwards, like this:
label:
This is one of the few lines (the others being comments and Stop) that does not require a CONDITION ? in front of it. Here is an example of a a label being used:
GetOxygenLevel < 50 ? :O2Low
O2Low:
Old commands
These commands were in the first chunk of the NERP list before the verified positions - many may not work
These commands were tagged // very questionableFunction | Action |
---|---|
GetMinifigureTask | //get number of minifigures doing a task |
GetMinifigureActivity | //get number of minifigures doing an activity |
GetMinifigureHealth | |
GetMinifigureEnergy | |
GetMinifigureTool | //drill, spade |
GetMinifigureCarryObject | //crystal, ore, weapon |
GetMinifigureCurrentTask | //deposit crystal, dig, etc |
GetMinifigureUnderAttack | //weapon type, thrown about, punched,etc |
GetMinifigureScared | //close proximity of enemy |
GetMinifigureCocooned | //trapped by cocoon |
GetBlocksDynamited | |
GetBarriersOnLevel | |
GetElectricFencesOnLevel | |
GetMinifiguresTeleportedIn | |
GetMinifiguresDestroyedIn | |
GetMinifiguresSold | |
GetMinifiguresTeleportedOut | |
GetMinifiguresGrabbed | |
GetMinifiguresScaredCount | //NUMBER OF TIMES MINIFIGURES ARE SCARED, NOT NUMBER OF INDIVIDUAL MINIFIGURES SCARED |
GetMinifiguresSlippedCount | //NUMBER OF TIMES MINIFIGURES SLIPPED, NOT NUMBER OF INDIVIDUAL MINIFIGURES SPLIPPED |
GetMinifiguresCaughtInWeb | |
GetVehiclesTeleportedIn | |
GetVehiclesSold | |
GetVehiclesTeleportedOut | |
GetVehiclesCaughtInWeb | |
GetBuildingsConstructed | |
GetBuildingsDestroyed | |
GetBuildingsSold | |
GetBuildingsTeleportOut | |
GetBuildingsPunched | //NUMBER OF TIMES BUILDINGS ARE PUNCHED |
GetBuildingsHitByBoulder | //NUMBER OF TIMES BUILDINGS ARE HIT BY BOULDER |
GetRockMonstersEmerged | |
GetRockMonstersDestroyed | |
GetRockMonstersEnteredWall | |
GetRockMonstersElectrocutedOnFence | |
SetLevelComplete | |
SetGameComplete | |
SetPrintMessage | |
SetAssignTaskToUnit | |
SetCreateBuilding | |
SetCreateMinifgure | |
SetRockMonsterAggression | |
SetSpiderAggression | |
GetBuildPathIconClicked | //Reset value |
SetBuildPathIconClicked | //Has build path icon been clicked |
FlashBuildPathIcon | //Flash build path icon |
Sample NERP levels //---------------------------- //Example of what to use for sample times //Set wait times (sample length multiplier, time added after sample, time for no sample) TRUE ? SetMessageTimerValues 1000 1000 4000 //---------------------------- //---------------------------- Objective :- Level ends after 5 minutes Solution :- TRUE ? SetTimer0 300 GetTimer0 > 0 ? :Skip TRUE ? SetLevelComplete Skip: //---------------------------------- //---------------------------- Objective :- Level ends after 10 power crystals collected and teleporter built After 9 crystals collected give the message "Only one more crystal to collect" Solution :- GetCrystalsCollected < 10 ? :Skip GetCrystalsCollected = 9 ? SetPrintMessage Only one more crystal to collect GetBuildingsConstructed TELEPORTER <1 ?:Skip TRUE ? SetLevelComplete Skip: //----------------------------------