Heck icon indicating copy to clipboard operation
Heck copied to clipboard

[Feature Request] Ability to define custom modifiers

Open Mawntee opened this issue 9 months ago • 2 comments

The idea is essentially to have something like Vivify's "SetGlobalProperty" event and Heck's Modifier base's, but backwards.

So instead of taking a base game value like "baseEnergy", and setting that as something our custom assets could access, it would be sick if we could grab some global properties exposed either in the scene or from shaders, and apply those to point definitions.

One example would be grabbing some of the AudioLink data directly, and applying that data to the position on an AnimateTrack event. Another use could be using something like a compute shader that calculates a day/night cycle based on the current time in the song or the users local time (something provided by AudioLink), and outputs a vec3 for sun rotation coords which could be applied to a prefab with a directional light. https://fxtwitter.com/mawntee/status/1823152211662115302

(ngl i just really want to create a modchart that has a completely different experience depending on what time of day you play it at lol)

Example syntax could be something along the lines of:

(referencing _Bass from the BS AudioLink GitHub)

...sorry

{
  "b": 62.1, // Time in beats.
  "t": "SetCustomModifier",
  "d": {
    "properties": [{
      "id" : "_AudioLinkBass", // Name for the new base modifier.
      "type" : "Float", // Type of the property (Texture, Float, Color, Vector, String)
      "Source" : "AudioLink._Bass" // Name of the global value to look up
    }]
  }
}, {
  "b": 69,
  "t": "AnimateTrack",
  "d": {
    "track": "definitelyNotThePlayer",
    "duration": 420,
    "position": [0, 0, "_AudioLinkBass"]
  }
}

or from the time of day example:

{
  "b": 17.38, // Time in beats.
  "t": "SetCustomModifier",
  "d": {
    "properties": [{
      "id" : "SunRotation", // Name for the new base modifier.
      "type" : "Vector", // Type of the property (Texture, Float, Color, Vector, String)
      "Source" : "_SunRotation.xyz" // Name of the global value to look up
    }]
  }
}, {
  "b": 42.069, // Time in beats.
  "t": "InstantiatePrefab",
  "d": {
    "asset": "assets/prefabs/sun_directional_light.prefab", // File path to the desired prefab.
    "id": "areYaWinnin", // (Optional) Unique id for referencing prefab later. Random id will be given by default.
    "track": "Sun" // (Optional) Track to animate prefab transform.
  }
}, {
  "b": 62.1,
  "t": "SetRenderingSettings",
  "d": {
    "renderSettings": {
      "sun": "areYaWinnin"
    }
  }
}, {
  "b": 69,
  "t": "AnimateTrack",
  "d": {
    "track": "Sun",
    "duration": 420,
    "rotation": ["_SunRotation.xyz"]
  }
}

Thanks for coming to my TED Talk™

Mawntee avatar Mar 07 '25 15:03 Mawntee