#Unreal Essentials
1 messages · Page 2 of 1
IS THAT UM JAMMER LAMMY
It parses your Steam Library, finds the AppId for your game, drops a steam_appid.txt, and also hooks 2 functions related to rebooting/checking if need to reboot
Off the top of my head
Of course, if there is non-Steam related logic for rebooting, it won't handle it
Yeah, I had a look and I don't think steam is the problem (or if it is, it's not the only problem). I edited the source to force steamhook to work (just hardcoded the paths) and the reboot still happened
oop
its a mod
yeah, no, HiFi devs just trolled a little too hard
that said, I assume the HiFi specific fix can still be applied globally?
Yeah
It's just writing 0s to the struct every time the function is called. There's no harm in doing that for all games
I still haven't worked out the reboot problem yet but I did find where the branch name is. This might be useful for more specific matching of signatures, I'm not really sure. For example, I now know that Scarlet Nexus is built on ++UE4+Release-4.25Plus M3
The signature for it in Scarlet Nexus is E8 ?? ?? ?? ?? 45 33 ED 4C 8B F0 4C 89 6D ?? 41 8B C5 if either of you want to find it in other versions. You might also be able to just search for the string UE4+Release, hopefully that's a consistent part of it
BuildSettings::GetBranchName right?/
Yeah
++UE4+Release-4.27
Actually if that start of the name is consistent it'd probably be easier to just scan for that. Code may change between versions
Then instead of those other values we could use this string which should be more helpful (and hopefully actually work with all the things)
tested with all my normal 4.27 games (GBVSR, Ishin and Stray) and they're all reporting the same string
Nice
hifi rush is being a troublemaker as usual though
i haven't gotten the sig to match
always the troublemaker
Did you try just searching for the string
Surely they wouldn't change the branch name that much





nothing so far, wow
bruh
tried bsimming the caller and no good matches so far
There were a few functions that call it, maybe another one will give you better luck
well, at the end of the day this means its no more consistent than the older method
because you'll still run into the HiFi rushes of the UE4
I think it is a bit better, with the last versions like 4.25+ weren't distinguished from 4.25.
bruh
oh i love this game
I guess I can search for both uppercase and lowercase ++ue4+ and it'd work
Oh wait
Is that assigned at runtime
bruhhhh
wtf are they doing
I see it now lol
Oh, so I could search for ++ue4+?
that would work in this circumstance
Cool, well I'll make something that does that and we can see if it works
I’m not a modding expert but this seems like a real pain in the ass to make work lol
I wish y’all luck tho!! Not sure how close to working this is but I believe in you guys 
It's not that close tbh. I've been getting sidetracked with things like getting the version and fixing the reboot
It'll get done though (I hope)
man I wonder what FF7R reports since that's heavy modified too
Damn, only 15 days until reload
I think it should be done by then, depends on how side tracked I get (and whether I get a job in that time which would nuke all my free time)
well, scarlet nexus is 4.25+ and the sigs from 4.25 still worked but i get what you mean
IO Store format change moment
They actually didn't lol
I used bsim to get scarlet nexus sigs from 4.25
That sig is from scarlet nexus, not the 4.25 project.
I think there was one that worked between the two but most I've had to use bsim. When I change to this new version string I'll update the sigs I have to not be lies
They were all really close but not identical
It's from scarlet nexus, so I guess it should be ++UE4+Release-4.25Plus M3, I'll get the actual ones for 4.25 in a bit and update you with what they should be
idk
they only list a single 25 plus on epic
I guess M3 is what they added to denote their modifications 

The cheering u on dance
i'm still actively working on my own thing, if that ever ends up being needed
True, that might be our saviour. I guess we'll see
I do wonder how easy it’ll be to mod music for this game considering that the DLC BGM can actually be used to create an actual playlist to shuffle between
Assuming it can be modded, I mean
i'll try to help out as much as i can
i have a decent amount of experience with ue modding, as deathchaos can attest to
Oh, hello. Sewer mentioned I should reach out to you
(I then proceeded to not do that :D)

Could one of you check that this still works for hi-fi rush
ive just been lurking
the spectators ‼️
I appreciate your help, I probably would've pinged you eventually if you hadn't shown up on your own
FemSpectator
tbf this would help a lot of people if successful
no I’m not coping about femc not being in reload what’re you talking about
yes (it works)
i...probably should try and do something to train myself in this sort of thing, but...need to clear ssd space...
Same; don't really have much to say in here, at least nothing that would be helpful at all
when it comes to threads like this with active work being done I personally try to avoid "useless" comments ig just to avoid being a potential bother or anything unless there's a really good joke opportunity sometimes I can't help myself then)
I'd love to try and help out but I'm stuck under 5 tons of imposter syndrome 
See the most I could do is provide testing muscle for Hi-Fi Rush and even then I mainly use Steam Deck (though I imagine knowing whether or not it works on that would probably be beneficial)
mood
it was sewer
real
*sewer56 sonic riders gif*
The actual signature for 4.25 is E8 ?? ?? ?? ?? 44 39 60 ?? 74 ?? 48 8B 08 48 85 C9 btw.
What version is it?
4.26
But you've got the 4.26 one listed as E8 ?? ?? ?? ?? 48 8B D8 39 78 ??
Is that wrong?

ill check again after i finish this bsim
Hmm ok
Could you check if the KOF XV branch is different?
I hope it is otherwise branch isn't a consistent way to deal with signatures either
give me like 10 days
(Run the game with Unreal Essentials and it'll print it out)
Yeah, bsim is awesome
yea it was our christmas present from the nsa
i usually use ida but bsim is a very strong argument to make me switch to ghidra permanently
i hate how ida handles making structs so i always stuck to ghidra
and i also dont have to download potential malware to get it
the math isnt mathing i think
rounding™️
Decompiling FUN!!! 😃
kof
well, the thing is
the listed sig works
and it takes me to the right spot
but the sigmaker generates a longer one
wonder whats up with that
Good enough for me 
We'll cross that bridge when we find a game where that isn't the case
kof gives this
how long is the generated sig anyway?
E8 ?? ?? ?? ?? 48 8B D8 39 78 ?? 0F 84 ?? ?? ?? ??```
that's fine
at least it's not that one sig we got where it was the entire function lmao
Ok, then I'll just use the longer one
ok swine
we may have a problem
i checked the listed regular 4.25 sig on DNF Duel
no match
😔
but the one you said was scarlet nexus only
match
E8 ?? ?? ?? ?? 48 8B D8 39 78 ??```
i am 100000% sure this matches across regular 425 and plus
above is dnf duel
below is scarlet nexus
Oh, wait. It does match my 4.25 project???
lmao
i cant believe youd lie to me like this!!!!!!
I will never emotionally recover
But it's not in a function (at least not one that's defined)
wacky
Which doesn't really make sense, I had symbols for this
guilty gear strive is also 4.25 but i need to upgrade to open it
i mean, DNF Duel is regular 4.25
and it works there
oh right i have the demon slayer exe here too from that one time i helped that one person
also 4.25
Alright I'll just let you work it out, maybe something is off with my blank project 
I'll just put it as whatever you tell me it is
yeah im suspecting that
well right now its the "right" one
the one that works on both scarlet nexus and DNF Duel
ill check ggst once it finishes upgrading
matched Strive too
matched on Strive arcade exe (which has symbols)
On a different topic, I found out what's going on with the rebooting on launch. It turns out it is a problem with steam, but also unreal engine...
In FOnlineSubsystemSteam::InitSteamworksClient bRelaunchInSteam is true, however, making it false doesn't help. i also tried lying to it and returning true in thee function that calls that but no dice. somehow in what i've done i've also lost my ability to use the ctrl and shift keys 

Well I restarted my pc and I'm now allowed to use ctrl and shift again. That's something lol
oh right demon slayer had denuvo
well it works on all the other 4.25 exes I have
so i think its fine
dont need a separate sig for 425+
do you still plan to mess with the pakfolders function?
sad!
ik it's something we'd have to get to eventually if we want each mod's assets in their reloaded mod folder
Would we? I was thinking it was only so I don't have to place a dummy utoc and ucas in the actual game's files. Instead they'd go in Unreal Essentials' folder
guess that's my cue to vanish for tonight
that's an option too
timezones moment
Oh, well gn
but yeah i had a look at GetPakFolders and saw that TArray's push function was inlined
so you'd have to reimplement that
at least in my blank project there was a call to TArray::ResizeGrow which handles allocation when length > capacity, and then the stuff that gets inlined is mostly just things like incrementing the length field
the main problem with hooking ResizeGrow is that it's signature's it generated is the entire function lol
48 89 5C 24 ?? 57 48 83 EC 20 48 63 79 ?? 48 8B D9 B9 04 00 00 00 48 8B D7 83 7B ?? 00 74 ?? 48 8D 04 ?? 48 C1 E8 03 48 8D 4F ?? 48 03 C8 EB ?? 48 3B D1 48 0F 47 CA 48 C1 E1 04 33 D2 E8 ?? ?? ?? ?? 48 C1 E8 04 B9 FF FF FF 7F 3B F8 0F 4F C1 89 43 ?? 48 8B 0B 48 85 C9 75 ?? 85 C0 74 ?? 48 63 D0 45 33 C0 48 C1 E2 04 E8 ?? ?? ?? ?? 48 89 03 48 8B 5C 24 ?? 48 83 C4 20 5F C3
I mean
we're already scanning for a function call for keysdelegate
just scan for another function call here

Yeah, when I tried before I realised I'd have to scan for a bunch of functions to make it work since it gets angry if you allocate stuff on your own. I didn't really want to deal with finding all of these for multiple versions
well if you list them down we could tackle them slowly but surely
my concern is mostly that the length of that sig is so long that it'd be a lot more fragile
thousands of times
oh baby
then that shouldnt be an issue
go through the xrefs and see which function call has shortest sig
ez
couldn't we just use ue4ss
What's that?
it contains a modified fork of unreal for stuff like interacting with tarrays/fstrings
it is the tool for code modding unreal games
I guess we could copy the necessary code from it
i'd just recommend using ue4ss in general for modding ue4 games
for tarray stuff it should be fine to just reuse the code??
it relies decently heavily on finding gmalloc for interacting with reflected memory though
I might look at it for reference but for now, I'd already actually written code for working with TArrays and FStrings yesterday. In theory I think it'd work but ue doesn't like me using c# for allocating stuff, I'll have to scan for the one in ue itself.
fair
you can't allocate memory "regularly" in unreal, you have to work with the fmemory functions via gmalloc
here's a useful tool for finding several things from ue games btw
it's a very sophisticated pattern scanner
Cool, thanks 
here's the code used in ue4ss for finding fmemory::free and consequently gmalloc
I guess I'm trying this again. Before I start though I'll say that I found the reboot is caused by steam as I mentioned here. I tried not running FOnlineSubsystemSteam::Initialize at all and just returning true, in that case the game did launch without rebooting but I had no save data, presumably because the steam stuff wasn't initialised. Anything else I tried just caused a reboot or it to not launch at all.
From this just nuking the entire initialisation clearly won't work, I'll have to come back to this later...
ah
(That wasn't directed at you btw, I'm sort of just putting my thoughts to text so I don't forget what I was doing)
no i understand dw
Thanks for the suggestions so far though, those tools seems like they'll be useful even if I don't directly use them
np
i'm pretty in tune with the general ue modding scene, so if nothing else i'll be helpful there
unreal is a wack ass engine
7.6MB DLL 💀
In any case, not bad
so those guys have many symbols too
damn, I feel cursed, reversing everything from scratch for each game.
I've mostly dealt with native C games, so I never had these kinds of opportunities
I wonder what these guys will do about the ImGui versioning problem, since they let C++ mods use their ImGui.
If they update ImGui, all those C++ mods will break
(Note: Technically speaking they may break even on same version if different compiler is used, due to risk of struct size differences, though I doubt that would happen given how carefully ImGui is made)
Nobody brought that up even in the PR that merges the functionality, I just had a look.
Willing to guess though they'll just update it eventually and break mods the hard way, that's the way people operate in the Unity & Unreal world from what I've seen, they just expect things to break, and as the games themselves get updated and break things, that can sometimes be acceptable.
Same, it feels so weird having symbols and source code. It's a really different experience, sometimes it feels like I'd be better off without symbols since it's what I'm used to lol
We come from a different world than unreal modding people lol
Some of us are more spoiled than the others :p
we're lucky cuz unreal is twofold with symbols:
- reflection (though not everything gets exposed to reflection, it's an opt-in system)
- the engine itself is source available, so as long as the devs don't fuck with the engine too badly it's pretty easy to find things
Free Engine Symbols for Disasms 
Build your own engine, make the symbols, apply symbols to new disassembly
Also standardised unreal file formats across games (with official dev tools)
Free stonks, yeah.
unreal modding is quite a bit more difficult than unity modding, but we're still priveleged
...unless you mod ue3. god help you then.
The easier the engine the less powerful the mod loading solution
runs
(I joke but it seriously always felt that way, there's no incentive when people have it easy)
huh, I was always under the impression modding UE3 was easier
at least judging from the insane amount of mods for Mass Effect Trilogy that alter gameplay elements and aren't purely audiovisual
like-- i'm not experienced full disclaimer, but I see a lot more gameplay and story sequence alteration mods in ME alone than... any UE4 game i can possibly think of
maybe it's due to ME's popularity and my bias is showing
I've always been told that kind of mod is not possible in UE4 rule of thumb
ue3 modding is easier in certain ways
especially if the dev supported modding, in which case it's super easy
but in the case of, for example, guilty gear xrd, the engine was heavily customized so no asset mods were possible
since ue3 isn't source available
ue3 modding is very crazy when it's possible, but when it's not possible
yeah
in the ue4 days, engine modifications are rarely as heavy
so you can usually get away with just messing with stock engine versions, and in the worst case scenarios where engine modifications do break stock engine versions you can always make a custom engine build from source
plus, ue4 is just a much more well-understood engine than ue3
i see 
i feel like the main thing holding back ue4 modding is the lack of communities surrounding most such games
hopefully reload doesn't suffer that fate
yeah
ue4 modding, at its worst, is about as hard as modding a normal c/c++ game
and at its best, is almost as easy as unity modding
i want reload to be my main game for modding-- but again, GFD modding is so advanced I fear people are gonna dip lmao
gfd?
P5R's engine
ah gotcha
i don't know much about persona modding, i was brought here because i'm an unreal engine modding expert plus i love jrpgs
asset mods for P5R are very straightforward, can also decompile and modify game scripts very easily
asset mods in ue4 are very easy as well, custom formats are incredibly easy to recreate too
ue4ss allows for lua, bp, and c++ modding
interacting with reflection makes modding practically any ue4 game very easy
i need to make documentation my top priority when I get around to modding P3R
the main problem is that most of the things we know now were only advanced enough to be usable within the last two years
so before that ue4 modding was quite... simplistic
i mean ive constantly been told "models, textures and audio is the most you'll see"
i do none of those 🥴
fair
that was the case a while ago
now we're far beyond that point
it doesn't help that a lot of ue4 games have modding scenes filled with people who don't know anything about programming
only recently have i gotten people to make code mods for ue4 arcsys games
GBVSR has a SF6 styled frame meter MOD 👀
as an example, introducing frame data tools into gbvsr
well yeah
this was based on my initial work on ggst
it's not surprising, just disappointing imo
there's only three people in my community who make code mods
out of thousands of modders
that's why I'm very focused on documentation
you can't teach everyone but if you can facilitate it, it might make it more appealing
yeah
unfortunately my modding scene has a very distinct lack of documentation, as i'm pretty much. the only person who knows how to do 99% of things
it's mainly on me for being bad at documentation tbh
i hope that by contributing to knowledge here, i'll be able to take some documentation back to my own scene
BF decompilation from previous Persona games was seriously such a blessing that I am mentally preparing myself to lose lol
blueprint disassembly is a thing we have
doesnt it return gibberish?
it's actually fairly readable
we have a control flow graph type system
oh nice
and most of it is just function calls or basic operations
After way too long I've gotten paks loading from Reloaded mods at least somewhat working. It's only for scarlet nexus rn and for some reason the other mod I'm trying to use (simple ps4 ui replacer) will only work if it's the only one that's on.
I'll try and fix that but I'm really happy with the progress (I feel like this took way too long, it's literally just adding strings to a list)
I saw this used for Shin Megami Tensei V https://github.com/tge-was-taken/KismetKompiler
(sorry for disrupting your convo)
sorry for hogging the UTOC thread

it's alright, if you want we can move this somewhere else
i have never heard of that before, but if it's like you say and gibberish then kismet analyzer is most likely better
looked at the samples and yeah that's much harder to understand
iirc it was used to modify AI procedures for one of the enemies in the game and nothing else
makes sense
If I can get this working universally then I've realised it'd technically be a minimum viable mod. With it people would be able to use Reloadeed for theeir mods even though they'll still have to build utocs and stuff
Obviously it'd be nice to get utoc emulator done but if I can't in time this should do for a while
fair

good work
I don't really intend to mod it day 1, I'm going to dive into the game and vanish for days lol
that's fair yeah
Thanks, that pattern scanning thing you linked was pretty helpful for getting gMalloc stuff working
i see
https://github.com/atenfyr/UAssetAPI
uassetapi is a c# library for messing with assets
though, i just remembered that asset editing doesn't work with utoc
someone's going to want to get zentools working
https://github.com/Archengius/ZenTools
zentools can convert io store packages to normal cooked packages
but it only supports ue5
I've used UnrealUnzen to open Scarlet Nexus utocs. I assumed it'd work for packing them as well but maybe that assumption's wrong 
There must be some way to do it since mods exist for the game
i should try unrealunzen
i had a look at unzen and it appears to be possible to use it to pack into a utoc but it requires a manifest file
that's in a json format
at least that's what I've gathered looking at how uecastoc handles the manifest
It's weird, only certain mods are consistently working and it seems to depend on their location, not the actual file. Does the path name affect whether files are loaded or not?
Files in scarletNexus.ge1Alisa\Unreal consistently work, those in scarletNexus.ps4UI\Unreal only work if it's the only mod and those in scarletNexus.yuitoKinglyRaiment\Unreal never work. The order I have the mods in Reloaded and whether there are others doesn't seem to matter
when I tested having multiple patch utocs that patched the same file, it would load the one that was in alphabetical order
so AAAA_P.utoc would load it's asset over BBBB_P.utoc
Something weird is definitely going on, I renamed the scarletNexus.yuitoKinglyRaiment mod folder to scarletNexus.ge1Alllllllllisaaaaaaaaaaaa (as well as one's with less characters, that was in case it's a length problem) and the two mods (yuito and kasane skins) both work fine together.
oh
I didn't touch any of the actual files, just the folder name
hm
in the meantime i am trying to get zentools working with 4.27
since i assume reload is 4.27
Pretending stuff isn't broken for now, the two signatures I need if we want to test this with other games are: FPakPlatformFile::GetPakFolders and GMalloc (the global variable), I got that from FMemory::GCreateMalloc but I suppose anywhere that's consistent is fine.
The signatures for scarlet nexus are 48 89 5C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 4C 89 74 24 ?? 55 48 8B EC 48 83 EC 40 48 8D 4D ?? for GetPakFolders and 48 89 05 ?? ?? ?? ?? E8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 84 C0 74 ?? for GMalloc
I don't think I'll do much (if any) more work on this tonight, other than putting in those signatures if anyone finds some.
I'll get to digging tomorrow maybe, been busy with P5 beta
(friendly advice, dont manually do assembly patching on ps3, it SUCKS!!!!!!)
GetPakFolders
4.27, same as Scarlet Nexus
48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 40 48 8D 4C 24 ?? - Hi-Fi RUSH
GMalloc
48 89 35 ?? ?? ?? ?? EB ?? 48 8B 3D ?? ?? ?? ?? - 4.27
48 8B 0D ?? ?? ?? ?? 48 85 C9 75 ?? E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? 48 8B 01 48 8B D3 FF 50 ?? 48 83 C4 20 - Hi-Fi RUSH (returns several results but they're all pointers to GMalloc)
documentation of some sort is one of the highest priority things that should be looked at when it comes to P3R (and honestly Persona modding in general) - it is always going to be so much harder for people to get familiar with things and potentially help out if they don't have a good starting point.
(which I think you address that later on but this was the first message I saw about it lol)
once people start modding this game, we've got sniwe's modding documentation pages that could probably use some filling out lol
ideally i'd make guides even for "simple" tasks, as signalling "hey, this is a thing you CAN do and here's how" is a very big motivator
I'm personally a fan of that approach, for instance this is how I did the Getting Started guide for code mods https://reloaded-project.github.io/Reloaded-II/DevelopmentEnvironmentSetup/

Thanks, here's a version with those added.
If anyone wants to test out loading files from Reloaded mods just add Unreal Essentials as a dependency then put your utocs and stuff in the Unreal folder of your mod. It's still the whole utocs, paks, etc so if you download a mod from nexus or whatever you can probably just extract it into there (what I've done so far).
I'll be out for a few hours but it's easy enough to edit the source yourself to add the signatures if moree are found or those don't work (they're just in Signatures.cs)
That's roughly what I was aiming for with my modding docs. I wanted everything to be very hands on, lots of pictures showing you what to do, that sort of stuff. My aim was that you would generally not need prior knowledge to go through them (or if you did, resources to gain that should be clearly shown first)
Ill test once I get on
trying to backport zentools to ue4 with
mixed results
main issues right now:
- cooked package summary is busted
- at least one file sets off an assert in zentools at
check( SerialDataStart <= ChunkDataEnd ); - i can't figure out how filenames are stored
So, I'm looking into how priority works with files to try and fix the weirdness with some mods not working. What I've found out so far:
- UTOCs are loaded in
FPakPlatformFile::Mount, specifically whenFIoDispatcher::Get().Mount()is called in it. This means utocs will only be loaded if there's a corresponding pak with the same name (this was presumably already well known as it's how mods are formatted) - The priority is done using a
PakOrdervariable in here. This is passed intoMountwhen it's called inFPakPlatformFile::MountAllPakFilesand the initial value is determined byGetPakOrderFromPakFilePathwhich gives priority in the order: game main pak -> game content -> engine content -> saved dir -> anything else- If the pak ends with
_P.pakthe priority is increased by 100 *CunkVersionNumber(seeemingly if you name a file..._2_P.pakit would have a version of 2)
- If the pak ends with
- In the case where files have the same priority I'm fairly sure it should go in alphabetical order as there's a call to
PakFiles.StableSortinFPakPlatformFile::Mount - I'm fairly sure utoc priority is identical to paks (which makes sense). It applies in
FFileIoStore::Mountwhen the file is added to theOrderedIoStoreReadersand is stored asOrderwhich is a part of theFIoStoreEnvironmentvariable.
All that said, I'm still not really sure what's going on with mods not working as I described here...
All of the folders I add should have a base priority of 0, and then that's increased to 100 since the paks have _P in them.
I'm now logging utoc files being mounted and it turns out it doesn't even try to mount the yuito mod's folder, even when it's the only mod 😕
I'm logging both the function for mounting paks and utocs, it doesn't even attempt to load it in either. I'll have to go further up and log stuff from FPakPlatformFile::MountAllPakFiles
that's super odd, maybe there's a problem in the file discovery function
Well, I found the problem. I logged the folders it's searching (separated by a new line) and this is what I got. Something is definitely going wrong with that third line lol
Turns out it was a skill issue. I was setting the length and capacity of my FStrings to be the number of bytes where it should be the number of chars (I had it correct in my TArray code). It working with the other mods was just coincidence, they were being allocated somewhere that was zeroed out so it read them fine.

Here's the current version. With it you should actually be able to load mods from Reloaded.
To do so, just put the pak, utoc, and ucas files in an Unreal folder in your mod and set Unreal Essentials as a dependency of it.
UwU
uwu!
I guess I'll work on the actual utoc emulator now. I just realised there are only 11 days until reload 
this progress is already insane
this is some terrible timing for p3r too because some of us are busy with the p5 betas stuff lmao
So true
Good thing I don't care about p5 modding that much
If it was p4g I'd have to drop everything for it lol
Yep 🙃
fortunately (or unfortunately?) it probably will never happen just bc the interest isn't there + P4 had its quick development time...
atlus inside job
clearly this just means we need a p3r proto too 
Definitely unfortunately, I would love a p4(g) prototype 😄
there's debug stuff for fes and 4 its just nowhere near the level of, well, this
og p3 debug build is pretty close to this
p5 just has a metric fuck ton of leftover data and dev tools
My plans of finishing rewriting x86 implementation of hooks library this weekend got thwarted too :v
I happened to receive a ROM for a future prototype release ahead of time
I love ue 4.25+ source, it doesn't have implementations for FIoDirectoryIndexReader and Writer (unless I'm just blind) so I'm switching to 4.27 for now and I guess I'll just hope it hasn't changed much 🙃
Can this be tested on older unreal engine games?
Like those which only load from pak
Yeah, it should work with theem in theory
The function it hooks is used to load both paks and utocs
(Since a utoc is only loaded when it has a corresponding pak of the same name)
Got it. I will try to ask if the other people who also were making unreal engine games mod interested on testing this
Cool, the more testing the better 
I wonder if idolm@star starlit season was tested. Not too many were working on this game
Well, since the game broke street date, you might be able to get hands on some real files ahead of time. Maybe that might help
xbox doesnt count lol
actually none of the systems its on would allow filedump aside from pc
You saying you can't get files from a Jailbroken PS5?
who even has one capable of opening p3r
I dunno, I've not done anything in that space before. Guessing there's cryptographic keys involved that only ship with newer firmware then
thats always the case with consoles
i.e. switch games need you to update your fw (sometimes re-dump keys) to dump new games
oh the irreparable damage caused by letting the users access the files of a product they bought
how will the economy ever recover??
I don't think not intended early access count lol
it woulnt matter console ue games ship with special shit
and afaik, no ones cracked opening ps5 ones lol
Cheering on you for the utoc emulator!
Has been a pain dealing with those for other ue games 
Thanks, I'm hopeful that I can finish it by launch (can't wait for that to backfire on me lol)
To give a bit of a progress update, a few days ago I worked on making an imhex pattern for utoc files and now that I've done that I think I have a good understanding of the format. I'm decently confident that I could build a valid utoc at this point (at least for Scarlet Nexus, I'll need to check if anything changed in 4.27)
I'm going to try and actually make progress on utoc emulator today, we'll see how far I get...
Dealing with the workflow of making the utocs with unreal is not the end of the world.
So don't stress too much 
I was way too ambitious with my plans for today, turns out I don't understand the format as well as I thought. I'll not try and set any plans like that (at least publicly) for now, I'll just work on it and see how it goes.
If it's not finished by reload I'll hopefully just release the current version and that'll do for a while
God speed to ya 
And even if you don't crack it
If you're able to. It would be a big win if you can handle the chunk numbers of different mods so they don't conflict
How does conflicting chunk numbers actually work? When you say that do you mean if two mods tried to replace the files from the same utoc it'd conflict?
Like I have two new utocs in a mods folder and they both edit different files that were originally in pakchunk0-WindowsNoEditor, then only one works?
essentially the one with the higher priority would work, and the other one wouldn't
unless you're asking about something else
That's all I was asking
I just hadn't seen conflicts for myself
I guess I just happen to have ones from different chunks
it gets weird sometimes when two mods overlap in one area but not another, and they get mixed together essentially
So can one utoc file contain stuff from multiple chunks?
there's nothing stopping you from doing such a thing
Ok
ue games are generally modded by making one big pak with all of the things you want to replace
and then forcing the pak to have a higher priority
if you know about the ~mods folder in unreal games, there's no implicit behavior in that
Cool, that was pretty much the plan
it's just that the name has a good priority and is easy to read
When you import content into unreal engine, you assing it to a chunk number when you make the ucas files
So you can have both a mesh and a texture contained in fx chunk 22
But if another mod wants to mod a music track. And also assing it to chunk 22
Then there will be a conflict
It sounds like nothing's forcing you to use any particular chunk so couldn't everyone just be careful not to use one someone else has? (In theory that is, I realise that might be hard in practice)
also i'm fairly sure that you can just. rename the pakchunk and at that point the chunk index doesnt matter anymore?
so like instead of pakchunk22-WindowsNoEditor, just call it MyMod
after you package
When you say rename the pakchunk do you mean something in unreal when building or the literal file?
the literal file
Hmm ok, I don't really see why conflicts would be a problem then
like, i've never seen the pak name have any hardcoded behavior
I'm fairly sure it doesn't. The only thing is checking for _P for higher priority
the other one is that the closer to the end of the alphabet, the more native priority it has
_P just makes a pak have priority over all paks that don't end in _P
Yeah but if I understood the code correctly you can add a number before for even higher priority
so _999_P would have 9990 priority
The default unreal engine only allows up to 300 chunks
So might be a problem might not
oh i wasn't aware of that
For the Hogwarts Legacy game they made a costum engine instance to remove that limit
So overlap was less likely
I believe that Menv's UEcastoc was supposed to take the mod name's hash as a chunkid when packing
So practically impossible for overlap.
But not sure how much success that had
oh yeah, i'm working on implementing c# mods into ue4ss
so look forward to that future
So how's development coming along
What do you mean? It's basically all in this thread. Last "progress update" is here:
[Reply to:](#1195558171377422346 message) So how's development coming along
To give a bit of a progress update, a few days ago I worked on making an imhex pattern for utoc files and now that I've done that I think I have a good understanding of the format. I'm decently confident that I could build a valid utoc at this point (at least for Scarlet Nexus, I'll need to check if anything changed in 4.27)
[Go to message!](#1195558171377422346 message)
Right
You can have a look at the original post if you to see what's done and to do, I've tried to keep it relatively up to date although because of word count it isn't as specific as I might like
I didn't know the post was made yesterday (I live in the UK and that post was made 12:07AM my time lol)
I'm sure you'll have the emulator almost complete by the time next week rolls around, GL with that btw
Thanks, hopefully that comes true 😄
i've still been working on this on the background btw
my efforts are at the point now where it's generating an almost complete utoc, missing only the hashes for TocEntryMeta and a mostly complete ucas, missing only the container header
(since the container header's missing, this utoc still won't be able to load)
Awesome, the ucas and small bits of the utoc are where I'm stuck as well. Do you have an understanding of ucas, I'm kind of confused about it. It seems to me like it's just compresion blocks all one after the other but I'm sure there must be some kind of header because the file size doesn't add up if that's the case
ucas has a header that's at the end of the file
Do you have a template or anything like that for it?
Thanks 




i've gotten it to work with one (1) texture uasset
the caveat is that you can't currently use a cooked asset directly
i'm making the utoc, then unpacking it with unzen and using the uasset that produces since the structure of package assets and io store assets is completely different
I had a crack at trying to convert between those two formats and got partway through but that was taking a while
Oh, ok
I do remember seeing something about the format on the uecastoc github page
Yeah, at the end of this it's got stuff on the different format
https://github.com/gitMenv/UEcastoc/blob/master/CasTocFormats.md#uasset-file-format
Honestly, seeing you're version working makes me want to just give up on mine and just leave it to you...

Since I don't think I'll keep working on utoc emulator directly (I didn't get far with my version anyway) I'm trying to make myself useful elsewhere.
I've gone back to the problem with the game restarting and found that putting a steam_appid.txt in the folder with the exe does actually work (I guess I was doing it wrong before).
So, I'm going to try updating Reloaded's built in steam hook to work with unreal games. I don't think it should be particularly hard
Here's a modified loader that should make steam hook work with ue games. That means you should be able to launch the shipping exe directly from Reloaded, no asi loader necessary
If you wanted to test this you'd just extract it into your Reloaded folder, replacing the existing Loader folder in there (there's no real need for me to upload the entire program)
(Depending on the nature of the patch, you might be able to ship this as a mod, or PR it to the loader)
Thanks. Should this be pinned?
I was planning on making a pr for it. All it does is check an additional place for the steam api dll
There is also still going to be a problem with chunkid overlap
For mods made with the engine
A tool was made utilizing UECastoc to resolve the conflicts for Hogwarts Legacy.
If Reload can have the same functionality so users don't have to manually deal with it 
https://www.nexusmods.com/hogwartslegacy/mods/1155
I don't think it'll be a problem if utoc emulator is finished. In case it isn't though, I guess it'd be useful and hopefully not too hard to add
Is the tool open source? I can't even find the download... I see there's a link to uecastoc but not the actual tool 😕
is this what you're looking for?
https://github.com/gitMenv/UEcastoc
That's the source for UEcastoc (I already had that) I was asking specifically about this tool that uses it
I wasn't going to actually use the tool, just replicate what it's doing
Based on that though I'm guessing it probably is closed source 😔
yeah
Well I can probably work out how it's doing stuff
I now know why I couldn't find it, the author took it down. Thankfully they also linked to the source on GitHub which is still up
Yeah

I'm assuming you're familiar with hogwarts legacy modding based on this. Do you think you could link me some mods that would normally conflict that are fixed by the chunk id thing?
If so, I could try making Unreal Essentials fix the conflicts and if possible, you could test it out with Hogwarts Legacy
Actually, I think I've found some mods I could use to test it with Scarlet Nexus, if that doesn't work though I'd appreciate the help
It’s funny how modding tools probably made by people who want me dead will help mods be made for me to use for one of my new favorite series lmaooooo
(This ain’t me throwing shade on y’all for using the tools btw)
(It’s just ironic and funny)
Well this is interesting. I found two mods that use the same chunk id and gave the one that edits Kasane priority, the model change shows for thee other characters but no textures (Kasane's works fine)
Would that be due to the chunk id thing?
I've made some example mods for HiFi-Rush
One that changes the Guitar on the titlescreen
And one that changes Chai's Model on the titlescreen
When both meshes are assigned to chunk 121 they work fine when loaded individually.
But loading both of them will crash the game
And by then changing the Chai mesh to chunk 69 instead. the game can load them both just fine
With seperated chunks
Yes. this is also a behaviour that can happen.
If it doesn't outright crash the game
Awesome, thank you for those. I'll see if I can get Unreal Essentials doing that automatically
Another thing I realised that I should do is hook where ue decides priority. With the current system, the order you put mods in Reloaded makes no difference since it's based purely on file name. That's not a particularly good experience for users (this is only with full files though, the emulator would probably remove the need)
True, being able to set the load order is a nice plus 
here from reloaded hub
I’m not able to help with coding but if a lab rat is needed to test this stuff lemme know 🫡
Welcome, I'll add back the check for exe name in a minute then look at sackboy
I think I'll try put out a call for some lab rats soon, I'd like to get Unreal Essentials tested with as many games as we can in the hopes of finding any bugs before P3R (like the one with Sackboy that M&M found)
Probably once I've dealt with the chunk id and priority stuff
👍
(And sackboy)
yea, was a good thing i caught the engine branch stuff now
incase P3RE ended up doing that too
I’ve barely played Hi-Fi Rush but I’m sure there’s something I could test with that
luckily i have several UE4 games 
just a matter of installing them
ah, stray is 4.27 with no utoc
okay huh, it also can't load mods
Do your mods have _P at the end of the name of the pak files?
nada, i can try that though
That'll probably fix it then
Turns out the recent SpongeBob platformers I own are UE4, and I own hi fi rush
So I can try with those
When I do stuff to fix priority then it shouldn't be necessary but it is for now
lmao that did it
Ah, well that's good
i'm just realizing that we can make use of demos too
both scarlet nexus and like a dragon ishin have them
Oh, I didn't think of that. Good idea
ishin has ++UE4+Release-4.27 which should work as-is
ff7r is ++UE4+Release-4.18
though the first instance of that is ++UE4+Release-4.18-CL-0
Dumb question but how do I check what version of UE4 a game uses?
i've been checking in hex but it can also appear under details in properties
Yeah, but that's not a guarantee
PC Gaming Wiki also usually has it listed (although for forks I don't think it lists the full branch name)
Oh this is helpful, thank you! SpongeBob BFBB Rehydrated is 4.23.1
7R is very custimized cobbled togehter engine. Do not reccomend 😂
doesn't surprise me given how bad the pc port is
We'll need to get signatures for these older engine versions if we want to support them...
I can just test with hi fi if that’s easier
Yeah, that's fine but it would be nice to support as many versions as possible.
Sorry for being a bit obnoxious, I’m just really excited for P3R lmao
All good, so am I lol
7R doesnt use utoc though, does it?
Nope
yeah it's "4.18" that's far too old
no point worrying about it then
Kh3 and 7R does not ise IO store
But crisis core did
Like I don’t need mods for initial playthrough besides switching out mass destruction and FeMC but I’m of the opinion that P3 has the best story/main cast of newsona and with modern gameplay I think it might be the best persona game ever
On an objective level
I'm kinda focusing on Unreal Essentials for now, leaving utoc emulator to rirurin
For Unreal Essentials there's no reason we can't support older things that don't use utoc
you should really ignore it
I've tried myself already
not a single symbol matched with bsim
and i had some methods to manually find some stuff
Fun
i.e. findfileinpakfiles
that shit got destroyed beyond recognition that its unsearchable
If Reloaded can handle any Unreal game and deal with IO store's chunk problem
Very appealing mod maneger
even with the method i got that worked for like 20 diff games
its too custom
does GetPakSigningKeysDelegate exist in older ue4?
i have quite a few games analyzed so I could look in older ones if that's your goal
I'm not sure
Supporting more games is sort of a sidequest, if people want to search for signatures or send me exes that I can search for I'll do that, otherwise it can be left for later
My current proper goal is to make the game respect Reloaded's mod load order
oh god
Woah, you weren't kidding
Well if you want to find signatures I'm happy to add them lol
if you want to go even further
if you have non utoc games, you can just enable loose file loading
and do something akin to persona essentials i guess
although there's no "bind files" function afaik
thats why i have all these games lol
its super easy
you hook FindFileInPakFiles, and make it return 0, this makes UE4 search for the file outside of pak (because 0 return means file doesnt exist in PAK)
you also have to hook IsNonPakFilenameAllowed and just make it always return 1
obv though you'd have to check the file exists loosely first
I see, well that sounds like it'd be worthwhile to add to Unreal Essentials
utoc games do still put stuff in paks so it'd be good to have for reload as well
Was R2 designed for Persona? It’s funny how Persona is about to make R2 so much more usable for games
the method is the same for all versions, however the struct changed ever so slightly I think starting on 4.19 or some such
It was designed to be universal, Persona games are just one of the big franchises that picked up on it
R2 is designed for any game
so you get filename by doing **filename rather than just *filename
I think it was used for some sonic games before that
Ah
thanks discord
Well it’s still cool that it’s about to become much more accessible as a mod manager since a lot of games are UE4
a bunch of the documentation has sonic-related example images so i figured those were being eyed early on (though obv it was meant for all sorts of games to use it)
can confirm
const TCHAR* TargetFile = *(TCHAR**)Filename;
if (wcsstr(TargetFile, L"../../../") != NULL && FileExists(TargetFile) && config::enableLooseFileLoad)
{
printf("Redirected File: %S\r\n", TargetFile);
return 0; // file exists loosely, return false so the game thinks that it doesn't exist in the .pak
}
return orig_hook_FindFileInPakFiles_NoLog(PakFile, Filename, FileEntry);```
youve no idea how many times ive copypasta'd this
lol
its
void* FindFileInPakFiles (void* PakFile, TCHAR* Filename, void** FileEntry)```
and ofc IsNonPakFilenameAllowed you just make it always return 1 since there's no harm in doing so
ok yeah, in older versions a2 is just the char* pointer to filename
i dont know which version was where i started needing to do that first line
but everything after that uses it, so its not like they changed it again
seeing MHOJ2 here made me go and check MHOJ1
++UE4+Release-4.18
lmao, curiosity hit me and wanted to see what fortnite's engine branch showed
++Fortnite+Release-28.10-CL-30676362
so even epic themselves forgoe the ++UE4+
I also have BPM: Bullets Per Minute, which is UE4 4.26.2.0
What did you use to actually change the chunk ids?
I'm fairly sure I've got priority working properly now. I just need a signature for FPakPlatformFile::GetPakOrderFromPakFilePath for other engine versions
(It's 48 89 5C 24 ?? 57 48 83 EC 40 48 8B D9 48 8D 4C 24 ?? for Scarlet Nexus)
I'm downloading the like a dragon ishin demo so I can at least do 4.27 myself
the demo doesn't
With this would the loose file need to actually be in the game's folder though?
yes
does 48 89 5C 24 ?? 57 48 83 EC 40 48 8B D9 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 83 78 08 00 also work for scarlet nexus? sackboy ran into a sig conflict
Ok, well I'll have to do some extra work
youd have to symlink it like how old essentials did
I'll see if I can avoid that, it can be a last resort
Yeah, that does work. I can switch to it
Are you looking to test this with other games? I have a fuck ton of ue4 games I've modded I could test this on if need be
Yeah, the more games the better
It omega dies on Sifu, I can test a couple other games I have downloaded too (Sifu is 4.26)
Do you want that .txt it spits out
4.26 only has GetPakSigningKeys too
Yeah, I just didn't have signatures for it
Scarelt Nexus was the only game I was getting them for myself, I was kinda relying on other people for the others 😅
I think I have one on 4.27 
i'm upset i don't have my hi-fi rush idb anymore because that means having to analyze that denuvo ridden exe again 
Do you think you could send mee the exe for Sifu Mudkip?
hi-fi rush GetPakOrder = "48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 57 48 83 EC 40 48 89 CF 48 8D 4C 24 ??"
alright im pooped and ill check more tomorrow
it seems roughly up until 4.19, a2 itself is just char* for filename, but then somewhere between 4.20 or 4.21, a2 became an FString* which is why you have to do the bit of trolling with pointer to pointer to pointer thing
this is for 4.21 and above
coincidentally, in the same way, 4.21 and above you're no longer hooking FindFileInPakFiles
its too "late" in the chain of command
you have to go 2 levels depeer now into
EFindResult __thiscall FPakFile::Find(FPakFile *this,FString *param_1,FPakEntry *param_2)```
its still the same exact thing/result
just thought you might want to know the distinction incase you go looking for symbols
you can tell because the function you're hooking should always be 3 args, and at some point (i have 4.21 as earliest to compare) it became 4
anyway

at least with stray (4.27) you can use the same GetPakOrder signature as the other 4.25 games
I've got loose pak file loading working with Scarlet Nexus. No symlinks, they're loaded directly from the mod's folder 🙂
The way I did it feels a little jank so I definitely want to test it on lots of games to see if it works with them all. If file structure is consistent between them it should work fine though
The signature I need for this is FPakPlatformFile::OpenRead which is 48 89 5C 24 ?? 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ?? 48 81 EC B0 00 00 00 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 45 ?? 66 0F 6F 05 ?? ?? ?? ?? for Scarlet Nexus
I'll be able to get ones for 4.26 and 4.27 myself eventually (I'm waiting an eternity for analysis) but if someone gives me them before then it could be tested quicker.
let me check that against sackboy
no results, hm
Try this, it's the 4.25 one 48 89 5C 24 ?? 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ?? 48 81 EC D0 00 00 00 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 45 ?? 66 0F 6F 05 ?? ?? ?? ??
Scarlet Nexus is on a custom branch which is closer to 4.25+ (it's sort of a mix of 4.25 and 4.25+ if I understand correctly)
nada
rip
Well I've got Sifu and Like A Dragon Ishin analysed, now just to wait to add them to the BSim database and I can get sigs for 4.26 and 4.27
should i send the executable for sackboy then?
if you can wait 8-9 hours i can help again
i am going to sleep, this message has been brought to you by "certified timezone moment"
have a gnight
If you could, yeah that'd be helpful
would be fine to just put it here then, right?
All good, I can wait. Sleep well
Yeah just do it, we can delete it after I've downloaded it 😄
alright
Thanks 
np
You assign the chunkID in Unreal Engine before you export/cook the ucas
How to change it after it is cooked is the big question 
Oh, ok. So you just remade the mods, I see
Well, I think I'll just leave this chunk id stuff for now. I'm pretty sure utoc emulator should fix it anyway.
I was hoping it'd be something relatively simple that I could do but it seems like it probably isn't
oh yea, the emulator
when I posted the first image where I had the emulator working, that was only emulating the utoc portion
the ucas was still a real file that I made by copying the contents of each file into it, which ofc was never gonna be the solution I would ship
so I've done the work needed to also emulate the ucas, but I've come across a weird problem where it doesn't report any errors, but the game refuses to continue when using the emulated ucas
It only works if I dump the contents of the emulated ucas to a file and let the game read the actual file
That's fun. My guess just based off of what you said would be that the emulated file size is being reported incorrectly (or something along those lines). I had that problem with bf emulator although I thought it was fixed (it was a problem in the base file emulation framework mod)
Another idea is maybe the stream for the ucas is being closed and it's failing to read it that way
It's kinda hard to tell if there aren't any errors reported
after you mentioned that, I remembered that all ucas streams are sized as a multiple of 0x10, which I hadn't done, so I added that in without any success
i imagine that'd have to be the case then
Worst case scenario you find where the game is reading from the ucas and just step through until you see where it fails, it'll probably be a pain but it should work

x64dbg
Cool, I've always just used cheat engine
I've tried to use the debugger in Ghidra a few times but have never really had any success with it
i mostly use cheat engine too, this just has a couple of useful features such as pausing at the entrypoint by default
yea I've tried to get ghidra's debugger working too and didn't get anywhere with that
If you launch the game directly from cheat engine it breaks at the start
and pausing on crash
that used to be useful before I discovered crash dumps
which funnily enough I never knew about for many years
@wild abyss FPakPlatformFile::OpenRead changed omega drastically somewhere after 4.18 lol
4.17 and 4.18
4.21+
thats not even the whole thing lol
@wild abyss here, I hunted down most of them manually just to make sure it wasnt a signature collision thing
Thanks, as long as it still does the same thing it shouldn't really matter if it changed drastically (we'll have to test it to see if that's the case though)
What I do is check the file that it's trying to open and then if we have a loose version, call it with the path to the loose one instead. I doubt any change would break that
i see
while you're at it I'd suggest a file access log toggle
(although i have yet to find where you'd get such a thing for utoc)
Yeah, it currently logs them if you're in "debug mode". I'll put a separate toggle for file access to make it clearer
I don't have signatures for versions prior to 4.25 (apart from the one you just sent). Did you send them at some point or do we still need to find them?
for what?
The other things I use:
- GetPakSigningKeys
- GetPakFolders
- GMalloc
- GetPakOrder
(Not the actual names, that's what I called them in my code)
Ok, well if it's not that's fine, I'd still need the other ones
i have GetPakOrder for hi-fi rush here if you haven't seen it yet
i can look for some of these later if they havent been found yet
although ill need the full name for the gmalloc one
the others i assume are from FPakPlatform class?
I didn't see that one. Thanks
Yeah, I'll double check and get you the full names of them
GMalloc is a global variable (that's what it's called) but I can get the name of the function I scanned for it (there are hundreds of options iirc)
FCoreDelegates::GetPakSigningKeysDelegateFPakPlatformFile::GetPakFoldersFMemory::GCreateMalloc(there's a pointer to GMalloc in there, I need the address of the instruction that loads it, not this function. Any function that uses it would also work fine)FPakPlatformFile::GetPakOrderFromPakFilePath
In theory this should work for all games on 4.25-4.27 (I'll post another when I have complete sigs for older versions). The additions are:
- You can now load loose files from paks. To do this, just put them in the
Unrealfolder of your mod copying the file structure in game. For example:Unreal\ScarletNexus\Content\UI\01_Common\00_Font\AGMENAW1G-SEMIBOLD.ufont - You can log file access (from paks only for now) by enabling the new setting in the mod's config. If you're having trouble working out where loose files should go you can use this (just ignore the
../../../at the start of what's printed in the log and that's what you'd put in theUnrealfolder) - Your load order in Reloaded is now reflected in game. If a file is lower in your mod list it will take priority over other mods that edit the same files (chunk id conflicts can still happen, this doesn't fix that)
I'll write some proper usage documentation later today but hopefully that'll do for now if anyone wants to test
sifu still seems to get same error (2.26)
lol did they troll with custom version
it says unable to find unreal engine version
that means its not in the exe
which usually only happens when they mess with the code
swine could probably definitively tell you he has exe 
That doesn't make any sense, Sifu does have the standard ue4 version. It should find this just fine 
I just retried again and got this 
Umm that's weird. I should be able to fix that though
Did you change anything since you last ran it?
I re-pasted files in, ig windows didnt replace files correct first time or something? 
I'm having a lot of trouble finding the function in Sifu for some reason 😔
send exe
K
Could you also check if this signature matches with your 4.27 games, the shorter one that you had was conflicting with Like a Dragon Ishin Demo
4C 8B DC 55 53 57 41 54 49 8D 6B ?? 48 81 EC B8 00 00 00 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 45 ?? 66 0F 6F 05 ?? ?? ?? ??
Oh, I was going to send the Ghidra archive for it to save you analysing but it's huge 
thats why i made note of a longer one lol
the longer one still worked
oh wait 4.27
my brain read that as 25
ill check
lets see, matches granblue
matches crisis core
matches on default project exe too
so it should be fine then
Cool, thanks for checking
I'm still trying to upload Sifu btw, it nearly finished but failed for some reason
I think you sent him the wrong one
Oh yeah
what the fuck did they do on SIFU lmao
ive tried backtracing from FindFileInPakFiles and IsNonPakFilenameAllowed (because both are used by OpenRead) and i cant find any function that matches
bruh
i actually had this same issue on KoF XV
I think retail 4.26 is different from what they give now
in fact, I can even tell you
the FindFileInPakFiles here
it looks like the 4.18/4.19 one
but i cant find anything that matches how OpenRead was in those versions
If you havee FindFileInPakFiles then open read should call it...
Thanks
isnonpakfilenameallowed is at 0x143029fb0
finding them both is easy because FileExists is an easy to find function (relatively) and it calls them both
FileExists is at 0x143024f20
thing is, like i mentioned earlier, after 4.21 or so there's 2 FindFileInPakFiles
i think openread calls the one thats inside FindFileInPakFiles
fun isnt it
Oh...
I found one that looks like it might be it at 143026b10
The general structure looks about the same to me
and ghidra is usually good at guessing types
and it didnt guess a3 as a bool
usually it guesses "undefined" which is just 1 byte
Yeah, I think you're right. nvm
yeah I haven't yet found a solution for why it hangs on startup, so for now I'm testing by just writing the ucas to disk right after the emulated utoc's created
which sucks because other than that, things have been working great so far. I can add and replace files, it respects reloaded's mod order and it has worked fine with hifi rush
I've only tested it with 4.27 so far, so I'm planning to check how it performs with 4.26 later since I've found out that normally the container header on 4.25+/4.26 is located at the top, so I wonder if that may cause any issues
Well I'm glad to hear it's going well apart from that. Sounds very promising
If you want I could try looking into it not working with the emulated file, maybe some fresh eyes would help
also I'm wondering if it may be a good idea to bundle the UTOC emulator inside of the Unreal Essentials repo instead of FileEmulationFramework since the IO Store format changes and the only way I can think of to check for that would by getting the exe/branch name from Essentials
because I know that the format's quite different in 4.25 and in UE 5
Does it change without changing a version number or something in the file?
Tekken 8 is UE5, so it'll be very fun if someone runs into this and tries to use it
there's no version number field stored in the files to indicate such a thing
I thought there was... Maybe I'm thinking of something different
cooked packages do
but its not in io store packages since it's just assumed that they're formattes for the target engine version
Ok, well if you want to include it directly in Unreal Essentials that's fine by me. Either that or expose an api that Unreal Essentials can use to tell it the version and stuff (you'd probably need to do that anyway)
Oh, I see what you mean. the version is either initial, directory index, or latest. Latest is not a particularly useful version number lol
ok i found something in SIFU that i dont know if its the right one, but the args match at least
check 0x14302e3b0
there are exactly only 2 functions that match the argument count that call FindFileInPakFiles


ah wait that says undefined8 nvm

so yeah only the one i sent
i will test a mod
Do we have any other 4.26 games we could test it on?
this matches on KOF XV and that one actually vaguely resembles the function from other retail games
Ok, well it's probably right. I guess we'll find out eventually if it isn't consistent
So I can't seem to get mods to load on Sifu, however I also don't really see it logging alot of files 
Does it use utocs? (I feel like I've asked this before lol)
nah
Weird, it should log everything then
but it seems to be logging files here
very odd
Could you see if this logs more stuff
Ok, see that seems like it's logging all the files?
very much so
Alright, well I guess there must be something other than OpenRead used. Maybe I just hook FindFileInPakFiles instead (that's what this logging is from)...
mods no worky, but its logging everything
Yeah, that was just logging to see if it's the right function, I'll work on making mods actually work

hook isnonpakfilenameallowed
make it always return 1
literally just kill the entire functionality and make it just return 1
That goes back to files needing to be in the game's folder though, doesn't it?
well findfileinpakfiles has the filepath
but being an older game you get into the whole
"this is an fstring so you need do to **(*char)" or however it went
I've already got code for dealing with FStrings, that's not really a problem. I guess I'll try doing what I had before but on FindFileInPakFiles and just see what happens
I think I have an idea based off of this actually, those file types are ones that would be stored in utocs if the game used them. So, maybe I need to hook whatever the function is that tries to read from utoc files 
Actually no, FindFileInPakFiles isn't used in the io store code anywhere that I can see so that'd be wrong...
I made the assumption that the UTOC file will always be read before the UCAS, and that held true for my 4.27 tests
but it's the other way around in 4.26



but it does read the 4.27 formatted UCAS just fine (4.25+ and 4.26 put the header at the top with a fixed size of 0x10000 while 4.27 puts it at the bottom, and it doesn't use the partition count and partition size fields in the toc header)
Lmao 😭😭 small revisional changes between versions that have major impacts moment or smth fjfjn
Makes sense why theyd change it tho, bit odd to read the data file before the table of contents file haha
Sounds like it'd be an easy enough fix for that since ud just have to make the emulated UCAS file write first but then I could see that just inverting the problem where 4.27 games start hanging or failing to read files BC the UTOC wasn't made in time or smth
which is why I mentioned earlier that the emulator's gonna end up depending on unrealessentials to get the right version from
i knew this was gonna happen eventually since 4.25 and 5.0+ change the format significantly, but I didn't think I'd have to pull that trick this early
Sometimes thats just how it be 😔
At least for that it might be simple enough to just go "if 4.27 or equivalent behavior, utoc first, else UCAS first" but then u never know if any devs decided to be cheeky on those older versions and change the read order for no reason lol
Regardless tho it's just gonna have to be one of those "this is a kinda dirty workaround to fix an issue but no other option is better so ¯\_(ツ)_/¯ "
I just had an idea for the emulated ucas files not being read. Maybe the stream of the file isn't being set to position 0?
I acquired Sifu and it has symbols 
I found out where those other files are being loaded thanks to that, FPakPlatformFile::OpenAsyncRead
Sorry that took ages, could you try Sifu with this one @visual bramble (won't work with non 4.26 games for now)
If anyone wants to look for signatures (assuming that works for Sifu) FPakPlatformFile::OpenAsyncRead is what I hooked for it,
I'll try and do them myself tomorrow in any case
(I would do it now but Ghidra keeps deciding to completely freeze and then eat my cpu alive and I don't know why, it's not even analysing anything)
oh it did this for me a few times too
i wonder whats up with that
had to completely kill it with task manager and reopen
specifically only happened yesterday too
infinite loads at this point always, the files not modded so its not that
just refuses to load stuff beyond this point
oh nop it is dying from mod specifically
mod works fine as a .pak so ik thats not the issue 
yeah ive deleted files, the only way to make it load is to just not have a mod enabled lmao
Fun, could you send the mod that's breaking it. I'll try and see if I can work out what's wrong
sounds to me like you'll end up eventually just going with my original idea lol
findfileinpakfiles has the filepath
Maybe...
you can immediately test btw
start a new game, adachi first person you see
I tried going further up to change the path in FAsynchArchive but still no dice 😔
I'm going to try FindFilesInPakFiles now...
Ughh why does this work
This needs files in the game's actual folder though. I'll see if I can work out why this works when I'm fairly sure what I was doing should be equivalent
cant you just replace the filepath string?
its in a2
well, a2 is an fstring that contains the path but you get the idea
I can try
Nope, that just caused a crash unless I did something wrong
(It's also not an FString btw, just a regular string)
At least in 4.26 it isn't







