scp-fs2open / fs2open.github.com

Origin Repository for SCP FreeSpace 2 Open
https://www.hard-light.net/
Other
407 stars 163 forks source link

Invalid Sound Environment in BP2-23 #6369

Closed MoerasGrizzly closed 1 month ago

MoerasGrizzly commented 1 month ago
Warning: Error in mission event: "s7endA: laporte comes back in": Invalid sound environment.

In sexpression: ( when 
   ( true ) 
   ( fade-in 2000 ) 
   ( set-skybox-model "dreamscape.pof" ) 
   ( play-sound-from-file 
      "silent_cruise.ogg" 
   )
   ( adjust-audio-volume "Effects" 100 ) 
   ( set-object-position 
      "Kappa 1" 
      -48325 
      0 
      48594 
   )
   ( set-object-facing-object 
      "Kappa 1" 
      "Waypoint path 24:2" 
   )
   ( set-sound-environment "Living room" ) 
   ( set-ambient-light 120 115 114 ) 
   ( remove-sun-bitmap @Sunbitmap6[0] ) 
   ( add-sun-bitmap-new 
      "SunSol" 
      282 
      48 
      311 
      100 
      @Sunbitmap5[0] 
   )
)

(Bad node appears to be: "Living room")

File: missionparse.cpp
Line: 6498

@Goober5000 alerted me to this yesterday.

Problem occurs on FS 24.2 RC5 And the nightlies from 7 to 13th July 2024 (see below).

Sound environment "Living Room" is a default EFX parameter as described here. BP ocasionally calls other EFX environments (such as in BP2-20), but those are defined in bp-snd.tbm (all the way at the bottom).

In FRED, the sound environment "living room" is still shown: https://cdn.discordapp.com/attachments/355799261784571904/1288451669172162570/image.png?ex=66f68d20&is=66f53ba0&hm=e79cda48cf8c69d8c26186b171785023666cdb899ba7d741f462bbf4a1bf608a& https://cdn.discordapp.com/attachments/355799261784571904/1288451953621340180/image.png?ex=66f68d64&is=66f53be4&hm=5a69274197b7d5dcab5dae498707bf50d010c61ae9b88577d2116b20e5f3e988& And FRED doesn't produce an error when loading these missions.

Goober and I did some testing, suspecting the following two PRs: https://github.com/scp-fs2open/scp-prebuilt/pull/15 https://github.com/scp-fs2open/fs2open.github.com/pull/6246

However, testing nightly builds from the 7th to the 13th of July revealed that the bug was already present before these mergers.

MageKing17 commented 1 month ago

If EFX is disabled, this is expected behavior; sound environments aren't loaded, so they'll report as invalid, but FRED forces them to load anyway so they can be listed out. This should be flagged as a "recoverable error", so it shouldn't stop the mission from loading, and the warning won't even show up in Release builds.

Goober5000 commented 1 month ago

FSO treats it as a recoverable error; the warning does not prevent the mission from being loaded. But @MoerasGrizzly said that the warning has not been seen in the past.

(@MoerasGrizzly is it possible that EFX was enabled in the past but was disabled in your recent testing?)

MoerasGrizzly commented 1 month ago

EFX has been enabled throughout testing. If EFX being on or off is a culprit here, this does not explain why 1) It happens only with recent builds 2) it happens with this specific EFX preset but not others.

MoerasGrizzly commented 1 month ago

No, Mageking is right. aargh

So what happend is that at the march of 25th the ability to toggle EFX was added to the in-game options menu, and as such since then I get the error in my testing becuase WXLauncher doesn't play nice with the in-mod options for reasons I am not really willing to research (on account of it being pretty obsolete, it's just that the BPC repo is set-up with it in mind).