 |
Using
the fix |
|
|
|
 |
Other
questions |
|
|
|
| |
|
Using the fix |
The fix is
totally safe. It makes no changes to your PC outside of the game
files and it works by
simply playing all the sounds a chapter uses prior to starting a
chapter, in much the same way they are played in the game. This
causes the sounds to be cached in your PCs RAM, and as a result
they may be accessed much faster when required
In the case
of the main game's files, it does not overwrite any game files
and, unless you add the entries from the autoexec.cfg provided it
makes no changes to the normal operation of Half Life 2. It only
does anything when you run one of the files manually from the
console and the changes only last for the duration of that game.
If you no longer wish to use the fix then simply do not load a
sound file next time you play. You do not need to even delete the
files from your cfg folder, although of course you are free to do
so if you wish.
In the case
of the Lost Coast files there is one file, "Chapter1.cfg", which
causes the sounds to be loaded when you start a new game. To stop
using the fix you will need to delete this from your Lost Coast
cfg folder.
One word of
caution, if you set the game's heapsize too high for your
available RAM there will no longer be enough free RAM for
essential Windows processes. This will cause your PC to run very
slowly and in extreme circumstances, impossible if you follow the
instructions carefully, it could even crash your PC. In this
unlikely situation your PC will be fine after a reboot. However,
before running Half Life 2 again you will need to either stop
unnecessary applications or processes to make more room for Half
Life 2, reduce your heapsize or increase your RAM. However, you
should not reduce your heapsize below the level recommended for
the files you are using, if you do the fix will not work and it is
likely Half Life 2 will run worse than without the fix.
Top
To change
your heapsize:
- Open the
Steam 'games' window and click on 'properties' for Half Life 2
(or whichever game/mod you are planning on playing).
- Click on
'Launch options'
- Type "-heapsize
nnnnnn" (without the quotes) where "nnnnnn" is the heapsize you
require.
For Half Life 2 especially, you may also
want to add "-console", e.g. "-heapsize 716800 -console", which
will automatically load the console when the game starts. This
will make it easy for you to load the necessary sound files before
starting play (not necessary with Lost Coast, Minerva or CS:S) and
also disables the 3D menu background. resulting in a faster load
time.
Top
There is no
way (without Valve help, which at the moment doesn't seem likely)
to automatically load the cfg when you load a saved game or when
you move from one chapter to another whilst playing the game. As I
result I felt it was more confusing than helpful to have the game
'sometimes' load the cfg automatically.
cfg files
are simple text files which you can create using Notepad. It is
possible to create a cfg file called "Chaptern.cfg", which you
store in the same folder as the others. This needs to first
execute the right cfg from the package and then load the first map
of the chapter e.g.
exec 001@Point_Insertion.cfg
map
d1_trainstation_01
The game
will then automatically load the right sounds when you start a
"new game" on that chapter, but not when you load one of your own
saved games and not when you move from one chapter to another in
the game. Then you still need to execute the cfg file manually.
Feel free to make your own files if you feel they will be helpful.
I have
actually implemented this for "Lost Coast", which only has one
chapter and where you are most likely to start a new game every
time you play. So there is an example of a chapter cfg file in the
lc_cfg folder.
If you
intend on playing the same bit a lot you can also add an exec
command to load the relevant cfg in your valve.rc file (in the
same folder as the cfg's and also a simple text file). This will
then load a set of sounds every time you start HL2. But you need
to remember to change when you move to a different bit of the
game. This is more useful if you have 2GB or more RAM, as you can
load cfg's less often (see below).
Top
You can make
your own that have the contents of several chapters in them e.g.
echo
"Flushing sound cache..."
snd_flushasync
echo "Loading Point Insertion sounds..."
echo "Built by the Steam Community"
echo "Sounds revealed by MaLDo and Jong"
echo "Packaged by Jong"
echo "Original concept by MaLDo"
exec ch_001.cfg
exec ch_001.cfg
exec trainstation.cfg
exec trainstation.cfg
echo "Loading Red Letter Day sounds..."
exec ch_002.cfg
exec ch_002.cfg
exec train_lab.cfg
exec train_lab.cfg
echo "Sound preloading complete."
BUT!!!
Things go badly wrong if you ever overflow the cache - either
during the pre-loading phase or whilst playing - the system
flushes the cache for you and you lose all your cached sounds. You
need to be sure you have enough cache for all the sounds you are
going to encounter. Probably the biggest chapter, Anticitizen One,
uses 95% of the cache when the heap is set to 700MB. You will not
be able to load multiple chapters in many cases if at all with a
700MB heap.
On the good side there are sometimes massive overlaps in sounds
from one chapter to another and sounds only get loaded once so
loading multiple chapters does not result in as much cache usage
as you might think. For example, Anticitizen One and Follow
Freeman use many of the same sounds, so adding those together results in only a modest increase in cache.
The best way
to build a file which loads more sounds is to first increase your
heapsize appropriately (MaLDo reports that you can actually use a
2GB heapsize with 2GB of RAM), then progressively add an extra
chapters' sounds to your new cfg file, one at a time. After each
addition load the new set of sounds and then type "snd_memasync"
(without the quotes) into the console. This lists all sounds
loaded and at the end says how much of your cache is in use. As
long as the cache used increases when you add a new chapter is
added you are fine. If suddenly the cache percentage in use drops
this indicates you overflowed your cache and all the sounds loaded
to that point were flushed out. You will then need to remove the
sounds for the last chapter from your file and start a new file
for this and subsequent chapters.
Top
|
|
Other questions |
Stuttering
is a symptom of a number of problems and not a single problem in
itself. The Audio Loading Fix can only address stuttering caused
by the loading of audio sounds. This is typically the last cause
left when all other problems with a users PC have been eliminated.
This web
site is not intended to duplicate the work done by many others to
address the more general stuttering issue with Half Life 2.
However, for completeness here are a few tips that may help. You
may also wish to check the
Steam Forum, which always has a number of stuttering threads
on the go!
Common Causes of stuttering
It is worth noting
that many old stuttering tips (from late 2004, before the earlier
Valve fixes) are now more dangerous than helpful. Generally it is
now better not to tweak your config.cfg file or add to your
autoexec.cfg file. Deleting these files and allowing Steam to
recreate them, as above, is often the best way of getting back to
a known, working state.
Top
-
Temporarily (whilst collecting sounds only) change the launch
options for Half Life 2 to include "-condebug"
- Open the
game at the main menu
- If you
wish to use an existing list of sounds as a starting point then
'exec' that .cfg file first before loading the map/chapter/game you wish
to play
-
Immediately type 'snd_memasync'
into the console and make a note of the last few sounds that
appear (if any). Any newly captured sounds will appear after
these in the list
- Load your
game and start playing
- Every few
minutes "quicksave", then bring up the console, and enter 'snd_memasync'.
This provides a 'checkpoint' in case HL2 crashes.
- At the
end of the map/chapter/game, close the game and open the file
"console.log" in the game folder (C:\Program
Files\Valve\Steam\SteamApps\<account name>\half-life 2\hl2).
- Scroll to
the end of the file and copy and past the results of the very
last "snd_memasync" command to your favourite text editor (if
you have completed your run without any crashes you can ignore
all the checkpoints).
- Delete
everything from the beginning of the file up to the first new
sound you discovered (the first sound to be listed after any
sounds that appeared at step 4 above).
- Delete
everything that appears at the end of the file, after the last
sound.
You
should have file which looks like this (sounds shown are
examples only):
14.40 Kb : npc\combine_soldier\vo\dagger.wav
10.32 Kb : npc\combine_soldier\vo\seven.wav
35.26 Kb : npc\combine_soldier\vo\hardenthatposition.wav
14.54 Kb : npc\combine_soldier\vo\hunter.wav
19.12 Kb :
physics\metal\metal_grenade_impact_hard2.wav
31.38 Kb : npc\combine_soldier\vo\contactconfim.wav
15.68 Kb : npc\combine_soldier\vo\fifteen.wav
6.71 Kb : npc\combine_soldier\vo\fist.wav
38.00 Kb : npc\combine_soldier\vo\targetcontactat.wav
30.00 Kb : weapons\debris3.wav
9.41 Kb : npc\combine_soldier\vo\dash.wav
17.02 Kb : npc\combine_soldier\vo\range.wav
100.54 Kb : ambient\levels\streetwar\city_battle5.wav
198.83 Kb :
physics\metal\metal_box_scrape_smooth_loop1.wav
17.75 Kb :
physics\surfaces\tile_impact_bullet3.wav
17.24 Kb :
physics\surfaces\tile_impact_bullet1.wav
......................etc
......................etc
- Now use your
text editor/word processor to remove everything for the beginning
of each line up to and including the ":" and replace with "Play "
- Add "Stopsound"
to the very end of the file, after the last Play command.
You should
now have a file which looks like this:
Play npc\combine_soldier\vo\dagger.wav
Play npc\combine_soldier\vo\seven.wav
Play npc\combine_soldier\vo\hardenthatposition.wav
Play npc\combine_soldier\vo\hunter.wav
Play
physics\metal\metal_grenade_impact_hard2.wav
Play npc\combine_soldier\vo\contactconfim.wav
Play npc\combine_soldier\vo\fifteen.wav
Play npc\combine_soldier\vo\fist.wav
Play npc\combine_soldier\vo\targetcontactat.wav
Play weapons\debris3.wav
Play npc\combine_soldier\vo\dash.wav
Play npc\combine_soldier\vo\range.wav
Play ambient\levels\streetwar\city_battle5.wav
Play
physics\metal\metal_box_scrape_smooth_loop1.wav
Play
physics\surfaces\tile_impact_bullet3.wav
Play
physics\surfaces\tile_impact_bullet1.wav
....................etc
Stopsound
- Save the
file as "xxxxx.cfg", where "xxxxx" is anything you like.
- Now use your
text editor to make another .cfg file with a name of your choosing
(starting it with a "0" can make it easy to find as there are no
other cfg's with this as their first letter). In this example I
have called it "001.cfg"
- Put "snd_flushasync"
as the first line
- If you used
an existing sound file as a start point then enter lines to 'exec' that file twice
first
- Then enter
lines to 'exec' your file with the newly captured sounds (xxxxx.cfg) twice
- So you end
up with a file that looks something like
-
snd_flushasync
exec yyyyy.cfg
exec yyyyy.cfg
exec xxxxx.cfg
exec xxxxx.cfg
-
Now you can simply
reload the game, execute "001.cfg" (or whatever you called it) and play.
If the game crashes at any point you can use steps 7-19 to make a
sound file for all the sounds up to the point of your last save.
You should then go through the steps again, "exec 001.cfg" at step
3, reload the last quicksave at step 5 and start capturing the
sounds up to the end of the map/chapter/game. Remember to only add
new sounds that appear after the last sound displayed at step 4 of
your new run. You can add the newly collected sounds to your
original sound file (in this example, xxxxx.cfg), before the
final "Stopsound".
Normally
I would recommend going through this whole process at least two
times, the second time loading 001.cfg, at step 2 above, before collecting sounds.
The second pass almost always finds more sounds and, at the very
least, will reassure you you have most captured. If you have
captured the sounds correctly you should not find more than about
5-10 new sounds per map. You can add the newly collected sounds to
your original sound file (in this example, xxxxx.cfg), before the
final "Stopsound".
NB: You MUST exit
the game and reload it before trying to create a different sound
file e.g. for a different chapter or map. once a sound has been
loaded once it is allocated a space in the sound cache 'index'.
Even if you flush (empty) the sound cache the sound still retains
a place in the list, marked 'not resident'. If a subsequent
chapter/map plays the same sound the old space is re-utilised, the
sound does not appear at the end of the list and is likely to be
missed when capturing the sounds.
Top
|
|