Difference between revisions of "Invader"

From Screeps Wiki
Jump to navigation Jump to search
(categorized and clarified)
Line 1: Line 1:
  +
[[File:InvaderIcon.png|left|frameless]]
The hostile Non-Player Characters (NPCs) of screeps. Their forces are built up of creeps, however instead of the user's round shape they take on a more angular one colored red. They have a body the same as a normal creep made up of the same parts. They are immediately hostile to any user's creeps but will only attack/peruse in the room they were created, they will not pass exit-tiles to peruse a creep. They come in several forms.
+
The hostile Non-Player Characters (NPCs) of Screeps. Their forces are built up primarily of creeps, however instead of a user's round shape they take on a more angular one colored red with a darker red outline. They have a body the same as a normal creep made up of the same parts. They are immediately hostile to any user's creeps but will only attack/peruse in the room they were created, they can not use [[Exit tiles|exit-tiles]] and walk over them as normal tiles without being transported.
   
   
== Room Invasions ==
+
== Room Invasions ==
  +
[[File:Invader creep.png|left|thumb|An invader creep. Depending on your snack-food preference occasionally they are referred to as 'doritos' or 'pizza slices' They have more angular bodies and are always red.]]
  +
The most common Invader based attack a user will encounter is a room invasion. When any player creep harvests energy in a room, it is added to a background counter for that room known as <code>invaderGoal</code>. Once the counter reaches ~100,000 energy plus a random off-set (See: [https://github.com/screeps/backend-local/blob/master/lib/cronjobs.js#L433 Engine Code]) and a stronghold is present in in the sector (as-of stronghold update, See: [https://github.com/screeps/backend-local/blob/7520c8c7e6a443ad955d25e064dbd151a909d8cb/lib/cronjobs.js#L393 Engine code]) the invaders will attempt to spawn on an [[Exit tiles|exit tile]] in the room. Invaders may only spawn on exit tiles from adjoining neutral rooms which are connected by exit-tiles, such as a [[Map|Highway room]], [[Map|Source-Keeper room]], or a [[Map|Controller room]] that does not have an active user Claim/Reservation. If there is no viable exit tile for them to use or stronghold in the sector, they will not spawn. Invasions can happen in any room that energy harvesting is happening, even in Source-Keeper & Center Sector rooms where they will normally attack in greater strength.
   
  +
Once spawned, the Invader(s) will seek out and attack user creeps it can path to. It will avoid attacking structures unless it is blocking its access to the user's spawn (Such as built walls & ramparts). In non-claimed rooms where there is no spawn, as long as one Invader remains with attack parts they will wait in-room till they die naturally or are killed.
The most common Invader a user will encounter, when harvesting energy in a room with creeps an counter is being tallied of total energy harvested. Once the counter has been reached an invasion will be attempted. The invaders will attempt to spawn on an exit tile, invaders may only spawn on exit tiles from neutral rooms, meaning that no reservation or claim can be on the room that their exit tile the spawn on is connected to. If there is no viable exit tile, they will not spawn. Invasions can happen in any room where energy harvesting from a source is happening, claimed, reserved and, SK rooms alike.
 
 
Once spawned, the invader will then make its way to attack the user's creeps. It will avoid attacking structures unless it is blocking its access to the user's spawn.
 
   
 
The invader(s) will not stop attacking until:
 
The invader(s) will not stop attacking until:
   
*They die of natural causes (their TicksToLive, 1500, reaches 0)
+
*They die of natural causes (their <code>TicksToLive</code> by default 1500, reaches 0).
  +
*All Attack-based Invaders die (Healer invaders will <code>suicide()</code> if no attack-based body type invaders remain)
*They succeed in killing all the user's creeps in a room and can reach the spawn.
 
  +
*They succeed in killing all the user's creeps in a room and can reach the spawn. (If they can reach (path) to the spawn & there are no active room creeps, they <code>suicide()</code>, only applies to rooms with a controller & level (owned room))
*Their HP is brought to 0 by the user's creeps or towers.
+
*Their HP (<code>hits</code>) are brought to 0 by the user's creeps or towers.
   
  +
Their body makeup and number of Invaders spawned during an invasion varies first by the presence/absence of a controller. Rooms with a controller will scale based on its <code>level</code> while rooms without a controller (SourceKeeper/Center Sectors) will always spawn a 'raid' or larger group of invaders (See: [https://github.com/screeps/backend-local/blob/7520c8c7e6a443ad955d25e064dbd151a909d8cb/lib/cronjobs.js#L322 Engine Code]), controllers with a level greater or equal to four also have a chance to spawn raids. They will occasionally be boosted, and on-death will drop energy & boosts according to their body makeup in a tombstone which a user can withdraw from, and when the tombstone decays will drop to the ground and begin to decay as well.
Their body makeup and numbers varies on the room's controller level, if there is no controller they tend to spawn lager bodies and more numerous. Claimed rooms do also have low chance of spawning a large more powerful group then would normally be seen.
 
   
  +
=== Dealing with Room Invasions ===
  +
Room invasions are one of the first tower-to-creep & creep-to-creep combat a user partakes in. In an owned room RCL 3 or greater, a tower can be use to attack and destroy the Invaders providing that they do not out-match the towers damage (rare, but can happen with boosts & raids at later RCLs depending on their positioning). In [[Remote Harvesting|remote harvesting]] rooms, where a user does not have owned objects like towers creeps are normally employed. They can be 'retained' by renewing and renewed at a spawn until they are needed & deployed to a room (sometimes energy expensive) or spawned on-demand by the user's spawn system to deal with the attack (takes time to spawn). Generally, you will need:
   
  +
* A System or Systems to detect an invader has spawned in the room
== Source-Keepers ==
 
  +
* A System or Systems to deploy your countermeasure creep (either spawned deploying mission, or call spawning for it)
  +
* Logic to out-match the size of the invader (greater attack & healing or just attack)
  +
* Logic to guide the combat creep to the target & to destroy the target.
   
  +
Once mission complete, if reusing the creep I needs to be healed up and renewed, if not, it can be repurposed for other attack missions, or recycled for a return of its energy, or what-ever other task the user desires.
  +
  +
=== Spawning Invaders ===
  +
Though use of the Screep's GUI it is possible to spawn invaders of approx. desired size and with or without boosts by using the menu, then clicking on an exit tile. These Invaders will behave exactly like their normally spawned counterparts, but should have no effect on the background counter and do not drop energy/boosts when killed. The damage they can do to creeps however, is still very real. This is mainly mean to test defenses, and can not be done when hostile user creeps are in the room (creeps different from other user's creeps).
  +
 
== Source-Keepers ==
  +
[[File:Source Keeper and lair.png|left|thumb|A keeper, its lair & resource its defending.]]
 
Source keepers are special invaders found in Source-Keeper rooms towards the center of a sector. They spawn from eternally from keeper-lairs, the process begins as soon as the creep hits low HP or dies of natural causes.
 
Source keepers are special invaders found in Source-Keeper rooms towards the center of a sector. They spawn from eternally from keeper-lairs, the process begins as soon as the creep hits low HP or dies of natural causes.
   
 
Each source-keeper seeks out and defends the nearest source or mineral from its spawn location and defends it. Unlike regular invaders, they will not chase a user's creeps but instead will attack anything in range and stay to guard the source.
 
Each source-keeper seeks out and defends the nearest source or mineral from its spawn location and defends it. Unlike regular invaders, they will not chase a user's creeps but instead will attack anything in range and stay to guard the source.
   
== Strongholds & Stronghold Invaders ==
 
   
  +
  +
  +
  +
  +
  +
  +
  +
 
== Strongholds & Stronghold Invaders ==
  +
[[File:L5 Stronghold.png|left|thumb|A Level Five stronghold is well-defended and well stocked. Can also see they can occasionally spawn near source-keepers for extra defense.]]
 
Strongholds are Invader bases that periodically spawn in an Source-keeper room in a sector. Only one can be spawned at a time, and they vary in level 1 - 5. While they are quite a challenge to take down, they contain many valuable resources.
 
Strongholds are Invader bases that periodically spawn in an Source-keeper room in a sector. Only one can be spawned at a time, and they vary in level 1 - 5. While they are quite a challenge to take down, they contain many valuable resources.
   

Revision as of 23:30, 25 January 2021

InvaderIcon.png

The hostile Non-Player Characters (NPCs) of Screeps. Their forces are built up primarily of creeps, however instead of a user's round shape they take on a more angular one colored red with a darker red outline. They have a body the same as a normal creep made up of the same parts. They are immediately hostile to any user's creeps but will only attack/peruse in the room they were created, they can not use exit-tiles and walk over them as normal tiles without being transported.


Room Invasions

An invader creep. Depending on your snack-food preference occasionally they are referred to as 'doritos' or 'pizza slices' They have more angular bodies and are always red.

The most common Invader based attack a user will encounter is a room invasion. When any player creep harvests energy in a room, it is added to a background counter for that room known as invaderGoal. Once the counter reaches ~100,000 energy plus a random off-set (See: Engine Code) and a stronghold is present in in the sector (as-of stronghold update, See: Engine code) the invaders will attempt to spawn on an exit tile in the room. Invaders may only spawn on exit tiles from adjoining neutral rooms which are connected by exit-tiles, such as a Highway room, Source-Keeper room, or a Controller room that does not have an active user Claim/Reservation. If there is no viable exit tile for them to use or stronghold in the sector, they will not spawn. Invasions can happen in any room that energy harvesting is happening, even in Source-Keeper & Center Sector rooms where they will normally attack in greater strength.

Once spawned, the Invader(s) will seek out and attack user creeps it can path to. It will avoid attacking structures unless it is blocking its access to the user's spawn (Such as built walls & ramparts). In non-claimed rooms where there is no spawn, as long as one Invader remains with attack parts they will wait in-room till they die naturally or are killed.

The invader(s) will not stop attacking until:

  • They die of natural causes (their TicksToLive by default 1500, reaches 0).
  • All Attack-based Invaders die (Healer invaders will suicide() if no attack-based body type invaders remain)
  • They succeed in killing all the user's creeps in a room and can reach the spawn. (If they can reach (path) to the spawn & there are no active room creeps, they suicide(), only applies to rooms with a controller & level (owned room))
  • Their HP (hits) are brought to 0 by the user's creeps or towers.

Their body makeup and number of Invaders spawned during an invasion varies first by the presence/absence of a controller. Rooms with a controller will scale based on its level while rooms without a controller (SourceKeeper/Center Sectors) will always spawn a 'raid' or larger group of invaders (See: Engine Code), controllers with a level greater or equal to four also have a chance to spawn raids. They will occasionally be boosted, and on-death will drop energy & boosts according to their body makeup in a tombstone which a user can withdraw from, and when the tombstone decays will drop to the ground and begin to decay as well.

Dealing with Room Invasions

Room invasions are one of the first tower-to-creep & creep-to-creep combat a user partakes in. In an owned room RCL 3 or greater, a tower can be use to attack and destroy the Invaders providing that they do not out-match the towers damage (rare, but can happen with boosts & raids at later RCLs depending on their positioning). In remote harvesting rooms, where a user does not have owned objects like towers creeps are normally employed. They can be 'retained' by renewing and renewed at a spawn until they are needed & deployed to a room (sometimes energy expensive) or spawned on-demand by the user's spawn system to deal with the attack (takes time to spawn). Generally, you will need:

  • A System or Systems to detect an invader has spawned in the room
  • A System or Systems to deploy your countermeasure creep (either spawned deploying mission, or call spawning for it)
  • Logic to out-match the size of the invader (greater attack & healing or just attack)
  • Logic to guide the combat creep to the target & to destroy the target.

Once mission complete, if reusing the creep I needs to be healed up and renewed, if not, it can be repurposed for other attack missions, or recycled for a return of its energy, or what-ever other task the user desires.

Spawning Invaders

Though use of the Screep's GUI it is possible to spawn invaders of approx. desired size and with or without boosts by using the menu, then clicking on an exit tile. These Invaders will behave exactly like their normally spawned counterparts, but should have no effect on the background counter and do not drop energy/boosts when killed. The damage they can do to creeps however, is still very real. This is mainly mean to test defenses, and can not be done when hostile user creeps are in the room (creeps different from other user's creeps).

Source-Keepers

A keeper, its lair & resource its defending.

Source keepers are special invaders found in Source-Keeper rooms towards the center of a sector. They spawn from eternally from keeper-lairs, the process begins as soon as the creep hits low HP or dies of natural causes.

Each source-keeper seeks out and defends the nearest source or mineral from its spawn location and defends it. Unlike regular invaders, they will not chase a user's creeps but instead will attack anything in range and stay to guard the source.






Strongholds & Stronghold Invaders

A Level Five stronghold is well-defended and well stocked. Can also see they can occasionally spawn near source-keepers for extra defense.

Strongholds are Invader bases that periodically spawn in an Source-keeper room in a sector. Only one can be spawned at a time, and they vary in level 1 - 5. While they are quite a challenge to take down, they contain many valuable resources.

Invader Core

The primary core of an invader base, it acts as a spawn & brain for invaders stationed at the base. If the core dies, any invaders created by the base stop functioning and no invasions can happen in the sector for a limited time.

The stronghold will also spawn proxy invader cores which will attempt to reserved the controller of the room they are spawned in, causing problems for harvesting in that room.