Author Topic: Demo playback sound?  (Read 31423 times)

Cryfire

  • Lieutenant
  • ***
  • Posts: 56
Demo playback sound?
« on: December 28, 2012, 09:31:59 AM »
I was wondering if there was any way to get the sound to work again when playing demos? It's nice to play them and see what was but would be so much better if the sound worked again.

Hotaru

  • Lieutenant
  • ***
  • Posts: 77
  • Just a demo-loving fool in the Far East...
Re: Demo playback sound?
« Reply #1 on: December 28, 2012, 11:34:41 AM »
Sound works in demos played back with an earlier issue of the client--issue 17, possibly 18 (I'll have to pick up a Going Rogue disk to check that out, though). If you've got an earlier issue backed up to CD, that could give you your aural fix, though later parts/patterns/effects/maps might be missing from some demos.

Leandro

  • Elite Boss
  • *****
  • Posts: 310
Re: Demo playback sound?
« Reply #2 on: December 29, 2012, 10:43:49 AM »
It might be possible to patch the current client to re-enable sound in demos. I think Codewalker is looking into it.

Hotaru

  • Lieutenant
  • ***
  • Posts: 77
  • Just a demo-loving fool in the Far East...
Re: Demo playback sound?
« Reply #3 on: December 29, 2012, 11:34:46 AM »
That would be unspeakably awesome, Leandro.

therain93

  • Elite Boss
  • *****
  • Posts: 572
Re: Demo playback sound?
« Reply #4 on: December 29, 2012, 01:34:25 PM »
It might be possible to patch the current client to re-enable sound in demos. I think Codewalker is looking into it.
That would be a phenonemal accomplishment and one I look forward to, if it's in the pipeline!
@Texarkana - March 5, 2004 - December 1, 2012 -- Imageshack |-| Youtube
---------------------------------------------------------------------------------------

You don't know what it's like.... |-| Book One. Chapter one...

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #5 on: December 29, 2012, 10:59:36 PM »
How to fix demo playback sound in the Issue 24 beta client:

You'll need 1 (one) hex editor program, 2 tablespoons of sugar, and a jackhammer.

Okay, just the hex editor.

  • MAKE A BACKUP COPY OF CITYOFHEROES.EXE

  • Check that you made a backup copy of Cityofheroes.exe

  • At offset 0043788A of Cityofheroes.exe, you'll see the following sequence of bytes:

    E8 F1 18 05 00 E8 BC 10 05 00

  • Change it to:

    83 05 30 13 67 01 01 90 90 90

  • Save the changes

  • Fire up your bug fixed copy and enjoy sound in demo playback!

Working on finding the correct locations in the Issue 23 client, will make a followup post shortly.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #6 on: December 29, 2012, 11:15:46 PM »
For the Issue 23 client:

  • MAKE A BACKUP COPY OF CITYOFHEROES.EXE

  • Check that you made a backup copy of Cityofheroes.exe

  • At offset 0043A43A of Cityofheroes.exe, you'll see the following sequence of bytes:

    E8 D1 15 05 00 E8 9C 0D 05 00

  • Change it to:

    83 05 D0 D4 66 01 01 90 90 90

  • Save the changes

  • Fire up your bug fixed copy and enjoy sound in demo playback!


Michiyo

  • Titan Staff
  • Lieutenant
  • ****
  • Posts: 54
    • SGSpaces
Re: Demo playback sound?
« Reply #7 on: December 30, 2012, 01:02:15 AM »
Made a patcher for those not wanting to play with hex editors.

Link for Live Client

Link for Beta Client

corvus1970

  • Elite Boss
  • *****
  • Posts: 758
  • A true ruler is as moral as a Hurricane.
Re: Demo playback sound?
« Reply #8 on: December 30, 2012, 01:13:29 AM »
Holy crap on toast!

Codewalker, NeoRavencroft, you guys are awesome! :D
... ^o^CORVUS^o^
"...if nothing we do matters, than all that matters is what we do."
http://corvus1970.deviantart.com/

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Demo playback sound?
« Reply #9 on: December 30, 2012, 01:17:24 AM »
Tech awesome. (pardon the pun).
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #10 on: December 30, 2012, 01:37:11 AM »
The really funny part is that the bug is actually related to loading screens. Go figure.

Hotaru

  • Lieutenant
  • ***
  • Posts: 77
  • Just a demo-loving fool in the Far East...
Re: Demo playback sound?
« Reply #11 on: December 30, 2012, 01:40:08 AM »
Once again, I find myself celebrating Codewalker Xmas, which unlike plain ol' Xmas, seems to come ever few weeks. Outstanding!

NeoRavencroft, thank you so much for making it idiot simple. In the time it took me to read Codewalker's posts, hit Wikipedia for info on hex editors, and finally download one, you took care of everything. Nicely done!

Hotaru

  • Lieutenant
  • ***
  • Posts: 77
  • Just a demo-loving fool in the Far East...
Re: Demo playback sound?
« Reply #12 on: December 30, 2012, 01:43:44 AM »
The really funny part is that the bug is actually related to loading screens. Go figure.

About 2 weeks back, Floride mentioned here http://www.cohtitan.com/forum/index.php/topic,7275.0.html that it might've been turned off by the devs to stop annoying sound bugs during loading screens.

Thanks again for another awesome contribution!

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #13 on: December 30, 2012, 02:44:44 AM »
It is related to the loading screen change that Floride mentioned, but in a somewhat unexpected way.

The game keeps an internal frame counter in memory, and the main loop increments that counter for every frame that's drawn. It's not used for much, but one of the few things it is used for is to fade the volume back in after it was muted for a loading screen.

The demoplay loop however doesn't increment that counter. So the sound code thinks that you're still at a loading screen the whole time a demo is playing because the frame count is 0. So it keeps the volume at 0.

The patches above modify the demo loop to simply increment the frame counter, and then everything works properly. Since with all magic nothing is free, in order to do that I had to replace some existing instructions. I picked the ones that call a function to detect changed files, since the number of times when people need to move files around during demo playback should be close to 0.

Michiyo

  • Titan Staff
  • Lieutenant
  • ****
  • Posts: 54
    • SGSpaces
Re: Demo playback sound?
« Reply #14 on: December 30, 2012, 02:52:17 AM »
So my Scene file replacements for a fog free Echo DA won't work anymore?  Darn!  Small trade off :D

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #15 on: December 30, 2012, 02:56:42 AM »
So my Scene file replacements for a fog free Echo DA won't work anymore?  Darn!  Small trade off :D

No, those will still work. :)

The only check I removed was the one for files that are changed after the game is already started -- like if you were to drag a new replacement sound file or something in during playback. Even that only worked if the files were present on startup (you couldn't add new overrides once the game was running; just replace existing ones). So very little is lost.

And thanks for putting together that patcher so quick. Saved me the trouble of writing yet another launcher!

Michiyo

  • Titan Staff
  • Lieutenant
  • ****
  • Posts: 54
    • SGSpaces
Re: Demo playback sound?
« Reply #16 on: December 30, 2012, 03:27:14 AM »
Well my scene replacement required I rename and then rename back the skyfiles, I had a bat that did it for me.  They didn't work unless they were "New" and renaming worked.  But I'm REALLY not worried about that :p

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #17 on: December 30, 2012, 03:43:49 AM »
Oh, that's because scenes/ is one of the four excluded directories that normally is prohibited from being overridden by local files, along with ent_types/, geobin/, and object_library/.

It's pretty easy to hack that check out of the exe, I can PM you details if you want; just let me know which client version.

Hotaru

  • Lieutenant
  • ***
  • Posts: 77
  • Just a demo-loving fool in the Far East...
Re: Demo playback sound?
« Reply #18 on: December 30, 2012, 04:27:53 AM »
I'm thinking this info and the links to NeoRavencroft's executables should be given a new sticky on this board--some folks who didn't follow this past the initial exchange should be jazzed to know we now have sound luv in demos.

I'd be interested in getting some info on how to override ent_types and scenes with local files, since I have some ideas I'd like to try out (mainly with trying to get clickies to show up demo playback).

Edited to add: in i24.
« Last Edit: December 30, 2012, 10:39:07 AM by Hotaru »

Electric-Knight

  • Elite Boss
  • *****
  • Posts: 297
  • E-K and Malfaz taking a break, drinking tea
    • www.pauldamonthomas.com
Re: Demo playback sound?
« Reply #19 on: December 30, 2012, 06:05:29 AM »
FANTASTIC!!
Thank you SO MUCH, Codewalker!
And thanks for those patchers, NeoRavencroft!

Has anyone told Black Pebble about this fix? I just thought he'd appreciate it.
--
"Your reality, sir, is lies and balderdash and I'm delighted to say that I have no grasp of it whatsoever."
- Baron Munchausen

http://www.pauldamonthomas.com/

Shadowkiss

  • Underling
  • *
  • Posts: 2
Re: Demo playback sound?
« Reply #20 on: December 30, 2012, 07:05:07 AM »
Thank you codewalker, and thank  NeoRavencroft. for the great work. The Demos now look and sound like home.

Cryfire

  • Lieutenant
  • ***
  • Posts: 56
Re: Demo playback sound?
« Reply #21 on: December 30, 2012, 11:06:21 AM »
Thanks tons Codewalker & NeoRavencroft. Didn't think there would be a fix for this so fast.  ;D

ThorsAssassin

  • Boss
  • ****
  • Posts: 161
Re: Demo playback sound?
« Reply #22 on: December 30, 2012, 12:40:24 PM »
oh snap....sound?

SQUEEEE!!!!!!!!!!!!


So you guys were able to fix a bug that the developers couldn't? That makes you very cool people. Any danger in patching our clients i23 or i24? Should we make copies? (duh of course we should)

Also if we make copies, is there a way to patch it to the right client?

Just wanna make sure I don't damage anything really but REALLY wanting sound again.

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Demo playback sound?
« Reply #23 on: December 30, 2012, 12:57:45 PM »
Quote
Any danger in patching our clients i23 or i24?
Shouldn't be, unless you patch the wrong client.
Quote
Also if we make copies, is there a way to patch it to the right client?
The i23 patch should be used on the Live client. The i24 patch should be used on the Beta client.
If there really is a demand for a foolproof solution, I might dust off VS and make a patcher that identifies the executables by checksum.
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

ThorsAssassin

  • Boss
  • ****
  • Posts: 161
Re: Demo playback sound?
« Reply #24 on: December 30, 2012, 01:22:01 PM »
Don't want to complicate it for ya bro, just wanting to make sure before I do it (just in case).

I really appreciate this. Been trying to port in the sounds and align them to the video and it's tedious as all hell. Almost like a B rated movie at this point lol. So this solution has me all giddy like a Coh player watching a Leandro video...

therain93

  • Elite Boss
  • *****
  • Posts: 572
Re: Demo playback sound?
« Reply #25 on: December 30, 2012, 01:31:55 PM »
Gotta shovel some snow so I can't play with this yet, but I'm starting to believe Codewalker is one of Santa's Little Helpers.  Thank you! ( ' :
@Texarkana - March 5, 2004 - December 1, 2012 -- Imageshack |-| Youtube
---------------------------------------------------------------------------------------

You don't know what it's like.... |-| Book One. Chapter one...

Tivomaniac

  • Minion
  • **
  • Posts: 35
Re: Demo playback sound?
« Reply #26 on: December 30, 2012, 01:59:17 PM »
Keep up the great work! 
--
You may know me as @PricklyDarkness from Triumph

Michiyo

  • Titan Staff
  • Lieutenant
  • ****
  • Posts: 54
    • SGSpaces
Re: Demo playback sound?
« Reply #27 on: December 30, 2012, 07:52:22 PM »
The patches will back up the exe for you as well. It'll name the backup cityofheroes.exe.bak.  I also tried to run the beta patch on the live exe, and the patcher will not use it, complains of "Unkown Version" so no worries there.

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Demo playback sound?
« Reply #28 on: December 30, 2012, 10:23:57 PM »
Good stuff.

Thanks Codewalker and NeoRavencroft!

 :)
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #29 on: December 30, 2012, 10:33:56 PM »
I'd be interested in getting some info on how to override ent_types and scenes with local files, since I have some ideas I'd like to try out (mainly with trying to get clickies to show up demo playback).

Edited to add: in i24.

At offset 00487C92, you should see:

0F 84 34 03 00 00

Just replace it all with NOPs:

90 90 90 90 90 90

And it will disable the check for disallowed file overrides.

Keep in mind that by changing the exe, you wouldn't be able to connect to a server with that client anymore, since it checksums the exe at startup and sends it to the server for verification. Not that it's really an issue, just an fyi.

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Demo playback sound?
« Reply #30 on: December 31, 2012, 12:09:38 AM »
http://www.speedyshare.com/8UFa2/Demos.rar

527 MB unpacked, 144 demorecords.

These are not mine, I simply have them from an archive someone posted on the old official forums before they went down.

I've posted this link to the forum before, but I'm reposting it now due to the fixed sound :)
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Leandro

  • Elite Boss
  • *****
  • Posts: 310
Re: Demo playback sound?
« Reply #31 on: December 31, 2012, 04:36:38 AM »
http://www.speedyshare.com/8UFa2/Demos.rar

527 MB unpacked, 144 demorecords.

These are not mine, I simply have them from an archive someone posted on the old official forums before they went down.

I've posted this link to the forum before, but I'm reposting it now due to the fixed sound :)

* Leandro steals the demos and extracts all the characters for them for future crowd use.

916 characters, 882 that I didn't have. Mwahahaha!
« Last Edit: December 31, 2012, 04:59:26 AM by Leandro »

Torroes.Prime

  • Lieutenant
  • ***
  • Posts: 76
Re: Demo playback sound?
« Reply #32 on: December 31, 2012, 04:39:15 AM »
http://www.speedyshare.com/8UFa2/Demos.rar

527 MB unpacked, 144 demorecords.

These are not mine, I simply have them from an archive someone posted on the old official forums before they went down.

I've posted this link to the forum before, but I'm reposting it now due to the fixed sound :)

*looks around sheepishly*

I just looked at my demo files.

I have 1.5gbs worth of demo files recorded from in game...
Strength and intelligence make no requirement of one another. Power demands both.

Samuraiko

  • Honorary Paragon Dev and
  • Elite Boss
  • *****
  • Posts: 350
  • EVERYONE LOOK AWESOME - I'M FILMING!
    • The Wandering Crane
Re: Demo playback sound?
« Reply #33 on: December 31, 2012, 05:06:09 AM »
*grins*

From the live server - 2,785 demofiles totalling 3.22GB (non-compressed)
From beta - 126 demofiles totalling 111MB (non-compressed) (I routinely move demofiles from beta to live as issues get released)

*sighs*

Never mind the 10GB worth of demofiles I lost when my old storage hard drive crashed...

Michelle
aka
Samuraiko/Dark_Respite
The game may be gone, but the videos are still here...
http://www.youtube.com/samuraiko
http://cohtube.blogspot.com

ThorsAssassin

  • Boss
  • ****
  • Posts: 161
Re: Demo playback sound?
« Reply #34 on: December 31, 2012, 06:36:01 AM »
nom nom nom demo's...

Actually I think I have those demos from Arachnion from the last time ya posted em. I have been collecting them whenever I see em.

Cryfire

  • Lieutenant
  • ***
  • Posts: 56
Re: Demo playback sound?
« Reply #35 on: December 31, 2012, 08:00:15 AM »
nom nom nom demo's...

Actually I think I have those demos from Arachnion from the last time ya posted em. I have been collecting them whenever I see em.

Same, grabbing all the demo files anyone posts.  ;D

Cryfire

  • Lieutenant
  • ***
  • Posts: 56
Re: Demo playback sound?
« Reply #36 on: December 31, 2012, 08:02:08 AM »
* Leandro steals the demos and extracts all the characters for them for future crowd use.

916 characters, 882 that I didn't have. Mwahahaha!

How do you go about extracting characters from demos? I mean besides doing it manually one at a time.

Aggelakis

  • Elite Boss
  • *****
  • Posts: 3,001
Re: Demo playback sound?
« Reply #37 on: December 31, 2012, 08:04:30 AM »
Leandro is one, mean Perl-man. Which is different than Ron Perlman, but ALMOST as awesome.
Bob Dole!! Bob Dole. Bob Dole! Bob Dole. Bob Dole. Bob Dole... Bob Dole... Bob... Dole...... Bob...


ParagonWiki
OuroPortal

Leandro

  • Elite Boss
  • *****
  • Posts: 310
Re: Demo playback sound?
« Reply #38 on: December 31, 2012, 09:48:13 AM »
How do you go about extracting characters from demos? I mean besides doing it manually one at a time.

If you already used one of my scripts before, you should have Perl installed. If not, get it from http://www.activestate.com/activeperl/downloads

For the following scripts, right-click the link and select Save As to put them in the appropriate folder, then double click them to run them.

This Perl script reads all the .cohdemo files in the folder where the script is and writes all entities (players and NPCs) it finds to a folder called "Characters", creating it if necessary:

http://dl.dropbox.com/u/37952257/cohdemo2char.pl

This Perl script reads all the .costume files in the folder where the script is and writes them in demo format to a folder called "Characters", creating it if necessary:

http://dl.dropbox.com/u/37952257/costume2char.pl

This Perl script reads all the Sentinel+ .xml files in the folder where the script is and writes all costumes to a folder called "Characters", creating it if necessary:

http://dl.dropbox.com/u/37952257/sentinel2char.pl

This script reads all the .char files in the $charfolder and uses the COH client to generate JPEG previews of each character, dumping them in $jpegfolder, creating the latter if necessary:

http://dl.dropbox.com/u/37952257/char2jpg.pl

WARNING ON THAT LAST SCRIPT: you need to change the three paths near the beginning to match the folders in your own computer where you have the .char files, where you want the .jpg files to be dumped, and where your City of Heroes client resides. If you don't set those full paths correctly, it won't work.

$charfolder = 'D:\City of Heroes\JPEG Maker\Characters';
$jpegfolder = 'D:\City of Heroes\JPEG Maker\JPEG';
$cohfolder = 'D:\City of Heroes\CohBeta';

You have to open the script in Notepad (open Notepad, drag the scripts inside) and change just the paths part of those lines. Leave the single quotes around them. No trailing slash. If, for example, you have City of Heroes installed in the default path, you would change the last line to:

$cohfolder = 'C:\Program Files (x86)\NCsoft\City of Heroes';

Hotaru

  • Lieutenant
  • ***
  • Posts: 77
  • Just a demo-loving fool in the Far East...
Re: Demo playback sound?
« Reply #39 on: December 31, 2012, 02:01:12 PM »
Over 5 Gigs of uncompressed demos here, and I'll put them up somewhere eventually for your viewing/harvesting enjoyment.

In the meantime, if anyone's looking for anything in particular, give me a shout and I'll dropbox it if I have it.

therain93

  • Elite Boss
  • *****
  • Posts: 572
Re: Demo playback sound?
« Reply #40 on: December 31, 2012, 02:08:55 PM »
*grins*

From the live server - 2,785 demofiles totalling 3.22GB (non-compressed)
From beta - 126 demofiles totalling 111MB (non-compressed) (I routinely move demofiles from beta to live as issues get released)

*sighs*

Never mind the 10GB worth of demofiles I lost when my old storage hard drive crashed...

Michelle
aka
Samuraiko/Dark_Respite
It would be wonderful to torrent those ( ' :
@Texarkana - March 5, 2004 - December 1, 2012 -- Imageshack |-| Youtube
---------------------------------------------------------------------------------------

You don't know what it's like.... |-| Book One. Chapter one...

wei yau

  • Boss
  • ****
  • Posts: 102
Re: Demo playback sound?
« Reply #41 on: December 31, 2012, 02:12:15 PM »
OMG!  You guys!

Thanks to Leandro's script, not only was I able to convert all my .costumes in one fell swoop.

But, I was able to extract characters from demos I ran from two large events.  The first being a massive gathering at AP, in which tentacles were fought.  The other being The Immortal Game event on the Beta server.

First, I was able to find a lot of Praetorian NPC names, which I'll post once I've cleaned them up.  Second, I might be able to find the model names for the Beast Mastery pets.  And finally, I can post a list of all available characters I do have, in case some people need them.

Thanks Leandro!

Cryfire

  • Lieutenant
  • ***
  • Posts: 56
Re: Demo playback sound?
« Reply #42 on: December 31, 2012, 02:46:32 PM »
If you already used one of my scripts before, you should have Perl installed. If not, get it from http://www.activestate.com/activeperl/downloads

For the following scripts, right-click the link and select Save As to put them in the appropriate folder, then double click them to run them.

This Perl script reads all the .cohdemo files in the folder where the script is and writes all entities (players and NPCs) it finds to a folder called "Characters", creating it if necessary:

http://dl.dropbox.com/u/37952257/cohdemo2char.pl

This Perl script reads all the .costume files in the folder where the script is and writes them in demo format to a folder called "Characters", creating it if necessary:

http://dl.dropbox.com/u/37952257/costume2char.pl

This Perl script reads all the Sentinel+ .xml files in the folder where the script is and writes all costumes to a folder called "Characters", creating it if necessary:

http://dl.dropbox.com/u/37952257/sentinel2char.pl

This script reads all the .char files in the $charfolder and uses the COH client to generate JPEG previews of each character, dumping them in $jpegfolder, creating the latter if necessary:

http://dl.dropbox.com/u/37952257/char2jpg.pl

WARNING ON THAT LAST SCRIPT: you need to change the three paths near the beginning to match the folders in your own computer where you have the .char files, where you want the .jpg files to be dumped, and where your City of Heroes client resides. If you don't set those full paths correctly, it won't work.

$charfolder = 'D:\City of Heroes\JPEG Maker\Characters';
$jpegfolder = 'D:\City of Heroes\JPEG Maker\JPEG';
$cohfolder = 'D:\City of Heroes\CohBeta';

You have to open the script in Notepad (open Notepad, drag the scripts inside) and change just the paths part of those lines. Leave the single quotes around them. No trailing slash. If, for example, you have City of Heroes installed in the default path, you would change the last line to:

$cohfolder = 'C:\Program Files (x86)\NCsoft\City of Heroes';

Had no trouble with the first 3, the 4th just won't work for me.

$charfolder = 'C:\Program Files (x86)\City of Heroes\JPEG Maker\Characters';
$jpegfolder = 'C:\Program Files (x86)\City of Heroes\JPEG Maker\JPEG';
$cohfolder = 'C:\Program Files (x86)\City of Heroes';

I double and triple checked to make sure these were right but it still won't work, does the scrpit have to be in a certain file to work?

Leandro

  • Elite Boss
  • *****
  • Posts: 310
Re: Demo playback sound?
« Reply #43 on: December 31, 2012, 03:25:39 PM »
Had no trouble with the first 3, the 4th just won't work for me.

$charfolder = 'C:\Program Files (x86)\City of Heroes\JPEG Maker\Characters';
$jpegfolder = 'C:\Program Files (x86)\City of Heroes\JPEG Maker\JPEG';
$cohfolder = 'C:\Program Files (x86)\City of Heroes';

I double and triple checked to make sure these were right but it still won't work, does the scrpit have to be in a certain file to work?

Can you copy your City of Heroes folder outside of the Program Files (x86) folder? Just put it on your desktop or documents. I am assuming you never disabled User Account Control in Windows, and it transparently reroutes file calls to a "VirtualStore" folder, so the script *thinks* it's reading files from the Program Files folder, but it really isn't.

#1 source of headaches for programs putting data under Program Files since Windows Vista.
« Last Edit: January 01, 2013, 05:09:43 AM by Leandro »

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Demo playback sound?
« Reply #44 on: December 31, 2012, 05:10:47 PM »
In a few days, you'll have somewhere to
But, I was able to extract characters from demos I ran from two large events.  The first being a massive gathering at AP, in which tentacles were fought.  The other being The Immortal Game event on the Beta server.
You demorecoded TIG? Mind sending me a copy?
Over 5 Gigs of uncompressed demos here, and I'll put them up somewhere eventually for your viewing/harvesting enjoyment.
In a couple days, there will be somewhere to put them up. :)
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

brucetromp

  • Underling
  • *
  • Posts: 3
Re: Demo playback sound?
« Reply #45 on: December 31, 2012, 07:26:29 PM »
Just wanted to the thank you all for the really informative and useful posts!  They've helped me quickly get up to speed with demorecord.  I didn't want to be a lurker so thought I'd just say hello.  I have over 100 hours of video I took with FRAPS but for some strange reason never looked at demorecord.  It's really stupid oversights like this that continue to keep me humble.  I feel like quite the idiot.  Anyway, thanks to the help you've all provided I have a new toy to play with and some excellent inpirational videos out there.  I really appreicate those folks who are sharing their cohdemo files.  I'm thinking my first project would be a simple fly around of Atlas populated with lots of cool heroes (with sound thanks to Codewalker!).  I feel a bit better knowing that I'm not the only one who hasn't gotten over this.  Thanks again all!

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Demo playback sound?
« Reply #46 on: December 31, 2012, 07:50:33 PM »
You demorecoded TIG? Mind sending me a copy?

I'd like an Immortal Game copy too, thank you in advance, Hotaru.

I wasn't able to attend :(
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Hotaru

  • Lieutenant
  • ***
  • Posts: 77
  • Just a demo-loving fool in the Far East...
Re: Demo playback sound?
« Reply #47 on: January 01, 2013, 01:35:30 AM »
Quoting seems to be acting oddly. I believe it was wei yau that posted about having recorded The Immortal Game. If I had it, I'd share. Put me on the list, please, wei yau.

ThorsAssassin

  • Boss
  • ****
  • Posts: 161
Re: Demo playback sound?
« Reply #48 on: January 01, 2013, 11:24:46 AM »
Put me down as a +1 for the TIG demo, would love to have a copy as I missed the event as well.

Globetrotter

  • Boss
  • ****
  • Posts: 169
  • I am a still Hero and This is what I do!
Re: Demo playback sound?
« Reply #49 on: January 01, 2013, 01:48:58 PM »
Missed TIG too. I would be down for a copy if possible.
Gutta cavat lapidem, non vi, sed saepe cadendo.

Floride

  • Elite Boss
  • *****
  • Posts: 861
  • Badgehunter Extraordinaire
Re: Demo playback sound?
« Reply #50 on: January 09, 2013, 09:27:21 AM »
About 2 weeks back, Floride mentioned here http://www.cohtitan.com/forum/index.php/topic,7275.0.html that it might've been turned off by the devs to stop annoying sound bugs during loading screens.

Thanks again for another awesome contribution!
I don't have the programming experience of a lot of people here, but I observe stuff like a professional stuff observer. I'm just glad the loading screen bug was overcomeable.
Now that I've patched the game I think th--- HOLEECARP! I HAVE SOUND IN MY DEMOS NOW!!!!!!! MUUAHAHAHAA!!!

Thank you soooooooo much Codewalker, you have improved my life!
History shows again and again
How nature points out the folly of men

SuburbanHell

  • Lieutenant
  • ***
  • Posts: 62
Re: Demo playback sound?
« Reply #51 on: January 17, 2013, 12:26:08 PM »
http://www.speedyshare.com/8UFa2/Demos.rar

527 MB unpacked, 144 demorecords.

These are not mine, I simply have them from an archive someone posted on the old official forums before they went down.

I've posted this link to the forum before, but I'm reposting it now due to the fixed sound :)

Looks like you need a premium account to get this now....does anyone have it that can post it to a free location?

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Demo playback sound?
« Reply #52 on: January 17, 2013, 07:51:39 PM »
Looks like you need a premium account to get this now....does anyone have it that can post it to a free location?

I'll upload it to my personal SugarSync account, that'll let you download it for free.

https://www.sugarsync.com/pf/D0133125_936_04626173

Enjoy :)
« Last Edit: January 17, 2013, 07:56:52 PM by Arachnion »
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

Torroes.Prime

  • Lieutenant
  • ***
  • Posts: 76
Re: Demo playback sound?
« Reply #53 on: January 18, 2013, 06:02:10 PM »
It would be wonderful to torrent those ( ' :

Actually why don't we? I've got a computer that's online 24/7 anyway right now. I'm still torrenting the MOV library that Leandro made. Sam, Hotaru, if you guys wants to set up your demo collections in drop box or something so I can grab 'em, I'll compile them all into one massive library and start torrenting them.
Strength and intelligence make no requirement of one another. Power demands both.

Todogut

  • Boss
  • ****
  • Posts: 247
    • Todogut on deviantART
Re: Demo playback sound?
« Reply #54 on: September 27, 2014, 05:55:59 PM »
Recently, I tried to follow the instructions by Codewalker on how to edit Cityofheroes.exe for making sound work when replaying demorecordings. However, the links in NeoRavencroft's post for his patchers (for I23 and I24 beta) did not work for me... I got error messages indicating the page did not exist. (Are these links no longer valid?)

So, I tried to follow Codewalker's instructions for manual editing. I downloaded HxD software from CNet, installed it, and used it to open I23 Cityofheroes.exe (after creating a copy of the file). I searched the file but did not find offset 0043A43A. I also searched for but did not find the following sequence of bytes: E8 D1 15 05 00 E8 9C 0D 05 00.

Similarly, when I opened I24 beta Cityofheroes.exe and searched for offset 0043788A and bytes sequence E8 F1 18 05 00 E8 BC 10 05 00, I did not find them.

I'm stumped.

Here is info about the versions of Cityofheroes.exe on my PC:

I23
Date modified: 7/31/2012 7:18 PM
Size: 8,840 KB

I24 beta
Date modified: 12/29/2012 7:11 PM
Size: 8,848 KB

Do I have different versions from the ones that Codewalker referenced? Any ideas on what I can do to make the sound work when playing demo recordings?

JadeFalcon

  • Minion
  • **
  • Posts: 36
Re: Demo playback sound?
« Reply #55 on: September 28, 2014, 11:48:07 PM »
The only thing I can think of that may help is to remove the spaces between the bytes when searching for the sequence. There aren't really any spaces between bytes, it just appears that way since each byte is displayed in a separate column.

Todogut

  • Boss
  • ****
  • Posts: 247
    • Todogut on deviantART
Re: Demo playback sound?
« Reply #56 on: October 06, 2014, 08:36:43 PM »
The only thing I can think of that may help is to remove the spaces between the bytes when searching for the sequence. There aren't really any spaces between bytes, it just appears that way since each byte is displayed in a separate column.

Thanks for the suggestion. But, I don't think removing spaces between bytes is the solution. The offset values don't have any spaces, and they don't give a match when searching, either.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #57 on: October 06, 2014, 09:31:10 PM »
You shouldn't be searching for the offset in the file. You simply go there. If you're using HxD, it's Goto under the search menu, then you enter the offset in hex.

Todogut

  • Boss
  • ****
  • Posts: 247
    • Todogut on deviantART
Re: Demo playback sound?
« Reply #58 on: October 07, 2014, 04:40:18 AM »
... it's Goto under the search menu, then you enter the offset in hex.

Ah, thanks. Now it seems clear: the cause of my problem is, I don't know what I'm doing.

I found the Search>Goto... menu and copy/pasted the offset value for issue 24 while the hex option was active. I clicked the OK button, and the screen advanced to the position shown in the image below.



The cursor was at the 0A column, to the left of 83.

But, I didn't see the E8 F1 18 05 00 E8 BC 10 05 00 bytes sequence. So, I didn't know what to do next.

Can I get some more help, please? How do I find the bytes sequence and change it?

Todo

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #59 on: October 07, 2014, 05:22:20 AM »
The reason you're not seeing it is that that exe has already been patched. Look at the 0A column on the first line and you'll see the "change it to" sequence from the original post for I24:

83 05 30 13 67 01 01 90 90 90

So... it should be working. Are you using the patched executable to try to play back demos?

Todogut

  • Boss
  • ****
  • Posts: 247
    • Todogut on deviantART
Re: Demo playback sound?
« Reply #60 on: October 07, 2014, 06:24:58 AM »
The reason you're not seeing it is that that exe has already been patched. Look at the 0A column on the first line and you'll see the "change it to" sequence from the original post for I24:

83 05 30 13 67 01 01 90 90 90

Huh. Yep, the updated bytes sequence is already in place. Wow.

I have no recollection of updating my files; but, maybe I ran NeoRavencroft's patcher utility back in December 2012. That's the only explanation I can imagine.

Quote
So... it should be working. Are you using the patched executable to try to play back demos?

Yes, I am running the patched executable. But, I don't hear any sound. When I run a .cohdemo file, it plays in silence.

I'm using the City of Heroes/Villains Demo Launcher 2. I don't see any options in the launcher for activating/deactivating sound.

Is there some way I need to run a .cohdemo file in order to hear sound?

Todogut

  • Boss
  • ****
  • Posts: 247
    • Todogut on deviantART
Re: Demo playback sound?
« Reply #61 on: October 12, 2014, 06:08:52 AM »
Thanks to tips from Codewalker, I have made some progress.
- I have been able to get sound while playing a demorecording in the issue 24/beta client.
- But, no sound yet when using the issue 23/live client. Not sure what the problem is. I've still got some things to check and try for a fix.

Todogut

  • Boss
  • ****
  • Posts: 247
    • Todogut on deviantART
Re: Demo playback sound?
« Reply #62 on: December 27, 2014, 11:24:13 AM »
... no sound yet when using the issue 23/live client. Not sure what the problem is. I've still got some things to check and try for a fix.

Tonight, I rechecked the Issue 23 exe file and found--heheh--I had not changed the sequence. I guess, that's why the sound didn't play.

After a few tries in HxD, I got it right. The sound plays now--hooray! So, now I can hear sound in both I23 and I24 demo replays.

Thank you, Codewalker!

saipaman

  • Elite Boss
  • *****
  • Posts: 920
Re: Demo playback sound?
« Reply #63 on: March 05, 2015, 04:47:50 PM »
Made a patcher for those not wanting to play with hex editors.

Link for Live Client

Link for Beta Client

Does anyone still have copies of these files?

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Demo playback sound?
« Reply #64 on: March 27, 2015, 10:59:37 PM »
Here's a patched beta client executable: http://ge.tt/9JZHA6D2/v/0
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

Ice Trix

  • Boss
  • ****
  • Posts: 184
Re: Demo playback sound?
« Reply #65 on: May 18, 2015, 10:26:43 AM »
Thanks for the patch link.

MomentaryGrace

  • Lieutenant
  • ***
  • Posts: 66
Re: Demo playback sound?
« Reply #66 on: March 23, 2016, 03:01:08 PM »
I just found this. Can anyone recommend a hex editor? Free if possible... Microsoft has one for W10 but I want to use my W7 box.

thnx

Scrapperlock in ten... nine...

Floride

  • Elite Boss
  • *****
  • Posts: 861
  • Badgehunter Extraordinaire
Re: Demo playback sound?
« Reply #67 on: March 24, 2016, 04:00:08 AM »
I just found this. Can anyone recommend a hex editor? Free if possible... Microsoft has one for W10 but I want to use my W7 box.

thnx
I'm running win7 and I used HxD Hex Editor and it worked fine, and it's free.
History shows again and again
How nature points out the folly of men

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Demo playback sound?
« Reply #68 on: March 24, 2016, 04:08:57 AM »
If you're planning on doing this, keep in mind step 1 of the original instructions:

1. MAKE A BACKUP COPY OF CITYOFHEROES.EXE

In fact, it's better if you copy the file to some other name and modify the copy instead.

This is especially important if you use Paragon Chat, because version 1.0 is around the corner, and it will not work if cityofheroes.exe has been modified. It won't even detect the COH directory as a valid install if the exe is not the original.