#Add bin merging (+ any other major Aemulus features still missing) to Reloaded II / PersonEssentials

1 messages Β· Page 3 of 1

true bronze
#

In Persona Essentials you'd add a new IFileMerger (presumably SpdMerger) and then in Mod_Merging.cs you'd add it to the list of fileMegers in OnBind (it'd need to be before PakMerger so spds in paks work)
Then in that SpdMerger you'd basically replicate what BfMerger does. It's a bit complicated but I can help more if you have specific questions when you start looking at it

lethal orbit
#

I'll probably start doing that either tomorrow or during the weekend

true bronze
#

Then for the api you'd probably need roughly the same functions that bf emulator has, you can see them in BfEmulatorApi.cs. To expose that api you'd need to add a line in Mod.cs like

_modLoader.AddOrReplaceController<IBfEmulator>(context.Owner, new BfEmulatorApi(framework, _bfEmulator, _log));

(bf emulator's one).

#

That's a very brief overview, when you do decide to work on it I can try and help with any more specific stuff

lethal orbit
#

I'll let you know hee_approves

#

tysm for the help so far

true bronze
#

All good, I'm very happy to see someone else working on this stuff

hollow thicket
#

i would like to help too - but i don't have any knowledge on C# - i would probably break more things then implement :/
i honestly don't even know where to start learning C#

Hopefully i can contribute something to the Modding Community too :/

cedar shuttle
#

It's okay ^-^

#

Everypme starts with small steps πŸ˜‰

lethal orbit
#

finally got it to work without the original files being included, realized I could just do what the pak emulator does and use the spd path to check for and extract the spds from the cpk. Just need to figure out how to get the ones in paks

lethal orbit
#

turns out I swapped height and width when reading from the dds file and that's why it looked like that

simple timberBOT
lethal orbit
true bronze
#

Paks are one of the main reasons I did bf emulator like it is with the dummy files, either way is a bit jank but I thought that way was better (and there was no real pushback from other people)

lethal orbit
#

Oh btw how does bfs in paks work? For mod creators specifically

true bronze
#

Same way any bf does except the dummy file would go somewhere in FEmulator\PAK
Like to edit init_free.bin\init\field.bf there'd be a dummy bf in FEmulator\PAK\init_free.bin\init\field.bf and then the flow in FEmulator\BF\field.fow

lethal orbit
#

yea I think I'm starting to see why you did what you did...

#

if I don't have something put in the PAK directory, it won't be exposed to the pak emulator

true bronze
#

Yeah, I'm pretty sure you can work around that with the pak emulator api though. I think it's AddFile

lethal orbit
#

yea I might be able to work something out with that and AddDirectory

#

maybe

#

it's hard for me to tell how either of them work

#

man there's only like 2 spds in p5r that are in paks but I do want full support

true bronze
#

Basically AddDirectory is like adding a new FEmulator\PAK folder, you probably don't want to use that since pak emulator will then attempt to treat everything in whatever folder you give as paks (and I assume the folder would have some spds which might cause problems)
AddFile adds a single file into a pak. So you'd give it the path to your spd as the file, the route is the route to the pak, and inPakPath should be fairly self-explanatory (if it was init_free.bin\init\thing.spd I think it'd be \init\thing.spd)

lethal orbit
#

ah ok the route part had me confused

minor barn
#

@lethal orbit You're working on the SPR/SPD emulator, right?

#

I wanted to suggest a feature

#

Based on your existing SPD Patcher

#

Being able to set the size of each sprite inside the texture

#

Because we have a very specific bug with textures:
Generally in the bottom of the screen there's gonna be a guide of what button does what, for example Shift to Sprint, M to open Messages, Tab to open Menu, etc
The texts for these buttons are in textures
These texts are in certain positions inside that texture, and the sprites are set for that position
If you patch a texture where a text of a button is on a different place, you have to change the sprite's position
But if you do that, The text for the button witll be in the correct position but the button itself gonna be in a completely different place

true bronze
#

I think this is already planned. When we were initially discussing it I suggested a way to let you define the position, size, etc. of a sprite using a sprt file (which you can export from Amicitia)
You can look at what I've replied to for how I planned it'd work. I assume it's something that's still happening

minor barn
#

You can reproduce that if you grab an UI texture from one language and use it on another language (like grab a texture from idk french and put in on english)

#

small exemple of it happenning

minor barn
#

I was just curious to see if it would help about that bug

#

Bc like, what I have to do now is mess with like scale and stuff until I think it's okay

#

Which is pretty tedious, where I go like:
Change stuff
Save
Load game
test
Doesn't work?
Change stuff
save
load game
test
rinse and repeat

lethal orbit
minor barn
#

Oooh, great!

lethal orbit
#

finally was able to extract the spd from the pak, now I just need the pak emulator to read it

minor barn
#

Also, do you know about the offset setting for sprites, right?

lethal orbit
#

what do you mean?

#

I know that each spd sprite entry has position and length coordinates if that's what you're referring to

lethal orbit
minor barn
minor barn
#

So if you define the X offset as 30, it would be rendered 30 pixels to the right

lethal orbit
#

ah

#

these ones I assume?

minor barn
#

Yes

lethal orbit
#

huh. I didn't know that

minor barn
lethal orbit
#

gaming

minor barn
#

epic

lethal orbit
#

I'm just gonna go with this for spds in paks...

minor barn
lethal orbit
#

they're both unmodified?

minor barn
#

yes

lethal orbit
#

so what am I looking for?

#

completely forgot about this lmao. gonna try and implement this too

minor barn
#

The name for "Bloquear" is in the correct place but the button "N" is completely elsewhere

lethal orbit
#

does the button prompt get moved if you change the language? if it does then that smells like hardcoding

minor barn
#

It does

lethal orbit
minor barn
#

mfw they have a sprite file but they hardcode the sprites either way

solar stratus
#

true

lethal orbit
true bronze
#

Awesome work risepray
Are you planning on looking into sprs later on or are they more different than I originally thought?

lethal orbit
#

not sure, I still need a template πŸ’€

#

i peeked at amicitia's spr parsing code and it does seem kinda different

#

I might try making a template from that

#

if it's remotely similar though it shouldn't be too hard to adapt the spd merging code for it

true bronze
#

Ok, cool. Good luck with that when you try it, hopefully it's easy 🀞

#

I think I'll make an announcement about this (probably just verified modders) in the hopes that you get some testers

lethal orbit
lethal orbit
#

I'm gonna ping @frigid remnant specifically since her texture fixes mod is the first one that comes to mind that changes a bunch of spds (hi keku, would love if you gave it a try naosmiley)

minor barn
#

although that's gonna be pretty hard to make

#

oh no wait, I just saw how it works

#

that might help us like a lot

minor barn
#

@lethal orbit Is there any specifics to how I should export the DDS textures?

minor barn
#

I'm testing the mod and the game doesn't wanna load my saves lol

minor barn
#

technically this is the setup, right?

#

ok i had to put the folder name in all lowercase for some reason but it worked

minor barn
#

ok I just put in the wrong place lol

minor barn
#

Ok how do I deal when the file inside the pak is named like spd/velvet_list_01.spd?

#

i created a folder called spd inside the pak folder and put my sprite there

#

it kinda works, something changes, but it doesn't show my sprite there

minor barn
#

Ok none that needs pak emulation that I made is working

#

Despite the logs saying otherwise

lethal orbit
#

Did you put a blank spd file in the pak emulator folder?

minor barn
#

yes

#

I have this on PAK

#

and this on SPD

lethal orbit
lethal orbit
#

can you try the example mod I uploaded?

minor barn
#

yes

#

it does work actually, no problem

#

maybe it's like I exported the DDS?

lethal orbit
#

probably not

#

it should import the dds properly as long as the header is the same as other dds

#

can I test out your mod?

#

wait wtf...

#

oh I was using switch UI which has lower res lmao

#

it does still work for me though

#

I'll probably have to rewrite part of the emulator though since the way I have it set up it won't detect changes and will always use the cache

#

at least I think?

#

all I know is that sometimes cache will be used even though changes were made

minor barn
#

Do you still want my mod to test?

lethal orbit
#

works for me

minor barn
#

huh

#

Did you change anything in the mod or no?

lethal orbit
#

nope

#

not sure why it's not working for you...

#

especially since non pak stuff does work

minor barn
#

it was cache

#

deleted cache and it worked

lethal orbit
#

ah

#

yea not sure what to do about that...

#

it's fine for mod users but it can be annoying for mod creators

true bronze
#

(I tried to look at your fork to check but you haven't pushed anything, that's kinda scary lol. I pray that your local copy doesn't explode)

true bronze
#

Oh

#

(I always go straight to main lol)

#

I see you already are doing that then, weird...

lethal orbit
#

at least I assume

true bronze
#

Do your sources include every file?

#

Yeah I do

lethal orbit
#

I think it's just the paths to the spd

true bronze
#

The problem is you'd need to get the last write time of every file you use otherwise changing one won't cause an update

lethal orbit
#

yea

#

is it worth just not caching naodead

true bronze
#

If you can you really should...

#

Oh, so the routes you're getting aren't file paths, they're paths to the directory?

lethal orbit
#

uhhh

#

lemme double check actually

#

oh wait I think I do get the files too

#

the tuple passed in contains a DirectoryFilesGroup

true bronze
#

Ok, well if you're not using that you probably should, at least to work out the real last write time

lethal orbit
#

ok I think i actually am checking each file... innerFiles should be the list of files from the DirectoryFilesGroup

true bronze
#

Weird

#

Maybe it's a bug with the cacheing (not your stuff, the actual cache code)

lethal orbit
#

I think it actually works for non paked spds

true bronze
#

Does it consistently not work or is it only sometimes?

lethal orbit
#

I just realized for paked spds when I write the new last write i do it for the dummy spd in the pak emulator folder 🫠

#

however fixing that doesn't seem to fix the issue...

lethal orbit
#

for non paked it seems to work consistently with brief testing

true bronze
lethal orbit
#

oh

#

so maybe I should do both then?

true bronze
#

Wdym by both? What's the other?

lethal orbit
#

both the dummy spd and the modded files

true bronze
#

Oh, I don't think you should need to change it for the modded files (I assume you mean the dds and/or spdspr) it should just be the actual spd file (which is a dummy)

lethal orbit
#

I assume you mean the dds and/or spdspr
yea. that's what I was doing for the non paked spds. I got that from the bf but on second look you were also doing it for the dummy bf since you used a dummy for both paked and non paked naovanish

true bronze
#

Yeah, I don't think you really need to do anything for the loose ones

#

Even if you're unnecessarily changing it for the source files though it shouldn't cause the cache to not update (if anything I'd think it would update when it shouldn't)
Idk what the problem is but I'd say just step through in a debugger and hopefully work out something from that

lethal orbit
true bronze
#

Good luck naosmiley

lethal orbit
#

figured it out...

#

when creating the list of files to be passed in to the CachePakedSpds function, I was populating the list with just the filenames instead of the filepaths

minor barn
#

Man

#

I think you just solved our buttons problem

minor barn
#

sort of

#

that's more on the game than your mod tho

minor barn
#

Ok whole texture replacement broke a bit

minor barn
#

adn the game freezes for like 1 or 2 seconds before loading the menu, where I'm replacing the texture

lethal orbit
#

Are your textures compressed? I think the mod you sent me had textures uncompressed

#

Also if you turn on dumping in the spd emulator mod it'll dump the new spd to your game directory so you could see what it looks like

minor barn
#

It's not compressed

#

it should be?

#

where the dump goes?

lethal orbit
#

game directory

lethal orbit
minor barn
#

Huh, nothing on the game directory

#

only thing I noitice different is a folder called PatternCache

lethal orbit
#

did you turn on dumping in the spd emulator mod?

minor barn
#

Yes

lethal orbit
#

maybe it's somewhere else then? idk this is where it dumps for me

#

try clearing the cache and running the game

minor barn
#

ok now it worked

minor barn
#

ok, what...

#

ok, so, I wanna replace texture p5camp-12.dds

#

if I can still count right, it's texture 11, right?

#

if I put the filename as tex_11, it replaces p5camp_10.dds
if I put the filename as text_12, it replaces pscamp_13,dds

#

I found out, it was texture 8

lethal orbit
#

yea it's texture id, not index

#

do you have my fork of personaeditor?

minor barn
#

I think so

lethal orbit
#

it should show the sprite and texture ids

frigid remnant
cedar shuttle
#

I noticed the PR tied to Cache behaviour, I merged it and pushed it out as a release.

#

Anyway should be live.

lethal orbit
true bronze
#

Very random...

#

Yeah, I don't see why not

#

Oh, ok. I assumed you were referring tops_model.bin since it was just talked about in #p4-modding-chat

#

Ohh, that's the other light lol

#

There's too many of you

#

Sorry

inner sky
#

bustup params too maybe adachi_true

true bronze
#

Anyway, if someone makes a list of files (I assume just binary files) that people want merging for, that'd be helpful

inner sky
#

the real light

inner sky
#

i think

minor barn
#

There's a editor made by ShrineFox that supports FTD

#

I'm gonna try to write support for more type of FTDs on it

dark tree
#

worth noting that shdpersona and enemy are the same exact format

#

although for enemy atlus did massive trolling

#

they have the p5 file. then they went "fuck the format", and just randomly added another pdd file at the end of the existing one

#

like, straight up file header and everything instead of just adding more blocks

lethal orbit
#

wrote a python script that makes it easy to edit and mod in individual textures from sprites. It should make dds/spdspr pairs ready to be used with the spd emulator. feel free to mess around with it hee_approves https://github.com/Secre-C/SpdDisassembler

GitHub

Deconstructs an Spd file, separating each sprite it's own texture and sprite entry. Best used to easily make custom spds to be used with the Spd Emulator - GitHub - Secre-C/SpdDisassembler:...

#

I have no idea if this is the right place for this but it's spd related so I'll put it here for now

true bronze
#

I think putting it here's fair

mortal yarrow
#

i was literally about to ask this to be made for persona editor lol

#

i was hoping someone could add texture atlas-ing support to persona editor so you can edit specific bits of larger textures

#

that's what i was referring to in #modders-chat

scenic sand
#

#1062319573472383006 would also be a good place to put it

mortal yarrow
#

@lethal orbit how much of the code do you think could be applied to tmx files?

lethal orbit
#

no idea

mortal yarrow
#

rip

lethal orbit
#

if I ever stop procrastinating on looking into p4g/p3p spr files then maybe I'll find out NaotoDizzy

mortal yarrow
#

please do 😭

#

there's so many cool tmx mods but they're always incompatible with each other

#

like i love the new P3P P5 skill icons

#

but the items aren't colored

true bronze
#

You mean sprs right?

mortal yarrow
#

nah the tmx files itself

true bronze
#

Not like raw tmxs

mortal yarrow
#

like

#

if it's a massive sheet

true bronze
#

Really? There are sprites that aren't in sprs?

mortal yarrow
#

sorry lemme explain

#

if it's a massive sheet like c_main_01

#

which a lot of mods modify

#

all of them are incompatible with each other

true bronze
#

Yeah, that's an spr isn't it?

mortal yarrow
#

even if they modify one tiny part like naoto's bananas

mortal yarrow
#

they're contained inside of sprs

true bronze
#

Then yeah, that'd just be an spr support thing

mortal yarrow
#

i'm only mentioning persona editor because it already features that bounding box stuff

true bronze
#

Sorry, it's just by saying tmxs I think actual tmx files on their own (which I'm pretty sure would be pointless)

mortal yarrow
#

i meant like

#

splitting the tmx into it's individual pictures, based on the bounding boxes in persona editor

#

then being able to modify each small element

true bronze
#

Yeah, that's an spr

#

Same thing as spds basically

mortal yarrow
#

yeah

true bronze
#

(At least in terms of what they do)

lethal orbit
#

if imagemagick works with tmx's then that part would already be taken care of

mortal yarrow
#

actually i'm pretty sure it does but you need to install some addon

#

it's in their list of supported files lol

lethal orbit
#

ah

#

but yea the bulk of the work is figuring out spr

#

which has already technically been done but as far as I'm aware there isn't a template for them

mortal yarrow
#

template as in hex template?

#

or like outlines?

#

because i'm pretty sure swine made a fork of persona editor that has fixed outlines for sprs

lethal orbit
mortal yarrow
#

ah

#

nah sadly not

#

only a tmx template lol

tight vector
#

Not to add any more to people's plates (this is just an idea and would be extremely low priority), but it would be cool if Reloaded II notified you prior to launch if you had any mods installed that conflicted; meaning that they contained files that weren't mergeable.

Someone suggested it and figured I'd just put it out there.

true bronze
#

That would be interesting but it's something that would have to be added directly to Reloaded (or at least some new stuff would have to be added to Reloaded)
Currently there's no way a mod could do that

#

Maybe something to think about for Reloaded 3, I think some kind of plugin system was suggested (and never worked on) at some point for Reloaded 2. This kinda thing sounds like something that'd fit in with that

#

Probably something that won't happen for a long time though. Sounds like it'd be pretty complex (and not that important)

tight vector
#

Interesting, ty

crisp abyss
#

I think this proves I'm a genius

minor barn
#

What about messaging API for Reloaded?

#

Like at least a way for mods to show dialogs?

minor barn
#

it doesn`t draw the most attention to it...

#

unless you write with BIG FLASHY TEXT LIKE THIS

#

##OR LIKE THIS

#

epic markdown fail

mortal yarrow
#

epic markdown win

solemn geyser
#

How do you do that ?

#

oh, like this

lethal orbit
honest charm
#

how did you get that so smol

mortal yarrow
#

three hashtags

dark tree
inner sky
true bronze
#

Rudiger was talking about something in Reloaded, not in-game. If it were directly in Reloaded it'd have to be something new
You could add something in game that'd tell you but you'd have to actually launch the game to see it

mortal yarrow
#

maybe not text but like

#

would it be hard to add an outline to the package in reloaded when two mods modify the same file / archive?

#

like a UI change? not a text change?

true bronze
#

Again, something that would need to be added as some kind of feature to Reloaded

#

There's nothing that could be done in Reloaded (the desktop app) without some kind of changes to it

#

The best we can do is in game or as the game boots

empty galleon
#

I know a lot of games with mod support have the message ingame (although those games also tend to not have a client equivalent to R2)
if it's not too much work I think it would be good to have explicitly in-game. it makes sense to me to have the mod conflict check when you start the game for a multitude of reasons

minor barn
#

I still think that a dialog that warns you as the game boots is a good option, even if you just throw an error to force a dialog to show up

cedar shuttle
#

The problem is, as Swine said, that R2 is game agnostic. There's no logic that's tied into any specific game or mod.

It's not possible to implement this, unless you make changes to the launcher itself.

cedar shuttle
#

I will be accepting mod specific logic into R3's launcher directly.

Reason for that is R3 will be built with NativeAOT, and C# NAOT plugins take up too much RAM for my liking.

However, strict rules will be imposed on any mod specific logic; including:

#
  • All mod options must be available via standard Configure dialog (if you want to add custom settings page for game; that bridges settings from essential mods).

  • Mod specific integration should not modify any files on disk (mods must work without launcher integration).

  • Mod specific logic only runs if that mod is enabled (either directly or transitively [as dependency]).

  • Minimal impact on performance and binary size (EXE size).

    • (Consider the fact some logic needs to be ran every time a mod is enabled/disabled)
#

Ideally I'd like to show hints about e.g. file conflicts as badges that dynamically pop up on the right side of each mod in the mod list.

So you can find the conflicts if you hover over the badge etc.

Though we're at least half a year away I'd say before I even get to doing any of that.

lethal orbit
#

I'll probably work on adding spr support to the emulator next week though

devout crystal
lethal orbit
#

Oh yea I also need to write docs which I'm really not looking forward to naodead

lethal orbit
mortal yarrow
#

weird

#

last time i tried to work with it spit out some error about needing to install a specific addon for it

amber gale
#

for spd merging, what file path should i use if the file inside the pak is named like spd/image.spd

#

in my case itd be cmbfile.pak/spd/p5_velvet_list_01

#

right now actually making the /spd/ be a folder in both pak and spd directories just make the game crash on boot

minor barn
#

it is like that

#

if you're replacing a sprite, you need to export the .spdspr for it

amber gale
#

im using the dissasembler so im sure the sprite itself is fine

lethal orbit
lethal orbit
minor barn
amber gale
#

the game boots up afterwards with no mods enabled (as far as i can tell)

lethal orbit
#

Can you send a log then?

amber gale
lethal orbit
#

can you also send the mod? just the necessary files to test this should work

#

looking at the log though it seems like it's the pak emulator failing

lethal orbit
amber gale
#

i havent tested it with no other mods yet though so it could be a conflict with something else? i doubted that at first since this file emu hasnt been officially released yet, theres no way any of the mods im using could also be using it

lethal orbit
#

yea I get the same crash

#

oh I figured out why. in the spd folder you had the directory as COMBINE\CMBFILE.PAK\p5_velvet_list_01.spd\spd\ instead of COMBINE\CMBFILE.PAK\spd\p5_velvet_list_01.spd\

amber gale
#

omg youre right thats such a dumb oversight

#

i checked the path like 4 times too lol

#

so sorry to bother you w this

lethal orbit
#

no worries hee_approves took me a bit to realize as well

honest charm
minor barn
#

Orichalculus

honest charm
lethal orbit
#

p4g spr merging corrinflames

true bronze
#

I assume bin means spr lol

lethal orbit
#

🫠

true bronze
#

πŸ™ƒ

lethal orbit
#

not sure what to do about adding new spr sprites though since they're index based not id based

true bronze
#

Add dummy ones up to the index they specify (if you need to) maybe

lethal orbit
#

yea ig

true bronze
#

I don't think there's really another way, that's how I did it with flowscript procedures with forced indexes (obviously not the same thing but a similar idea)

dusk crow
#

damn means soon enough all the major filetypes that needed merging support will have them; pak, bf, bmd (only sorta iirc since there isn't standalone bmd merging, you have to do a workaround with bf emulator but still) and now spr/spd

lethal orbit
#

wip spr merging support. works the same as the spd emulator, the only difference being that the sprite entry files are.sprt, and need to be named spr_xx.sprt with xx being the sprites index

#

I still need to write actual docs pain_snap

true bronze
#

Writing documentation is the worst naodead

lethal orbit
#

works in p3p too forgor to test last night

cedar shuttle
#

It's good for these things if you know how to utilize well.

true bronze
#

Probably a good idea, I've rarely really used gpt. I guess this would be a situation that it'd be good at

cedar shuttle
#

for 9.X.X

#

Like 80% of it was done by GPT; I just gave it

  • Public API
  • Page Template
  • Aand tests

To go off of.

frigid remnant
frigid remnant
#

ah thanks, all i saw was the downloads so i guess thats on me

lethal orbit
#

feel free to ask for help if you need it hee_approves

lethal orbit
frigid remnant
#

ok so uh
i forgot to install P5R lol

#

would anyone here be willing to test this new version of Texture Fixes while P5R downloads

mortal yarrow
#

lol so i tried to open a PSP SPR file and it seems to be infinitely generating .sprt files lol

lethal orbit
#

uhhh

#

can you send the file you're trying to open?

mortal yarrow
#

there's some error logs at the top

#

Error:
An assembly specified in the application dependencies manifest (tmx_to_png.deps.json) was not found:
package: 'Microsoft.Win32.SystemEvents', version: '4.6.0'
path: 'runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll'

lethal orbit
mortal yarrow
#

oh it does?

#

fuck sorry lol

lethal orbit
mortal yarrow
#

i assume i pick option 4 for P3P PSP anyways yeah?

#

weird, could've sworn i did

lethal orbit
lethal orbit
mortal yarrow
#

it appears that i did not >.>

#

wonder if that explains the weird issues i was having with the new aemulus fork

mortal yarrow
lethal orbit
#

also one

mortal yarrow
#

or would vita also use 1

#

yeah yeah

#

alright

lethal orbit
#

the pc versions of the game upscaled the textures and are scaled down in the spr, hence the discrepancy

mortal yarrow
#

ohhh

#

yeah that makes sense

lethal orbit
mortal yarrow
#

eventually ill figure out how to work out that scaling stuff in the spr, that way i can port the HD textures to P3P PSP

mortal yarrow
lethal orbit
#

hee_approves maybe one of these days I'll make an spd reassembler so it's more useful for the non pc games

frigid remnant
#

with the crihook stuff going on to make the configure menu work it seperates the P5REssentials folder into multiple ones i can turn on and off but how can integrate that with FEmulator hmm

devout crystal
#

FEmulator doesn't use crifs probing path stuff, gotta dl femulator for building and use AddDirectory

#

Should be able to just add to current lines for probing paths, folder setup is just a little different

frigid remnant
#

ah boy i had no idea what i was doing in the first place setting this up

#

probably gonna need help again i am very stupid with visual studio

devout crystal
#

Probing path is "Naoto"/asdjaiodj/folders
Add Directory is "Naoto"/whatever.bin/files

#

Assuming spr and spd merging is compatible with that (Id assume it is?)

lethal orbit
#

I don't think it explicitly needs to? most of the code is copypasted from bf/pak emulator

frigid remnant
#

well i never found a need to implement PAK emulator into Texture Fixes so im not sure if it works with this setup

devout crystal
#

you can add to your existing stuff

frigid remnant
#

and also i did test it inside the custom folders, the sprites that is. they didnt work thats why i came in here

lethal orbit
#

anyway femulator itself doesn't add files to the game, that's still in p5ressentials

devout crystal
#

Like straight up another line under your function lol

#

example

frigid remnant
#

listen i dont know what that means i was like given a template basically and told how to make this work i got no clue what i'm doing

devout crystal
#

Uh

#

Fair enough adachi_true

frigid remnant
#

i will try to understand

devout crystal
#

Idr the exact line

frigid remnant
#

but it is hard and i am also tired atm so maybe i should pick this back up tommorow

hoary cypress
#

There is one issue that i need to report. Maybe it's just me but it's better than sorry.

So according to this ss, it seems that reloaded doesn't manage to merge TBL well. CBT was above higher than my mod which means CBT got overwritten. As you can see, the items are having wrong icon and if you try to view it in the item menu, it crashes.

So what I checked is that I found out that CBT ITEM.TBL outfit section has way more bytes than the vanilla ITEM.TBL outfit section. This leads to crash. I assumed that it should have merged but it didn't. I managed to fix it by copying the data from CBT ITEM.TBL Outfit section to mine. And Voila, it didn't crash anymore.

hoary cypress
#

I see i see. But if this introduces a new issue, im glad to report it

dark tree
#

so it seems we found a bug with tbl merging in essentials @cedar shuttle

#

essentially, if tbl merging is ever needed, and one of the new TBLs have more entries than original tbl, merging dies

hoary cypress
#

So glad that DC verified it

#

Does this also cause the DAT error can't be found issue thing?

dark tree
#

ive no idea what that is

#

but im getting reports that Custom Bonus Tweaks EXIST is not working when another mod modifies tbl

#

which is obviously not something that should be happening

hoary cypress
#

Hmmm I see I see. To explain it further, some people have EMXXX.DAT file can't be found even with CBT and other mod on.

Only by enabling simple exist Nuke solves it

#

Which I don't understand how and why

dark tree
#

you mean the motionse files?

hoary cypress
#

Yeah

dark tree
#

you can include dummy ones I guess?

hoary cypress
#

Oh it has way more than that, lemme show you ss

dark tree
#

every enemy has motionse enabled by default

#

scarltz patch removes it from all enemies

#

which kills sound effects

#

(like evoker sound in p3mc battle)

hoary cypress
dark tree
#

yes thats the motionse file

#

just include a default/dummy one for the new enemies you added

hoary cypress
#

Ahh so that's why

dark tree
#

hang on

#

i can help with this easily

hoary cypress
#

You can? Sweet

dark tree
#

i have an idea

#

make a dummy one

#

copy it for every enemy id in the game

#

then delete the ones for enemies that exist

#

so your mod only has for enemies that dont

hoary cypress
#

That's one way to solve it. Alright cool

dark tree
#

dummy motionse for every enemy id that doesnt have one

#

from id 0 to id 999

hoary cypress
#

Thank you. I'll get it done asap

cedar shuttle
#

I know that more entries with a section should work (I think there was a test for it)

#

But more full sections was never something I looked into

dark tree
#

more entries in a section

#

i.e. outfit section in ITEM.TBL has 250 items in original (made up number) and then my mod has, say, 300 items there

#

someone's mod edits a different section

#

and then those 50 new entries dont get merged

cedar shuttle
#

That sounds like a bug alright

#

Chances are I won't be able to verify/check it this week (I'm away from home, and generally hanging out)

#

But you can bully Swine about it.

#

I do know though that this was one of the cases I explicitly handled when I wrote the original code

#

And I know this has worked at least for some setups before.

#

hmmmmm

#

on a fun note....

#

There are unit tests for this

#

So you could get out of your comfort zone and try something new :p @dark tree

#

People tell me you should try something new for once, haha

hoary cypress
#

DC got bullied instead cause of me sadsumi

lethal orbit
#

Finally we can drag DC into reloaded hell give

#

not actually hell but it's a steep learning curve no offense to sewer he's the goat jokergirlfriendprayge

cedar shuttle
#

No super special stuff involved there.

For them it's

  • Find & copy existing test
  • Figure out how to copy file during build
  • Replicate the issue
  • Debug the issue
#

Typical programming, just in different language.

dark tree
lethal orbit
#

still testing

true bronze
#

Is there anything in particular that needs testing or just the whole thing?

lethal orbit
#

the whole thing

#

tbf I have no idea how much testing is enough

#

There haven't really been any issues related to the merging itself so far

true bronze
#

It's never enough lol, just keep doing it until it seems like everything's fine then release it and find out there's a major bug

lethal orbit
#

I still need to write docs

true bronze
#

Also, does the api have a way to add files (like bf and pak emulator)?

lethal orbit
#

I basically copypasted the bf emulator api

true bronze
#

cool

#

On testing, do we know who's actually testing this (if anyone)?

#

Ideally anyone who's doing testing (presumably people making da mods) would say if everything's going well, then once everyone who wants to test has done that say it's probably good to go

minor barn
#

tbl emulator?

true bronze
#

???

minor barn
#

merge I meant

true bronze
#

It's been a thing for quite a while (literally since release for p5r)

#

yes

minor barn
#

oh, if its the whole thing, I've been testing the spr emulator for some time

#

I actually have a new thing to put in, lemme test

#

I just need to remember how to use it lol

minor barn
#

ok it crashed but i think its how im exporting my image

#

Fun(?) thing I discovered about SPR emu:
I have a mod that replaces a file
Below that mod is a mod that emulates a SPR in the same file
because of that, Reloaded ignores the file replacement for the first mod and uses the base one from the game

#

Also, I dont even need to have a sprite or a texture for that to happen, I just had the folder structure

true bronze
#

Yeah, that's how all the emulators work. Something emulated will completely override full copies of the file

#

It's something that could probably be worked around, it's just not worth the effort. People can just update their mods to support the emulators

minor barn
#

ok now things are not being emulated at all

lethal orbit
#

did you get it working? if not can you send mod?

true bronze
#

(Yes I have dotnet 7)

#

Maybe a file is missing from what you uploaded to github?

lethal orbit
#

Not sure

lethal orbit
true bronze
#

Oh, ok

#

Could you check, if you download what's on github (instead of using what you presumably already have locally) does it work?

lethal orbit
#

Pretty sure whatever's on GitHub is what's on my machine

#

In bed rn though so I'll check when I wake up naosleep

true bronze
#

Thanks, no rush naothumbsup

scenic sand
#

are these correct, im just kinda copypasting like you said

lethal orbit
#

oh it's because I generated a python gitignore and it catches some c# library dlls pain_snap

#

@true bronze updated the tmxtopng converter. Ended up writing my own because the other one didn't work in paths that had spaces

true bronze
#

Thanks, it works fine for me now

true bronze
minor barn
#

Yes I'm just modifying your example bc there's the only one that works

#

everything else worked, except the file for the calendar file

lethal orbit
#

something's wrong with your texture

#

specifically tex_1.dds

#

I compressed the dds and it fixed the crash

minor barn
#

I was suspecting it

#

what compression did you use?

lethal orbit
minor barn
#

oh, gimp is screaming about missing names for something...

scenic sand
#

i can probably just...strip out the library and enum overrides, right

true bronze
#

It'd be nice if you left them in some form since messagescript libraries are a thing, that's probably a bit different though. If you don't it's not really going to be a big deal

#

Unlike flowsdcript, messagescript still works fine if you'd renamed something but then use ethe unnamed version so library overrides like that shouldn't really matter

#

Actually now that I've said that I take the first statement back, just leave them out it'll be fine

scenic sand
#

yeah i wasnt sure if there was something unhinged i should leave the door open for and wasnt sure if enums were even a thing for messages anyway

true bronze
#

You should leave the compiler args thing in though in case someone needs to use different encodings

#

I'm not sure if enums are a thing for them either

minor barn
#

oh I see now

#

ok got it

scenic sand
#

third question: i dont know what a bmd header is supposed to look like

true bronze
#

I'm pretty sure it starts with MSG1

#

If you open one up in a hex editor you'll see

#

Checking the header really isn't that important tbh (plus I didn't properly check it, I just check for the magic and trust the rest is fine lol)

#

It'd probably be more important in something like pak emulator where you probably need that info to emulate the file.
Bf (and BMD) don't really emulate it in that sense, they just build it with script compiler

scenic sand
#

i c

true bronze
#

Try little endian

scenic sand
#

tried that

i probably just dont know 010 that well tbh lol

true bronze
#

Weird, I'm fairly sure it should be MSG1...

#

Like I said it's really not important though. You really could just not bother checking

#

Maybe it's different in the other games naotoshrug

scenic sand
#

well these are modded p5r bmds i pulled up just to quickly check

#

i could grab a p4g mod real quick to compare ig, if i really wanted

#

...meh, ill make it future mes problem

dusk crow
#

doesn't appear to be working correctly for me

lethal orbit
#

can I take a look at your files?

lethal orbit
#

did you use the sprdisassembler?

dusk crow
#

yes

lethal orbit
#

it's probably an issue with the sprdisassembler rather than the emulator. just means you'll have to use the full size images instead of having the disassembler cut them out

mortal yarrow
#

lol

#

that’s how those files look on PSP if you don’t downscale them lol

lethal orbit
dusk crow
#

the files sprdisassembler gave me looked ok was the thing so i think it's something in spdemulator that's going wrong

#

but hey using the full tex_X.tmx files works ok so that's good enough for me until the mods get updated officially naothumbsup

#

i can now have the better logo from truehd and still keep the "mod loader enabled" message from title screen fixes with the normal mods instead of making a seperate manually merged mod :D

lethal orbit
#

you should still use spr_ naming, even if you're using the full textures

#

just don't include any .sprt files

lethal orbit
dusk crow
#

i converted it with tmxconverter which usually i don't have any problems with so i'd be confused if that was causing problems

lethal orbit
#

I'm pretty sure that's what I'm using too lmao

dusk crow
#

works4me moment

lethal orbit
#

the portable logo does still get slightly cut off though

honest charm
#

POATABL

dusk crow
#

Yeah I noticed that when I was trying to use the pngs and sprts from sprdisassembler (I didn't realize it needed tmx files); wound showing the vanilla logo fine but it got cutoff too

#

Weirdly using the tex_0.tmx file works perfectly fine for me tho no issues at all so uhhh idk πŸ™ƒ

lethal orbit
#

I think it's just that the texture itself is too big

#

the logo from reloadedhd works fine

#

btw @true bronze what changes did you want to make to personaeditor before I accepted to your pr? perhaps I can make those changes if you want

devout crystal
#

poatabl

dusk crow
lethal orbit
#

actually I may have used my own .sprt file, lemme double check

#

that's a different texture than I have...

#

but yea I'm pretty sure I'm using the one you sent

dusk crow
#

they look like the same one to me (title screen fixes's that is) so uhh idk

lethal orbit
#

I think the .sprt you sent may have been taken from the vanilla spr instead of pixelguins spr then...

#

or something of the sort because the one you sent was different from the one I generated from title screen fixes

dusk crow
#

huh

#

tried setting it up for spr_X.tmx/spr_X.sprt files again and now it works fine πŸ™ƒ

#

soooo maybe i did screw it up somehow? not sure how though considering im pretty sure at one point i tried without using the sprts at all (which SHOULDN'T have caused them to crop in nearly as much as they did)

#

well it works 100% properly now sooo uhh good enough for me lol

lethal orbit
true bronze
# lethal orbit btw <@131175789138935808> what changes did you want to make to personaeditor bef...

Sorry, I forgot about that. Basically I changed a few things like adding the X Flip and Y Flip and removing the rotation stuff (or something like that).
I think I'd basically just separate out the spd editor and spr editor into two different things (since seemingly they share the same code, at least for the UI). So I'd put what I have there into an "spr editor" and whatever you've got stays in "spd editor".
Or at least something along those lines, hopefully that makes at least some sense πŸ˜„

lethal orbit
#

are there any changes you made that should apply to spds too?

true bronze
#

I don't think so

#

I only was working with sprs when I made those changes, if anything I changed is the same between the two it'd be a coincidence

lethal orbit
#

btw I found a bug with spr scaling where changing scale from 2 to 1 won't show any change in the editor until you select another texture

true bronze
#

Oh, fun

#

I vaguley remember having some problem like that but I thought I fixed it 🫠

lethal orbit
true bronze
#

nice, thanks

true bronze
#

Is adding new sprites something that you've done yet? I'm trying to do so but it isn't being added

lethal orbit
#

for the femulator?

true bronze
#

yeah

lethal orbit
#

yea you can add new sprites. all you need to do is add the new spdspr/sprt entries (make sure the ids are set in the file) and a texture(s) with the new sprite ids

true bronze
#

Oh wait, I have a png, not a tmx naodead

#

I copied it straight from spr dissassembler lol

#

Umm I think the spr's' been corrupted...
Amicitia dies when I open it

#

What do I need to set in the sprt? It doesn't have an id field

lethal orbit
#

sprt doesn't have id so the emulator will use the name to determine the index

true bronze
lethal orbit
#

Personaeditor opens it fine...

true bronze
#

Hmm, ok

#

Well the game doesn't seem happy about it, unless I've just messed up my code to display it (very possible)

#

I wonder why it dies in Amcitia

lethal orbit
#

one thing I did notice though is that the height/width is scaled down by .5 instead of .25, but that's probably not the issue

#

not sure why amicitia doesn't like it though... the spr seems fine

#

does it just crash?

true bronze
#

I'm trying to make one manually but amicitia is refusing to save my changes πŸ˜”

#

Does what crash? Amicitia or the game?

lethal orbit
#

game

true bronze
#

No, it wasn't crashing before

#

Either it showed nothing or glitchy black squares

lethal orbit
#

seems like amicitia dies with all sprs generated by the emulator

#

the only thing I can think of is maybe lack of 0x10 alignment?

true bronze
#

Well the sprt must be messed up a bit, I got it sort of working with a manually made one. (That should be the outfit icon from p4g)

lethal orbit
true bronze
#

Ok, so is that the sprt or the actual image?

lethal orbit
#

sprt

true bronze
#

k, I'll try fixing that

lethal orbit
true bronze
#

Nice, thanks

#

Oh, I realised why the size was wrong. That sprt is from p4g so it's scaled by 2 instead of 4 🫠

#

Well I've got it working with a manually made one, now to see if it'll work with the emulator

#

Yep, that was all it was

#

mb, the emulator works fine

scarlet bolt
#

You're going to the shadow realm now, Jimbo

devout crystal
#

Swine is that BOOBS

true bronze
#

Yes...

minor barn
#

since when p3p has a separate thing for costumes?

true bronze
#

since I made it have one (wip obviously)

#

#1124040609087365130

lethal orbit
#

I think all sprs built by the emu do, but I'm not sure if that's worth fixing. I think amicitia requires certain alignment for textures? that's the only difference I see between emulated and vanilla files

#

unrelated, but I've been thinking about several ways mods using spd emulation can be made incompatible, and I'd like some input on how to reduce that.

firstly, I'm wondering if it's worth keeping texture replacement (using tex_xx) as a feature... I can't think of a scenario where it's a better solution than just replacing all sprites (still using just a full texture, but instead using spr_xx-xx). it only hurts compatibility and messes up priority (spr_xx texture edits will always override tex_xx texture edits).

Another avenue for incompatibility is spr_xx textures not needing an accompanying sprite entry file. If a lower priority mod uses the spd disassembler to replace a sprite and a sprite entry, and a higher priority mod replaces that sprite in a full size texture (without a .spdspr/sprt, there will be a mismatch between the sprite entries coordinates and the sprites location in the texture. The solution to this would be to always require an accompanying sprite entry file for each sprite that a spr_xx texture replaces.

true bronze
#

I think it'd be fine to remove both of those things, the alternatives really aren't that much harder to do as mod creators

#

Especially with your disassembler, you can basically just copy-paste the sprt/spdspr file and name the texture appropriately (in the case that someone was actually replacing every sprite in a texture)

lethal orbit
#

yea

lethal orbit
#

I'll make some changes to the personaspritetools scripts to make things easier after I make these changes

scenic sand
#

maybe i should...be noting the workflow of this thing down somewhere instead of just trusting my brain to Get Itℒ️ after looking at it enough times lolol

lethal orbit
lethal orbit
minor barn
#

I think I have a use case for replacing both textures and sprites at the same time

#

Like that button problem I have

#

Replacing only the sprite for it helps to make it look good in-game

#

And sometimes the texture have other UI stuff (Like in a shop for example) that, maybe with the script, it would be a little bothersome to put the replacements on

#

Like, I was thinking my workflow would be like:
Designer from the translation team send me the whole texture translated
I put it in the game using the SPD emulator
A button's text is looking a bit weird, it's being cut off
I get the PSD of the texture and I export only the text for that button in that texture
I replace that sprite for the text of that button and use the spdspr file to fine tune the parameters for it

lethal orbit
#

You can do all that without replacing vanilla textures

#

And yea it does make replacing most sprites in a texture a bit more annoying (hopefully the sprite disassembly/extraction make that easier), but I'd like to encourage best practices to avoid people being lazy and making their mods incompatible

lethal orbit
#

ok maybe texture replacement might be necessary...

#

I can manually make this a file name so i wonder why it's giving me an error...

#

ok it might not be the length of the filename

lethal orbit
#

...it might be the length of the filename pain_snap

#

If it wasn't obvious, I'm trying to have the sprite extractor export textures with the filename including all the sprites... I guess some texture just have too many sprites not in a row and it makes the filename huge...

mortal yarrow
#

oh please get the actual file name to work

#

i would hate to have to rename a hundred tmx files just because of the old sprite merging

lethal orbit
#

hee_thonk were you just replacing textures before?

lethal orbit
#

I guess for now I'll name the textures that are too long something else

mortal yarrow
#

like if i wanted to port a P3P PC texture to P3P PSP i’d have to rename tex_00.tmx to c_main_01.tmx

lethal orbit
#

wait why?

mortal yarrow
#

because of how aemulus merging works

lethal orbit
#

ah

mortal yarrow
#

the texture name has to match for it to be merged into the spr

#

and with the new PC merging it’s some generic name

#

meaning i’d have to go in and rename every tmx file

lethal orbit
#

if you just need the textures then you can just use amicitia or personaeditor

mortal yarrow
#

what?

#

if the mod is setup for the new spr merging

#

how would i grab the textures with amicitia?

#

id still need to rename all the files, that’s my main point

lethal orbit
#

You wouldn't be able to adapt the new spr merging to use with aemulus anyway, the most you can do is port the entire spr

mortal yarrow
#

🫠

#

i literally just said i had to rename the tmx but alright

#

how would i even port the entire spr if the file isn't even an spr

#

unless renaming the tmx and converting it wouldn't actually do it?

#

does someone have an example mod with spr merging set up that i could test with?

lethal orbit
#

All you'd have to do is turn on dumping in the spd emulator, run the game with the mod enabled, then get the dumped spr from Femulator-dumps in the game directory and scale down the textures

mortal yarrow
#

run the game.... with the mod enabled.....

#

yeah.......

true bronze
#

just ask someone to do it for you

mortal yarrow
#

true lol

#

i'm just being dramatic

true bronze
#

It's the kinda thing that'd literally take a minute at most

lethal orbit
#

Or use the spr patcher in my personaspritetools repo adachi_true

#

i forgot it existed lmao

mortal yarrow
#

i found the mod package that moddaman sent

#

how would the patching work?

#

i'm assuming i just like

#

drag and drop a tmx file in the window? or an spr?

#

does not appear to be that >.>

#

so it's sys.argv which means drag and drop ontop of the script, but which files femcmad

#

i tried dragging and dropping the sprt and tmx and nothing

lethal orbit
#

you'll need to open it in cmd

mortal yarrow
#

oh?

#

i did that lol

#

unless i did it wrong perhaps?

lethal orbit
#

you need to give it the original spr as well

mortal yarrow
#

ohhhh that's my bad

#

alright i gotcha

#

original spr > spr path in that order?

lethal orbit
#

yea

#

this time without my name

mortal yarrow
#

oh wait original spr as in spr containing files or the spr in the mod package?

lethal orbit
#

the vanilla spr

mortal yarrow
#

so spr from the game files, unaltered?

lethal orbit
#

yea

mortal yarrow
#

damn

#

wonder if it'll die if i try and insert a PSP res spr and a PC res tmx lol

lethal orbit
#

it shouldn't die, but it won't look right in game

mortal yarrow
#

oh i know

#

im just trying to get the tmx so i can convert it for PSP

#

ill still be quartering / halving the resolution and exporting as 8 bit

#

i think it worked?

#

it did not

lethal orbit
#

what happened?

mortal yarrow
#

gave me this

lethal orbit
#

looks right...

mortal yarrow
#

spr file is the same

#

unless it generated somewhere else?

lethal orbit
#

it outputs <filename>_out.spr

mortal yarrow
#

ohhhh

#

yeah that broke

#

like not good at all

#

check it lol

#

says the resolution is 65280 x 0 lol

lethal orbit
#

patched sprs break in amicitia for some reason, opens fine in personaeditor and should work fine in game

honest charm
#

that's my favorite resolution

#

65280x0

lethal orbit
mortal yarrow
#

yeah ill stll be resizing

honest charm
#

my next gaming monitor is gonna be 65280x0 :3

mortal yarrow
#

little jank but i think i get it

lethal orbit
#

even with fixed scale it's still not right though

mortal yarrow
#

yeah y'all went over that

#

i know it's broken lol

lethal orbit
#

🫠

mortal yarrow
#

not actually going to port it

#

it was just the only example i could find with spr merging set up

#

was just trying to understand the whole process of it all

#

not gonna lie

#

i just opened it in persona editor and all it did was just like

#

put the new tmx in the spr

#

no name change, meaning id still have to do that

lethal orbit
#

you can't really use aemulus merging for these, better to just include the entire spr, with a lower priority so other mods can merge with them

mortal yarrow
#

yeah that's what i don't really understand

#

how would i include the entire spr

#

if the spr that was just generated wouldn't work in game

#

because this

#

this ain't gonna work

lethal orbit
#

why not? the texture name is not important

mortal yarrow
#

unless i'm supposed to just:

patch it
externalize the tmx
optimize the tmx
replace the original tmx

?

lethal orbit
#

i guess? it's the lowest effort way to do it

#

not replace the original tmx

#

downscale the added tmx

mortal yarrow
#

why not lol

#

but there's two tmx files in an spr that's only supposed to have one

lethal orbit
#

because the modified sprites don't point to the old tmx anymore

mortal yarrow
#

don't i need to remove the original tmx at least?

#

oh wait what

#

wait wait wait

mortal yarrow
#

i did not know that

#

the sprt files will instead point to the new tmx?

lethal orbit
#

yea

mortal yarrow
#

ohhhhhh

#

see i did not know that lol

#

right so

#

if i were to externalize this texture, optimize it, replace it back

#

then place the spr back in my title.bin

#

it'd just work?

#

i gotta try that now

lethal orbit
#

lemme know how that goes hee_approves

mortal yarrow
#

ok well

#

the texture is uh

#

off center like before

#

but it is replaced

#

so i'm gonna call that a success lol

#

damn that's actually pretty interesting

lethal orbit
mortal yarrow
#

now if only someone would make a patcher for the new flowscript merging naocry

#

thank you for helping me get all of this worked out btw

#

i appreciate it

scenic sand
#

couldnt one just dump the emulated files for that too

mortal yarrow
#

i sorta get it now? it feels a little jank in my brain still

mortal yarrow
#

nah i'm messing around

#

i can totally just ask someone to dump it for me

lethal orbit
#

shouldn't be too hard to convert bf files for aemulus merging

mortal yarrow
#

yeah i've actually done it before

lethal orbit
#

there's some formatting changes but it's mostly the same

mortal yarrow
#

it's a little rough honestly

#

just need to add the new import messages

lethal orbit
#

yea

mortal yarrow
#

move the files around a bit

#

rename all functions that are renamed from stock if they exist painfrost

#

i actually did that with swine's "visible rankup ready mod" so i have that working on hardware

#

i just miss the days when you could drag and drop that stuff into the right folder and it'd just work on vita naodead

#

also uh

#

is it normal for the textures to not align anymore?

#

is it part of spr merging?

#

new texture, old texture

#

i'm assuming the sprt will fix that?

#

it does not naothink

#

this time with the true HD logo

#

also i remembered to actually quarter the resolution this time instead of halving it, so it should've been scaled properly

#

not sure how to get the large preview like you did

#

but that shouldn't be happening?

lethal orbit
lethal orbit
#

I have no idea why this is happening though

mortal yarrow
#

damn so i guess i'm screwed huh

#

i'm not even sure why it's repeating honestly, that's the confusing thing

#

oh wait

#

i know why

#

no wait we're good

#

sorry uh

#

atlus games die when you have textures that aren't divisible by a power of two

#

i thought it was that

#

my texture file is 256x96 which is fine

lethal orbit
mortal yarrow
#

yeah yeah

#

good on that then lol

#

no idea then

lethal orbit
mortal yarrow
#

that was my only idea haha

#

you want the spr file it outputted?

lethal orbit
#

sure

mortal yarrow
#

i tried it with the true hd files from that moddaman zip

#

lemme try the title fixes one again

#

happens with title fixes

mortal yarrow
#

yeah i cannot get it worked out for the life of me 🫠

#

alright well i can sort of confirm that it's nothing to do with the sprt file

#

as i just exported the exteranlized tmx as 8bit tmx with 1/4th the resolution

#

same issue

#

seems like it's just a problem with the size of the tmx, and it not being standard

#

meaning ill have to go in and manually resize all tmx files considering they'll be trimmed adachirage

scenic sand
# lethal orbit apparently windows has a max filepath length <a:pain_snap:1045325221890097162>

i think i remember reading while i was forking aemulus that uh.
you can go past the limit natively, but only from windows 10 onward and you need to do a registry edit MonaConcern

hold on

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later this thing

also that is a monstrosity of a filename besides

Maximum path length limitation.

scenic sand
minor barn
#

Endianess maybe

scenic sand
#

it...might be endianness after all--? ninja
if i highlight the MSG1/1GSM and then set the bmds to opposite endianness then this specific part of the inspector lines up, but the msg1 in the p5r bmd is still backwards

minor barn
#

Yeah, the msg1 is not a text

#

It's just a number where the bytes happen to write MSG1

scenic sand
#

im still putting off writing a proper check until i actually...need to do so, so for now bmdchecker.isbmdorempty just always returns true lol

scenic sand
#

...wouldnt be that hard though i think, but id rather do it not at 3am god i have the sleep schedule of all time

scenic sand
#

well anyway bmdchecker.hasbmdheader looks like this now

#

kinda feel like i should put swines name on this since most of this code is copypasted from bf emulator with bf wordswapped for bmd

true bronze
#

Array.Reverse is pretty wasteful, you could really just change the indices you're using (header[11] == 'M' && ...). I also may be wrong but I'd expect it doesn't change the array, instead it'd return a new one that's reversed (that's generally how functions like those work)

true bronze
scenic sand
#

I also may be wrong but I'd expect it doesn't change the array, instead it'd return a new one that's reversed (that's generally how functions like those work)
i looked at some sample code in official windows documentation and it did look like it properly changes the array
though yeah it probably is better for performance to like...not, i was just kinda lazy and have uni homework i should be doing instead so i just quickly hacked out the first thing i thought of

true bronze
#

Just letting you know because it's the kinda thing Sewer would almost certainly make you change lol

scenic sand
#

understandable lol

#

anyway there we go

lethal orbit
# lethal orbit made both of the changes I mentioned here, those being: removed support for tex...

Ok I found a better solution than just axing features. I slightly reworked how the emulator works. instead of modifying sprite entries directly, the emulator now holds the modified sprite entries separately, and merges them into the original spr/spd right before writing the file. this allows the following:

bringing texture replacement back, and reducing the unpredictable behavior by reverting every modified sprite that previously pointed to the texture. (still not recommended to use unless you're replacing all sprites in a texture, but at least you won't get overwritten by lower priority mods)

re-allowing spr_xx.dds sprite patching without accompanying sprite entry files (.spdspr and .sprt). If a spr_ texture doesn't have an accompanying sprite entry file, the original one will be used. This comes with one drawback, that being that spdspr files now need to be named spr_{id}.spdspr

#

also since it's something I've seen people do, don't add leading 0's to the id in the file name (so do spr_1.sprt instead of spr_01.sprt)

lethal orbit
#

btw I was right about why the spr dies in amicitia. Amicitia requires at least 0x10 bytes of padding between each texture, and they have to be 0x10 aligned

#

neither personaeditor nor the game seem to care so It's probably an issue with amicitia...

#

ok with the padding amicitia is fine but peditor won't open the spr thinkfall

lethal orbit
#

added padding after the pointer list and before the sprite entries. Still opens in persona editor and seems to fix the crashing in amicitia

cedar shuttle
#

before even getting started

dark tree
#

im very busy

#

😩

cedar shuttle
#

:v

scenic sand
#

:v

empty galleon
#

hi, just wanted to ask something quickly. if I have mod A that has init.bin (not using bin merging) and mod B below it that edits init.bin (using bin merging), how is that interaction handled? will reloaded load the init.bin from mod A and then modify that archive with the files from mod B? or will reloaded use the stock init.bin when merging mod B, ignoring mod A? or etc?

someone was telling me that they believe Aemulus and reloaded handles it differently but that they weren't confident about it

#

reason I'm asking is because some P3P PC mods are not updated for bin merging, I think on purpose. HD audio SFX only seems to be effective when replacing the whole bin itself, bc remaking the mod with bin merging just leads to the poor sound quality returning. (thanks ATLUS)

so I'm wondering what happens if you combine HD audio SFX with another mod that edits init.bin with merging

#

(speaking of this, if you edit the voice lines in model archives for P3P and then use bin merging, it destroys the audio quality even more)

dusk crow
#

i think i remember swine or someone else saying this but IIRC basically any mod that uses merging automatically takes priority over that file versus any non-merging mod, which is to say that init.bin in your example would only merge with the vanilla game files and ignore any mod's replacement of init.bin

empty galleon
#

that's a little unfortunate for P3P

#

it's like literally just bc P3P's audio sucks ass too 😭

true bronze
#

Yeah, that's the case. If there's something using merging it'll completely ignore anything that isn't. Like I've said before it's something that could be worked around but it really isn't worth the effort, people should just update their mods

dark tree
#

absolutely, it offers better compatibility all around that way anyway

true bronze
empty galleon
#

I have no clue whatsoever

#

😭

dark tree
#

I think the audio loading code in p3p might just be fucked/bugged, audio files (adx) are 1:1 byte identical with PSP and they sound way worse lmao

empty galleon
#

yeah

#

but then it has me wondering, why does having it in an archive make it sound fine lol

#

I recognize this is a pretty niche case because it's P3P, famously a very lazy release lol, but I figured I'd ask

#

really the better question is if there's a way to fix whatever fucked up the P3P audio loading, but I can't imagine something like that is trivial at all

devout crystal
#

init_free doesn't have that issue

#

well init but point remains

empty galleon
#

the model pac bit was a separate thing, the main thing is the init SFX sounding just as bad as the base game when bin merged but better when not bin merged. not sure if that's something that's addressable with persona essentials or reloaded tho lol

devout crystal
#

wait huh

#

I was using hd sfx with bin merging support and it sounded fine modCheck

#

time to retest ig

#

they really fucked with how they read the audio files if thats the case

empty galleon
#

I mean we know that one already lol

#

given they shipped it in this state for some reason 😭

devout crystal
#

Yeah but I did testing specifically to see if it was just model pacs so im wondering how its different now..........

empty galleon
#

all I really did was go fight some baby tier shadows, drop a morning star on them, and then listen to the crunchy sound that plays when they die 😭

empty galleon
#
#

I figured I should bring this up so we all know it's an issue, but realistically idk how many people truly care about P3P PC anyways, so again, I would get it if no one is interested in looking at this haha

mortal yarrow
#

lol so HD audio sfx doesn't do shit on psp

#

got it

empty galleon
#

as far as I can tell, all HD audio SFX does is package init.bin from the P3P PC files because the raw audio sounds fine, it's just whatever the hell the game does that fucks the audio playback

#

idk if this is really a big issue for PSP anyways since it never had the audio issues, but seeing as PC sounds awful unmodded....

vital narwhal
#

hows spr merging comin along

scenic sand
#

so do i necessarily need a baseMsg parameter for a MessagescriptCompiler.TryCompileWithImports method, the way FlowscriptCompiler.TryCompileWithImports has a baseFlow param for the first .flow passed to the builder that calls it, or could i theoretically just treat the first .msg the same as the rest
since baseFlow seems to be necessary due to flows being full-on code, whilst msgs are...labels and text

lethal orbit
devout crystal
#

I wanted to test but you never responded to ping PensiveCombee

lethal orbit
#

what ping naovanish

simple timberBOT
#

file emulation framework module -

PersonaEssentials -

Ok I found a better solution than just axing features. I slightly reworked how the emulator works. instead of modifying sprite entries directly, the emulator now holds the modified sprite entries separately, and merges them into the original spr/spd right before writing the file. this allows the following:

bringing texture replacement back, and reducing the unpredictable behavior by reverting every modified sprite that previously pointed to the texture. (still not recommended to use unless you're replacing all sprites in a texture, but at least you won't get overwritten by lower priority mods)

re-allowing spr_xx.dds sprite patching without accompanying sprite entry files (.spdspr and .sprt). If a spr_ texture doesn't have an accompanying sprite entry file, the original one will be used. This comes with one drawback, that being that spdspr files now need to be named spr_{id}.spdspr

Jump

[Go to message!](#1083541081880268920 message)

SPD.File.Emulator.7z

fixed paked spd cache invalidation naovanishreverso

Jump

[Go to message!](#1083541081880268920 message)

p5rpc.modloader.7z
lethal orbit
#

thanks nqn pensbe

vital narwhal
#

how to

scenic sand
#

extract to reloaded mods folder, then refactor your mods (instructions in pins)

vital narwhal
scenic sand
#

whu

#

why do you have a bin file in your spd folder?

vital narwhal
#

the bin is where the spd is stored (its a folder not a file)

scenic sand
#

make a folder called FEmulator/PAK/btlanel.bin, put a dummy spr in it (right click in file explorer to make an empty txt file, then rename it b_p_k01x2.spr) (im going to assume the spr isnt in a subfolder of the bin, im mainly familiar with p5r so i dont know what btlpanel.bin normally looks like)
then make a folder called FEmulator/SPD/b_p_k01x2.spr, put your dds and spdspr/sprt files inside that

vital narwhal
scenic sand
#

yeah then just do the thing i said

vital narwhal
#

ok

scenic sand
#

try the full path to the bin, for the dummy file
FEmulator/PAK/battle/panel/btlpanel.bin/b_p_k01x2.spr

vital narwhal
#

ok

vital narwhal
#

OH

#

I think its trying to look for the spr in the cpk not the bin file

#

i think i fixd

lethal orbit
true bronze
scenic sand
#

if im understanding bfemulator right, baseFlow is the first .flow for that file passed to the emulator while baseBfStream is the original bf innit
i still have the filestream param though its ofc renamed baseBmdStream, and i think i know how to use it, i just wanted to be sure the whole thing wouldnt break down if i axed the baseMsg param (since i wasnt altogether sure it was doing much other than making me overthink)

true bronze
#

Oh, ok. I thought baseFlow was the original bf lol, it's been a minute.
In that case yeah, you'd probably be fine without a baseMsg

scenic sand
#

i wasnt sure, thats why i was asking you
i presume it was bc baseBfStream is imported separately later on if its not null, and when bfBuilder calls TryCompileWithImports (the only place that calls it) _flowFiles[0] is whats passed to baseFlow, but the name throws me

mortal yarrow
#

has bmd merging been looked into yet?

scenic sand
#

ive been on that for a while, trying to make test cases currently

#

my internet is having a time apparently

mortal yarrow
#

i think discord is dying actually

#

some messages are just failing to send randomly

dusk crow
#

(hitting a 13,000ms peak in latency an hour ago is crazy)

honest charm
#

someone tripped on the server cord methinks

scenic sand
#

this is a bit embarassing but where do i find the dumps folder

lethal orbit
#

in the game's exe directory

scenic sand
#

thanks

#

i mean
i dont see it but i only just turned on dumps and the game crashed immediately for unrelated reasons but now i know

dark tree
#

dw, I've never seen this mysterious dumps folder either despite having dumps turned on in pak emulator and bf emulator and stuff

#

but i also tend to break stuff in the weirdest edge case scenario type of ways, so

scenic sand
#

well.

#

(thought id turn it on for paks and bmds to make sure they were compiling correctly, but given im getting immediate exceptions i think thats the least of my worries atm)

lethal orbit
#

what exception are you getting?

scenic sand
lethal orbit
#

also you need to delete cache after turning dumps on

scenic sand
#

oh

scenic sand
#

...oh, i didnt instantiate an array

lethal orbit
#

updated spd emu again, hopefully the last functionality change hee_melt.

  • texture replacement under the hood now acts as sprite patching but affects every sprite used by the texture (so it doesn't actually replace the texture anymore lmao)

  • you can exclude sprites from this by adding a tilda ~ after the texture id and using the same naming convention for sprites (for example: To replace all sprites in texture id 4 except for sprite id 15-20, and 24, you'd name the texture tex_4~15-20_24.dds )

mortal yarrow
#

just curious, is "double" merging possible?