NERPs slimy slug setup

From RRU Knowledge Base
Revision as of 09:03, 8 June 2018 by Jessietail (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In order for slimy slugs to appear in a mission in LEGO Rock Raiders for Windows, the NERPs script must include a slimy slug setup. Slimy slugs will enter a map only under the certain conditions defined in the NPL file.

There are two major varieties of slimy slug setups: one based on the amount of Rock Raiders the player has teleported, and the other based on the amount of energy crystals the player has collected. Note that these setups will only work if slimy slug holes are present on the level.

Attack based on Rock Raider count

This setup is the less dangerous of the two, and is primarily used to freak out the player. After the player has teleported a certain amount of Rock Raiders, slugs will start popping out of their holes randomly, sometimes attacking, sometimes diving back into their holes. This setup is comprised of this section of script:

 TRUE ? SetR1 0
 GetMiniFiguresOnLevel > 8 ? AddR1 1
 GetRandom100 = 1 ? AddR1 1
 GetSlugsOnLevel = 0 ? AddR1 1
 GetR1 = 3 ? GenerateSlug

In this case (taken from Rock Hard) after the player has teleported more than 8 Rock Raiders, a slug is generated. When encrypted, this section translates to:

 01 00 02 00 04 00 01 00 1A 00 02 00 00 00 00 00
 34 00 02 00 05 00 01 00 08 00 00 00 04 00 01 00 22 00 02 00 01 00 00 00
 06 00 02 00 07 00 01 00 01 00 00 00 04 00 01 00 22 00 02 00 01 00 00 00
 BC 00 02 00 07 00 01 00 00 00 00 00 04 00 01 00 22 00 02 00 01 00 00 00
 12 00 02 00 07 00 01 00 03 00 00 00 04 00 01 00 BB 00 02 00

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

Attack based on energy crystal count

This is probably the more recommended setup for slimy slugs, as it creates a more active and direct attack. This time, slugs will attack based on how many crystals the player has, and will begin attacking in increasing numbers as the player collects more crystals. Instead of popping in an out of their holes, slimy slugs will instead head straight for Rock Raider HQ, unless they cannot reach it. This setup is designated by this section, as seen from Back To Basics:

 TRUE ? SetMessagePermit 1
 TRUE ? SetR1 0
 GetOxygenLevel < 30 ? :skip
 
 GetCrystalsCurrentlyStored > 10 ? SetR1 1
 GetCrystalsCurrentlyStored > 20 ? SetR1 2
 GetCrystalsCurrentlyStored > 25 ? SetR1 3
 GetCrystalsCurrentlyStored > 30 ? SetR1 4
 GetCrystalsCurrentlyStored > 35 ? SetR1 5
 GetCrystalsCurrentlyStored > 37 ? SetR1 6
 GetCrystalsCurrentlyStored > 40 ? SetR1 7
 GetCrystalsCurrentlyStored > 41 ? SetR1 8
 GetCrystalsCurrentlyStored > 42 ? SetR1 9
 GetCrystalsCurrentlyStored > 43 ? SetR1 10
 GetCrystalsCurrentlyStored > 44 ? SetR1 11
 GetSlugsOnLevel > GetR1 ? :skip
 
 loopstart:
 GetR1 = 0 ? :loopend
 GetRandom100 < 10 ? GenerateSlug
 TRUE ? SubR1 1
 TRUE ? :loopstart
 loopend:

As the crystal count goes up, the slug count goes up. However, no slugs will attack if the air supply is below 30%. When encrypted, this section translates to:

 01 00 02 00 04 00 01 00 31 00 02 00 01 00 00 00
 01 00 02 00 04 00 01 00 1A 00 02 00 00 00 00 00
 B5 00 02 00 06 00 01 00 1E 00 00 00 04 00 01 00 25 01 08 00
 
 0D 00 02 00 05 00 01 00 0A 00 00 00 04 00 01 00 1A 00 02 00 01 00 00 00
 0D 00 02 00 05 00 01 00 14 00 00 00 04 00 01 00 1A 00 02 00 02 00 00 00
 0D 00 02 00 05 00 01 00 19 00 00 00 04 00 01 00 1A 00 02 00 03 00 00 00
 0D 00 02 00 05 00 01 00 1E 00 00 00 04 00 01 00 1A 00 02 00 04 00 00 00
 0D 00 02 00 05 00 01 00 23 00 00 00 04 00 01 00 1A 00 02 00 05 00 00 00
 0D 00 02 00 05 00 01 00 25 00 00 00 04 00 01 00 1A 00 02 00 06 00 00 00
 0D 00 02 00 05 00 01 00 28 00 00 00 04 00 01 00 1A 00 02 00 07 00 00 00
 0D 00 02 00 05 00 01 00 29 00 00 00 04 00 01 00 1A 00 02 00 08 00 00 00
 0D 00 02 00 05 00 01 00 2A 00 00 00 04 00 01 00 1A 00 02 00 09 00 00 00
 0D 00 02 00 05 00 01 00 2B 00 00 00 04 00 01 00 1A 00 02 00 0A 00 00 00
 0D 00 02 00 05 00 01 00 2C 00 00 00 04 00 01 00 1A 00 02 00 0B 00 00 00
 BC 00 02 00 05 00 01 00 12 00 02 00 04 00 01 00 25 01 08 00
 
 0E 00 04 00
 12 00 02 00 07 00 01 00 00 00 00 00 04 00 01 00 24 01 08 00
 06 00 02 00 06 00 01 00 0A 00 00 00 BB 00 02 00
 01 00 02 00 04 00 01 00 2A 00 02 00 01 00 00 00
 01 00 02 00 04 00 01 00 12 01 08 00
 0F 00 04 00

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

Other varieties of slug attacks

You could also base slug attacks on other parameters, such as how much ore the player has collected, how many buildings the player has teleported, or how many monsters are present. This could be done just by modifying the previous setup that was based on energy crystals.

Examples of missions that use this setup