Hi tirlititi, I've done a bit of playtesting in the last few days, but it seems the desired changes to the battle theme won't take effect. Here's what I did:
I've exported the BtlEncountBGMMetaData.txt, opened it with a text editor and made the required changes, and then I imported it again using the "import selection" function in Hades Workshop. I've done this with both resource.assets files (the x64 and the x86) to be sure. However, I still don't get any music changes in my new random battles. Both resource.assets files are updated according to the fiel change date. Is there anything else I'm missing?
Also, I've encountered another problem: When adding random battles to a new field, after such a battle the field music doesn't resume and I can't move my character anymore. I've noticed that all fields that naturally have random battles also have a main_reinit function in their scripts, while fields without random battles don't. So I'm guessing I need to write a main_reinit function for the fields that I've added random encounters to, right? I'm just unsure what exactly I need to put there, as these scripts seem to differ from field to field. From what I see it's something similar to each respective field's main_init function, but before I resort to (potentially fruitless) trial and error I was hoping that you could give me some general tips as to what I can copy/paste from the main_init script.
If you add random battles to a field that doesn't have it, you need to add the function
"Main_Reinit" to the script for the player to regain control after the battle.
(Not sure if this is the
precise code to enter in the function (ask Tirlititi) but I used this for some of mine without issue:
Function Main_Reinit
set VAR_GlobBool_159 = 0
RunScriptAsync( 0, 250, 13 )
if ( VAR_GlobBool_155 == 1 ) {
ATE( 1 )
}
ShowTile( 11, 0 )
ShowTile( 12, 0 )
if ( VAR_GlobBool_158 == 0 ) {
0x27( 127 )
} else {
0x27( 255 )
}
Wait( 2 )
ShowTile( 9, 0 )
RunTileAnimation( 0, 0 )
SetTileAnimationFlags( 0, 16 )
SetTileAnimationSpeed( 0, 64 )
RunSPSCode( 10, 130, 195, 0, 0 )
RunSPSCode( 10, 145, 6000, 0, 0 )
RunSPSCode( 10, 155, 255, 0, 0 )
RunSPSCode( 10, 160, 16, 0, 0 )
RunSPSCode( 10, 170, 0, 0, 0 )
RunSPSCode( 10, 156, 1, 0, 0 )
RunSPSCode( 10, 131, 1, 0, 0 )
SetCameraFollowHeight( 500 )
if ( VARL_GenBool_2926 ) {
ShowTile( 9, 1 )
}
if ( VAR_GlobUInt8_24 ) {
RunScriptAsync( 2, 15, 14 )
}
if ( VAR_GlobUInt8_25 ) {
RunScriptAsync( 2, 18, 14 )
}
Wait( 2 )
if ( VAR_GenUInt8_13 == 9 ) {
SetTextVariable( 2, 0 )
WindowAsync( 6, 0, 65 )
RaiseWindows( )
WaitWindow( 6 )
set VAR_GenUInt8_13 = 0
}
if ( VAR_GenUInt8_14 == 9 ) {
SetTextVariable( 2, 1 )
WindowAsync( 6, 0, 65 )
RaiseWindows( )
WaitWindow( 6 )
set VAR_GenUInt8_14 = 0
}
set VAR_GlobBool_159 = 1
if ( VAR_GlobBool_158 == 1 ) {
set VAR_GlobBool_158 = 1
if ( VAR_GlobBool_159 == 1 ) {
if ( VAR_GlobBool_156 == 0 ) {
EnableMove( )
0x27( 255 )
if ( VAR_GlobBool_144 == 0 ) {
EnableMenu( )
}
}
}
}
if ( VAR_GlobUInt8_17 == 255 ) {
set Op66(( GetData_12 - 160 ), ( GetData_13 - 112 ))
}
0xA9( 250 )
FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )
return
The battle music will stop playing after battle if
"No Victory animations" isn't checked and that random battle's music code isn't in the field (through
BtlEncountBGMMetaData.txt). In this case, you can just put the field's Sound code in
Main_Reinit, and/or check the box
"No Victory Animations".
editing the BtlEncountBGMMetaData.txt e.g.1. I've added a Battle with
"625" to field:
"Daguerreo/Entrance".
Daguerreo/Entrance is Field ID:
"2800"Extract and open
BtlEncountBGMMetaData.txt (Always keep the BtlEncountBGMMetaData.txt in the HadesWorkshopAssets\Resources folder!)From the list scroll down to #2800:
Since Daguerreo doesn't ever have a random battle it in Vanilla, I've added it in as Tirlititi told you to do before.
The number
"111" is music id:
"music082" which is
"Hunter's Chance" (in my case, a battle theme).
Save the .txt file, import it back with HW Unity Viewer and test.
My battle leaves
"No Victory Animations" unchecked
With this setup, the battle will be in the field, once the battle ends, the field music resumes as it should.
Also for a setup for multiple battles can go a little something like this in the field script:
if ( VARL_GenBool_7962 == 0 ) {
DisableMove( )
DisableMenu( )
RunSoundCode( 265, 0 )
Wait( 10 )
0xA9( 250 )
FadeFilter( 4, 24, VAR_GlobUInt8_17, 255, 255, 255 )
Wait( 25 )
RunSoundCode3( 53248, 3096, 0, -128, 125 )
Wait( 30 )
0xA9( 250 )
FadeFilter( 5, 16, VAR_GlobUInt8_17, 0, 0, 0 )
Wait( 70 )
RunSoundCode( 0, 73 )
WindowSync( 1, 128, 400 )
WindowSyncEx( 22, 1, 128, 401 )
Wait( 10 )
0xA9( 250 )
FadeFilter( 4, 24, VAR_GlobUInt8_17, 255, 255, 255 )
Wait( 25 )
RunSoundCode3( 53248, 3096, 0, -128, 125 )
Wait( 30 )
0xA9( 250 )
FadeFilter( 5, 16, VAR_GlobUInt8_17, 0, 0, 0 )
Wait( 10 )
WindowSyncEx( 22, 1, 128, 402 )
WindowSync( 1, 128, 403 )
WindowSyncEx( 22, 1, 128, 404 )
WindowSync( 1, 128, 405 )
FadeFilter( 2, 24, 0, 64, 64, 64 )
RaiseWindows( )
WindowSync( 1, 16, 406 )
WindowSync( 1, 16, 407 )
WindowSync( 1, 16, 408 )
WindowSync( 1, 16, 409 )
set VARL_GenBool_7962 = 1
}
DisableMove( )
DisableMenu( )
RunSoundCode( 0, 73 )
WindowSync( 1, 16, 410 )
switch 5 ( GetDialogChoice ) from 0 {
case +0:
RunSoundCode( 0, 0 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 896 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 899 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 897 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 210 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 211 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 57 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 82 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 231 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 280 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
Battle( 1, 763 )
RunSoundCode( 0, 111 )
DisableMenu( )
DisableMove( )
Wait( 20 )
0xA9( 250 )
FadeFilter( 4, 24, VAR_GlobUInt8_17, 255, 255, 255 )
Wait( 25 )
RunSoundCode3( 53248, 3096, 0, -128, 125 )
Wait( 30 )
0xA9( 250 )
FadeFilter( 5, 16, VAR_GlobUInt8_17, 0, 0, 0 )
Wait( 30 )
RunSoundCode( 0, 5 )
FadeFilter( 2, 24, 0, 64, 64, 64 )
RaiseWindows( )
WindowSync( 1, 16, 411 )
0xA9( 250 )
FadeFilter( 4, 24, VAR_GlobUInt8_17, 255, 255, 255 )
Wait( 25 )
RunSoundCode3( 53248, 3096, 0, -128, 125 )
Wait( 30 )
0xA9( 250 )
FadeFilter( 5, 16, VAR_GlobUInt8_17, 0, 0, 0 )
Wait( 30 )
FadeFilter( 2, 24, 0, 64, 64, 64 )
RaiseWindows( )
WindowSync( 1, 16, 412 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 15 )
AddItem( 15, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 25 )
AddItem( 25, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 39 )
AddItem( 39, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 49 )
AddItem( 49, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 44 )
AddItem( 44, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 56 )
AddItem( 56, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 61 )
AddItem( 61, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 63 )
AddItem( 63, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 67 )
AddItem( 67, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 78 )
AddItem( 78, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 83 )
AddItem( 83, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 84 )
AddItem( 84, 1 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 87 )
AddItem( 87, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 96 )
AddItem( 96, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 97 )
AddItem( 97, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 131 )
AddItem( 131, 6 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 147 )
AddItem( 147, 7 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 163 )
AddItem( 163, 4 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 164 )
AddItem( 164, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 167 )
AddItem( 167, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 175 )
AddItem( 175, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 176 )
AddItem( 176, 8 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 191 )
AddItem( 191, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 195 )
AddItem( 195, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 197 )
AddItem( 197, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 209 )
AddItem( 209, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 222 )
AddItem( 222, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 198 )
AddItem( 198, 8 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 225 )
AddItem( 225, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 226 )
AddItem( 226, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 227 )
AddItem( 227, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 228 )
AddItem( 228, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 229 )
AddItem( 229, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 230 )
AddItem( 230, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 231 )
AddItem( 231, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 232 )
AddItem( 232, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 233 )
AddItem( 233, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 234 )
AddItem( 234, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 238 )
AddItem( 238, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 235 )
AddItem( 235, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 241 )
AddItem( 241, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 242 )
AddItem( 242, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 243 )
AddItem( 243, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 247 )
AddItem( 247, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 248 )
AddItem( 248, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 249 )
AddItem( 249, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 250 )
AddItem( 250, 13 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 253 )
AddItem( 253, 50 )
WindowSync( 7, 0, 68 )
RunSoundCode3( 53248, 108, 0, -128, 125 )
SetTextVariable( 0, 254 )
AddItem( 254, 50 )
WindowSync( 7, 0, 68 )
WindowSync( 1, 16, 413 )
WindowSync( 1, 16, 414 )
set VARL_GenBool_7963 = 1
FadeFilter( 6, 16, VAR_GlobUInt8_17, 255, 255, 255 )
EnableMove( )
RunSoundCode( 0, 73 )
EnableMenu( )
Wait( 16 )
FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )
TerminateEntry( 255 )
break
case +1:
DisableMenu( )
DisableMove( )
Menu( 0, 0 )
EnableMove( )
EnableMenu( )
break
case +2:
DisableMenu( )
DisableMove( )
Party( 4, 0 )
UpdatePartyUI( )
EnableMove( )
EnableMenu( )
break
case +3:
DisableMenu( )
DisableMove( )
SetHP( 0, 9999 )
SetMP( 0, 999 )
CureStatus( 0, 255 )
SetHP( 1, 9999 )
SetMP( 1, 999 )
CureStatus( 1, 255 )
SetHP( 2, 9999 )
SetMP( 2, 999 )
CureStatus( 2, 255 )
SetHP( 3, 9999 )
SetMP( 3, 999 )
CureStatus( 3, 255 )
SetHP( 4, 9999 )
SetMP( 4, 999 )
CureStatus( 4, 255 )
SetHP( 5, 9999 )
SetMP( 5, 999 )
CureStatus( 5, 255 )
SetHP( 6, 9999 )
SetMP( 6, 999 )
CureStatus( 6, 255 )
SetHP( 7, 9999 )
SetMP( 7, 999 )
CureStatus( 7, 255 )
SetHP( 8, 9999 )
SetMP( 8, 999 )
CureStatus( 8, 255 )
SetHP( 9, 9999 )
SetMP( 9, 999 )
CureStatus( 9, 255 )
SetHP( 10, 9999 )
SetMP( 10, 999 )
CureStatus( 10, 255 )
SetHP( 11, 9999 )
SetMP( 11, 999 )
CureStatus( 11, 255 )
RunSoundCode3( 53248, 534, 0, -128, 125 )
FadeFilter( 2, 24, 0, 64, 64, 64 )
RaiseWindows( )
WindowSync( 1, 16, 80 )
EnableMove( )
EnableMenu( )
break
case +4:
EnableMove( )
EnableMenu( )
Wait( 16 )
FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )
if ( GetDialogChoice == 0 ) {
FadeFilter( 7, 16, VAR_GlobUInt8_17, 0, 0, 0 )
} else {
EnableMove( )
0x27( 255 )
EnableMenu( )
}
}
return
that script was a battle rush mode I removed as
"trial mode".
Since I no longer used it in the mod, feel free to use it for your occasion.