Home   Help Search Login Register  

Author Topic: Saving Games Breaks Custom Sounds  (Read 1075 times)

0 Members and 1 Guest are viewing this topic.

Offline Bruce Pech

  • Members
  • *
Saving Games Breaks Custom Sounds
« on: 21 Sep 2007, 00:33:34 »
 ???

I'm cross-posting this question which I submitted to the BIS OFP Mission Editing and Scripting Forum a few days ago.

"Back in 2003, Blanco posted the following question and received no replies:
 
'All my missions have a lot of custom sounds (CfgSounds,CfgRadio,CfgMusic,CfgEnvSounds & CfgSFX).When I use CfgEnvSounds and I save and reload or retry my mission the sounds disappear. That's a pity cos all the efforts to create a mission with a lot atmosphere are useluss because of that. Also custom music won't play anymore after a reload. I don't care about the music, but when you do you best to add several CfgEnvSounds, after a save/reload/retry everything is quiet... Is this a OFP-bug since the beginning? Is there a solution?'

I've been fooling around editing user-made missions for ffur05 and ffsx07 and discovered that any of the four save functions (a savegame trigger, the menu "save" and "abort" options, and the cheat) break custom voices, radio messages, music, and, often, the accompanying subtitles, when a saved game is reloaded. To judge by the error messages -- e.g., "voice1 file not found" or something similar -- the saved game doesn't retain the the cfgSounds, cfgRadio, etc. data in the mission's description.ext file.

Strangely, the problem only occurs when a mission is played from the OFP missions folder; not when it's played by previewing it in the editor.

Careful examination of the description.ext files, the sound files, and the stringtable files doesn't turn up any obvious scripting errors. (Two of the affected missions are General Barron's well-regarded "Platoon Commander" and the excellent OFPEC contest entry "Morning Dew" -- both of which are expertly and carefully scripted). Moreover, the problem occurs in when playing the missions in plain vanilla OFP v1.96 as well as in ffur05 and ffsx07.

Do any of you scripting gurus have an explanation and/or fix for the problem? Or is this just another example of the unfixable savegame bug mucking things up?"

Thanks in advance,
gnossos

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Saving Games Breaks Custom Sounds
« Reply #1 on: 21 Sep 2007, 01:26:37 »
Interesting

I would tend to think that sound/music etc data is never saved with a mission as there isn't much need or reason to do so, the save game just concerns itself with saving the status of the game.

I think it must stem from the fact that the description.ext is probably not run again on a reload of a save game.
Probably something simple like that.


Planck
I know a little about a lot, and a lot about a little.

Offline Bruce Pech

  • Members
  • *
Re: Saving Games Breaks Custom Sounds
« Reply #2 on: 25 Sep 2007, 22:09:57 »
Planck wrote:

Quote
I think it must stem from the fact that the description.ext is probably not run again on a reload of a save game.
Probably something simple like that.

I think you're right. For example, if "GPS=1" is added to a mission's description.ext file, the GPS will appear in the in-game map but vanish when a saved game is reloaded. Oh well ....

Bruce