Jump to content


Photo

intro/splash theme from BGI to BGII?


  • Please log in to reply
11 replies to this topic

#1 Ionopachys

Ionopachys
  • Member
  • 13 posts

Posted 02 September 2009 - 08:07 PM

Simply put, I would like to replace the intro theme from BGII that is played during the splash screen with the theme from BGI, but I can't find that music file. Is it built into baldur.exe, so that there is no way to edit it? If not, where is it, and is it possible to extract and swap the themes?

#2 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 03 September 2009 - 07:52 AM

Simply put, I would like to replace the intro theme from BGII that is played during the splash screen with the theme from BGI, but I can't find that music file. Is it built into baldur.exe, so that there is no way to edit it? If not, where is it, and is it possible to extract and swap the themes?

Well, I tried it to see if it was possible. The sound that is played is a WAVE resource in the baldur.exe of each game (BG1 & BG2), although no such resource existed in BGMain.exe of either game.... I was able to swap them, but there is a size difference between the unmodded and modded baldur.exe (3,380kb vs. 3,219kb). Frankly, that scares me! :unsure: In the attached archive is the modified baldur.exe for BGII (ToB and patched to 26498) (rename the file to "baldur.exe"). Make a backup of your original before you replace it, though. Also included are the extracted .wav resources. I used a program called Resource Hacker to do this, if you are interested in messing with it.

Attached File  Modified_BGII_Sound_Resource.rar   3.62MB   165 downloads

Edited by Sam., 03 September 2009 - 07:57 AM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#3 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 03 September 2009 - 09:43 AM

The sound that is played is a WAVE resource in the baldur.exe of each game (BG1 & BG2), although no such resource existed in BGMain.exe of either game....

That's because the baldur.exe just starts the front end/splash screen, while the BGMain.exe starts the game, and the baldur.exe uses the BGMain.exe for that.
Now, if you change the 'baldur.exe's size, it's nothing game braking because of the previous fact, the .exe cracks/hacksfixes like the Widescreen mod only change the BGMain.exe .

Edited by Jarno Mikkola, 03 September 2009 - 12:02 PM.

Deactivated account. The user today is known as The Imp.


#4 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 03 September 2009 - 11:22 AM

The sound that is played is a WAVE resource in the baldur.exe of each game (BG1 & BG2), although no such resource existed in BGMain.exe of either game....

That's because the baldur.exe just starts the front end/splash screen, while the BGMain.exe starts the game, and the baldur.exe uses the BGMain.exe for that.

I suspected that was the case but wasn't sure. So, any chance this can be done easily with WeiDU? :P

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#5 Ionopachys

Ionopachys
  • Member
  • 13 posts

Posted 03 September 2009 - 12:29 PM

Well, I tried it to see if it was possible. The sound that is played is a WAVE resource in the baldur.exe of each game (BG1 & BG2), although no such resource existed in BGMain.exe of either game.... I was able to swap them, but there is a size difference between the unmodded and modded baldur.exe (3,380kb vs. 3,219kb). Frankly, that scares me! :unsure: In the attached archive is the modified baldur.exe for BGII (ToB and patched to 26498) (rename the file to "baldur.exe"). Make a backup of your original before you replace it, though. Also included are the extracted .wav resources. I used a program called Resource Hacker to do this, if you are interested in messing with it.

Attached File  Modified_BGII_Sound_Resource.rar   3.62MB   165 downloads



Thank you so much! This will make playing the mega mod so much more satisfying. Its just a little thing, but somehow the original intro was much more memorable than the sequel's.

I might look at this Resource hacker, but I'm not very technically inclined. My favorite tool for editing items and such is still IEE; while DLTCEP is my high-power second choice. Anything more complicated confuses me.

#6 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 03 September 2009 - 12:55 PM

Its just a little thing, but somehow the original intro was much more memorable than the sequel's.

I agree. This was a good idea, I'm glad you suggested it.

I might look at this Resource hacker, but I'm not very technically inclined.

It's really fairly simple to use. Here is a link. It doesn't seem to have been updated in a while, though. Oh well.

My favorite tool for editing items and such is still IEE; while DLTCEP is my high-power second choice. Anything more complicated confuses me.

I actually prefer NearInfinity. I personally think that DLTCEP has too many buttons that bring you to buttons that bring you to even more buttons that aren't activated until still other buttons are pressed in the right order. I still use DLTCEP for several things that NI can't do though, and it does them well.

Does anyone happen to know how this might be done with WeiDU? Would you just have to resort to writing a huge string of bytes?

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#7 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 03 September 2009 - 01:12 PM

Does anyone happen to know how this might be done with WeiDU? Would you just have to resort to writing a huge string of bytes?

Not sure exactly what you want to do, but you could probably use WRITE_FILE or INSERT_FILE as an alternative to an ugly WRITE_ASCII(E).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#8 Ionopachys

Ionopachys
  • Member
  • 13 posts

Posted 03 September 2009 - 02:35 PM

My favorite tool for editing items and such is still IEE; while DLTCEP is my high-power second choice. Anything more complicated confuses me.

I actually prefer NearInfinity. I personally think that DLTCEP has too many buttons that bring you to buttons that bring you to even more buttons that aren't activated until still other buttons are pressed in the right order. I still use DLTCEP for several things that NI can't do though, and it does them well.

Does anyone happen to know how this might be done with WeiDU? Would you just have to resort to writing a huge string of bytes?

Yeah, but forcing the user to go through all the steps makes it a bit easier to figure out what you need to do. Having such a thorough GUI with DLTCEP is simpler than trying to decipher what everything means. With Near Infinity, you need to have a pretty good idea of what you are trying to do and how to accomplish it. It probably would be easier if I had the time to study it, but for more casual players it doesn't seem to be worth the investment.

Did anyone ever complete a BGI GUI mod for BGII? I still miss the calm green with the shiny gold buttons.



Does anyone happen to know how this might be done with WeiDU? Would you just have to resort to writing a huge string of bytes?

Not sure exactly what you want to do, but you could probably use WRITE_FILE or INSERT_FILE as an alternative to an ugly WRITE_ASCII(E).

Perhaps he is suggesting a standard WEIDU mod that would allow one to swap the intro theme without manually replacing the baldur.exe, so that it could be incorporated into the set-up utilities for the BGI to BGII mods.

#9 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 03 September 2009 - 02:40 PM

Does anyone happen to know how this might be done with WeiDU? Would you just have to resort to writing a huge string of bytes?

Not sure exactly what you want to do, but you could probably use WRITE_FILE or INSERT_FILE as an alternative to an ugly WRITE_ASCII(E).

I would like to use WeiDU to directly replace "BG2 wave resource.wav" with "BG1 wave resource.wav" inside of "baldur.exe". The WAVE resource in baldur.exe is byte for byte identical to the .wav file that is in the above archive.

If you can do a 'search and replace', then this shouldn't be necessary but the resource starts at offset 6E0D8 and goes through 1DA37D and is empty (all 00's) through 1DF1F0. So with WeiDU, the code would be...? (please?)

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#10 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 03 September 2009 - 03:37 PM

I would like to use WeiDU to directly replace "BG2 wave resource.wav" with "BG1 wave resource.wav" inside of "baldur.exe". The WAVE resource in baldur.exe is byte for byte identical to the .wav file that is in the above archive.

If you can do a 'search and replace', then this shouldn't be necessary but the resource starts at offset 6E0D8 and goes through 1DA37D and is empty (all 00's) through 1DF1F0. So with WeiDU, the code would be...? (please?)

I still am not sure I get it... but you have an external .wav file you want to replace with one of the exact same length embedded in an .exe? If so, couldn't you just do:
COPY ~baldur.exe~ ~baldur.exe~
  WRITE_FILE 0x6e0d8 ~mymod/resource.wav~
BUT_ONLY //Kinda pointless here, heh... unless someone's done the same thing already
Granted, that might be a bit heavy-handed and you might want to check the offset has the expected data before writing, but well, first things first. You might be wanting to do something different entirely.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#11 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 03 September 2009 - 04:20 PM

I still am not sure I get it... but you have an external .wav file you want to replace with one of the exact same length embedded in an .exe? If so, couldn't you just do:

COPY ~baldur.exe~ ~baldur.exe~
  WRITE_FILE 0x6e0d8 ~mymod/resource.wav~
BUT_ONLY //Kinda pointless here, heh... unless someone's done the same thing already
Granted, that might be a bit heavy-handed and you might want to check the offset has the expected data before writing, but well, first things first. You might be wanting to do something different entirely.

This is basically what I want to do, only the file that is being replaced is a bit longer that the one doing the replacing:

there is a size difference between the unmodded and modded baldur.exe (3,380kb vs. 3,219kb).

, so "00"s will probably need to be added to replace whatever is left over from the original.

As for the offset, could you search for the first occurrence of "52 49 46 46 18 11 17 00 57 41 56 45 66 6D 74 20 10 00" and start overwriting at the beginning of that?

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#12 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 03 September 2009 - 06:17 PM

This is basically what I want to do, only the file that is being replaced is a bit longer that the one doing the replacing:

there is a size difference between the unmodded and modded baldur.exe (3,380kb vs. 3,219kb).

, so "00"s will probably need to be added to replace whatever is left over from the original.

As for the offset, could you search for the first occurrence of "52 49 46 46 18 11 17 00 57 41 56 45 66 6D 74 20 10 00" and start overwriting at the beginning of that?

WeiDU doesn't do "search and replace" well - in any case, it takes a lot longer and is less efficient than precise writes. Since you know the exact offset of your starting write and the filesize, you should be able to figure out the exact offset where it terminates. Then just WRITE_LONG (or whatever) the nulls you need. There's cleverer ways to do it I'm sure - you could even INSERT_BYTES to the end of your source .wav and then WRITE_FILE it to baldur.exe. If you want to make sure you're writing to the right place, you can do a READ_LONG first and then PATCH_IF only if the read variable equals the expected hex value. Take a look at Ascension64's or Taimon's .exe patches for working examples of this sort of thing.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle