[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 519: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4721: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3828)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4723: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3828)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4724: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3828)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4725: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3828)
Legends World • View topic - Batch (?) Script to rename files


Index ⇒ Games Support ⇒ Batch (?) Script to rename files  Topic is solved

Trouble playing a game? Game not running well? Ask help here.

Moderator: LW Moderator

Batch (?) Script to rename files

Postby Terje_P » Tue Mar 28, 2023 11:46 am

I need help creating a batch script to rename files. While this would be somewhat unnecessary as the files are now renamed. I think it's good way to figure out if I made by typos in the notes compared to the filenames. Maybe people want a clean start without all of the manual labor.. .

Need to rename files in accordance to the notes in the pastebin.

What I want to achieve:

0000001f.wav to gum_begin_1.wav
00000020.wav to gum_begin_2.wav

Etc for all the files
https://pastebin.com/t5kjPHUQ
Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

Re: Batch (?) Script to rename files

Postby Terje_P » Tue Mar 28, 2023 11:59 am

Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

Re: Batch (?) Script to rename files  Topic is solved

Postby HcH » Tue Mar 28, 2023 12:27 pm

Last edited by HcH on Tue Mar 28, 2023 12:37 pm, edited 1 time in total.
HcH
Super Member
 
Posts: 54
Joined: Thu Jul 07, 2022 10:03 pm
Thanks: 100
Thanked: 43 times in 27 posts

The following user would like to thank HcH for this post
Terje_P

Re: Batch (?) Script to rename files

Postby Terje_P » Wed Mar 29, 2023 9:57 am

The last ones are gameplay hints which don't have audio tied to them.

505 games added those hints when they localized the game to make the game feel a bit more polished . The original 2008 Russian only version didn't have them.
Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

The following user would like to thank Terje_P for this post
HcH

Re: Batch (?) Script to rename files

Postby Terje_P » Wed Mar 29, 2023 11:53 am

Could you reverse the script?

So that ren gum_begin_1.vaw 0000001f.wav becomes ren 0000001f.wav gum_begin_1.wav

I have a feeling the other language versions of the game may have the same filenames, with a batch script I could try to do them all.
Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

Re: Batch (?) Script to rename files

Postby Terje_P » Wed Mar 29, 2023 1:36 pm

Will see if I can't get the xwb_split program in the last comment here to work. Then I will avoid the issue of unlabeled wave files to my understanding.

https://zenhax.com/viewtopic.php?t=6910

Importing the xwb in foobar with the appropriate plugin at least gives me something to work with, also the audio clips are sequenced in some degree, so I can make an educated guess of what the matching filenames would be.

Foobar seems to be a bit hit or miss. Some xwb files load fine, while other have messed up audio tracks with the wrong length. Although i would probably have saved some time instead of comparing one by one to the subtitles.

Will get the 360 release and see if what files can be extracted there.
Last edited by Terje_P on Wed Mar 29, 2023 8:22 pm, edited 3 times in total.
Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

Re: Batch (?) Script to rename files

Postby annoyment » Wed Mar 29, 2023 5:34 pm

"Hellos, plz help with , will help backward." -Wimpy
User avatar
annoyment
Super Member
 
Posts: 1997
Joined: Tue Jul 14, 2015 9:30 pm
Location: Land of KEBAB REMOVERS
Thanks: 603
Thanked: 768 times in 659 posts

The following user would like to thank annoyment for this post
HcH, Terje_P

Re: Batch (?) Script to rename files

Postby Terje_P » Wed Mar 29, 2023 6:59 pm

Will have to do some QA later, but here is an early and possibly only edition of the translation. Went a bit backwards and forwards when testing so not quite sure about its state now. Some assembly required :lol:

https://mega.nz/folder/BOYnFSzQ#LUXRGqZ3h6dKbT0yOwEMpA

delete ui.pak replace with fonts folder and UI data\fonts data\ui
Extract sounds.pak with quickbms using the clutch script in order to use my sound files

The game will run with extracted pak files

Tested with Russian retail release (4gb image) and wkduffy version

Enemy chatter not done yet, as I need some russkies to help me with that.. There are also fewer English files than Russian ones, so would need to figure out how to solve this, maybe duplicate the english one to fill the void if the content dont matter or use russian ones in it place. Want to avoid silence here....
Last edited by Terje_P on Sat Apr 01, 2023 2:03 pm, edited 1 time in total.
Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

The following user would like to thank Terje_P for this post
HcH

Re: Batch (?) Script to rename files

Postby HcH » Thu Mar 30, 2023 12:36 am

Great job.

I might be able to test this out a bit, I have some older Win7 machines so I'm not sure if those are capable of running this.

Let me know if you need a test run!
HcH
Super Member
 
Posts: 54
Joined: Thu Jul 07, 2022 10:03 pm
Thanks: 100
Thanked: 43 times in 27 posts

Re: Batch (?) Script to rename files

Postby Terje_P » Thu Mar 30, 2023 4:56 am

The older Windows 7 laptops should be good, the game came out in 2008 and ran playable on my HD5500 5005u laptop. We all know how bad iGPUs are.
Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

The following user would like to thank Terje_P for this post
HcH

Re: Batch (?) Script to rename files

Postby Terje_P » Fri Mar 31, 2023 12:11 am

Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

The following user would like to thank Terje_P for this post
HcH

Re: Batch (?) Script to rename files

Postby Terje_P » Fri Mar 31, 2023 9:19 am

Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

Re: Batch (?) Script to rename files

Postby Terje_P » Fri Mar 31, 2023 10:18 am

Terje_P
Super Member
 
Posts: 1474
Joined: Sat Dec 29, 2012 4:38 pm
Thanks: 127
Thanked: 964 times in 746 posts

The following user would like to thank Terje_P for this post
HcH


Return to Games Support

Who is online

Users browsing this forum: No registered users and 23 guests