Entity Collision
Entity collision is a mechanic deployed by most players and NPCs in OldSchool RuneScape. It uses server-side pathfinding flags to prevent said entities from colliding on the same game squares.
Table of contents
Flags
There are either three or four flags used for this purpose. It is currently unclear which option it is, as both are viable and neither can be disproven as of right now.
Flag | Set by | Checked by | Removed by | Description |
---|---|---|---|---|
Player | Strictly players | All NPCs except for sulphur clouds and excluded NPCs | Strictly players | Indicates that a player is standing on the game square |
NPC | All NPCs but the excluded NPCs | All NPCs but the excluded NPCs | All NPCs but the excluded NPCs, players | Indicates that a NPC is standing on the game square |
Projectile | Line of Sight and Full-blocking NPCs | All NPCs but the excluded NPCs, players, line of sight | Line of Sight and Full-blocking NPCs | Indicates that the tile cannot be crossed by line of sight |
Full | Line of Sight and Full-blocking NPCs | All NPCs but the excluded NPCs, players, line of sight | Line of Sight and Full-blocking NPCs | Indicates that the tile cannot be crossed players or NPCs |
Note: Because the gorillas block line of sight, as well as players and most NPCs from crossing the tile, it is unclear if those flags are separated or the same exact thing.
Exceptions
Line of Sight and Full-blocking NPCs
The listed-below NPCs prevent entities from going through them, and do not allow NPCs or players to shoot projectiles through them, as line of sight checks for the projectile flag.
- Gorillas
- The gorillas refer to the brawlers found in Pest Control and the bearded monkey guards found in the Temple of Marimbo, on Ape Atoll. They are not to be confused with the non-bearded versions on the eastern side of the temple, as those do not follow the same effects.
- Vanstrom Klause
- Vanstrom Klause can be found in the canifis pub, by the staircase. Prior to starting the “In Search of the Myreque” quest, the NPC will be called “Stranger.”
- Bandit Camp’s Sitting Bandits
- Bandits that sit in the desert bandit camp, the ones which move around are excluded.
- Barricades in Castle Wars
- The barricades that can be deployed by the player.
- Elder Guard in Ape Atoll
- Refers to the elder guard by the King Awowowgei.
Excluded NPCs
Below is a list of monsters which belong in the excluded group:
- All three Dagannoth kings
- Dusk & Dawn
- Smoke devil
- Most Chambers of Xeric NPCs, except for skeletal mages
- Followers(pets)
- Followers only check for the NPC flag, they do not add or remove it.
- Godwars generals and their minions
- Jal-Nib
- Ravager, spinner and splatter
- Animated armours
- Hunter NPCs
- The Mimic
- Callisto, Venenatis, Vet’ion, Chaos elemental, Chaos fanatic, Crazy archaeologist, Scorpia
Sulphur clouds
The sulphur clouds found in the sulphur mine are a unique exception. While they do not get blocked by players, as they are required to walk on-top of the player in order for them to start dealing damage to the players, they will be blocked by NPCs which do set the NPC flag. A commonly deployed safespot can be visible below.
The Mechanic
Upon spawning to the world - or logging in, in the case of players, all the game squares beneath the entity will be flagged with the respective addition flag. When the creature despawns, or logs out in the case of players, the respective removal flags are removed from the tiles beneath the entity. When the creature moves, the respective flags aforementioned are added and removed for each game square that the creature traverses. In the case of running, this would include both of the game squares that a player crosses. In the case of teleporting, it only means the current and destination tile.
Upon removing flags, the flags will be removed from the respective game squares regardless of if there are any other creatures which deploy the same flags colliding on that same tile. This is important to keep in mind, as that is the sole reason why [entity stacking] works.
All the flags mentioned in this thread are ignored by both the “dumb” and “intelligent” pathfinders. They are only checked prior to the creature being moved to the respective tile, upon which it fails if the game square contains a restricted flag.
Media
Sulphur cloud exception
Below if the example picture of the sulphur mine safespot, used by tagging a spider(slightly visible by the player’s head) to block the northern side of the player. The direct result of this is sulphur clouds being unable to walk on the player, as the tiles to the south and west of the player are fully clipped by the map itself.
Credits to the OldSchool Wiki for the image below.
Entity Stacking
Below is a gif of getting NPCs to walk on-top of one another, by running through the game square on which the stack of them is, unclipping the game square, and allowing another dust devil to then walk onto the stack.
Vanstrom Klause Blocking
Below is a clip where Vanstrom Klause in the Canifis inn blocks line of sight as well as player movement.