Pushed a commit that should fix the descriptions, but I also wrote up an explanation for how I did it and why it works, just in case this kind of thing comes up again.EmreX_Coded wrote: ↑Thu Jan 20, 2022 12:11 pm UPDATE 2:
I used the old fscr015_002_100.bf instead of the new hook and it now works, i have successfully loaded the Mod Menu into the game.
NOW THE NEW PROBLEM:
It seems like the description of EVERY Option in the Menu (sub menus included) is shifted
Example:
When i hover over the "Player" Option (the first option in the Menu) then the Description is blank.
When i hover over the "Battle Select" Option (the second option) then it shows me the Description of the Player Menu Option
So Descriptions are in the wrong order/place. But i can't figure that out sadly :/
But it loaded! So now fixing this problem at everything should work. ^^
It's kinda long so I'll put it in a spoiler.
Fixing Offset MSG Descriptions
Basically, each
In this case, 94 is the ID of the corresponding description message.
So selecting
Problem is, if you add more messages before
Then all the
etc.
To make it even more complicated, there are more messages in the
If you decompile the original
This shows that there are 34 messages in the
But if you decompile
And
Since the Mod Menu gets tacked onto the end of these original
So for example, let's start with
The
To fill it out with 147 of these more easily, we can use an online number list generator like this and start at 35, working our way up to 181. The prefix can be
Now I can just paste this into notepad++ and replace the
The placeholder is imported by
Now I can just repeat this process for
Last step, probably the most inconvenient, is to rename all the
Fortunately I already made a program that automates this, msgReindex.exe.
Ta-daa!
I can tell if it worked by decompiling the
[SEL]
option in the Mod Menu .msg
file ends with a command like this: [f 4 26 1 94]
.In this case, 94 is the ID of the corresponding description message.
So selecting
[s]Player[f 4 26 1 94][e]
in-game should display the following message:
Code: Select all
[dlg GENERIC_HELP_94]
[s]Edit your Personas, items, stats,[n]money, or even your name.[e]
GENERIC_HELP_94
, it's no longer the 94th message.Then all the
GENERIC_HELP_X
lines need to be renamed with the new ID, as well as the number in the selection option.GENERIC_HELP_94
becomes GENERIC_HELP_95
[s]Player[f 4 26 1 94][e]
becomes [s]Player[f 4 26 1 95][e]
etc.
To make it even more complicated, there are more messages in the
mementos/palace .bf
files than in the overworld one. If you decompile the original
field.bf
, you get a file called field.bf.msg.h
with the ID of each message:This shows that there are 34 messages in the
field.bf
.But if you decompile
dungeon.bf
, it has 110 messages. And
at_dng.bf
has 181.Since the Mod Menu gets tacked onto the end of these original
.bf
files, we have to start our Mod Menu .msg
at ID 182.So for example, let's start with
field.bf.flow
. 181 - 34 = 147, so we need to add 147 placeholder messages.The
placeholder.msg
next to the .flow
is full of dummy messages like this:
Code: Select all
[dlg msg01]
[s][n][e]
[dlg msg02]
[s][n][e]
...
[dlg msg
and the suffix can be ]\n[s][n][e]\n
Now I can just paste this into notepad++ and replace the
\n
with an actual new line & save it as the placeholder.msg
next to the field.bf.flow
.The placeholder is imported by
field.bf.flow
before the Mod Menu .flow
, but after the original field.bf
.
Code: Select all
import( "../build/input/extracted/etc/field.bf" );
import( "placeholder.msg" );
import( "../ModMenu.flow" );
dungeon.bf
(placeholder messages starting from 111 and ending with 181).Last step, probably the most inconvenient, is to rename all the
GENERIC_HELP_X
and [f 4 26 1 x]
lines in the Mod Menu .msg
to start from 182.Fortunately I already made a program that automates this, msgReindex.exe.
Ta-daa!
I can tell if it worked by decompiling the
field.bf
and dungeon.bf
output scripts and seeing if the message IDs line up as expected.