#How does Boss Text Dialogue work?

1 messages · Page 1 of 1 (latest)

magic bobcat
#

So, as I make boss mods, there's been some times where I want boss dialogue to appear, not the voice but in the text boxes.

How does the script calling them work? And how can I replicate it if not hardcoded?

My plan is if it's not hardcoded, to have boss dialogue in most of my battles.

paper notch
#

it's called from the encounter script like any other dialogue

#

although I think they started using a unique function for this in P5R? I have no idea why

magic bobcat
austere kindle
#

you dont have to copy, you just make a unique label and msg and call that
the msg id doesnt matter unless youre doing some kind of math like eg. jazz club does to pick a pseudorandom msg

magic bobcat
#

I'm looking at other boss flows to try to get a handle on it but so far it looks a little confusing.

void otter
#

Not boss ai scripts, the encounter scripts

magic bobcat
#

Where are those ones at?
BATTLE/EVENT/SCRIPT?

Might be in the wrong area

austere kindle
#

i havent looked much at encounter dialogue specifically but the msgs themselves are basically, like

[s]According to all known laws of aviation[n]there is no way a bee should be able to fly.[n][w][e]```
id suggest giving a look at this for learning to use different msg tags like bustups https://gamebanana.com/tuts/15363
GameBanana

How to edit dialogue text (and more) in Persona 5 Royal... A Persona 5 Royal (PC) (P5R (PC)) Tutorial in the Other/Misc category, submitted by chlorophylls

magic bobcat
#

the event locations I mean

void otter
#

Amicitia has a list of encounters, find the encounter script for it, both the flowscript and messages are in it

#

You can search for some boss battle banter text (like for example pre-aoa lines) in text dump

magic bobcat
#

Thats where I was I think

void otter
#

Yeah that

magic bobcat
#

This is what's confusing me.
Since most of this I don't need as my guy won't be healing, or he will but not like kamo.

void otter
#

I mean encounter script can just show dialogues when some condition is met or just at the start of someones turn

#

It's up to you to program that

austere kindle
#

MSG_DEVIL(), if im looking at it right, is used to make it show the funky textbox that enemies use (though i dont know what the second variable after the msg label does)
and then msgs with the regular textbox are just MSG()
youd use MSG_WND_DSP to make the game display a textbox, call the MSG command, and then MSG_WND_CLS makes the box disappear

im not sure about the different BTL_CUTSCENE_ functions, i assume theyre what makes the camera focus on the speaker in this case

paper notch
#

the BTL_CUTSCENE functions relate to the BCD files

magic bobcat
#

Alright this is just weird.

#

Why does kamoshida's flow say the msg name.

austere kindle
#

bc thats how you call the msg lol

magic bobcat
#

But the others have 1+ sVar2 stuff in them

austere kindle
#

you can call by msg label or msg id, id just use label unless youre doing some sort of math to pick between a set of msgs

magic bobcat
#

I'm looking at others flow and everyone but kamoshida has the 1 + sVar2 thing.

paper notch
#

because Atlus's programmers are very smart

austere kindle
#

presumably sVar2 changes throughout the fight, with the msg called being based on its value

paper notch
#

you would think

#

but no

#

it's always set to 0

austere kindle
#

lmao
atlus moment

magic bobcat
#

I WAS gonna use another boss's flow as a template for mine, but since kamo has a bunch of healing and other scripted stuff that ain't happening.

#

Now I gotta find another way to make the dialogue.

void otter
#

You know I'm honestly amazed you're making enemy ai scripts with 0 programming knowledge or even understanding them

#

Though by that point I assume atlus might have been the same..

magic bobcat
paper notch
#

I had 0 programming knowledge when I started messing with enemy ai either

#

it's honestly not that complicated

#

especially considering how primitive a lot of this game's AI is

austere kindle
#

meanwhile me, a cs major who has done one(1) flow mod completely urelated to enemies

void otter
#

Yeah the scripts are very simple, I recommend actually studying them to understand how they work instead of going "well it doesn't do exactly what I won't so no luck". Might help down the line if you want to make more custom fights

austere kindle
#

yeah it wouldnt hurt to learn a little c syntax

magic bobcat
#

wonder what'll happen if I replace the 1 + var thing with the msg label...

austere kindle
#
paper notch
#

if it's the same msg, then nothing different will happen

#

the value the game is reading is the same

#

idk why they decided to write it that way

#

but Atlus's programmers have a habit of making things way more complicated than they need to be

paper notch
magic bobcat
paper notch
#

I mean regardless of how annoying it is for us, most of the stuff they hardcode makes some sense

#

it's usually just in the way they decided to hardcode it

#

or when they do shit like shoving every bmd related to navi dialogue into the executable for god knows what reason

magic bobcat
#

So how would the boss call the dialogue?
Rn I'm using 0305.BF for the boss dialogue but how would MY boss know to call it?

void otter
#

You have the script. Figure out how it shows the dialogue and then figure out how you can show them

paper notch
#

you would enable this flag in ENCOUNT.TBL

#

then rename your BF to the hex for whatever encounter ID you're using

#

so if you were making a custom encounter over encounter ID 870 (just as an example)

#

the name is always padded out to 4 digits

magic bobcat
#

mine is 775.
but I don't see the hex number

paper notch
#

it'd be 0307 then

#

I think you can use a calculator to convert the number to hex

#

plug the encounter ID into the Decimal field and the Hexadecimal is what you want to name the BF

#

just make sure it's padded out to 4 digits like this

#

I thought the encounter table on Amicitia also had the hex IDs but apparently not

#

I might fill that out at some point if I get bored

magic bobcat
#

Already off to a great start where I can't compile the flowscript to even test it.

#

Ugh.
Might have to wait with the dialogue till I can figure out more.

In the meantime, gonna get some AI stuff going on.