Difference between revisions of "NERPs slimy slug setup"

From RRU Knowledge Base
m (Jessietail moved page Tutorial:Slimy Slug setup to Slimy slug setup)
Line 1: Line 1:
{{WIP}}
In order for [[slimy slugs]] to appear in a [[level]], the [[NPL file|script]] must include a '''Slimy Slug Setup'''.  Slimy slugs will enter a map only under the certain conditions defined in the NPL file.   
In order to have [[Slimy Slugs]] on a [[Level]], the script must include a '''Slimy Slug Setup''' (as well as [[Slimy Slug Holes]] placed on the map).  Slimy Slugs enter the map only under certain circumstances.  There are two major varieties of slimy slug setups, one based on the amount of [[Rock Raider]]s the player has teleported, and one based on the amount of [[Energy Crystals]] the player has collected.  These setups will only work if [[Slimy Slug Holes]] are present on the level.
 
There are two major varieties of slimy slug setups: one based on the amount of [[Rock Raider]]s 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.'''
<br><br>
<br><br>
== Attack Based on Rock Raider Count ==
== 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 comprises of this section of script:
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:


   <code>TRUE ? SetR1 0</code>
   <code>TRUE ? SetR1 0</code>
Line 12: Line 13:
   <code>GetR1 = 3 ? GenerateSlug</code>
   <code>GetR1 = 3 ? GenerateSlug</code>


In this case, taken from [[Mission 13: Rock Hard|Level 13]], after the player has teleported more than 8 Rock Raiders, a Slug is generated.  When encrypted, this section translates to:
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:


   <code>01 00 02 00 04 00 01 00 1A 00 02 00 00 00 00 00</code>
   <code>01 00 02 00 04 00 01 00 1A 00 02 00 00 00 00 00</code>
Line 24: Line 25:
== Attack Based on Energy Crystal Count ==
== Attack Based on Energy Crystal Count ==


This is probably the more recommended setup for Slimy Slugs.  This setup creates a more direct and active Slimy Slug attack.  This time, they attack based on how many crystals the player has, and they begin attacking in numbers the more crystals that the player collectsAlso, they do not just pop in and out of their holes, but leave their holes and head straight for [[Rock Raider HQ]], unless they cannot reach it.  This setup is designated by this section, as seen from [[Level 23]]:
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]]:


   <code>TRUE ? SetMessagePermit 1</code>
   <code>TRUE ? SetMessagePermit 1</code>
Line 50: Line 52:
   <code>loopend:</code>
   <code>loopend:</code>


As the crystal count goes up, the slug count goes up.  However, no slugs will attack if the [[Oxygen Supply]] is below 30%.  When encrypted, this section translates to:
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:


   <code>01 00 02 00 04 00 01 00 31 00 02 00 01 00 00 00</code>
   <code>01 00 02 00 04 00 01 00 31 00 02 00 01 00 00 00</code>
Line 80: Line 82:
== Other Varieties of Slug Attacks ==
== Other Varieties of Slug Attacks ==


You could also base slug attacks on other parameters, such as how much [[Ore]] the player has collected, or how many buildings the player has teleported.  This could be done just by modifying the previous setup that was based on Energy Crystals.
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 Levels that Use this Setup ==
== Examples of Levels that Use this Setup ==


*  '''[[Mission 13: Rock Hard|Level13]]''' (with [[Material Collecting Objective]])
*  '''[[Rock Hard]]''' (with [[Material Collecting Objective]])
* '''[[Mission 17: Lava Laughter|Level17]]''' (with Material Collecting Objective, though no holes are present in the map)
* '''[[Lava Laughter]]''' (with Material Collecting Objective, though no holes are present in the map)
* '''[[Mission 23: Back to Basics|Level23]]''' (with Material Collecting Objective)
* '''[[Back to Basics]]''' (with Material Collecting Objective)


[[Category:Modding]][[Category:Scripting Tutorials]]
[[Category:Modding]][[Category:Scripting Tutorials]]

Revision as of 15:57, 9 April 2018

In order for slimy slugs to appear in a level, the 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 Levels that Use this Setup