Klehrik-CooldownHelper icon

CooldownHelper

Allows for displaying cooldowns on the HUD.

Last updated 2 days ago
Total downloads 2370
Total rating 0 
Categories Mods Tools Libraries
Dependency string Klehrik-CooldownHelper-1.0.2
Dependants 3 other packages depend on this package

This mod requires the following mods to function

ReturnOfModding-ReturnOfModding-1.0.55 icon
ReturnOfModding-ReturnOfModding

Lua Mod Loader for Risk of Rain Returns

Preferred version: 1.0.55
MGReturns-ENVY-1.1.1 icon
MGReturns-ENVY

A plugin to allow ReturnOfModding plugins greater control of their environment.

Preferred version: 1.1.1
RoRRModdingToolkit-RoRR_Modding_Toolkit-1.2.1 icon
RoRRModdingToolkit-RoRR_Modding_Toolkit

Friendly abstractions of the game's internal functions for easier modding.

Preferred version: 1.2.1

README

Allows for displaying cooldowns on the HUD.
(Automatically adds Time Keeper's Secret's cooldown.)

CDHelperShowcase.png

Import line:

Cooldown = mods["Klehrik-CooldownHelper"].setup()


Functions

Cooldown.set(inst, id, duration, [icon], [color]) -> nil

Adds a cooldown to the instance.
Overrides the existing cooldown if the ID is already in use.

Parameters:

Parameter Type Description
inst CInstance or Instance object The instance to set the cooldown for.
id string The identifier for the cooldown.
duration number The maximum time for the cooldown (in frames).
[icon] sprite Player HUD: The icon to display on the cooldown visual.
Should be 8px x 8px.
[color] color Player HUD: The color to use for the cooldown visual.

Cooldown.get(inst, id) -> number, number, sprite, color

Returns information about a cooldown as unpacked values.
remaining time, maximum time, icon sprite, color

Parameters:

Parameter Type Description
inst CInstance or Instance object The instance to get the cooldown from.
id string The identifier for the cooldown.

Installation Instructions

Follow the instructions listed here.
Join the Return of Modding server for support.