$ man tshabbic.projects.rct-pgates
RCT-PGATES(8)Progression GatesRCT-PGATES(8)
Name

rct-pgates -- progression gates

Description

[See the Source Code!]

This TShock for Terraria plugin allows server administrators to control which bosses and invasions can be defeated and when. The typical use case for this is when server admins want to more explicit control in when certain world-altering bosses and invasions are defeated, usually because these engagements are best enjoyed together with many friends, but also because there are significant advantages to intentionally staggering the rate at which the server can progress. The latter is especially true in the case of public, 24/7 online servers, like the one I managed; I didn't want some players speed-running the game and the world reaching end of game state in less than a week, as this tends to ruin the experience for everyone rather quickly. Instead, I created this plugin for the players that have significantly less time to invest than others (i.e., work, school, etc.) so that they too could enjoy being "on pace" and experiencing more of the game's content with everyone else than what otherwise would be possible.

Whenever an boss spawns, regardless of how (naturally, from a summoning item, etc.), the plugin's NpcSpawn hook checks whether it belongs to a gated engagement. If that engagement isn't currently allowed to spawn, the boss is deactivated immediately, the removal is synced to all connected clients, and a message is broadcast saying the boss is currently disabled. Note that the presence of invasions are checked every game tick,, but are otherwise handled the same.

In the source code directory, you will find the bare-bones C# code (as opposed to also including the assemblies, dependencies, packages, .csproj file, etc.), as well as a .dll binary for TShock 6.2.1.0, for Terraria 1.4.5.8 that you can simply drop into your server's plugins folder.

Usage

Commands:

/state [why]


Permission required: pgates.statecheck

Lists which bosses and invasions are unlocked, locked, and will be unlocked in the future. If 'why' is passed, explains what Progression Gates is and why it is installed on the server (because not everyone likes nor understands not being able to speedrun the game in a few days).

/pgate <option>. Options: lock, unlock, check, list, resetoverride


Permission required: pgates.manage

Allows server administrators to manage which bosses and invasions are available to the server.


Sub-commands:
/pgate lock <engagement> [override/DateTime].

/pgate unlock <engagement> [override/DateTime].

Immediately locks/unlocks the specified engagement. If override is used, the change is temporary (until the server restarts, or is otherwise manually modified to a different state). If DateTime is used, it sets the unlock time.

/pgate check <engagement>

Returns detailed information on whether or not an engagement is locked or unlocked, and if a temporary availability override is active, as well as the unlock time, if one was specified previously.

/pgate list

Prints a list of all the engagement IDs that should be used with all Progression Gates commands.

/pgate [resetoverride | ro] <engagement>

Clears the previously set override status for the specified engagement.

Examples

If you wanted to immediately allow the Eye of Cthulhu to spawn:
/pgate unlock EyeOfCthulhu -- this will set the unlock time to DateTime.MinValue, allowing the Eye to spawn immediately.

To schedule the Eater Of Worlds to automatically unlock on December 1st 2026 at 4:30 PM:
/pgate unlock EaterOfWorlds "2026-12-01 16:30:00"

Sometimes you want to only briefly unlock an engagement for a special occasion (even if an unlock date has been set), like Queen Bee. To temporarily allow them:
/pgate unlock QueenBee true
and to clear the unlock override:
/pgate resetoverride QueenBee


The following is how a player executing /state to check which bosses and invasions are available may look like after some configuration:

Screenshot capturing the output of the /state command
Bugs

All time-related measurements happen in accordance with the host machine's own clock and are shown in-game as such. This was done because the majority of our players at the time were connecting from US East, where our host machine's time is set to, so my team and I figured this would be the least confusing approach for our player base, although a more "correct" solution would instead use UTC as the baseline, as most programs should unequivocally.

History

This plugin was written in preparation for RenCorner Terraria's Survival server in March of 2025 and was updated from TShock 5.2.4.0 on .NET 6.0 for Terraria 1.4.4.9 to TShock 6.1.0.0 on .NET 9.0 for Terraria 1.4.5.8 in October of 2026.