[TOTPP] Lua Scenario Template

Get the music option "on" ? (game/game option/"music" box)

Advice from the guy who hardly played music :D .
You could check if it works by doing (game/pick music).
Otherwise, you can also launch a music using Lua and, per exemple, a onKeyPress.

Please notice that, while sounds are overlapping, only one music is played at a time. ;)
Ugh... so silly! Did not have that box ticked. I don't know how it "un-ticked" though. Anyway, all good now. :) Thanks @Dadais !
 
In LuaParameterFiles/customMusicIntegration.lua, there is a line
Code:
local useCustomMusic = false
which must be set to true (in addition to the TOTPP music patch being enabled). Otherwise, the game will refer to whatever playlist is in <Test of Time Directory?\lua\extendedMusicSettings.lua.

I'm pretty sure that the end user doesn't need to have the Extended Music Patch installed to get custom music with customMusicIntegration.lua. The older version needed it, because files would be overwritten in the Test of Time\Music folder, and I didn't want everyone shipping code that overwrites files.
Ah OK, this is helpful to hear. So I can keep my "ToT/lua" files as they are?
 
It has come to my attention that the Legacy Event Engine has a bug. The TURN event doesn't work for parameter turn=every. The template has been updated with the fix, which is attached here as well.
 

Attachments

  • legacyEventEngine.lua--Jan-1-fix.zip
    15 KB · Views: 5
Top Bottom