$ man tshabbic.projects.rct-dap
RCT-DAP(8)Server Side Disable Ally ProjectilesRCT-DAP(8)
Name

rct-dap -- server side disable ally projectiles

Description

[See the Source Code!]

Some video games, such as Realm of the Mad God allow players to disable the visual effects other players create, such as attacks, projectiles, particles, etc., as to reduce screen clutter and increase visibility. Terraria has no such feature, and really has no need for one; however, after the release of my server side raid system, players on lower-end devices, such as several year old mobile phones, made mentions of having lag (in the form of low frames per second), as well as stating that they found it hard to see which projectiles were coming from the raid boss, making for a less than ideal combat experience. As such, I saw this as an opportunity to both give players the ability to increase their visibility in non-PvP encounters, while simultaneously increasing the server's performance.

This was implemented by hooking into TShock for Terraria's SendDataEventArgs event handler, and intercepting and manually handling all PacketTypes.ProjectileNew packets. In theory, it's simple, for anyone opted in, check if the projectile belongs to an ally (as opposed to an NPC, or a Raid encounter, etc.) and don't send the new projectile packet to them. In practice, this was much easier said than done, as I also mistakenly sent a player's own projectile back to them, causing a significant amount of latency (non-zero versus zero), introducing a feeling of "sluggishness" to some weapons. Thankfully I was able to resolve this, though do note that some of the commented out code (i.e., all mentions of "send to self") still refer to this.

The difference Disable Ally Projectiles makes in raids is especially astounding. The following are two videos, each capturing the same raid but with two different perspectives, one player with Disable Ally Projectiles enabled, the other without.

This PoV does not have Disable Ally Projectiles enabled

This PoV does have Disable Ally Projectiles enabled


Hopefully it's easy to see that the difference is paramount, if it wasn't clear enough from the video thumbnails!

Usage

For use on the RenCorner Terraria server, simply type /disableallyprojectiles or /dap for short, to toggle between disabling and seeing ally projectiles. No client set up or anything else required!

If you would like to apply this logic for your own server, please see the source code above. You will need to remove some of our server-specific logic (i.e., still sending projectiles if they are "raid projectiles", or are "healing projectiles", et cetera., but the basic idea should be there).
You should call the DisableAllyProjectile(SendDataEventArgs args) function in a manner such as:

protected void NetHooks_SendData(SendDataEventArgs e)
{
switch (e.MsgId) {
case PacketTypes.ProjectileNew:
{
DisableAllyProjectiles.DisableAllyProjectile(e);
break;
}
}
}
After registering the event handler prior with:
ServerApi.Hooks.NetSendData.Register(this, NetHooks_SendData);

Our implementation also links with another plugin that spawns projectiles on behalf of players, which is not standard behavior. As such, code relating to this should also be removed, or, if you have your own mechanism for spawning projectiles on behalf of players, call AddSSP(int ProjectileHash) so that Disable Ally Projectiles knows that the projectile is spawned by the server.

See Also
History

Disable Ally Projectiles was made available on the RenCorner Terraria server in August of 2025 and was met with unequivocal praise; players who previously avoided content with tons of projectiles flying around everywhere were now much more involved in these types of encounters!