#How to tell what object models a field loads?

261 messages · Page 1 of 1 (latest)

lyric cobalt
#

Title says it all basically. Trying to help someone with porting a field from vanilla P5 to P5R but have absolutely no idea how to tell what object models the field loads

vague raft
#

not sure if base game models do it like this, but it's possible to see which models are loaded via checking the properties of bones

lyric cobalt
#

yeah I don't think fields do that

#

okay nvm I think I found something

#

these seem to correspond to object models? don't know how the game determines which ones get loaded or not though because some of them are missing

acoustic arrow
#

Do these get referenced in the field's INIT script...? i.e., by FIELD_OBJ_MODEL_LOAD and/or FIELD_ITEM_MODEL_LOAD?

...Those name patterns look more like field textures than like models, though. The above two functions refer directly to OBJECT and ITEM models by id, and usually seem to be followed by positioning commands -- so I'm not sure what information they'd need from the field model itself.

#

(In other words: items and objects definitely do get loaded in the FIELD/INIT/ scripts, but the question is whether that's how all item/object models get loaded, or just some conditional ones.)

lyric cobalt
#

well the naming convention follows how the object models are named

#

so I'm assuming it has something to do with them

acoustic arrow
#

Wait, -- remedial question, now that I think I'm understanding your question better -- the objects within the field's model are toggleable / don't just always load with the field?? I was thinking of the external objects and items in MODEL/FIELD_TEX/OBJECT/ and MODEL/ITEMS/ above.

#

(That seems obvious now from the above screenshots but 🤯 ... carry on.)

lyric cobalt
#

I'm wondering how the game determines what object models get loaded

#

The screenshot I posted is from the field model itself and given the name, I'm assuming it has to do with the actual placement of the objects

vague raft
#

just checked on a game model and basically fldLayoutOfModel_major is the major id of a mesh iin this example 57 bc it's loaded m057_204 and fldLayoutOfModel_minor is 204

you can view this by checking the bone properties, changing major and minor id here can make the game load a different field object mesh

acoustic arrow
#

So are the two m057_074s (_01 and _02) loading duplicates of the same mesh on two different bones...?

vague raft
#

yeah ig so

lyric cobalt
#

I swear I clicked that and it didn't show anything 🤔

#

I guess I'm just blind, thanks femc

#

well nothing seems like it's missing from the list so I wonder why this door is just missing

peak zealot
#

It's possible they're loading but just in a different location to where they should be

#

if the models were missing it would've softlocked

lyric cobalt
#

my hunch was that it was something handled through some obscure script somewhere

#

idk field scripting that well though

lyric cobalt
#

okay so it turns out those objects being spawned were a part of this GFS. note to self (and anyone else), check all the GFS files when you do things like this lol

lone light
#

If you enable logging - you should also be able to see the items model files that are loaded separately (rather than as part of the the map) when you load into it, and when you trigger events on the map, it should also tell what gets loaded. the logs are obviously very verbose,

lyric cobalt
#

idk why, but I've tried enabling the file access thing that's part of the CriFSv2 thing

#

and it just doesn't work for me

lone light
#

😦 - no logs are generated?

lyric cobalt
#

I'm dumb

#

it's reloaded console

#

right

lyric cobalt
#

well not like it matters now because the thing is just softlocking after porting the scripts over and I have no earthly idea why xd

lone light
#

if you check the logs, you might see if its trying to open a file that doesnt exist or something

lyric cobalt
#

doesn't say. It just stops

lone light
#

does teh game crash or is just black screening?

lyric cobalt
#

just softlocks when I try to load the field

lone light
#

its worth alt tabbing to the console and see what is happening there

lyric cobalt
#

It just stops printing anything after a few

#

It's also printing a bunch of things that have nothing to do with this field which is just confusing me

lone light
#

when does the softlock happen?

#

on game startup, or on map load?

lyric cobalt
#

map load

lone light
#

hmmmm

#

sounds like the scripts are trying to call something they can't find

#

might be worth sharing the files?

lyric cobalt
#

yeah I'll post in a bit

#

something else I wanted to try and see if it still happens

lyric cobalt
#

well whatever the problem is, it seems to be with the init script

#

and I barely understand what any of this is doing lol

lone light
#

sounds silly, but worth checking that import statement - in case its case sensitive

lyric cobalt
#

I don't think it is, but if it was then it wouldn't even be compiling

lone light
#

true..

#

are you essentially overriding the royal 157_013 field and associated scripts?

#

or are you giving it a new code

lyric cobalt
#

I just took the vanilla script and converted the bitflags

#

but I side-by-sided them and most of it is the same anyway

lone light
#

so it looks like the vanilla script is calling another script in it

#

var2 = FLD_SCRIPT_READ( 157, 13, 100 );

#

but the royal script seems to be calling
var2 = FLD_SCRIPT_READ( 157, 13, 120 );

lyric cobalt
#

huh

#

wonder what that's for

lone light
#

its in procedure index 6

#

to be fair the original script also does call 157, 13, 120

#

but that procedure call doesnt exist in royal, and in the original bit is turned on by that procedure

#

assuming i've got the right file, it seems to be about a path block?

#

(at least the msg is)

lyric cobalt
#

hm

#

idk what to do about this tbh lol

#

but I think it's that whole thing where the card thing forms a wall or something

lone light
#

i mean i might be clutching at straws

lyric cobalt
#

yeah idk, I'm very lost on this one

lone light
#

might be worth sharing the whole mod that you've got so far see if someone can debug the script in context

lyric cobalt
#

I'm at a complete loss lol

lone light
#

does this look right?

#

i get a softlock when the enemy attacks me though:

Binder_Find: CALENDAR\P5_DANGER_CHA09_A.DDS
Register_File: CALENDAR\P5_DANGER_CHA09_A.DDS
Binder_Find: CALENDAR/P5_DANGER_CHA09_A.DDS
Register_File: CALENDAR\P5_DANGER_CHA09_A.DDS

CRI # W2007060101:Can not open file. (err = 3, path = CALENDAR\P5_DANGER_CHA09_A.DDS)

#

(but thats likely because i warped there, and so there's no palace ruler set currently)

lyric cobalt
#

is that why it's trying to load the unused one for Wakaba lol

lone light
#

yes

#

but thats just because im not in a palace mode

#

and i used console commands to warp

lyric cobalt
#

gotcha

lone light
#

but warping there it loaded ok

#

when i go near the door akechi dialog pops up

lyric cobalt
#

weird

#

it was softlocking on me whether I tried warping there from mod menu or going there naturally

lone light
#

hmm i use zmenu from the title menu

#

ive disabled every other mod except p5 essentials as well

lyric cobalt
#

huh. I just tried again, but doing the thing that mod menu does where you can go into the test field from title screen

#

and warping there

#

and it worked

lone light
#

yeah the whole map loaded fine for me

lyric cobalt
#

maybe my saves are just fucked somehow?

lone light
#

maybe?

#

i will say though, the event in the room with the guard has the camera in the wrong place i think

#

when you go through the double doors at the end

lyric cobalt
#

yeah I notice that too

#

although it's just positions in general that are wrong

lone light
#

yeah, that EVT file probably got updated

#

(assuming its controlled by an EVT and no the script directly)

lyric cobalt
#

yeah idk how these cutscenes work

#

that don't like transition to full-blown events

#

and the log just spitting like 700 files that have nothing to do with this field at me is really not helping

#

I don't see it loading an EVT or anything though

lone light
#

I can see E177_001.EVT

#

but that might be dying and triggering a game over

lyric cobalt
#

well going off Amicitia, that's Kamoshida confessing

lone light
#

huh

lyric cobalt
#

just checked the BMD for it and that seems to be right

lone light
#

ok yeah, i must have done something weird. i ran the scene again, and this time in the logs i dont see an evt file

#

i can see exactly when i loaded into the map, therefore i removed all the title sequence stuff that gets loaded at the beginning of the log file

#

a good way to find the part where you map loads in the logs (if you're not doing it from an event) is to look for the 2MAPID and find the first instance of that. so for your map i searched for 2157_013_010.ENV and then scrolled down from there

lyric cobalt
#

yeah my log just has a bunch of random shit in it

#

like loading The Reaper for some reason

#

loading stuff from a different field entirely

lone light
#

huh thats odd

#

i dont see that at all D:

#

but yeah, that scene is not an evt controlled one, which suggests its does via a script

lyric cobalt
#

hm

#

would stand to reason the whole card wall one is too then

lone light
#

when i triggered the control panel, I did notice that the card wall sudently reappeared and then disappeared

lyric cobalt
#

weird

#

I should probably find a video or something, it's been so long since I actually played vanilla P5 I don't remember how these things are supposed to play out lol

lone light
#

its probably:

SCRIPT/FIELD/FSCR0157_013_110.BF

lyric cobalt
lone light
#

yez

lyric cobalt
#

time for some more drag and drop and pray it works

lone light
#

yup its that event

#

i just checked on youtube

#

and then checked teh msg for that event

#

[msg e382_240_mes01 [Shadow Attendant]]
[s]Inconceivable. How have you managed[n]to make it this far...?[n][w][e]
[s]You truly are pests... Every time you[n]think you've crushed them, they just[n]come crawling back in.[n][w][e]

#

I think this line must be the camera controller:

FLD_CAMERA_LOCK();
FLD_CAMERA_LOCK_INTERP( -788.0983f, 387.1212f, -76.1532f, 0.0066f, 0.7436f, -0.0072f, 0.6686f, 0 );
FLD_CAMERA_SET_FIXED( -788.0983f, 387.1212f, -76.1532f, 0.0066f, 0.7436f, -0.0072f, 0.6686f );

lyric cobalt
#

probably

lone light
#

but with the original file, hopefully it will work?

lyric cobalt
#

trying it now, was just gonna go through them to see if anything needed to be converted for whatever reason

lone light
#

awesome

#

the sound effects are probably defined in the script somewhere

lyric cobalt
#

nothing immediately jumps out at me, but I won't rule out the possibility

lyric cobalt
#

hm

#

oh well, something to figure out later

#

other than that, the locked door not being so locked, the safe room door effects not working for some reason, and the minimap stuff

#

everything else seems to work?

#

also those 2 doors don't have the right prompts either for some reason

lone light
#

it might be because certain bitflags ahvent been set?

#

or certain counts

#

ah no, minimap is deffo broken, because other pats of saes palace work

lyric cobalt
#

yeah idk what to do about that

#

the vanilla minimap for this area has 2 different dds files

#

and I don't think it even loads the 2nd one in Royal now

#

idk if that has something to do with the bin files in FIELD/PANEL/ROADMAP or not, not sure what those are doing

#

also pretty sure the position is just completely off too lol

lyric cobalt
lone light
#

in royal is the door locked when you warped there?

#

the bin filedefines the minmap layers

#

apparently anyway

lyric cobalt
#

oh there's a template for it? wtf

lyric cobalt
lone light
#

there's a template for loads of things

#

i just grabbed it from GH

lyric cobalt
#

I have one called "p5_roadmap" and another one called "p5_roadmaps"

#

uhhh lol

lone light
#

i used the first one

#

p5_roadmaps didnt seem to do anything

lyric cobalt
#

why does 010 always do this to me

lone light
#

btw which ddoor is unlocked?

lyric cobalt
#

the first one on the left from where you spawn in

#

it's supposed to be locked but isn't

lone light
#

its locked for me when there is no event

#

(the distorted door)?

lyric cobalt
#

yeah

lone light
#

also when i press the button the cards retract and the sfx does play

#

yeah its locked for me in the files that you sent

lyric cobalt
#

oh it is wtf

#

I'm just

#

on one apparently

lone light
#

for 010 is it definitely importing the header properly?

lyric cobalt
#

how can I tell?

lone light
#

in your template folder

#

have you got a folder called common?

lyric cobalt
#

yeah

lone light
#

and inside it has include.h, types.h, and utils.h?

lyric cobalt
#

yup

lone light
#

hmmm

#

where did you clone them from?

#

did you get it from the tge repo?

lyric cobalt
#

it was either there or the fork that DC had not that long ago

lone light
#

ah i think i used the fork that secre-c had

lyric cobalt
#

was having this same problem trying to use the FTD template the other day too

#

idk what the deal is

lone light
#

yeah ive not had any issues

lyric cobalt
#

the last time I had an issue like this, it was because my 010 was too out of date or something

#

but this is v14

#

sooo

#

idfk

#

thing just hates me I guess

lone light
lyric cobalt
#

yeah it was working for me too

#

I just blanked on that I guess lol

lone light
#

lol

lyric cobalt
#

I'm just gonna download the templates again ig

#

really don't feel like downloading 010 again if that's the problem zz

#

nope still happening

#

💀

lone light
#

which repo

#

i'll download it and see if i get the same issue

lyric cobalt
#

I just downloaded the ones from tge

lone light
#

i ran it on the parts_157_13.bin

#

ok will try that

lyric cobalt
#

I tried on all 3 of them and it said the same thing

lone light
#

*ERROR Line 55(21): Syntax error.

#

yeah its the templates

lyric cobalt
#

it's not just me

#

which ones did you say you downloaded again

lone light
lyric cobalt
#

hallelujah it works

#

so uh, what exactly am I looking at here then lol

#

oh this is what does the whole layers thing

#

I see

#

still doesn't quite explain why the position is completely off

lone light
#

dumb question, does the roadmap.tbl need to be updated with the info?

lyric cobalt
#

uh

#

good question

lone light
#

i reverted all your changes and just tried to load your _0 dds file (replacing the games version):

#

just to make sure there were no DDS issues

lyric cobalt
#

I'm trying to mess with some of the stuff in there atm, but idk how to get any of the files in the tbl out without them becoming a jumbled mess

lyric cobalt
# lone light

wait so does that mean they're screwed up or something? because that looks like it's only loading half of it

lone light
#

No it’s probably the royal versions of that map roadmap files are much smaller, so it’s cutting it off,

#

Since in royal that room is so small

#

I only swapped the dds, nothing else

lyric cobalt
#

I see

#

I feel like you were onto something with the roadpack tbl but like

#

how do you get the files out of this thing lol

lone light
#

You can open it in persona editor I believe

#

I don’t know much about label tbl files

lyric cobalt
#

yeah I tried that but it seems to just turn everything into a jumbled mess

lone light
#

Is there a template?

lyric cobalt
#

the roadmap one seems to work for these files

#

I checked the vanilla texpack.bin and it doesn't have this problem

#

so idk if it means it's like a template problem or PersonaEditor doesn't like saving the Royal ones properly or what

lone light
#

hmm

#

whats the field id again

#

157_013?

#

so there is an entry in royal one for that map (as expected - since the map has a new version)

#

thats for royal

lone light
#

i notice that if i saw the names of the DDS, it partially shows, but theres some kind of black square over it

lyric cobalt
#

🤔

#

I'll have to try to mess with it again later today

#

although idk why it just doesn't want to save properly for me

lone light
#

i used the fork of persona editor from secrec repo