Jump to content

Suggestion: BG1 Music Import


Salk

Recommended Posts

Hello! I am one of the people that think that music in BG1 is far superior to the sequel's and I think it would be nice to spare the user from having to import manually the BG1 Music folder under BG2.

 

I know it's not a great deal but lots of people, I believe, don't even know that this is possible and are stuck playing TuTu with BG2 Music. Making it automatic in TuTu Tweaks would be welcome.

 

I believe then that such an option would be handy:

 

"BG1 Music in TuTu ?"

 

Not to mention it'd be a joke for you to implement it. Cheers! :p

Link to comment
If we could do it, we'd have done it in Tutufix. WeiDU doesn't copy subdirectories. Or something. I dunno.

 

You can't do that via weidu anyway, since you can't copy the files from a directory outside your own (EG from BG1 to BG2). However, you can extract the relevant path from the file configuration, and write a .bat program ro handle the copying.

 

Assuming you have already read %bg1% variable, you'd launch the bg1music.bat file with the command

 

AT_EXIT ~bg1music.bat "%bg1%"~

 

bg1music would be something like

@echo off

rem make backups of bg2 music
mkdir music_backup
xcopy /e music music_backup

rem cd to bg2's music dir
cd music

rem delete all files and subdirectories recursively (/s), without asking for confirmation (/q)
del * /s /q

rem copy all files and subdirectories, including the empty ones, from bg1/music to bg2/music
xcopy /e "%1\music" music

 

Windows will automatically turn %1 to the second parameter from the command line (in this case, %bg1%). Note: I said second parameter on purpose

 

If this doesn't work, you can always revert to having WeiDU edit the .bat at install time :p

 

The following rewritten for Mac support (I hope, but Mac's use bash like Unixes :p )

@echo off

# make backups of bg2 music
md music_backup
cp -r music music_backup

# cd to bg2's music dir
cd music

# delete all files and subdirectories recursively, without asking for confirmation 
rm -r *

# copy all files and subdirectories, including the empty ones, from bg1/music to bg2/music
copy -r "$1\music" music

Link to comment
Instead of making a backup folder, copying the files and then deleting them, why not simply "rename" the directory? :p IIRC you couldn't do that in plain DOS, but the Windows command line supports it.  Alternatively, you could use the "move" command.

Didn't realize that...

I've been working 3 years in DOS/Win3.11 (from 95 to 98), so I have yet to recover...

 

Here is updated scripts (minus the comments):

 

DOS:

rem install
@echo off
move music music_backup
xcopy /e "%1\music" music

rem uninstall
@echo off
del music /s /q
move music_backup music

 

UNIX, Linux, Mac:

#install
@echo off
mv music music_backup
cp -r "$1\music" music

#uninstall
@echo off
rm -r music
mv music_backup music

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...