#Backport P3R QOL features to P3P & P3F.

1443 messages Β· Page 2 of 2 (latest)

copper schooner
#

so you have to advance time once the event finishes

marsh granite
#

I forgot that my furthest Makoto save is on the day where you get the police station intro

cold storm
#

god why does it take so long to compile lol

marsh granite
#

going to the dorm and forwarding time before resolving that had funny results

copper schooner
#

the dorm entrance has like

#

has like hella messages and procedures and shit

marsh granite
#

Junpei groaning at me to go to the police station even though that happened a month ago

cold storm
#

TURN LEFT!

copper schooner
#

i think swine mentioned that you can do "soft hooking"

cold storm
#

wdym

copper schooner
#

which is hooking part of an already existing procedure

#

instead of the entire thing

#

but i don't know how that works

cold storm
#

could be worth asking :')

copper schooner
#

if we could figure that out, all we would have to do is hook the get_day( 5, 12) thing

#

@steady hearth OHHHHHHH SWIIIIIIIIIIINNNNNNNNNNEEEEEEEEEE

cold storm
#

well the event loads but it's a little unclean with the transition to the next day

copper schooner
#

yeah it needs a fade out effect to the event

#

and then a fade sync

#

and then an EVT_FUNCTION_0001 too

marsh granite
#

the event loaded

#

I'll make the actual event when it isn't 2 AM my time I think adachi_true

#

still though, we're getting very close

cold storm
#

these are definitely gonna have to differ between FEMC and male route lol

#

not just writing but also like, structure, where they're placed, rewards, etc

marsh granite
#

Come to think of it, this exact one we set up kinda lacks that early P3 Junpei salt

cold storm
#

P3R does that quite a bit lol

marsh granite
#

It'd be funny if the FEMC version is the one that ends up closer to the Reload script

cold storm
#

then again, the P3 Junpei salt is already lacking with FEMC's social link with him

#

... which makes his social link rather disappointing to me in P3P

#

super contradictory when compared with the main story

marsh granite
#

I was gonna say, the main story played up his salt in Kotone's route if anything

#

there's something that's just so funny about Mitsuru shutting that shit about "but she's a girl, why is she leader" down

#

she was (rightfully) not having it

cold storm
#

yeah

#

no the thing that really bothers me is that you can max out his social link early, so he can act like oh you're a true friend to me I was awful to you I need to be better

#

and then next full moon operation he reverts

#

lol

marsh granite
#

wait, you can have him at 10 before Arcana priestess?

#

iirc that's where the most of it was at unless I'm mistaken

cold storm
#

there's more right after the love hotel

#

you don't really need to get to 10 anyways to see that he treats you differently in the social link vs the main story and I don't really think it comes down to just the whole battle operations thing

#

he's like pretty warm towards you even in the first few links, he opens up to you
but he also treats you like an ass lol

marsh granite
#

It almost makes me wonder if they just plain wrote the link to happen much later

#

then remembered that they replaced the Link That Tutorials How Links Work

steady hearth
cold storm
#

I'll answer, yes you're still needed

#

BonQ was asking about soft hooking to reduce load times, bc right now this mod takes 35 seconds to load on my machine. which causes R2 to show the "the game has crashed or hung!" message

steady hearth
#

How does it take that long?

#

Is it because there's so much stuff to merge

cold storm
#

I think the file is just really big or something?

marsh granite
#

dorm has reached fat pikachu status

cold storm
#

yeah

#

it has become the animatedsniwe (real)

marsh granite
#

I just need to make the actual scene we wanted adachey

steady hearth
#

So it's a single file taking 35 seconds?

cold storm
#

yeah, takes longer on bonq's machine too, like a minute lol

copper schooner
#

72 seconds for me

steady hearth
#

That is way too long

cold storm
#

indeed!

copper schooner
#

single file btw

steady hearth
#

I'll have a look, you must have done something ungodly for it to take that long lol

cold storm
#

lmao

copper schooner
#

i hooked a single procedure 😭

marsh granite
#

booting just now took considerably less long for me, but this is after having booted with it once

#

caching moment?

steady hearth
#

Yeah

copper schooner
#

yeah once it's cached it's 4 seconds for me

cold storm
#

the new goal is to increase loading times as much as possible in as few lines as possible

copper schooner
#

hell it takes so long that reloaded times out

#

and i have to do a weird combo for the game to load

cold storm
#

you just wait when R2 times out

copper schooner
#

because if i click ok on the reloaded error, it quits before it compiles

marsh granite
#

I said that wrong but it's funnier that way

steady hearth
#

The file really isn't that long, idk why it'd be so slow

cold storm
#

Shin Megami Tensei: Revelations: Persona 4 The Golden Featuring Dante from Devil May Cry for the Sony PlayStation 2

#

yeah I had a brief look myself at the file

steady hearth
#

Maybe it's just the enormous number of chained if statements

marsh granite
#

the new bit we're merging is small, the dorm itself is just large iirc

#

oh could be

cold storm
#

would that really take that long?

steady hearth
#

Idk, maybe naotoshrug

#

Could be that the compiler just has trouble with that many things

copper schooner
#

find a friend has wayyyyyyy more than that one procedure i'm pretty sure

steady hearth
#

Yeah but they aren't all chained

#

You've got an enormous chain in this

copper schooner
#

we uh

steady hearth
#

(i.e. else ifs)

copper schooner
#

we didn't touch how the code is decompiled

#

we just touched the get_day( 5, 12 ) thing

#

so only this section

steady hearth
#

Oh

marsh granite
#

I'm glad you two got a kick out of this btw

#

I coincidentally grabbed that one and was like welp, I can do something goofy here

cold storm
#

it was iconic

copper schooner
#

yeah that was pretty funny

steady hearth
#

I just tried compiling it myself with script compiler and it still took about 30 seconds so it's not anything specific to bf emulator

copper schooner
#

i fucking knew it was my pc performance 😭

cold storm
#

well

#

30 seconds is too long

#

like if it shows the error message about R2 timing out or crashing that sucks lol

copper schooner
#

would soft hooking solve the issue? i think you mentioned being able to edit parts of a procedure instead of the entire one when hooking

marsh granite
#

Come to think of it, ig one other random detail from Reload that feels like a nice novelty

#

actually getting to see the arcade

#

wonder if it would be possible to move the arcade functionality into an event πŸ€”

steady hearth
#

Well given you're only editing a small part of it you could use unhooked to call the rest of the stuff and only include that. Something like

import( "n07_02.msg" );

// Procedure Index: 3
void SCR_JUNPEI_hook()
{
    if ( GET_DAY( 5, 12 ) )
    {
        MSG( MSG0512_JUNPEI_011 );
        var3 = SEL( MSG0512_JUNPEI_01_SELL );
        
        if ( var3 == 0 )
        {
            MSG( MSG0512_JUNPEI_022 );
            MSG_WND_CLS();
            FADE( 3, 20 );
            CALL_EVENT( 912, 1 );
            NEXT_TIME();
        }
        else 
        {
            MSG( MSG0512_JUNPEI_033 );
        }

        // Don't bother with the other days in the original function
        return;
    }

    // Call the original function
    SCR_JUNPEI_unhooked();

}
#

(Sorry that took a while, I couldn't remember what you had to put to call the original function)

copper schooner
#

that would be the entirety of the flow file?

#

oop that error'd out

#

no that doesn't work

#

what is swine talking about?

#

[Script Compiler] (0009:0008) Assignment to undeclared variable: var3
[Script Compiler] (0009:0008) Failed to emit code for value assignment to variable
[Script Compiler] (0009:0008) Failed to emit assignment: var3 = (SEL(None MSG0512_JUNPEI_01_SELL))
[Script Compiler] (0009:0008) Failed to emit variable assignment: var3 = (SEL(None MSG0512_JUNPEI_01_SELL))
[Script Compiler] (0007:0004) Failed to compile if statement body
[Script Compiler] (0005:0000) Failed to emit procedure body
[BfEmulator] Failed to compile BF File | C:\Users\drewk\Downloads\Release\Mods\p5rpc.modloader\Cache\P3P\Files\wyb1etri.elj
[BfEmulatorApi] TryCreateFromBf: Failed to Create Emulated File at Path C:\Users\drewk\Downloads\Release\Mods\p5rpc.modloader\Cache\P3P\Files\wyb1etri.elj
Cannot Create File From C:\Users\drewk\Downloads\Release\Mods\p3ppc.event.linkepisodes\FEmulator\PAK\field2d\p07_02.bin\bg\b07_02.abin\n07_02.bf!

#

that doesn't work?

#

ok so it does "work"

#

and it cut the compile time down to 4 seconds 😭

#

but it doesn't clear the junpei bustup for some reason

#

and i don't know why >.>

#

if anyone knows how to clear the bustup lemme know

#

otherwise the compile time issue is fixed

steady hearth
#

There should be a messagescript function to clear bustups

#

Idk what it is though

copper schooner
#

oh i guess i had MSG_WND_CLS in the wrong spot >.>

#

works now

steady hearth
#

Oh yeah, I didn't put it in that code I sent

#

woops

copper schooner
#

i tested on 7/25 and it plays the normal dialogue for that day

#

i guess ill need to update convenient completion to use that method

#

thanks again swine

steady hearth
#

All good naothumbsup

marsh granite
#

@copper schooner I'm curious what you think might be the best way to approach the arcade th

#

cause the inside of it simply does not exist besides Reload/the movies iirc

copper schooner
#

CALL_BG_IMG( 8, 1, 0, 7 );

marsh granite
#

I gotcha

copper schooner
#

should i work on adding the code to every character to summon the link episodes?

#

while you work on the events?

marsh granite
#

trying to sort out merging for the dorm for each one sounds like a lot ngl

copper schooner
#

are we gonna try to figure this one out lol 😭

#

ok but we can totally do these

#

well some are specified to be in the evening or day

#

so i guess you can also do the link episodes at night for the ones not listed

#

do any of the guys show up on the map during the day in the mc route?

copper schooner
#

ok small problem with koromaru

#

there's already a procedure for checking it's messages on that day

#

but it's a range

#

it's just him saying arf so i guess we can remove it

#

aaaaaaaaaaaaaaaaaaaaaaaagh it doesn't work

#

hmmmmm the initial procedure is taking priority and playing the arf message instead

#

code change right

#

original flow

#

@steady hearth any reason why it would still be using the original procedure here?

#

i don't want to have to hook the entire procedure and drag up the compile time femcmad

#

but there's a range in here that covers what i'm doing

steady hearth
#

It looks fine to me

#

The only thing that could cause your stuff to not play is if the day isn't 8/22 but I would hope that isn't the problem lol

copper schooner
#

it is though

#

man so i unplugged my computer with my feet accidentally right

#

tell me why tf it removed P3P from my reloaded install 😭

#

that's so funny

steady hearth
#

lol that's weird

#

Anyway, you could have a look at the compiled file I guess, maybe that'd tell you something

#

Enable Dump Emulated BF Files for Bf Emulator and then they'll be put in an FEmulator-Dumps folder in the game's install

copper schooner
#

oh wait

#

i can dump the bf files, i don't have the dump the pak files?

steady hearth
#

Yeah

#

Either works

#

You just won't have to unpack them

copper schooner
#

damn that would've saved me so much time

#

why does it say i'm missing semicolon at next time?

#

nevermind.......

#

did reloaded losing P3P make it lose it's mind or something because why am i getting so many errors now

#

fucking mod menu ugh

#

it's the exact same as the others soooooooo

#

i guess time to test if akihiko was even working

#

ok akihiko is working

#

but koromaru isn't.....

#

not working

#

is it possible it's calling the unhooked version first

#

currently it's supposed to play the junpei dialogue because purpa hasn't added the other dialogue yet

#

like here

#

instead it's running this first

#

and i can't figure out why.....

#

ok it's definitely an issue with either atlus script compiler or the game itself because the code is the exact same between junpei and koromaru

#

just with different dates and vars

#

ok still broken

#

fun

Binder_Find: /field2d/bg/b07_02.abin
Register_File: /field2d/bg/b07_02.abin

#

ok so i guess it was working.....

#

it's just on off days the code loads from somewhere else......

#

interesting

#

IT DOESN'T WORK??????????????????

#

i'm so pissed wtf 😭

#

ok what the fuck

#

it still doesn't work

#

can someone explain to me why the koromaru code doesn't work? am i doing something wrong?

#

like am i seriously missing something here?

#

these are 1:1 the exact same code

#

'

#

is it a game skill issue?

#

because my code should be working

#

i can't get it worked out

#

and i kinda don't have the energy to bash my head against a wall until i figure out the solution looooooooooooool

copper schooner
#

well there goes that

copper schooner
#

i should also mention i fixed the koromaru dialogue issue

#

but 9/8 is the date of the first ken link episode

#

and he’s not on the map and is just in his room

copper schooner
#

@latent tree have you had any luck force showing a character on a field through bit flags? none of the flags mentioned for ken in b07_02.abin seem to do anything

#

according to the field containing the ken in his room dialogue

#

it just checks what day it is or a range of days

#

so i can't get the bit check from there

#

the template says 2056 but enabling it doesn't spawn ken anywhere

latent tree
#

Thonk odd

#

I have tried toggling flags already for NPCs and it did remove them as expected, with a custom npc added into the field even

copper schooner
#

it also be nice if i could just print all the associated bit flags instead of going through a massive debugger window too lol

#

there's a possibility i missed a different flag

#

but i checked like 60% of the file and it's only been 2056 or 0

latent tree
#

Hmmm

#

I'll have to look into it later at some point then; can't rn bc I'm at work and away from my PC lol

copper schooner
#

yeah no worries at all

#

toggling flag range 2000 to 3000 doesn't show ken

#

koromarus flag is strangely the male gender flag check

#

4104

#

wonder if that's right

#

ok i'm hella confused right now

#

7/25 save

#

evening

#

ken is there

#

i disable flag 2056, and he disappears???????????

#

is it fucking possible they hardcoded where they spawn on certain days 😭

#

like clearly the flags are all the same for the character spawning

#

but some other magic sauce controls which texture is shown

#

so is it possible that on certain days they just defined where every character spawns and which texture to show?

#

hmmmmm yeah seems hardcoded

#

checked every other dorm field (dunno if he appears anywhere else) and no other flags are mentioned

#

oh wait is it controlled by the tbl.dat file

#

because that template is also broken for me

#

yeah even on the new template, still borked

marsh granite
#

already gotta get across that Junpei's first one has to be accessed from the dorm rather than the classroom anyways tbh, so it's fine

copper schooner
#

yeah that works too

#

yeah yeah

#

and plus it's not like you have to do it on the same day, you have time, right?

marsh granite
#

iirc if you don't do one by the time the next one opens up, the next one doesn't in P3R

#

but they (mostly) aren't restricted to 1 day and 1 day only I think

copper schooner
#

i have all of these added so far

marsh granite
#

Shinji and Ryoji are sort of exceptions to it iirc

#

mostly cause Shinji has some of his literally the day after each other

marsh granite
#

so there is no window

copper schooner
#

would this also be an exception lmaooooo

marsh granite
#

it sounds like it yeah, though since they're different characters

#

could simply make it so ken's stays available when Koro's opens up if they both around the overworld somewhere

copper schooner
#

oh it's for the same character, not just the very next link episode

marsh granite
#

yeah, it's a case of like if you put off doing Junpei's #1

#

the game will not tell you about #2 until it's done iirc

copper schooner
#

damn

#

hmmm so i guess i need to change the get_day for chk_days_startend then

marsh granite
#

oh yeah, ig they are set to exact day checks rn

copper schooner
#

yeah lol

#

that's gonna be fun to test and add dialogue for 🫠

marsh granite
#

right, they have their regular NPC dialogue for all those days too

copper schooner
#

yeahhhhhhhh

#

junpei's first is 5/12 and his second is 8/9 lmaooooo

marsh granite
#

I forget if they do much with the subtitle narration for interacting with Koro in the overworld tbh

#

should be the easiest ideally because normal ass dog

copper schooner
#

yeah lol

marsh granite
#

also that one interaction about Koro not wanting to eat food from Fuuka iirc

copper schooner
#

if only we could see how the flowscript is handled for the link episodes in P3R

copper schooner
#

trying to do one of brawler's ideas right now and it isn't working :/

#

it's in P3R and used for the train station back alley

#

but the files are in P3F

#

so id like to just grab em from there

#

but for the life of me i cannot find em

cold storm
#

iirc that track is not in P3F or P3P

#

not as a track at least

#

it was originally only used in the 2nd cutscene of P3F

copper schooner
#

painfrost damn

#

if someone can get me the P3R version i’ll try and loop it myself

latent tree
# copper schooner oh wait is it controlled by the tbl.dat file

the tbl .dat wouldn't control the flags directly BUT it would control which npc "group" gets loaded at & after a set date & time for that field so it's possible that some days where ken is present use an npc group where him being there is "controlled" by flag 0 (so always present) and others where a different flag needs to be enabled

#

also harudeath on the tbl template not working

#

altho just out of curiosty @copper schooner at the very bottom of your 010 window what does it say here after "Hex ANSI"? bc if it says "BIG" then that's the only thing i could think of that would cause issues since i've never ran into any myself with my templates

#

(the files are little endian and the templates are written expecting to be run under little endian mode; if you're using big endian then the templates aren't gonna read the data right and it'll break things)

copper schooner
#

it says big yeah lol

latent tree
#

yep that's probably what's causing the templates to error out most of the time

#

(altho i am noticing some of these files are breaking the templates in other ways; n07_02_pck.dat errors out right at the very end since the amount of "duplicate bytes" isn't consistent with other _pck.dat files, so the way the template is written it tries to read more data than there actually is... gotta figure that out now)

copper schooner
#

i didn't realize there were modes to 010

latent tree
#

yeah, 010 can interpret hex file bytes in either little endian or big endian

copper schooner
#

where would i change that at

latent tree
#

should be in View -> Endian, there'll be an option for Little Endian and Big Endian

copper schooner
#

oh i see it now lol

#

intel vs motorola

#

that's funny

latent tree
#

yeah, those're the companies that iirc basically 'created' the different endianesses

copper schooner
#

ok so 9/8 evening loads group 157

#

hmmmmmmmmmmmmmmmmmmm that's weird

#

i could've sworn i enabled flag 2056

#

position id hmmmm

#

i noticed one thing when testing find a friend right

#

you can force enable a character to show up

#

but sometimes they'll just be invisible

#

i had that happen a lot testing ken's slink on femc

#

guess i need to move my cursor everywhere looking for the little dude

latent tree
#

sometimes that happens bc the PAK the game loads for the npc textures doesn't have a texture file for that npc i noticed, dunno if that was the issue u were having tho

copper schooner
#

any idea where position 6 is roughly?

latent tree
copper schooner
#

weird that never worked when ken was invisible for me on P3P PSP

latent tree
#

huh, seemed to work for me when i was experimenting with modding the files in the past

#

anyways you can find the data for that position id in the nXX_XX.dat file; you'll wanna look for the entry that has a matching "Index" value (in this case 6)

#

you're looking at field b07_02 which in the n07_02.dat file the position data with the ID of 6 is actually the 4th zero-index troll entry by physical order in the list

copper schooner
#

yeah no still not working

#

flag 2056 enabled and everything

#

no little selectable bubble anywhere

latent tree
copper schooner
#

yeah nope

#

even checked p07_02.bin because sometimes the game loads that

#

same flags

#

same group

#

same date

#

might be some hardcoded nonsense because i’m 99% positive i’m understanding everything right

raven echo
marsh granite
marsh granite
#

the event plays out as an ingame scene, but that song on the radio is missing

#

@cold storm curious about what your idea was that somehow involved I'm Blessed Up

copper schooner
#

have it play in the back alley of the train station

#

since it plays there in P3R

marsh granite
#

I figured P3R only had it play during the early scene where a guy ||turns into a Shadow,|| like the original

#

TIL

copper schooner
#

i was hoping there was a pre looped version sitting in the P3 files

#

but i guess ill have to loop it myself

marsh granite
#

Ah, no there is not

cold storm
#

I mean

#

there is one in the P3R files adachi_true

copper schooner
#

is it an adx lol

cold storm
#

no, it's encrypted hca

copper schooner
#

damn

cold storm
#

would need to be converted

marsh granite
#

encrypted hca w radio filter baked in πŸ˜”

copper schooner
#

does foobar preview the loop points like normal adx files?

cold storm
#

it does

copper schooner
#

can you send it lol

#

i’ll try to get it added

cold storm
#

yeah in a sec

#

I might send you the wav and loop points individually

#

is that cool? idk if there's a way to extract an unencrypted hca from the archive like that

copper schooner
#

yeah that works too

marsh granite
#

I forgot to ask you how you ripped them as encrypted hcas

#

the usual foobar way I do just spits em out as WAV from the acb

cold storm
#

yeah the answer is I didn't lol, I have the awb/acb archive

#

with P4G you could use sonic audio tools to dump the hcas individually. I'm not sure if that's an option for P3R but that's because I haven't tried

marsh granite
#

Right, SonicAudio do be a thing

cold storm
#

I'd imagine it is possible to dump the hcas individually but I can't be bothered to figure out the whole encryption stuff rn

marsh granite
#

they dumped but foobar fails to open them, hm

#

may not inherently mean they're broken, since foobar also refuses to open correctly exported hcas to replace the music either adachi_true

cold storm
copper schooner
#

just found out you can actually buy rose bouquets from the flower shop here

#

ill need to redo how the improved crane game works

cold storm
#

you can buy great vegetables (seedlings) from the flower shop too Dojima_smile

raven echo
#

have i been gaslighting myself this whole time

marsh granite
#

tbf it's easy enough to forget because FES has it, Reload has it, and the cutscene restoration for P3P itself has it in some form

#

but for unmodded P3P they forgor

raven echo
#

huh

#

then again i usually just fast forward through events so me missing it isnt that hard to believe

copper schooner
#

i have an idea for a mod

#

but i got no idea how to execute it

#

i wanna make the reaper drop ultimate weapons and armor just like how they do in P4G

#

but i can’t get it worked out

#

i think the only way to make it drop custom items is to call the battle like how margaret doors do it

#

so maybe adding it as a rare chance in rare chests?

copper schooner
#

having some problems though

#

if anyone wants to test

#

it just makes the reaper drop ultimate weapons if you defeat him

#

you need to get a rare chance of accessing him when opening a rare gold chest

copper schooner
#

NOOOOOOOOOOOOOOOOOOOOOOOO IT BROKE

copper schooner
#

finally fixed it

copper schooner
#

ok so

#

apparently right

#

there's dialogue after tartarus fights

#

like tartarus guardians

#

does anyone have a copy of all the dialogue?

#

i don't know how dialogue works in this game

#

is it safe to assume that 02_0_0 coordinates to the first dialogue choice and so on?

#

damn did they remove the whole line break thing? is it automatic now?

copper schooner
#

nevermind....................

#

i just realized i can't make it because of the pac crashing bug

#

but floor 47 is f057_006

latent tree
#

Which is actually quite nice BC trying to make sure you don't go over the pseudo character limits in the past games lest the text goes outside the message box can be pretty annoying lol

copper schooner
#

yeah pretty annoying

#

i guess ill work on the mod once the pac crashing bug is fixed

copper schooner
#

well i guess i can technically make the mod for hardware first?

#

and just test on hardware

#

and then port it to PC once the bug is fixed

#

except i don't have a save to test naodead

#

nevermind

raven echo
#

not sure if these would fit here since these are from P4G not Reload but i think the option view your party members' personas by using the Persona swap button on their turn along with the option to press the sub menu button to bring up the persona menu would be nice

copper schooner
#

probably would need to be unhardcoded for that

#

the aim right now is to do everything that can be done in pure flowscript

#

that way it can be ported to P3F

#

then we can focus on stuff like code mods

steady hearth
#

Yeah, that's definitely code stuff

copper schooner
#

this game would be 10x more fun to mod if it weren't so locked down unlike P4G

#

i'm kinda tempted to release the current working stuff as a WIP

#

but i really don't wanna have 4+ packages on the page

#

id like to have some dll configuration and have it all bundled in one

#

but ooooooooooooooooooooooooh

steady hearth
#

Why 4 packages?

copper schooner
#

25+ GB download just to compile dlls is not fun

#

there's around 4 finished mods right now

steady hearth
#

Why not just release the 4 mods separately?

copper schooner
#

i could do that yeah

#

hmmmmm

#

making 4 thumbnails πŸ˜”