Skip to content
Snippets Groups Projects

Expose most of the music handler to Lua

Merged Cheariisan requested to merge Chearii/RingRacers:expose-music into master
All threads resolved!

This exposes several music functions to Lua, while also enabling modders to add their own custom tune IDs.

Music system changes

Tunes can now be added via the Music_AddTune function. A set of tune flags can be passed to the function to assign various values on creation of a tune:

  • TN_LOOPING
  • TN_INCLUSIVEFADE
  • TN_USEMAPVOLUME
  • TN_SYNCMUSIC
  • TN_MUSICCRED
  • TN_VAPES
  • TN_NIGHTCOREABLE
  • TN_CHANGEPITCH (combination of TN_VAPES and TN_NIGHTCOREABLE)

A Music_SetFadeIn function has been added to the music framework, allowing for an easy way to set a tune's fade-in.

Example

I've created a Lua file that serves as a basic test for the music functions, playing existing base-game music.

ringracers0014.webm

muschangetest.lua

Everything has been tested in a Windows build. Both the Developer and Release presets have been used.

Edited by Cheariisan

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading