WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Dev Tools (https://www.wowinterface.com/forums/forumdisplay.php?f=41)
-   -   Script commands for every sound (updated for Wrath 3.1) (https://www.wowinterface.com/forums/showthread.php?t=22754)

Bluspacecow 04-23-09 08:39 AM

Script commands for every sound (updated for Wrath 3.1)
 
http://www.wowinterface.com/download...o.php?id=13194

Basically it's a zip file got a collection of text files in it. 2 of those 2 text files contain /script commands to play most any sound in game. If it was in the MPQ files then there should be a /script command to play it in game !

To use just use a decent text editor to do a Find on either "3_1_sounds.txt" or "wow_sounds_includingwrath_FINAL.txt"

For some reason it doesn't work if you open it in NotePad. Please use something else like Word or Wordpad. If I could figure out a way to save it on my mac so it is in a form you can open in NotePad I would. I'ld also need to upload it from work , as that's the only accessible PC I can get too.

So questions ? Comments ? Advice ?

Verissi 04-24-09 11:58 AM

Macs (and *NIX) save raw ASCII text files with line endings that consist of only line feeds. Windows adds a "carriage return" as well, so if a Windows user opens up a text file in Notepad that just has line feeds, it will display the whole thing as one line. The line feeds are still there, but Windows doesn't see them as sufficient for a line ending (silly, I know).

You can add the carriage returns to your file in a number of ways. My old TiBook isn't running now, but the command I use on my Linux machines to do this is pretty simple:

Code:

sed -e 's/$/\r/' inputfilename > outputfilename
You should be able to open up a terminal window and do the same, or you could probably set up a folder action to do it as well for any files that you drop into that folder.

If you anticipate doing this a lot, you would probably want to make the above into a simple script:

Code:

#!/bin/sh
sed -e 's/$/\r/' $1 > $2

Then call it from the command line like (I named the script addcr):
addcr inputfilename outputfilename
Hope this helps :)

Seerah 04-24-09 01:29 PM

Off-topic, but... I always have problems viewing lua files in regular Notepad. WordPad works perfectly, however.

Bluspacecow 04-25-09 11:51 PM

Quote:

Originally Posted by Verissi (Post 130809)
Code:

#!/bin/sh
sed -e 's/$/\r/' $1 > $2

Then call it from the command line like (I named the script addcr):
addcr inputfilename outputfilename
Hope this helps :)

Doesn't work :(

I pasted the code into a new script and chmod'd the file.

I execute and it truncates each line with a "r" character ????

Verissi 04-26-09 03:33 AM

Quote:

Originally Posted by honem (Post 131176)
Doesn't work :(

I pasted the code into a new script and chmod'd the file.

I execute and it truncates each line with a "r" character ????

Hmm, the shell may be using the slashes and escaping the backslash portion of the carriage return. Try changing the sed command to this and see if it works:
Code:

sed -e 's:$:\r:' $1 > $2
If it still has issues, you can try adding an extra backslash to the above in front of \r (e.g. \\r). Some shells handle things a bit differently and I can't remember which incarnation of "/bin/sh" is used by Macs these days.

Bluspacecow 04-26-09 06:08 AM

Quote:

Originally Posted by Verissi (Post 131211)
Some shells handle things a bit differently and I can't remember which incarnation of "/bin/sh" is used by Macs these days.

If it helps I'm using bash. :banana:

Verissi 04-26-09 06:49 AM

Ah, then the amended sed line should work just beautifully. I just checked it on my Linux machine and it went swimmingly. You probably should change the /bin/sh reference to /bin/bash (or what ever the path is to bash on your machine) to make sure it's calling bash as the script's interpreter as well.

Absolute worst case, I can whip up a perl script to do the same thing and just PM it over :p

Bluspacecow 04-27-09 02:48 AM

2 Attachment(s)
Quote:

Originally Posted by Verissi (Post 131224)
Ah, then the amended sed line should work just beautifully. I just checked it on my Linux machine and it went swimmingly. You probably should change the /bin/sh reference to /bin/bash (or what ever the path is to bash on your machine) to make sure it's calling bash as the script's interpreter as well.

Absolute worst case, I can whip up a perl script to do the same thing and just PM it over :p

It still seems to just put the r at the end of each line

I've tried something different this time.

Using TextWrangler I've had it save Dos Line breaks

Here's a file sample.

Can someone test this under windows , open in Notepad ?

Wimpface 04-27-09 05:35 AM

I tried it in windows, and the results were as if the new lines never occured. Here's a visual example of the first few lines.

Quote:

/script PlaySoundFile("Sound\\CinematicVoices\\DeathKnightNarration.mp3")/script PlaySoundFile("Sound\\Creature\\AlexandrosMograine\\PE_AlexandrosMograine_DeathKnightEvent01.wav")/script PlaySoundFile("Sound\\Creature\\AlexandrosMograine\\PE_AlexandrosMograine_DeathKnightEvent02.wav")
Between every script there was a small square, but this didn't show up in the Quote.

Seerah 04-27-09 09:03 AM

Try in WordPad. As I said, any lua file I open in NotePad doesn't translate the line breaks.


edit: Both files you attached work perfectly in WordPad. In NotePad, only the second has line breaks, not the first. Don't worry about it though. ;)

Bluspacecow 04-27-09 09:30 AM

1 Attachment(s)
Quote:

Originally Posted by Seerah (Post 131449)
edit: Both files you attached work perfectly in WordPad. In NotePad, only the second has line breaks, not the first. Don't worry about it though. ;)

B-b-b-b-b-but its my baby :(

I want it to be perfect.

I want it so people can just open it up in Notepad.

So the second one had the line breaks you say ?

Many apologies but I'm trying to figure out how i saved that second one.

Here's one saved as DOS linebreaks , with Western (windows latin) encoding.

Verissi 04-27-09 09:50 AM

Quote:

Originally Posted by honem (Post 131405)
It still seems to just put the r at the end of each line

Skah! Ok, try this script. Perl should behave predictably :p

Code:

#!/usr/bin/perl -pi
s/\n/\r\n/;

Of course, substitute the path for perl on your system in the first line. Once you make it executable (chmod +x), you should be able to call it like this (I named mine addcr.pl):
addcr.pl inputfile
It will just edit the existing file (no need for an output file name). We'll find a way to get this done if it kills me ;)

Wimpface 04-27-09 11:42 AM

Quote:

Originally Posted by honem (Post 131461)
B-b-b-b-b-but its my baby :(

I want it to be perfect.

I want it so people can just open it up in Notepad.

So the second one had the line breaks you say ?

Many apologies but I'm trying to figure out how i saved that second one.

Here's one saved as DOS linebreaks , with Western (windows latin) encoding.

Works a charm. ;)

Bluspacecow 04-27-09 06:33 PM

1 Attachment(s)
Quote:

Originally Posted by Verissi (Post 131464)
Of course, substitute the path for perl on your system in the first line. Once you make it executable (chmod +x), you should be able to call it like this (I named mine addcr.pl):
addcr.pl inputfile
It will just edit the existing file (no need for an output file name). We'll find a way to get this done if it kills me ;)

"which perl" comes back with the usaul path.

This appears to work. I've applied it to all the files and when I open it in Text Wrangler it has a little popup menu at the bottom of the window "Windows (CRLF)". To be sure I've gone through at also selected "Western (Windows Lating)" encoding as well.

Here's version 2.1

Verissi 04-27-09 09:07 PM

Yay! :banana::banana::banana::banana::banana: <-- dancing bananas added for emphasis

Glad I could finally find something that worked for ya :cool:

Bluspacecow 04-27-09 10:11 PM

Everybody loves a dancing banana

:banana::banana::banana::banana::banana::banana::banana:

Anywho.

Have submitted an update to 2.1

All files should now open in Notepad.

Bluspacecow 04-29-09 07:25 AM

Looks like I missed an entire MPQ when crusing for new 3.1 sounds.

It also had the vast majority of the new 3.1 sounds in it :(

About 75% of them (about 485MB/635mb) :eek:

Uploaded version 2.2 update to correct this :D :banana:

Dohzzer 05-13-09 03:54 PM

When you play these sound files, will other players in-game here it?

Bluspacecow 05-13-09 05:14 PM

Quote:

Originally Posted by Dohzzer (Post 135771)
When you play these sound files, will other players in-game here it?

No they only play for you .

Bluspacecow 05-26-09 07:03 PM

1 Attachment(s)
Complete re-extract and update for 3.1.2

Has baby murloc space marine sounds

This is a preview version as I'm not sure if the carriage returns thingy worked again.

I'll update it to my main page as soon as I know if the carriage returns have worked in Notepad or not....

PS Yes I'll be testing this @ work ....


All times are GMT -6. The time now is 11:40 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI