• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

tModLoader Time Limit - Apply game-altering effects after a set duration

hamstar

Steampunker


Note: Requires Mod Helpers


Time Limit does what it says on the tin. Worlds can now be set with time limits to have configurable events take place. For example, to run a timer for 5 minutes that exits the game on completion, type this into the chat or server console:

Code:
/timer-start 300 exit false
List of commands:
  • timer-start <seconds> <action> <repeat> - Begins the timer with the given number of seconds before the given action is executed.
  • timer-stop <action> - Stops all timers of a given action.
  • timer-pause <action> - Pauses all timers of a given action.
  • timer-resume <action> - Resumes all paused timers of a given action.
  • timer-stop-all - Aborts all currently running timers.
  • timer-pause-all - Pauses all timers.
  • timer-resume-all - Resumes all paused timers.
List of actions:
  • none - No action. Timer exists for show only.
  • exit - Exits the server/returns to menu.
  • kill - All players die.
  • hardkill - All players die as if in hardcore mode (i.e. permadeath).
  • afflict - All players receive a permanent affliction as specified in the config file's 'Afflictions' (de)buff list.
  • unafflict - All players recover from permanent afflictions in the 'Afflicitions' list.
  • (custom action name) - Same as none, unless another mod implements the named action via. API.
See the Mod Helpers Control Panel for configuration options.

Source code now available. API now available (now featuring Mod.Call() bindings).


Installation

Requires tModLoader (+0.11). Copy the above .tmod file to your 'Documents/My Games/Terraria/ModLoader/Mods' folder to play.




 
Last edited:

hamstar

Steampunker
v1.3.1
  • Updated for TML11.5
  • Added ranges to some config settings
v1.3.0
  • Fixed missing config Clone
v1.1.7.2
  • Fixed expired timer for serverclose lingering for repeat sessions
v1.1.7.1
  • Fixed 'unafflict' action
v1.1.7
  • Updated to Mod Helpers v2.0.2
  • Renamed chat commands for readability
  • Fixed MP player load bug failsafe
v1.1.6
  • Added debug messages for network packets
  • Added debug messages for commands and API calls
  • Added debug outputs for timer actions
  • Minor internal restructuring
v1.1.5
  • Migrated to Mod Helpers v1.6.3
  • Migrated to C# 6
  • Fixed console commands
v1.1.4
  • Dependency update; no changes
v1.1.3
  • Added 'serverclose' action
  • Fixed some API errors
  • Added timer commands for adjusting timers of a given action (with API bindings)
  • Fixed API for custom actions
  • Internal refactoring
v1.1.2
  • Revised net protocol (experimental)
  • Added API function GetTimersOf(string)
  • Minor bug fixes
v1.1.1
  • Changed commands to World (single player) or Console (multiplayer)
  • Added Mod.Call() bindings for API
  • Added SaveModSettingsChanges, RunTimesUpAction, TimerStart, TimerAllStop, TimerAllPause, and TimerAllResume API functions
v1.1.0
  • Changed old begin and end commands to 'timerstart' and 'timerallstop'
  • Added 'timerallpause' and 'timerallresume' commands
  • Added an 'unafflict' action option for the 'timerstart' command
  • Fixed multiplayer issues with commands
  • Internal refactoring
  • Tweaked timer display
v1.0.1.1
  • Fixed repeating timers multiplayer desync issue
v1.0.1
  • Fixed multiplayer
  • Fixed 'exit' command
v1.0.0.2
  • Initial release.
 

Attachments

Last edited:

GreyScale7287

Steampunker
I'm not sure if I'm just not doing it right, but the Blackout debuff doesn't seem to apply correctly when using the afflict timer..
For the Afflictions config option, I have "Slow""Blackout", slow works but Blackout does not.
 

GreyScale7287

Steampunker
Well, I tried that, and the timer said i had Blackout, but the debuff wasn't applied (again, slow worked fine.)
EDIT: tried it again, and the debuff was applied..
 
Top Bottom