#Custom Boss Select Menu doesn't work?
51 messages · Page 1 of 1 (latest)
your hook for the field script is probably bugged, do you get bf emulator errors in the log?
i was gonna suggest checking the log file from the last time you booted the game since presumably the error would be the same, also those messages arent from bf emulator theyre from cbt
bf emulator log messages will be labeled as such. look for ones that say something like "failed to compile"
show me your .flow
the battle select flow or the femulator flow?
here's battle select
and the femulator flow (too much to screenshot)
void MAIN_01_TOILET_hook()
{
int var2;
int var3;
int var13;
if ( BIT_CHK( ( 0x40000000 + 155 ) ) == 1 )
{
if ( CHK_CMB_SPECIAL_TIME() == 1 )
{
MSG_WND_DSP();
MSG( 55 ); // MSG_VELVET_LAV_NO_HELP_n
MSG_WND_CLS();
}
else
{
Sub_Lave_SET_LOOKAT();
MSG_WND_DSP();
MSG( 54 ); // MSG_VELVET_LAV_NO_HELP
MSG_WND_CLS();
Sub_Lave_RESET_LOOKAT();
}
var13 = SCRIPT_READ( 39, 0, 0 );
SCRIPT_READ_SYNC( var13 );
SCRIPT_EXEC( var13, 0 );
SCRIPT_FREE( var13 );
return;
}
var2 = FLD_PC_GET_RESHND( 0 );
FLD_CAMERA_LOCK();
FLD_CAMERA_LOCK_INTERP( -1.27f, 238.035f, 996.412f, -0.4222f, 0.1173f, 0.0552f, 0.8972f, 0 );
FLD_MODEL_SET_TRANSLATE( var2, -1.15f, 0.00f, 888.14f, 0 );
FLD_MODEL_SET_ROTATE( var2, 0, -90, 0, 10 );
FLD_MODEL_SYNC_ROTATE( var2 );
var3 = FLD_MODEL_CLONE_ADDMOTION( var2, 210 );
MDL_ANIM( var3, ( 60 + 0 ), 0, 0, 1.00f );
MDL_ANIM_SYNC( var3 );
MDL_ANIM( var3, ( 60 + 1 ), 1, 0, 1.00f );
SUB_VELVET_ReTutorial();
MDL_ANIM( var3, ( 60 + 2 ), 0, 0, 1.00f );
MDL_ANIM_SYNC( var3 );
MDL_ANIM( var3, 0, 1, 0, 1.00f );
FLD_MODEL_REVERT_ADDMOTION( var2, var3 );
FLD_MODEL_SET_ROTATE( var2, 0, 90, 0, 0 );
FLD_MODEL_SYNC_ROTATE( var2 );
N_CAM_01_toilet_END();
FLD_MODEL_UNIT_TRANSLATE( var2, -0.2958f, -0.00f, 816.5358f, 0 );
FLD_MODEL_SYNC_TRANSLATE( var2 );
var13 = SCRIPT_READ( 39, 0, 0 );
SCRIPT_READ_SYNC( var13 );
SCRIPT_EXEC( var13, 0 );
SCRIPT_FREE( var13 );
}
i didnt rly need that second thing, thats just part of custom boss select itself, but anyway in the first one it should be Main_hook
void Main_hook?
yea
Nope, still showing Encounter 1
you have the dummy file?
well
actually for me i needed to use the original bf from custom boss select as dummy for some reason, rather than just renaming an empty txt
The only file I have in FEmulator is FHIT_010_003_00
Legit everything in the same spots that the mod had, I have.
then youre hooking the wrong file, you should be hooking scr0039_00_0x.bf (x for whichever menu option you want to start the fight
you dont need to touch fhit at all
Wonder why DC made it like that?
so I replace Main_hook with scr0039_00_01 (first battle) or scr0039_00_01_hook
the base mod hooks fhit to pull up a menu after the normal toilet behavior, and then the option you pick in that menu runs a bf made specifically for that mod (the scr files)
you want to hook the scr files because those are the actual battle part
heres the rematch wip, thats the rough structure you want (ignore the localization framework stuff)
i made my main_hook call another menu to pick the boss you want but if you just want to call the one encounter you can just make it how it looked before
I want to be able to call multiple encounters.
So for Battle 1, one encounter, Battle 2, another encounter, so on so forth
then you hook multiple script files
although honestly if you have multiple custom encounters in one mod id suggest the sub menu approach so youre not taking up all the battle menu slots if custom encounters ever become more common (better compatibility)
sub menu eh?
Well I guess so, I'd just like to move from constantly recycling the ol' replacing challenge battles stuff I usually do.
you dont need to be hooking anything, the scr BF are simply there as placeholders so that the game doesn't softlock when selecting an entry, just replace the entire scr script of the matching entry you want to use
since its an actual script you can still just create your own sub menu inside that entry or whatever
well, if it works with hooking I won't stop you, but it's not needed since the script are just dummies
i could replace the whole thing but im emulatorpilled 
then again if you replace the file then you need to play with mod priority
so I guess it works out better with hooking
as an example, I had the Elizabeth boss on the 9th option, so I replaced the 9th SCR script
literally just existing script but i changed the encounter id
nothing really complicated
void Main()
{
PUTS("Battle 9 Selected: Elizabeth Boss");
LoadBossEncounter(988);
}
void LoadBossEncounter( int btlID )
{
int fldMajorID = FLD_GET_MAJOR();
int fldMinorID = FLD_GET_MINOR();
int fldEntranceID = FLD_GET_POS_INDEX(); // entrance id
int fldDivIndex = FLD_GET_DIV_INDEX();
FLD_PARTY_STATUS_SAVE();
PREPARE_FIELDBATTLE( btlID ); // battle type that tears screen when starting
CALL_FIELDBATTLE();
CALL_FIELD( fldMajorID, fldMinorID, fldEntranceID, fldDivIndex );
}```
so something I've been kinda wondering about with this menu thing
what would happen if you have 2 different mods that use the same selection? I imagine there'd be a conflict somehow or only one would work but how would you fix that?
use a different numbered entry?
there's 9 of them

each entry loads an entire BF file, so you can have a sub menu if you need more
I was just trying to think if there was any way to make it compatible or not because having to keep in mind whatever other mods use it also just sounds annoying
but oh well
easiest would just be to tell the user to rename one but lord knows you cant trust the user with jack lmao
@smoky bolt so it's not a big deal or anything but I noticed any fights I implemented in the menu not having the option to retry after dying, which kinda confuses me because that's what I thought FLD_PARTY_STATUS_SAVE() was doing but apparently not?
either that or I'm missing something, but the only way I've ever been able to get the battle saves to work is by just triggering the fight through BOSS.BF
i kinda looked at boss.bf while trying to debug the rematch menu and i think the actual retry stuff is a different flow function, FLD_PARTY_STATUS_SAVE just snapshots your team/stock/inventory so itll be the same on the second attempt
yeah I've tried messing around with those other functions and they didn't work either
