Jump to content


BGTmusic issues


  • Please log in to reply
52 replies to this topic

#21 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 22 January 2014 - 07:29 PM

 (Are there any of note? I only use SoBH as far as all BG/BGII quests go...)

I throw you with all the romance mods... and then challenge anyone with a full BWS Tactical install --change-log their songlist.2da file... to give you the exact details.

 

The spot where the --noautoupdate comes to is in the BiG World Install.bat file, just after the setup-BGTmusic.exe ... of course for that to actually do it's thing, you need to make a clearly impressive setup for yourself, one should also copy the reserved v23200 weidu.exe to take the uptodated once place just before it's ran and so forth. Of course that needs a localized info on where one stashes the v232 etc.

The BWS's problem is a yet more complex as I have no idea whatever does what.

 

Edit, I made the original post of this at 5AM my time, so it might lack a few understandable point... the fact that the .bat doesn't have "setup-BGTmusic.exe" anywhere, but something else ...
:: Call %INST% BGTMusic "2"

, that you need to manually edit anyways...


Edited by The Imp, 23 January 2014 - 01:13 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#22 Sederien

Sederien
  • Member
  • 10 posts

Posted 22 January 2014 - 09:11 PM

Ah, this is a shame... BWS already uses --noautoupdate if I'm reading the Includes\09_Install.Au3 file correctly (seen at multiple locations):

 

			$Setup[0]='Setup-'&$Setup[2]&'.exe'
			$InstallString=$Setup[0]&' --no-exit-pause --noautoupdate --language '&StringTrimLeft($Setup[5], 3) &' --skip-at-view --quick-log --force-install-list '&$Group&' --logapp'

 

Soo... I'm thinking the best way to handle this issue is to use BWS, find an appropriate time to pause the installation just after "pre-installation" and before any actual "Setup-*****.exe"s are run and then manually replace all of them with version 232. Then let BWS do it's thing as it will already have considered all of the Weidu setups updated by this point.

 

I don't have time to try it out before the weekend, but... in theory this would work?

 

And it looks like BGT already takes ToBex into account:

 

ACTION_IF NOT (FILE_EXISTS "TobEx_ini/TobExVer.txt") BEGIN
  COPY ~bgmain.exe~ ~bgmain.exe~
      READ_ASCII 0x000cc6f7 target_bytes_1 ELSE 0 (0x42)
      READ_ASCII 0x000d40ef target_bytes_2 ELSE 0 (0x611)
      READ_ASCII 0x000d4892 target_bytes_3 ELSE 0 (0x10)
      READ_ASCII 0x005e20b4 target_bytes_4 ELSE 0 (0x19c)
      PATCH_IF (~%target_bytes_1%~ STRING_EQUAL ~%orig_bytes_1%~)
           AND (~%target_bytes_2%~ STRING_EQUAL ~%orig_bytes_2%~)
           AND (~%target_bytes_3%~ STRING_EQUAL ~%orig_bytes_3%~)
           AND (~%target_bytes_4%~ STRING_EQUAL ~%orig_bytes_4%~)
      THEN BEGIN
         WRITE_ASCIIE 0x000cc6f7 ~%patch_bytes_1%~ (0x42)
         WRITE_ASCIIE 0x000d40ef ~%patch_bytes_2%~ (0x611)
         WRITE_ASCIIE 0x000d4892 ~%patch_bytes_3%~ (0x10)
         WRITE_ASCIIE 0x005e20b4 ~%patch_bytes_4%~ (0x19c)
      END ELSE
      PATCH_IF (~%target_bytes_1%~ STRING_EQUAL ~%patch_bytes_1%~)
           AND (~%target_bytes_2%~ STRING_EQUAL ~%patch_bytes_2%~)
           AND (~%target_bytes_3%~ STRING_EQUAL ~%patch_bytes_3%~)
           AND (~%target_bytes_4%~ STRING_EQUAL ~%patch_bytes_4%~)
      THEN BEGIN
          PATCH_PRINT ~bgmain.exe: patch already applied. Skipping...~
      END ELSE INNER_ACTION BEGIN FAIL ~bgmain.exe: Target bytes do not match.~ END
  BUT_ONLY
END ELSE BEGIN
  PRINT ~bgmain.exe: TobEx installation detected. Skipping .exe patch...~
END

 

Which means that as long as you ignore (or edit out) the BWS compatability warning, it should be able to install BGT-Music just fine without breaking the ToBex patch. Again, assuming that you can replace the setups with 232 at the right time.

 

On the right track here or am I way off?


Edited by Sederien, 22 January 2014 - 09:12 PM.


#23 Marvin

Marvin

    Sirius

  • Member
  • 197 posts

Posted 23 January 2014 - 12:03 AM

I can't use the old version of weiDU, because some mods do already have the newest version. So if I replace the new weidu with the old one in the downloads, it won't matter, because some mods do have the newest version and weidu will update anyway. Is there another solution?

#24 pro5

pro5
  • Modder
  • 722 posts

Posted 23 January 2014 - 07:21 AM

I think the easiest solution would be to make the .exe from the archive read-only. Right-click the .exe, set the read-only file attribute, click OK. It should fail to auto-update then. EDIT: Scratch that - testing shows WeiDU has no respect for that flag whatsoever, and updates anyway.

 

And I don't think this requires any other drastic action such as changing WeiDU ADD_MUSIC behavior - the change in v233 was logical and is actually useful, making it easier for "normal" mods to add their music into the game without creating duplicate entries in the .2da if the mus file already exists (i.e. added by another mod). Some other existing mods, or mods currently in development may rely on that behavior, and changing it could break more than just BGTMusic.

 

It is not a normal situation for a mod to add duplicate entries for the same MUS file to the songlist, in fact it's a very strange solution, I guess it was just chosen as a convenient shortcut. The ARE files should have been changed to refer to the same existing 2da entry instead.


Edited by pro5, 23 January 2014 - 07:52 AM.


#25 Sederien

Sederien
  • Member
  • 10 posts

Posted 23 January 2014 - 07:40 AM

I can't use the old version of weiDU, because some mods do already have the newest version. So if I replace the new weidu with the old one in the downloads, it won't matter, because some mods do have the newest version and weidu will update anyway. Is there another solution?

 

That's what the --noautoupdate does. It prevents Weidu from updating even if there are newer versions around.

 

I think the easiest solution would be to make the .exe from the archive read-only. Right-click the .exe, set the read-only file attribute, click OK. It should fail to auto-update then.

 

And I don't think this requires any other drastic action such as changing WeiDU ADD_MUSIC behavior - the change in v233 was logical and is actually useful, making it easier for "normal" mods to add their music into the game without creating duplicate entries in the .2da if the mus file already exists (i.e. added by another mod). Some other existing mods, or mods currently in development may rely on that behavior, and changing it could break more than just BGTMusic.

 

It is not a normal situation for a mod to add duplicate entries for the same MUS file to the songlist, in fact it's a very strange solution, I guess it was just chosen as a convenient shortcut. The ARE files should have been changed to refer to the same existing 2da entry instead.

 

Oh definitely. This isn't a BWS / Weidu problem. This is a BGT-Music issue (and other older music adding mods) for certain. I'm just hoping we can find a workaround solution until the issue is properly fixed for all those of us who want to continue using BGT since the music installs broke sometime last month.

 

(Though I do wonder if it's really harmful for the system to have duplicate entries in the songlist.2da... the game references music files by number, not by name, yes? In which case, the current Weidu system is "cleaner" but not necessarily better?)



#26 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 23 January 2014 - 07:52 AM

I can't use the old version of weiDU, because some mods do already have the newest version. So if I replace the new weidu with the old one in the downloads, it won't matter, because some mods do have the newest version and weidu will update anyway. Is there another solution?

 

That's what the --noautoupdate does. It prevents Weidu from updating even if there are newer versions around.

Just remember that it only applies during the time the file is ran, and the BWS and other things auto update the weidu.exe files in mass at the start of the installation, to make the installation process faster. And the BGT should be installed with the latest weidu.exe, to not cheese up the game files.


Edited by The Imp, 23 January 2014 - 07:54 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#27 Sederien

Sederien
  • Member
  • 10 posts

Posted 23 January 2014 - 08:21 AM

Right... As it I understand the BWS installation it does the following:

 

1) Selection of mods/components

2) Download of mods

3) Extraction

4) Pre-installation setup (update of all setups, some checking stuff)

5) Installation (--noautoupdate applied to ALL, it's been done in step 4)

6) Finishing steps (generalized biffing, etc.)

 

As a note, in step 4, it would seem as though BWS compares all of the setups to a single Weidu.exe in a folder and manually replaces them with the right names (instead of relying on autoupdates to ENSURE each version is up to date). As such, if one wanted to make all of the installs v232, even considering the notes pro5 mentioned, it seems like one could just replace that one file at some point between steps 3/4. Or, as suggested but not yet tested, one replaces Setup-BGTmusic.exe between steps 4 and 5 (along with any other potential music adding mods).



#28 Marvin

Marvin

    Sirius

  • Member
  • 197 posts

Posted 23 January 2014 - 01:33 PM

Yes, but I don't want to use the new weidu at all out of fear that it screws up other mods as well (I experienced some bugs I never had before and I am tired of starting the game over an over again). So I want to replace ALL the .exe files with gthe older weidu. Is there any way to do that!

Edited by Marvin, 23 January 2014 - 02:44 PM.


#29 Sederien

Sederien
  • Member
  • 10 posts

Posted 23 January 2014 - 02:28 PM

I am planning to try what I mentioned in my last post (with BWS) this weekend. If you want to try it earlier and are using BWS, when you start the process and it notifies you that pre-installation is about to begin, find the Weidu.exe file and replace it with a version 232.

 

Then BWS uses that file to replace all of the former ones:

 

	If FileExists($g_GameDir&'\WeiDU\WeiDU.exe') Then
		GUICtrlSetData($g_UI_Static[6][2], _GetTR($Message, 'L3')); => copy WeiDU
		$Setup=_FileSearch($g_GameDir, '*.exe')
		ReDim $Setup[$Setup[0]+2]; => make sure to add WeiDU itself so it exists
		$Setup[0]+=1
		$Setup[$Setup[0]]='WeiDU.exe'
		$Size=FileGetSize($g_GameDir&'\WeiDU\WeiDU.exe')
		For $s=1 to $Setup[0]
			If StringRegExp($Setup[$s], '(?i)-{0,1}(setup)-{0,1}.*exe\z|WeiDU.exe') Then
				ProcessClose($Setup[$s])
				While 1
					If $Size = FileGetSize($g_GameDir&'\'&$Setup[$s]) Then ExitLoop
					$Test=FileCopy($g_GameDir&'\WeiDU\WeiDU.exe', $g_GameDir&'\'&$Setup[$s], 1)
					If $Test = 1 Then ExitLoop
					$Test=_Misc_MsgGUI(3, _GetTR($g_UI_Message, '0-T1'), _GetTR($Message, 'L9')&'||'& StringFormat(_GetTR($Message, 'L10'), $Setup[$s], $Type), 2); => cannot continue without current WeiDU
					If $Test = 1 Then Exit
				WEnd
			EndIf
		Next
		If Not StringInStr(FileRead($g_GameDir&'\WeiDU.log'), 'WeiDU.tp2') Then 
			$PID=Run('"'&$g_GameDir&'\WeiDU\WeiDU.exe" --exit', $g_GameDir, @SW_HIDE, 8); read the version-number directly from weidu
			ProcessWaitClose($PID)
			$Version=StringRegExp(StdoutRead($PID), '\d{5}\r\n', 3)
			If IsArray($Version) Then _Install_CreateTP2Entry('WeiDU', StringTrimRight($Version[0],2))
		EndIf
	Else
		$Site=IniRead($g_MODIni, 'WeiDU', 'Link', '')
		_Misc_MsgGUI(4, _GetTR($g_UI_Message, '0-T1'), _GetTR($Message, 'L9')&'||'& StringFormat(_GetTR($Message, 'L11'), $Type, $Site, $g_GameDir&'\WeiDU\WeiDU.exe')); => need extracted WeiDU-archive
		Exit
	EndIf

I am NOT certain exactly when this is run, but if you can replace the Weidu.exe just before this step in the installation, it will ensure ALL of the setups are the same version old or not.



#30 Marvin

Marvin

    Sirius

  • Member
  • 197 posts

Posted 23 January 2014 - 03:03 PM

I did it, thanks =). But it was a bit more complicated. There are 4 different weidu.exes in the most recent version and I don't know which one is the one that is being copied, so I just replaced all of them ;).

#31 Sederien

Sederien
  • Member
  • 10 posts

Posted 23 January 2014 - 03:16 PM

...

 

Did it work/fix the issue or is the game still playing the wrong music at the wrong time? :huh:



#32 Marvin

Marvin

    Sirius

  • Member
  • 197 posts

Posted 23 January 2014 - 03:32 PM

Don't know, I'm still installing ;)

#33 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 25 January 2014 - 04:25 AM

I hope Wisp will take a peek at this topic and tell us whether or not this can be fixed for the next version of WeiDu.
Technically, this wouldn't be a fix. I can unfix WeiDU so that mods that depend on the old, buggy behaviour will keep working. (Or BGT Music can be updated to not use hardcoded songlist references. ADD_MUSIC provides symbolic references for this exact reason.)

#34 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 25 January 2014 - 04:48 AM

On the case! Will try to get something done to BGTMusic by the end of this weekend. WeiDU should remain bugless :P


"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#35 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 25 January 2014 - 06:36 AM

Ok here's a music.tp2 that uses the variables set by ADD_MUSIC to add the songs to them areas instead of hardcoded stuff :cheers:

 

Drop it into your \bgt\songlist folder before installing to see results :P (WeiDU version doesn't matter now... leave WeiDU aloooooooooone!!!!! :crying:)

Attached Files


Edited by Lollorian, 25 January 2014 - 06:36 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#36 -TiroFisso-

-TiroFisso-
  • Guest

Posted 28 January 2014 - 02:40 AM

Ok here's a music.tp2 that uses the variables set by ADD_MUSIC to add the songs to them areas instead of hardcoded stuff :cheers:

 

Drop it into your \bgt\songlist folder before installing to see results :P (WeiDU version doesn't matter now... leave WeiDU aloooooooooone!!!!! :crying:)

 

Don't work, tavern music start on GNoll Stronghold and Bandit Camp, and Imoen have wrong soundset.



#37 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 28 January 2014 - 03:06 AM

Don't work, tavern music start on GNoll Stronghold and Bandit Camp, and Imoen have wrong soundset.

Could you --change-log the "songlist.2da" and "musiclist.ids" -files ?


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#38 TiroFisso

TiroFisso
  • Member
  • 3 posts

Posted 29 January 2014 - 04:22 AM

Don't work, tavern music start on GNoll Stronghold and Bandit Camp, and Imoen have wrong soundset.

Could you --change-log the "songlist.2da" and "musiclist.ids" -files ?

 

songlist.2da:

 

[WeiDU.exe] WeiDU version 23600
override/songlist.2da bg1npcmusic/backup/0/songlist.2da
override/songlist.2daTB#"SPACE"tashia/backup/0/songlist.2da
override/songlist.2daTB#"SPACE"Kivan/backup/0/songlist.2da
override/songlist.2daTB#"SPACE"Xan/Backup/0/songlist.2da
override/songlist.2daTB#"SPACE"bgt/backup/songlist/2/songlist.2da
Mods affecting SONGLIST.2DA:
00000: ~BG1NPCMUSIC/BG1NPCMUSIC.TP2~ 0 0 // The BG1 NPC Project Music Pack -> Install All Audio: v5
00001: ~TASHIA/SETUP-TASHIA.TP2~ 0 0 // Tashia NPC Mod -> Full version (ToB required): v1.3
00002: ~SETUP-KIVAN.TP2~ 0 0 // Kivan of Shilmista: v13
00003: ~XAN/SETUP-XAN.TP2~ 0 0 // Xan NPC MOD for Baldur's Gate II: v12
00004: ~SETUP-BGTMUSIC.TP2~ 4 2 // Baldur's Gate Trilogy - Musica -> Musica completa Baldur's Gate/Shadows of Amn/Throne of Bhaal (ATTENZIONE: modifica BGMain.exe)

 

 

musiclist.ids is empty:

[WeiDU.exe] WeiDU version 23600
Mods affecting MUSICLIST.IDS:

 

 

Thanks :)


Edited by TiroFisso, 29 January 2014 - 04:26 AM.


#39 pro5

pro5
  • Modder
  • 722 posts

Posted 29 January 2014 - 06:31 AM

Don't work, tavern music start on GNoll Stronghold and Bandit Camp, and Imoen have wrong soundset.

 

Are you trying this on an existing save, by any chance? The changed TP2 from above won't affect areas already visited in your saved game. Imoen is not touched by BGTMusic at all, but messed up soundsets and strrefs are a common problem after loading a save made with a different mod setup/install order than the current one.



#40 TiroFisso

TiroFisso
  • Member
  • 3 posts

Posted 29 January 2014 - 07:17 AM

Don't work, tavern music start on GNoll Stronghold and Bandit Camp, and Imoen have wrong soundset.

 

Are you trying this on an existing save, by any chance? The changed TP2 from above won't affect areas already visited in your saved game. Imoen is not touched by BGTMusic at all, but messed up soundsets and strrefs are a common problem after loading a save made with a different mod setup/install order than the current one.

 

It's a fresh install, no saved game. I've used MoveToArea cheat to try the music in different areas.