- CombatTrack
Attach a track or playlist to combat encounters that plays when the combat begins
- CombatTrackForm
A FormApplication for managing the combat's track
- HypeTrackActorForm
A FormApplication for setting the Actor's Hype Track
- ItemTrack
Attach a track to an item that plays when the item is rolled
- ItemTrackForm
A FormApplication for managing the item's track
- Conductor
Orchestrates (pun) module functionality
- _checkForHypeTracksPlaylist()
Checks for the presence of the Hype Tracks playlist, creates one if none exist
- _createHypeTracksPlaylist()
Create the Hype Tracks playlist if the create param is true
- _processHype(combat, update)
Checks for the existence of the Hype Track actor flag, then plays the track
- _resumeOthers()
Resumes previously paused sounds
- _getActorHypeTrack(actor)
Get the Hype Track flag if it exists on an actor
- _setActorHypeTrack(trackId)
Sets the Hype Track
- _getActorHypeFlags(actor) ⇒
Object
Gets the Hype Flags
- _setActorHypeFlags(trackId)
Sets the Hype Flags
- _addHypeButton(app, html, data)
Adds a button to the Actor sheet to open the Hype Track form
- _openTrackForm(actor, track, options)
Opens the Hype Track form
- playHype(actor)
Plays a hype track for the provided actor
- _migratePlaylistMode()
- _migrateActorFlags()
- _migrateItemFlags()
- _migrateActorOwnedItemFlags()
- _migrateTokenOwnedItemFlags()
- _addPlaylistLoopToggle(html)
Adds a new toggle for loop to the playlist controls
- _onPreUpdatePlaylistSound(playlist, update)
PreUpdate Playlist Sound handler
- _onPreCreateChatMessage()
PreCreate Chat Message handler
- _onRenderChatMessage(message, html, data)
Render Chat Message handler
- playCriticalSuccessFailure(message)
Process Critical Success/Failure for a given message
- checkRollSuccessFailure(roll)
Play a sound for critical success or failure on d20 rolls Adapted from highlightCriticalSuccessFailure in the dnd5e system
- _checkForCriticalPlaylist()
Checks for the presence of the Critical playlist, creates one if none exist
- _createCriticalPlaylist(create)
Create the Critical playlist if the create param is true
- _checkForFailurePlaylist()
Checks for the presence of the Failure playlist, creates one if none exist
- _createFailurePlaylist(create)
Create the Failure playlist if the create param is true
- getFirstActiveGM() ⇒
User
|undefined
Gets the first (sorted by userId) active GM user
- isFirstGM() ⇒
Boolean
Checks if the current user is the first active GM user
- getPlaylistSounds()
Get all the sounds in a specific playlist
- getPlaylistSound(trackId)
For a given trackId get the corresponding playlist sound
- playTrack(playlistId, trackId)
Play a playlist sound based on the given trackId
- playPlaylist(playlistId)
Play a playlist using its default playback method
- findPlaylistSound(name)
Finds a Playlist sound by its name
- playSoundByName(name, options)
Play a sound by its name rather than id
- pauseSounds(sounds)
Pauses a playing howl
- resumeSounds(sounds)
Resume playback on one or many howls
- pauseAll()
Pauses all active playlist sounds
Attach a track or playlist to combat encounters that plays when the combat begins
Kind: global class
- CombatTrack
- instance
- static
Checks for the presence of the Hype Tracks playlist, creates one if none exist
Kind: instance method of CombatTrack
Create the Hype Tracks playlist if the create param is true
Kind: instance method of CombatTrack
Checks for the existence of a Combat Track and initiates playback
Kind: instance method of CombatTrack
Param |
---|
combat |
update |
Stops any playing combat tracks
Kind: instance method of CombatTrack
Param | Type |
---|---|
combat | * |
Resume any paused Sounds
Kind: instance method of CombatTrack
Sets the Combat Track flags on an Combat instance Handled as an update so all flags can be set at once
Kind: instance method of CombatTrack
Param | Type | Description |
---|---|---|
combat | Object |
the combat to set flags on |
playlistId | String |
the playlist id to set |
trackId | String |
the trackId or playback mode to set |
Kind: instance method of CombatTrack
Param | Type |
---|---|
defaults | * |
Checks the updating Combat instance to determine if it just starting (round 0 => round 1)
Kind: static method of CombatTrack
Param | Type |
---|---|
combat | * |
update | * |
options | * |
Adds a button to the Combat sheet to open the Combat Track form
Kind: static method of CombatTrack
Param | Type |
---|---|
app | Object |
html | Object |
data | Object |
Click handler for Combat Track button
Kind: static method of CombatTrack
Param | Type |
---|---|
event | * |
Builds data object and opens the Combat Track form
Kind: static method of CombatTrack
Param | Type | Description |
---|---|---|
combat | Object |
the reference combat |
track | String |
any existing track |
options | Object |
form options |
Gets the combat Track flags on an combat
Kind: static method of CombatTrack
Returns: Object
- flags - an object containing the flags
Param | Type | Description |
---|---|---|
combat | Object |
the combat to get flags from |
A FormApplication for managing the combat's track
Kind: global class
Provide data to the handlebars template
Kind: instance method of CombatTrackForm
Executes on form submission. Set the Hype Track flag on the specified Actor
Kind: instance method of CombatTrackForm
Param | Type | Description |
---|---|---|
event | Object |
the form submission event |
formData | Object |
the form data |
Activates listeners on the form html
Kind: instance method of CombatTrackForm
Param | Type |
---|---|
html | * |
Default Options for this FormApplication
Kind: static property of CombatTrackForm
A FormApplication for setting the Actor's Hype Track
Kind: global class
Provide data to the handlebars template
Kind: instance method of HypeTrackActorForm
Executes on form submission. Set the Hype Track flag on the specified Actor
Kind: instance method of HypeTrackActorForm
Param | Type | Description |
---|---|---|
event | Object |
the form submission event |
formData | Object |
the form data |
Activates listeners on the form html
Kind: instance method of HypeTrackActorForm
Param | Type |
---|---|
html | * |
Playlist select change handler
Kind: instance method of HypeTrackActorForm
Param | Type |
---|---|
event | * |
Default Options for this FormApplication
Kind: static property of HypeTrackActorForm
Attach a track to an item that plays when the item is rolled
Kind: global class
Checks for the presence of the Hype Tracks playlist, creates one if none exist
Kind: instance method of ItemTrack
Create the Hype Tracks playlist if the create param is true
Kind: instance method of ItemTrack
Handles module logic for chat message card
Kind: instance method of ItemTrack
Param | Type | Description |
---|---|---|
message | Object |
the chat message object |
html | Object |
the jquery object |
data | Object |
the data in the message update |
Adds a button to the Item sheet to open the Item Track form
Kind: instance method of ItemTrack
Param | Type |
---|---|
app | Object |
html | Object |
data | Object |
Builds data object and opens the Item Track form
Kind: instance method of ItemTrack
Param | Type | Description |
---|---|---|
item | Object |
the reference item |
track | String |
any existing track |
options | Object |
form options |
Gets the Item Track flags on an Item
Kind: instance method of ItemTrack
Returns: Promise
- flags - an object containing the flags
Param | Type | Description |
---|---|---|
item | Object |
the item to get flags from |
Sets the Item Track flags on an Item instance Handled as an update so all flags can be set at once
Kind: instance method of ItemTrack
Param | Type | Description |
---|---|---|
item | Object |
the item to set flags on |
playlistId | String |
the playlist id to set |
trackId | String |
the trackId or playback mode to set |
Sets a flag on a chat message
Kind: instance method of ItemTrack
Param | Type | Description |
---|---|---|
message | Object |
the message to set a flag on |
A FormApplication for managing the item's track
Kind: global class
Provide data to the handlebars template
Kind: instance method of ItemTrackForm
Executes on form submission. Set the Hype Track flag on the specified Actor
Kind: instance method of ItemTrackForm
Param | Type | Description |
---|---|---|
event | Object |
the form submission event |
formData | Object |
the form data |
Activates listeners on the form html
Kind: instance method of ItemTrackForm
Param | Type |
---|---|
html | * |
Default Options for this FormApplication
Kind: static property of ItemTrackForm
Orchestrates (pun) module functionality
Kind: global class
- Conductor
- ._hookOnInit()
- ._hookOnReady()
- ._initHookRegistrations()
- ._readyHookRegistrations()
- ._hookOnPreUpdatePlaylist()
- ._hookOnPreUpdatePlaylistSound()
- ._hookOnPreCreateChatMessage()
- ._hookOnPreUpdateCombat()
- ._hookOnUpdateCombat()
- ._hookOnDeleteCombat()
- ._hookOnRenderActorSheet()
- ._hookOnRenderChatMessage()
- ._hookOnRenderPlaylistDirectory()
- ._hookOnRenderCombatTrackerConfig()
- ._hookOnRenderItemSheet()
Init Hook
Kind: static method of Conductor
Ready Hook
Kind: static method of Conductor
Init Hook Registrations
Kind: static method of Conductor
Ready Hook Registrations
Kind: static method of Conductor
PreUpdate Playlist Hook
Kind: static method of Conductor
PreUpdate Playlist Sound Hook
Kind: static method of Conductor
PreCreate Chat Message Hook
Kind: static method of Conductor
PreUpdate Combat Hook
Kind: static method of Conductor
Update Combat Hook
Kind: static method of Conductor
Delete Combat Hook
Kind: static method of Conductor
Render Actor SheetsHook
Kind: static method of Conductor
RenderChatMessage Hook
Kind: static method of Conductor
RenderPlaylistDirectory Hook
Kind: static method of Conductor
Render CombatTrackerConfig Hook
Kind: static method of Conductor
Render Item Sheet Hook
Kind: static method of Conductor
Checks for the presence of the Hype Tracks playlist, creates one if none exist
Create the Hype Tracks playlist if the create param is true
Checks for the existence of the Hype Track actor flag, then plays the track
Kind: global function
Param | Type | Description |
---|---|---|
combat | Object |
the combat instance |
update | * |
the update data |
Resumes previously paused sounds
Get the Hype Track flag if it exists on an actor
Kind: global function
Param | Type |
---|---|
actor | * |
Sets the Hype Track
Kind: global function
Param | Type | Description |
---|---|---|
trackId | Number |
Id of the track in the playlist |
Gets the Hype Flags
Kind: global function
Returns: Object
- the Hype flags object
Param | Type |
---|---|
actor | Actor |
Sets the Hype Flags
Kind: global function
Param | Type | Description |
---|---|---|
trackId | String |
Id of the track in the playlist |
Adds a button to the Actor sheet to open the Hype Track form
Kind: global function
Param | Type |
---|---|
app | Object |
html | Object |
data | Object |
Opens the Hype Track form
Kind: global function
Param | Type | Description |
---|---|---|
actor | Object |
the actor object |
track | Object |
any existing track for this actor |
options | Object |
form options |
Plays a hype track for the provided actor
Kind: global function
Param | Type |
---|---|
actor | * |
Adds a new toggle for loop to the playlist controls
Kind: global function
Param | Type |
---|---|
html | * |
PreUpdate Playlist Sound handler
Kind: global function
Todo
- maybe return early if no flag set?
Param | Type |
---|---|
playlist | * |
update | * |
PreCreate Chat Message handler
Render Chat Message handler
Kind: global function
Param | Type |
---|---|
message | * |
html | * |
data | * |
Process Critical Success/Failure for a given message
Kind: global function
Param | Type |
---|---|
message | * |
Play a sound for critical success or failure on d20 rolls Adapted from highlightCriticalSuccessFailure in the dnd5e system
Kind: global function
Param | Type |
---|---|
roll | * |
Checks for the presence of the Critical playlist, creates one if none exist
Create the Critical playlist if the create param is true
Kind: global function
Param | Type | Description |
---|---|---|
create | Boolean |
whether or not to create the playlist |
Checks for the presence of the Failure playlist, creates one if none exist
Create the Failure playlist if the create param is true
Kind: global function
Param | Type | Description |
---|---|---|
create | Boolean |
whether or not to create the playlist |
Gets the first (sorted by userId) active GM user
Kind: global function
Returns: User
| undefined
- the GM user document or undefined if none found
Checks if the current user is the first active GM user
Kind: global function
Returns: Boolean
- Boolean indicating whether the user is the first active GM or not
Get all the sounds in a specific playlist
For a given trackId get the corresponding playlist sound
Kind: global function
Param | Type |
---|---|
trackId | String |
Play a playlist sound based on the given trackId
Kind: global function
Param | Type | Description |
---|---|---|
playlistId | String |
the playlist id |
trackId | String |
the track Id or playback mode |
Play a playlist using its default playback method
Kind: global function
Param | Type |
---|---|
playlistId | String |
Finds a Playlist sound by its name
Kind: global function
Param | Type |
---|---|
name | * |
Play a sound by its name rather than id
Kind: global function
Param | Type |
---|---|
name | * |
options | * |
Pauses a playing howl
Kind: global function
Param | Type |
---|---|
sounds | * |
Resume playback on one or many howls
Kind: global function
Param | Type |
---|---|
sounds | * |
Pauses all active playlist sounds
Kind: global function