Skip to content

Event Types

RegularPerson edited this page May 23, 2023 · 5 revisions

These are the types of events available to use within PixelTweaks. Note that not all of these have been fully implemented yet.

Battle Music

Type: battle_music
Description: Plays when you battle a pokemon
Properties: music (Music Object)

Background Music (Unimplemented)

Type: bgm
Description: Plays when all conditions are met outside of battle
Properties: music (Music Object)

Catch Music (Unimplemented)

Type: catch_music
Description: Plays when a pokemon is caught. If undefined for the current conditions, the music will stay the same.
Properties: music (Music Object)

Victory Music (Unimplemented)

Type: bgm
Description: Plays when a pokemon is defeated. If undefined for the current conditions, the music will stay the same.
Properties: music (Music Object)

Music Object

All music events require a Music object. All music objects must have at least ONE sound in them. Whether that is at the start, loop or end.

Properties

  • start (Sound Resource Location) - The sound to play at the start of the event. Will skip to loop if not provided. Optional.
  • loop (Sound Resource Location) - The sound to play in the event. This track will loop until the event ends. Optional.
  • end (Sound Resource Location) - The sound to play at the end of the event. Optional.
  • fade (Fade Object) - The fade timings to use. Optional. Defaults to 1000ms in and out.
    • in (Long) - How long to fade tracks in (in milliseconds). Optional. Defaults to 1000
    • out (Long) - How long to fade tracks out (in milliseconds). Optional. Defaults to 1000
  • volume (Float) - The volume of the sounds. Optional. Defaults to 1.0. Values above 1 will not make it any louder.
  • pitch (Float) - The pitch of the sounds. Optional. Defaults to 1.0. Min 0.1 and max 2.0

Example

Here is an example of a music object

"music": {
    "start": "pixeltweaks:legendary/intro",
    "loop": "pixeltweaks:legendary/loop",
    "end": "pixeltweaks:legendary/end",
    "fade": {
        "in": 1000,
        "out": 1000
    },
    "volume": 1.0,
    "pitch": 1.0
}

Clone this wiki locally