Z3nner / lancer-weapon-fx

Visual and Sound Effects for use primarily with the Lancer TTRPG system on Foundry.
5 stars 6 forks source link

Firing Burst Launcher generates "file not found" error message for weapon sound #34

Closed AndrewKopczynski closed 6 months ago

AndrewKopczynski commented 6 months ago

Version: 1.7.3 Foundry: V10 Stable Build 312 OS: Linux

Whenever you try to use the Burst Launcher (from Dusk Wing's License Level 2), it generates this error.:

image

Sequencer | Sound | Play - File not found:modules/lancer-weapon-fx/soundfx/AutoPod_Fire.ogg

I think this is being caused by funky Linux case sensitivity, specifically Line 10 in /lancer-weapon-fx/blob/main/packs/weaponfx.db:

{"name":"Burst Launcher","type":"script","author":"LancerWeaponFX00","img":"modules/lancer-weapon-fx/icons/airburst.png","scope":"global","_id":"EHls7n7amW2fEZ97","command":"const {targetsMissed, targetTokens, sourceToken} = game.modules.get(\"lancer-weapon-fx\").api.getMacroVariables(typeof messageId === \"undefined\" ? null : messageId, actor);\n\nconst target = targetTokens[0];\n\nlet sequence = new Sequence()\n .sound()\n .file(\"modules/lancer-weapon-fx/soundfx/AutoPod_Fire.ogg\")\n .volume(game.modules.get(\"lancer-weapon-fx\").api.getEffectVolume(0.7))\n .effect()\n .file(\"jb2a.lightning_ball.blue\")\n .endTime(1500)\n .scale(0.2)\n .atLocation(sourceToken)\n .moveTowards(target)\n .missed(targetsMissed.has(target.id))\n .waitUntilFinished();\n\n sequence.sound()\n .file(\"modules/lancer-weapon-fx/soundfx/AirBurst.ogg\")\n .playIf(!targetsMissed.has(target.id))\n .volume(game.modules.get(\"lancer-weapon-fx\").api.getEffectVolume(0.5))\n .effect()\n .file(\"jb2a.explosion.02.blue\")\n .playIf(!targetsMissed.has(target.id))\n .scale(0.5)\n .atLocation(target)\n .waitUntilFinished();\n\nsequence.play();"}

This specific section has an uppercase P in AutoPod-Fire.ogg (all other instances that use this sound effect have lowercase Ps) .file(\"modules/lancer-weapon-fx/soundfx/AutoPod_Fire.ogg\")\n

I changed that line to have a lowercase P in Autopod, and the Burst Launcher now works as intended. It plays the sound effect and does not generate any Sequencer errors. .file(\"modules/lancer-weapon-fx/soundfx/Autopod_Fire.ogg\")\n

It might be possible that this bug only happens on Linux due to case-sensitive filenames. It might not be reproducible if you're running Foundry on Windows.