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

Discussion in 'Released' started by hamstar, Dec 30, 2017.

  1. hamstar

    hamstar Steampunker

    [​IMG]
    Time Limit
    v1.1.7.2



    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.10). Copy the above .tmod file to your 'Documents/My Games/Terraria/ModLoader/Mods' folder to play.


    [​IMG]

     
    Last edited: Aug 16, 2018
  2. hamstar

    hamstar Steampunker

     

    Attached Files:

    Last edited: Aug 16, 2018
    FiveSix78 and 360Chadscope like this.
  3. TheWorfer27

    TheWorfer27 Retinazer

    Hmm... Distorted debuff playthrough
     
    hamstar likes this.
  4. トラッシュ

    トラッシュ Terrarian

    It says that "unafflict is not a valid action"... Now I'm kinda stuck with Feral Bite.
     
  5. hamstar

    hamstar Steampunker

    I'll try to fix it.

    Edit: Done.
     
    Last edited: Aug 9, 2018
    トラッシュ likes this.
  6. トラッシュ

    トラッシュ Terrarian

    Ah, Thanks!
     
    Last edited: Aug 11, 2018
  7. NightDragon72

    NightDragon72 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.
     
  8. hamstar

    hamstar Steampunker

    Try:
    Code:
    "Afflictions": ["Slow","Blackout"]
     
    TheWorfer27 likes this.
  9. NightDragon72

    NightDragon72 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..
     
  10. hamstar

    hamstar Steampunker

    Should I look into a way to make this work more consistently?