Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Jul 23, 2025

This change implements a 'MoneyTransactionVolume' option to control the volume of money deposit and withdraw audio events, via Options.ini.

Generals will begin with MoneyTransactionVolume = 100
Zero Hour will begin with MoneyTransactionVolume = 0

The main purpose of this change is that Zero Hour (and Generals) players will not need to suffer from money audio spam when setting the option value to 0.

Audio spam

MY_EARS.mp4

TODO

  • Replicate in Generals
  • Add comments for why default values are chosen

@xezon xezon added Audio Is audio related Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Jul 23, 2025
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we perhaps start Generals with default 0 as well?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would choose a default that fits best with the "best game ever" description, rather then set is a value that mimics the current game experience.

Maybe 0.25?
Or is it considered to be so annoying that we want to have it off by default?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Data, the volume is set to 0.30. So 0.30 * 0.25 would make it 0.075 - very quiet.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would say that very quiet is still better than being as noticeable as it currently is for a lot of people. But we could always play about with it, i can get some people to test and see what they think.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a problem with this sound is that its limit in data is set to 3. It should have been 1. One sound at a time only. So the spam can be greatly reduced from data side.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xezon

in CCG, is the MONEY tick audio considered to be annoying or fine?

Scotsman

It's never bothered me and I have never heard of anyone mentioning it so probably the latter

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "MoneyTickVolume" an acceptable name or is there a better one?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MoneyChangedVolume?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MoneyDepositVolume?

Copy link

@ghost ghost Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MoneyChangedVolume?

Based on that name that would imply that the sound should play even when losing money. Like if someone uses a cash hack on you.

Unless it already does and I just never hear it? (I personally typically only notice it when it's rapidly increasing, like when you have a bunch of hackers)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on that name that would imply that the sound should play even when losing money. Like if someone uses a cash hack on you.

Unless it already does and I just never hear it? (I personally typically only notice it when it's rapidly increasing, like when you have a bunch of hackers)

it plays on deposit and withdrawal. You just don't tend to hear it on withdrawal since a load of other construction related sounds tend to play, or button press sounds etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MoneyChangedVolume works.
MoneyUpdatedVolume too.

Alternatively

MoneyTransferVolume
MoneyTransactionVolume

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to MoneyTransactionVolume

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on that name that would imply that the sound should play even when losing money. Like if someone uses a cash hack on you.
Unless it already does and I just never hear it? (I personally typically only notice it when it's rapidly increasing, like when you have a bunch of hackers)

it plays on deposit and withdrawal. You just don't tend to hear it on withdrawal since a load of other construction related sounds tend to play, or button press sounds etc.

Well, even after around 20 years of playing this game I learned something new.

@xezon
Copy link
Author

xezon commented Jul 23, 2025

Generals fails to compile until code is replicated.

@xezon xezon changed the title [GEN][ZH] Implement 'MoneyTickVolume' option to control volume of money deposit and withdraw audio events [GEN][ZH] Implement 'MoneyTransactionVolume' option to control volume of money deposit and withdraw audio events Jul 24, 2025
Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, i think the complaints are due to it missing on the generals side.

Also did we want to get a wider view on having the sound enabled by default but at a low level?

Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

@xezon xezon added the Enhancement Is new feature or request label Jul 28, 2025
@xezon xezon force-pushed the xezon/add-money-tick-audio-config branch from c8ec031 to 4085829 Compare July 28, 2025 16:48
@xezon xezon changed the title [GEN][ZH] Implement 'MoneyTransactionVolume' option to control volume of money deposit and withdraw audio events feat(audio): Implement 'MoneyTransactionVolume' option to modify the volume of money deposit and withdraw audio events Jul 28, 2025
@xezon
Copy link
Author

xezon commented Jul 28, 2025

Tested once more in Generals and Zero Hour. Worked.

Replicated in Generals with conflicts

D:\Projects\TheSuperHackers\GeneralsGameCode>FOR /F "delims=" %b IN ('git merge-base --fork-point main') DO git diff %b  1>changes.patch

D:\Projects\TheSuperHackers\GeneralsGameCode>git diff 0dd58aad54dd36532f77e2e3cab13093bfeb55bf  1>changes.patch

D:\Projects\TheSuperHackers\GeneralsGameCode>git apply -p2 --directory=Generals --reject --whitespace=fix changes.patch
changes.patch:132: trailing whitespace.

changes.patch:144: trailing whitespace.

changes.patch:194: space before tab in indent.
        //-------------------------------------------------------------------------------------------------
changes.patch:195: space before tab in indent.
        // slider Gamma
changes.patch:196: space before tab in indent.
        val = GadgetSliderGetPosition(sliderGamma);
Checking patch Generals/GameEngine/Include/Common/AudioSettings.h...
error: Generals/GameEngine/Include/Common/AudioSettings.h: No such file or directory
Checking patch Generals/GameEngine/Source/Common/Audio/GameAudio.cpp...
error: Generals/GameEngine/Source/Common/Audio/GameAudio.cpp: No such file or directory
Checking patch Generals/Code/GameEngine/Include/Common/Money.h...
Checking patch Generals/Code/GameEngine/Include/Common/UserPreferences.h...
Hunk #1 succeeded at 102 (offset -4 lines).
Checking patch Generals/Code/GameEngine/Source/Common/RTS/Money.cpp...
error: while searching for:
        }
}

// ------------------------------------------------------------------------------------------------
/** CRC */
// ------------------------------------------------------------------------------------------------

error: patch failed: Generals/Code/GameEngine/Source/Common/RTS/Money.cpp:107
Checking patch Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp...
Hunk #1 succeeded at 725 (offset -44 lines).
Hunk #2 succeeded at 1208 (offset -60 lines).
Applied patch Generals/Code/GameEngine/Include/Common/Money.h cleanly.
Applied patch Generals/Code/GameEngine/Include/Common/UserPreferences.h cleanly.
Applying patch Generals/Code/GameEngine/Source/Common/RTS/Money.cpp with 1 reject...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Rejected hunk #4.
Applied patch Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/OptionsMenu.cpp cleanly.

@xezon xezon merged commit 1969d0a into TheSuperHackers:main Jul 28, 2025
16 checks passed
@xezon xezon deleted the xezon/add-money-tick-audio-config branch July 28, 2025 17:03
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
…volume of money deposit and withdraw audio events (TheSuperHackers#1353)

In Options.ini add MoneyTransactionVolume=0 to turn off and MoneyTransactionVolume=100 to turn on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Audio Is audio related Enhancement Is new feature or request Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants