Opened 12 months ago

Last modified 12 months ago

#10732 new defect

AGI: Per game volume setting changed (saved!) by ScummVM on game start

Reported by: raziel- Owned by:
Priority: normal Component: Engine: AGI
Keywords: Cc:
Game: King's Quest 2

Description

ScummVM 2.1.0git (Oct 6 2018 10:53:00)
Features compiled in: Vorbis FLAC MP3 RGB zLib MPEG2 Theora AAC FreeType2 JPEG PNG cloud (servers, local)

First of all, sorry if this has been reported to the bug tracker already, for some reason i remember gathering information for this bug a few months back already...i couldn't find any entry though. Might have been the forums...

I found a really strange and annoying behaviour with some AGI (fan) games and Kings Quest II from Sierra.
No other Sierra titles are affected.

I normally use the volume setting in "Options" to globally set the the available volumes for all games.
Sometimes that isn't possible though, because some games use speech, merged together with music, from a big sound file (i.e. Gobliiins CD) and that would be too loud, as i tend to lower the music volume to better understand spoken dialogue.

Lately i found out about some games that nearly blow my speakers because of the volume set to max per game.
I went along and changed them by unchecking the "Override" option...and tried again...to no avail.

There are some games that unknowingly set their own volume (per game) and also write them to the .ini file (which is bad imho).
They also don't respect a users setting by either erasing the per game setting out of the .ini file or unchecking said "Override" setting...the volume setting will be back on restarting the games, which is even worse, because i don't want ScummVM to write a per game setting which i don't like and could possibly harm my hardware (exaggerating).

I have yet to find out what ScummVM uses to set the per game volume to, probably the setting it still has saved somewhere, or the setting that was last used by me, but they are different on every game.

The games in question that suffer this behaviour so far are:

Sierra
King's Quest II: Romancing the Throne (2.1 1987-04-10/DOS/English)

Fan
Enclosure (v1.03) (DOS/English)
(There's a catch with this game as i get the following message in console when playing it: Broken volume in fan game detected, enabling workaround - which doesn't fix the volume problem though)
Space Quest 0: Replicated (v1.04/DOS/English)
Space Quest II: X - The Lost Chapter (v10.0 Jul 18/DOS/English)
The Gourd of the Beans (DOS/English)
URI Quest (v0.173 Feb 27) (DOS/English)
Voodoo Girl - Queen of the Darned (v1.2 2002 Jan 1) (DOS/English)

and probably more, but i haven't installed any more fan games to test for now.

AmigaOS4 - PPC - SDL - BE
gcc (adtools build 8.1.0) 8.1.0

Change History (11)

comment:1 by digitall, 12 months ago

The relevant code which is causing this issue is here:
https://github.com/scummvm/scummvm/blob/master/engines/agi/global.cpp#L89
and
https://github.com/scummvm/scummvm/blob/master/engines/agi/global.cpp#L136

I think the issue is that this allows the scripts to override any configured setting without thought that the user may have manually adjusted this. I think the main culprit are the two lines here:
https://github.com/scummvm/scummvm/blob/master/engines/agi/global.cpp#L123 and 124

If those two lines are commented out, the manually configured settings should be respected ... though the script can always override them at runtime the changed volume value will not be saved.

comment:2 by digitall, 12 months ago

I think the issue is partly about the usage of value 15 to indicate Mute, but misinterpreted by some fangames as maximum volume requiring the workaround hack which is indicated by the message you referred to. We should probably add a GAMEOPTION flag to the entries to indicate which games should have that instead of the possible unreliable autodetection.

If you or anyone else works out a good solution to this, then a patch or Pull Request would be welcome.

comment:3 by raziel-, 12 months ago

Thank you for the quick reply.

UInfortunately i won't be able to do it, i can't code and the best solution i could come up with is commenting those two lines out, as you suggested ;-)

comment:4 by raziel-, 12 months ago

Would be interesting to know why KQ II is affected as well, though

comment:5 by m-kiewitz, 12 months ago

I'm not sure about this.
One could make the ScumMVM volume setting separate and add both volume settings together to create the final volume setting.

Back then when I wrote the code I wanted to make the volume setting within AGI also control the ScummVM volume setting and vice versa. SCI does it the same way, otherwise it gets a bit confusing.

When exactly is the global volume set? On game startup only? During the game?

One could auto detect such overrides at the start of the game and ignore them.
Would have to look into the code again, will have lots of free time next month and wanted to take a look at those things.

comment:6 by digitall, 12 months ago

@m-kiewitz: Thanks. Hope you have time to take a look

comment:7 by raziel-, 12 months ago

@m-kiewitz

Thank you for taking a lookl

Do you need a more complete list of games which suffer from this behaviour?
I could try with all the fan games i can find/test. As the behaviour is triggered on start of the game, it should be "easy" (but time consuming) to install, run and test all games.

comment:8 by m-kiewitz, 12 months ago

@raziel-
That would be really useful.
If possible also check when the volume is actually set. As I said, I could simply block the call(s) when they happen during the first frame or something like that.

comment:9 by raziel-, 12 months ago

Will do.

Well i can't provide a "professional" check, but i found that i can set or unset the per-game volume while in the launcher, it saves it (closed ScummVM and checked manually in scummvm.ini), but once i start the game it's overruled and set to full volume.

So, i guess it's set to "full" volume
(not global volume, as global volume is set to
music_volume=128
sfx_volume=192
speech_volume=256
in Options here, which should also sound much lower than what the games actually start with)
once the game starts (and also after the game has startet and i "RTL" the new setting has been set and saved to the .ini).

wrt the special case of "Enclosure":
This was set while in-game, i think on the first scene when ego wakes up, but i'm not sure, will check again)

comment:10 by raziel-, 12 months ago

@m-kiewitz

Here you go...the most complete list and check of AGI fangames i could come up with. There may be more, but i haven't found them. If you need more info, just shout. I hope this helps...

Legend:

  • X means Yes, O means No, a question mark means i could not test it because of what the note says.
  • The first X or O means that the game is affected by changing the volume on start of the game and saving it to the .ini file on RTL by itself.
  • The second X or O means that it shows the "Broken volume in fan game detected, enabling workaround" which btw appears when the engine starts.
  • A note after the game's name means that the game does something unexpected.

The orignal Sierra games i wasn't able to test are Mixed-Up Mother Goose, Manhunter 1 and 2, The Black Cauldron, Christmas Card 1986, Police Quest, Space Quest, King's Quest and King's Quest IV as i don't own them.

X O - AGI Combat Beta - Fanmade AGI game (Unknown v2 Game/DOS) --> Not in the entry list yet (trac #10739)
X X - Sarien - Fanmade AGI game (Unknown v2 Game/DOS) --> Not in the entry list yet (trac #10739)

X X - 2 Player Demo (DOS/English)
O O - Abrah: L'orphelin de l'espace (v1.2) (DOS/French)
X X - Acidopolis (DOS/English)
X X - Agent 0055 (v1.0) (DOS/English)
X X - Agent 06 vs. The Super Nazi (DOS/English)
X X - Agent Quest (DOS/English)
X O - AGI Combat (DOS/English)
X X - AGI Mouse Demo 1.00 (DOS/English)
X X - AGI Piano (v1.0) (DOS/English)
X O - AGI Quest (v1.46-TJ0) (DOS/English)
O O - AGI Tetris (1998) (DOS/English)
X O - AGI Tetris (DOS/English) --> NOTE: This game sets all volumes to "0" instead of 256 like most other games
X X - AGI Trek (Demo) (DOS/English)
X X - AGI256-2 Demo (DOS/English)
X O - Al Pond - On Holiday (v1.3) (DOS/English)
X X - Al Pond 1 - Al Lives Forever (v1.3) (DOS/English)
X O - Apocalyptic Quest (v4.00 Alpha 2) (DOS/English)

X X - Band Quest (Demo) (DOS/English)
X X - Beyond the Titanic 2 (DOS/English)
? ? - Biri Quest 1 (DOS/English) --> Assertion on start (trac #10736)
X O - Bob The Farmboy (DOS/English)
X X - Boring Man 1: The Toad to Robinland (DOS/English)
X X - Boring Man 2: Ho Man! This Game Sucks! (DOS/English)
X X - Botz (DOS/English)
X O - Brian's Quest (v1.0) (DOS/English)

X O - Caitlyn's Destiny (DOS/English)
X O - Car Driver (v1.1) (DOS/English)
X X - Coco Coq (English) - Coco Coq In Grostesteing's Base (v.1.0.3) (DOS/English)
X X - Corby's Murder Mystery (v1.0) (DOS/English)
X X - CPU-21 (v1.0) (DOS/English)

X X - Dashiki (16 Colors) (DOS/English)
X X - Dashiki (256 Colors) (DOS/English)
X X - Date Quest 1 (v1.0) (DOS/English)
X X - Date Quest 2 (v1.0) (DOS/English)
X X - Dave's Quest (v0.17) (DOS/English)
X X - DG: The Adventure Game (English v1.1) (DOS/English)
X X - DG: The AGIMouse Adventure (English v1.1) (DOS/English) --> NOTE: Game/ScummVM freezes when clicking on the suitcase or map(?) icon on the top right (trac #10737)
X X - Disco Nights (Demo) (DOS/English)
X X - Dogs Quest - The Quest for the Golden Bone (v1.0) (DOS/English)
X O - Dr. Jummybummy's Space Adventure (DOS/English)

X O - Ed Ward (DOS/English)
X X - Elfintard (DOS/English)
X X - Enclosure (v1.03) (DOS/English)
O O - Escape from the Desert (beta 1) (DOS/English)
X O - Escape from the Salesman (DOS/English)
X X - Escape Quest (v0.0.3) (DOS/English)

X X - Fu$k Quest 1 (DOS/English)
X X - Fu$k Quest 1 (final) (DOS/English)
X X - Fu$k Quest 2 - Romancing the Bone (DOS/English)

X X - Gennadi Tahab Autot - Mission Pack 1 - Kuressaare (DOS/English)
X X - Get Outta Space Quest (DOS/English)
X X - Go West, Young Hippie (DOS/English)
O O - Good Man (demo v3.41) (DOS/English)
O O - Groza (russian) [AGDS sample] (DOS/Russian)

X X - Half-Death - Terror At White-Mesa (DOS/English)
X O - Hank's Quest (v1.81 English) - Victim of Society (DOS/English)
X X - Herbao (v0.2) (DOS/English)
X X - Hitler's Legacy (v.0004q) (DOS/English)

X X - Isabella Coq - A Present For My Dad (DOS/English)

X X - Jack & Julia - VAMPYR (DOS/English)
X X - Jeff's Quest (v.5 alpha Jun 1) (DOS/English)
X X - Jen's Quest (Demo 2) (DOS/English)
X O - Jiggy Jiggy Uh! Uh! (DOS/English)
X O - Jimmy In: The Alien Attack (v0.1) (DOS/English)
X O - Joe McMuffin In "What's Cooking, Doc" (v1.0) (DOS/English)
X X - Jolimie, le Village Maudit (v1.1) (DOS/French)
X O - Journey Of Chef (DOS/English)
X X - Jukebox (v1.0) (DOS/English)
X X - Justin Quest (v1.0 in development) (DOS/English)
X X - Jõulumaa (v0.05) (Estonian) (DOS/English)

O O - Kings Quest 2 - Breast Intentions (v2.0 Mar 26) (DOS/English)

X O - Lasse Holm: The Quest for Revenge (v1.0) (DOS/English)
X X - Lawman for Hire (DOS/English)
X O - Lefty Goes on Vacation (Not in The Right Place) (DOS/English)
X X - Les Insãparables (v1.0) (DOS/English)
X O - Little Pirate (Demo 2 v0.6) (DOS/English)
X O - Lost Eternity (v1.0) (DOS/English)

X O - Maale Adummin Quest (DOS/English)
X X - MD Quest - The Search for Michiel (v0.10) (DOS/English)
X X - Monkey Man (DOS/English)

X X - Napalm Quest (v0.5) (DOS/English)
X O - Naturette 1 (English v1.3) (DOS/English) --> NOTE: This game sets all volumes to "0" instead of 256 like most other games
X X - Naturette 2: Daughter of the Moon (v1.0) (DOS/English)
X X - Naturette 3: Adventure in Treeworld (v1.0a) (DOS/English)
X X - Naturette 4: From a Planet to Another Planet (2007-10-05) (DOS/English)
X X - New AGI Hangman Test (DOS/English)
X X - Nick's Quest - In Pursuit of QuakeMovie (v2.1 Gold) (DOS/English) --> NOTE: This game sets all volumes to "0" instead of 256 like most other games

X X - Open Mic Night (v0.1) (DOS/English)
X X - Operation: Recon (DOS/English) --> This just a Tech Demo, clicking or pressing Enter will shut down ScummVM (trac #10738)

X X - Patrick's Quest (Demo v1.0) (DOS/English)
X X - Phantasmagoria (DOS/English)
X X - Pharaoh Quest (v0.0) (DOS/English)
X X - Phil's Quest - the Search for Tolbaga (DOS/English)
X O - Pinkun Maze Quest (v0.1) (DOS/English)
X O - Pirate Quest (DOS/English)
X O - Pothead (v0.1) (DOS/English)
X X - President's Quest (DOS/English)
X O - Professor (English) - The Professor is Missing (Mar 22) (DOS/English)
X O - Professor (French) - Le Professeur a Disparu (DOS/French)

X O - Quest for a Record Deal (DOS/English)
X X - Quest for Glory VI - Hero's Adventure (DOS/English)
X X - Quest for Home (DOS/English)
X O - Quest for Ladies (demo v1.1 Apr 6) (DOS/English)

X X - Ralph's Quest (v0.1) (DOS/English)
X X - Residence 44 Quest (English v1.0a) (DOS/English)

X O - Save Santa (v1.3) (DOS/English)
X X - Schiller (preview 1) (DOS/English) --> When this demo ends it will shut down ScummVM (trac #10738)
X X - Serguei's Destiny 1 (v1.1 2002 Sep 5/DOS/English)
X X - Serguei's Destiny 1 (v1.1 2003 Apr 10/DOS/English)
X O - Shifty (v1.0) (DOS/English) --> NOTE: This game sets all volumes to "17" instead of 256 like most other games
X X - Sliding Tile Game (v1.00) (DOS/English)
X X - Snowboarding Demo (v1.0) (DOS/English)
X O - Solar System Tour (DOS/English)
X X - Sorceror's Appraisal (DOS/English)
X O - Space Quest 0: Replicated (v1.04/DOS/English)
X O - Space Quest X: The Lost Chapter (v10.0 Jul 18/DOS/English) --> NOTE: This game sets all volumes to "0" instead of 256 like most other games
X X - Space Trek (v1.0) (DOS/English)
X X - Special Delivery (DOS/English)
X X - Speeder Bike Challenge (v1.0) (DOS/English)
X X - Star Commander 1 - The Escape (v1.0) (DOS/English)
X O - Star Pilot: Bigger Fish (DOS/English) --> NOTE: This game sets all volumes to "204" instead of 256 like most other games
X O - Street Quest (Demo) (DOS/English)

X O - Tales of the Tiki (DOS/English)
X X - Tex McPhilip 1 - Quest For The Papacy (DOS/English)
X X - Tex McPhilip 2 - Road To Divinity (v1.5) (DOS/English)
X X - Tex McPhilip 3 - A Destiny of Sin (Demo v0.25) (DOS/English)
X X - The 13th Disciple (v1.01) (DOS/English)
X X - The Adventures of a Crazed Hermit (DOS/English) --> NOTE: This game features two "Broken volume..." messages on start
X O - The Gourd of the Beans (DOS/English)
X X - The Grateful Dead (DOS/English)
X X - The Legend of Shay-Larah 1 - The Lost Prince (DOS/English)
X X - The Legend of Zelda: The Fungus of Time (Demo v1.00) (DOS/English)
X X- The Legendary Harry Soupsmith (Demo 1998 Aug 19) (DOS/English)
X X - The Long Haired Dude: Encounter of the 18-th Kind (DOS/English)
X X - The Lost Planet (v1.0) (DOS/English)
X X - The New Adventure of Roger Wilco (v1.00) (DOS/English)
X X - The Ruby Cast (v0.02) (DOS/English)
X X - The Shadow Plan (DOS/English)
X X - Time Quest (Demo v0.2) (DOS/English)
X X - Toby's World (Demo) (DOS/English)
X X - Tonight The Shrieking Corpses Bleed (v1.01) (DOS/English)
X X - Turks' Quest - Heir to the Planet (DOS/English)

X O - Ultimate AGI Fangame (Demo) (DOS/English)
X X - URI Quest (v0.173 Feb 27) DOS/English)

X X - V - The Graphical Adventure (Demo 2) (DOS/English)
X O - Voodoo Girl - Queen of the Darned (v1.2.2002 Jan 1) (DOS/English)

X O - Wizaro (v0.1) (DOS/English) --> Answer any wizard's question with "no" will shut down ScummVM (trac #10738)

comment:11 by m-kiewitz, 12 months ago

@raziel-
Fantastic work.

"The orignal Sierra games i wasn't able to test are Mixed-Up Mother Goose, Manhunter 1 and 2, The Black Cauldron, Christmas Card 1986, Police Quest, Space Quest, King's Quest and King's Quest IV as i don't own them."

Don't worry. I do.

Note: See TracTickets for help on using tickets.