#Unreal Essentials

1 messages Β· Page 3 of 1

wild abyss
#

Idk, I only see one in the game but the source I showed was the one with actual code (the other one just calls it)

rough rose
#

ah right 4.26

#

i genuinely dont know what the fuck happened with that version

#

421 to 425 are all consistent

#

then there's whatever the fuck 4.26 is doing

#

and then 427 matches the ones before 426

wild abyss
#

lol, well I'll keep trying to work with OpenAsyncRead. Hopefully I can work out what's going wrong...

rough rose
#

try going deeper into findfileinpakfiles

#

there was a read function

#

forgot the name

#

ah

#

see if you can find this one

#
EFindResult __thiscall FPakFile::Find(FPakFile *this,FString *param_1,FPakEntry *param_2)```
#

this is what both of the FindFileInPakFiles function call

wild abyss
#

I see it in the source but not in Sifu. Is there some way to search by nameespace in Ghidra?

#

nvm, I found it

#

Still weird that it doesn't show up when I search for it though

rough rose
#

i really dont know whats going on with 4.26 lmao

#

thankfully very few games do use it

wild abyss
#

Seems all I needed to do was hook IsNonPakFilenameAllowed to return true. It now seems to work with OpenAsyncRead

rough rose
#

wait really?

#

that's...

wild abyss
#

I guess it just refuses to load non pak files at all if that's false

rough rose
#

well, good thing you have someone who dug for those signatures

#

πŸ™‚

wild abyss
#

No textures hee_melt

#

Bruh the image is taking five years to send

#

Oh wait...

visual bramble
#

adachi no....

wild abyss
#

Oh, I think it's because you use different names for your textures

#

There must be somewhere else that tries to load them in that case

#

At least, I think that's what's happening

visual bramble
#

sifu supports custom material instances

#

they work in paks so idk ADAHCI

wild abyss
#

It's loading ../../../Sifu/Content/Characters/MainChar/M/Textures/T_MainChar_M_BaseOutfit_S.uexp and three others

#

Fun

#

Well time to work out what's going wrong again

#

At least Sifu is finding lots of bugs lol

#

Weird, it only even tries to look for the files if I put them all in the game's folder and make FindFileInPakFiles return false...

wild abyss
#

I did it corrinflames

#

I needed to make FindFileInPakFiles also return true if there was a corresponding loose file

#

So, the current signatures I need for everything in Unreal Essentials is:

  • FCoreDelegates::GetPakSigningKeysDelegate
  • FPakPlatformFile::GetPakFolders
  • FMemory::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
  • FPakPlatformFile::OpenRead
  • FPakPlatformFile::OpenAsyncRead
  • FPakPlatformFile::IsNonPakFilenameAllowed
  • FPakPlatformFile::FindFileInPakFiles
#

I'll work on adding the signatures that I can and send a version for people to test with soon

wild abyss
visual bramble
visual bramble
#

Swine did you get a bunch of stutters from it loading stuff to

#

or is it pc issue

wild abyss
#

I did but I'd assumed it was a pc issue. I tend to get stutters everywhere lol

#

I'll see if I can do something about it

wild abyss
wild abyss
#

I'll try and sort out the stuttering now, I have an idea that hopefully will work

wild abyss
visual bramble
#

sure

wild abyss
#

Currently I'm creating a dictionary of redirections as mods are loaded and then just querying that when a file is loaded. It's using the exact same paths as keys that UE is using for opening files so the only processing that's happening is getting the string using Marshal.PtrToStringUni.
If anyone has ideas on a better way to do it I'd appreciate it. That's the smartest thing I could come up with

visual bramble
#

wow yeah way better

#

it also loaded way faster too

wild abyss
#

That's good

visual bramble
#

its from a minute and a half boot to like 12 seconds lmao

wild abyss
#

I was also using _logger.WriteLine instead of WriteLineAsync which would kill performance if you had file access logging on

#

That's probably the cause of the faster boot time

rough rose
#

which ones are still missing?

#

i know I'd need to find OpenReadAsync in almost everything

#

basically can you list which versions you need what for

wild abyss
#

I need everything you can get for every version before 4.25 except OpenRead, FindFileInPakFiles and IsNonPakFilenameAllowed since you already sent them.

rough rose
#

got it

wild abyss
#

I'll see if I can get any of them myself in the meantime and let you know if I do. (I'll have a look around and see if I have any older ue4 games)

visual bramble
#

I have a bunch of exes from before 4.25 if you want em ADAHCI

#

well, 3, but that counts I think

wild abyss
#

Sure, chuck them my way

dusky steppe
#

ok I found out what was going wrong with the emulated ucas

#

I hooked into FFileIoStore::ReadBlocks to check that it was reading all the file handles, offsets and lengths correctly for the requested items and got this reading from the emulated container header

#

inside of ReadBlocks, a size field is set to be the minimum between the partition's file size and some other thing
and the erroneous size value happened to be 0 - container header offset

#

turns out that the emulated ucas reports itself as having a file size of 0 for some reason??? (size out param in FGenericFileIoStoreImpl::OpenContainer)
if I change it to the size it's supposed to be, it works fine lol

#

There's an IoBatch class that represents a set of requests to read particular blocks of the container file. FIoBatch::Read adds a request onto the queue, then FIoBatch::Issue notifies the dispatcher thread (starts from FIoDispatcher::Run) to start retrieving the requested blocks, eventually getting to ReadBlocks

#

FIoBatch::Read accepts a chunk ID pointer as it's first param, so if you created a dictionary matching chunk ids to filenames you can create a file log for IO Store assets

wild abyss
dusky steppe
#

i haven't made the log

wild abyss
#

Ok, cool

#

On the file size being 0 there's a real possibility that it's a bug with File Emulation Framework. There are a number of windows functions that can be used to get information about a file, it's possible there's one that we haven't hooked that it's using

dusky steppe
#

yeah, the moment I tried testing using just a single FileStream as the UCAS stream I had a feeling that was the case

wild abyss
#

I could try looking into whether that's the case if you want. I spent a few days doing the same thing for bf emulator so I'm fairly familiar with the base file emulation framework mod stuff

dusky steppe
#

yeah, that'd be helpful

#

the code that I have as a workaround at the moment isn't particularly nice lol

wild abyss
#

Is what you've got on your fork on GitHub the latest stuff?

dusky steppe
wild abyss
#

I see, I didn't realised you'd actually put it with Unreal Essentials. I'll have a look and see if I can work anything out

#

How would I make a mod to test it, like what would the folder structure be?

dusky steppe
#

UTOC/UnrealEssentials.utoc/Content/...

wild abyss
#

FEmulator/UTOC or just UTOC?

dusky steppe
#

just UTOC

#

also I've only tested this on blank 4.26 and 4.27 so far
ik that hifi rush has inlined OpenContainer so I'm going to have to look elsewhere to fix the file size

wild abyss
#

Well I was going to try with Scarlet Nexus, I guess we'll see how that goes

#

It doesn't seem to be working...
Should there be stuff logged to the console to indicate things happening?

dusky steppe
#

did you build using the powershell script in the repo's root?

wild abyss
#

I did not

dusky steppe
#

i had to do that to glue the c# and rust parts together

wild abyss
#

didn't realise I needed to

#

Ah ok

#

I guess I'll probably need to install rust then lol

dusky steppe
#

πŸ¦€πŸ¦€πŸ¦€πŸ¦€

#

oh yea also this will need to be in the UnrealEssentials folder
it contains the dummy files

wild abyss
#

Oh, it's not going to work with scarlet nexus...

dusky steppe
#

i was aware that pak has different versions but I didn't think too much about it since it was working for 4.26 + 4.27

wild abyss
#

Do you think it's something that could be easily fixed?

dusky steppe
#

yea, i think it'd just be a matter of having several different dummy paks available made for each version

wild abyss
#

Oh wait, that's the pak

dusky steppe
#

if you use the dummy pak from a scarlet nexus mod that should fix it

wild abyss
#

I can probably just grab a pak from one of my mods then

dusky steppe
#

I wanted to take a look at the pak format but I just didn't have the time to

wild abyss
#

I thought it was the utoc, didn't read the message properly lol

#

Yeah, that's fair

#

If it works just having a dummy for each version should be fine for the initial launch

#

Still doesn't seem to work and I don't see anything in the log πŸ˜”

#

Oh, I was meant to make IO Store a dependency of the mod? Stuff happens now but it crashees

#
Path "UnrealEssentials/ScarletNexus/Content/Character/ch/ch0200/04_Mesh/SM_ch0200" is missing root containing project name + content. Path components were not handled properly
#

I'm not really sure what that means

#

Oh, I just do Content

dusky steppe
#

yea

wild abyss
#

That's cool

#

Does that just work if stuff in Engine\Content is being edited?

dusky steppe
#

good point

#

that's untested

#

and I don't think that would work because it assumes everything's in Game/Content

wild abyss
#

I'd say just make them put Game/Content or Engine/Content

dusky steppe
#

sounds good

wild abyss
#

That's what I've done with loading loose pak files

#

Anyway, it didn't crash but it also didn't work. Is that what's expected with this version?

dusky steppe
#

what I've got showing on the console when it works is this after all the hooks

#

then unrealessentials reporting pak order for the UTOC pak, then File Access Server reporting file size override

wild abyss
#

Oh yeah, it is showing that

#

But the changes definitely aren't showing in game. Maybe I formatted it wrong?

dusky steppe
#

do you have any blank UE projects? it might be easier to figure out what's going on using that

#

since I don't have scarlet nexus

wild abyss
#

Yeah, I have the one for 4.25

dusky steppe
#

ah

wild abyss
#

I tried opening up the dumped utoc file in UnrealUnZeen btw and it didn't work.

dusky steppe
#

oh yea I think that's because it doesn't like the fact that the root directory has a name

wild abyss
#

hmm ok

dusky steppe
#

i haven't formatted the toc 100% correctly but it still worked

dusky steppe
wild abyss
#

Well loading the dumped utoc and ucas directly worked, I guess this should be fine then

wild abyss
#

lol thanks

rough rose
#

this is so cursed

#

OpenRead calls the "lower" FindFileInPakFiles, while OpenAsyncRead calls the "top" one

#

thats why you're needing the hook for FindFileInPakFiles I guess

#

πŸ™‚

#

btw, i have default project with symbols from 4.18 and GetPakOrder just doesnt exist apparently, but searching for the string it seems to exist in Code Vein? (same UE4 version)

rough rose
#

a lot of these are hard to find in older ue4 for some reason

#
FPakPlatformFile::GetPakFolders ( search for %sPaks/ )
UE4 Game  (4.18) - 48 89 5C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 4C 89 74 24 ?? 55 48 8D 6C 24 ?? 48 81 EC 90 00 00 00 48 8B FA
Code Vein (4.18) - ??
DBFZ      (4.17) - 48 89 5C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 4C 89 74 24 ?? 55 48 8B EC 48 83 EC 50 48 8D 4D ??
GBVS      (4.21) - 48 89 5C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 4C 89 74 24 ?? 55 48 8B EC 48 83 EC 50 48 8D 4D ??


FMemory::GCreateMalloc ( instruction that loads gmalloc global)
UE4 Game  (4.18) - 39 05 ?? ?? ?? ?? 7F ?? 48 83 C4 28  - [39 05 3b 61 0e 05] CMP dword ptr [GMalloc], EAX
Code Vein (4.18) - impossible to generate unique signature


FPakPlatformFile::GetPakOrderFromPakFilePath ( search for %sPaks/%s- )
UE4 Game  (4.18) - ?? (doesn't exist?)
Code Vein (4.18) - 49 89 E3 55 53 49 8D AB ?? ?? ?? ?? 48 81 EC 98 01 00 00 48 8B 05 ?? ?? ?? ?? 48 31 E0 48 89 45 ?? 49 89 73 ?? 48 89 D3
GBVS      (4.21) - 48 89 5C 24 ?? 57 48 83 EC 40 48 8B D9 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 83 78 ?? 00


FPakPlatformFile::OpenAsyncRead
UE4 Game  (4.18) - 40 55 57 48 83 EC 58 48 83 3D ?? ?? ?? ?? 00
Code Vein (4.18) - 40 55 57 48 83 EC 58 48 83 3D ?? ?? ?? ?? 00



FCoreDelegates::GetPakSigningKeysDelegate (this is a signature to a function call of it, not the actual function)
UE4 Game (4.18) - E8 ?? ?? ?? ?? 48 8B D8 44 39 60 ??```
hollow glacier
#

hey in case u don't know P3R is available for pre-load on steam

steel fractal
#

Can't get to the game files anyway until release time 02Shrug

hollow glacier
#

I'm currently pre-loading the game rn, I'll check when it's done

steel fractal
hollow glacier
#

I can't browse the files sadly

#

oh, I didn't read your first response properly lmoa

#

I'm stupid

steel fractal
hollow glacier
#

it's a shame we can't view the files yet, would've helped with unreal essentials tremendously

ebon shard
#

altho maybe that's kinda a blessing in disguise since not being able to really access the reload files basically meant having to support other games first instead of solely focusing on reload and possibly leaving other games behind at least a lil bit so idk

rough rose
#

today vs tomorrow wont make any real difference

hollow glacier
#

true

wild abyss
steel fractal
#

Good luck naocheer

dusky steppe
#

i made a few changes in the last commit, including putting game files in /UnrealEssentials.utoc/Game/Content ... and engine content in /UnrealEssentials.utoc/Engine/Content, moving all the UTOC emulator related files into the UTOC.Stream.Emulator folder and manually copying over the changes made to UnrealEssentials since it won't let me automatically merge

wild abyss
#

Ok, cool

#

When you say Game/Content do you literally mean Game or do you mean ScarletNexus/Content, etc?

dusky steppe
#

literally Game

wild abyss
#

Oh

#

Do you change Game to the actual game name at some point or does literally putting Game just work? Seems weird to me

dusky steppe
#

i've only tested this on the test projects so far so I feel that this solution might not work for a shipping game

rough rose
#

they do str replace i think?

dusky steppe
#

so yeah try ScarletNexus first

rough rose
#

i vaguely remember seeing something like that in the code

#

while looking earlier

wild abyss
#

Well I tried both and neither worked...

#

Do I still need the UTOC folder in UnrealEssentials?

dusky steppe
#

no

wild abyss
#

Ok, good. I deleted it already

dusky steppe
#

yea i wanted to keep all the utoc emulator stuff out of the essentials folder

wild abyss
#

Yeaeh, seems better like that to me too

#

I'm not getting the file size overrides anymore

dusky steppe
#

oh yea there's no signature for OpenContainer for Scarlet Nexus

wild abyss
#

Oh, I guess I can find that

#

What's it used for?

dusky steppe
#

FGenericFileIoStoreImpl::OpenContainer

#

it gets the file handle and file size of the ucas

#

it's called from the same function that calls TocResourceRead

wild abyss
#

I didn't realise you'd need to hook that. I'd expected GetPakFolders (or whatever it is) would suffice since it can load full utocs?

#

Does it not just look for a ucas in the same folder?

dusky steppe
#

i am only hooking it because of the bug where the ucas reports a file size of 0

wild abyss
#

Oh, ok

#

I still saw file size overrides yesterday though. It seems like the file isn't being accessed at all now...

#

I'll get that signature anyway and see if it changes things

patent belfry
#

hey, is there testing that needs to be done rn?

wild abyss
#

Loose pak file loading could use some testing. UTOC emulator is very close to being ready for testing as well (it seems like once this bug is fixed it should be useable)

visual bramble
#

fyi ive been testing sifu on deck with uessentials and its been running great naoyes

patent belfry
#

oh cool

wild abyss
#

Awesome

patent belfry
#

cause I was gonna test on deck myself

#

because it's what I use to play my PC games femchappy

#

Hi-fi is probably the easiest game to test with that I own because that uses UE and also isnt an old-ish version like the spongebob platformers I own lol

wild abyss
#

I tested the dumped files again and they work fine btw

dusky steppe
#

i just realised that I had put return false instead of return true for when TryCreateDummyPak is successfully emulated and so FileAccessServer didn't report anything

wild abyss
#

lol

dusky steppe
#

i don't feel like that would fix it but might as well try

#

i'm not sure how much more support I'll be able to give since I'll be out for most of the day (I was hoping to get this working yesterday so I could have a break day before reload...)

wild abyss
#

All good

#

I'll try and work stuff out on my own, it might just be a little bit more difficult since I don't really know rust πŸ˜„

#

I do hope we can get this fixed soon

#

It's still not working but I am seeing file size overrides now so that's a bit better

#

I added logging to OpenContainer and it's not even trying to open the UnrealEssentials ucas πŸ˜”

dusky steppe
#

yea i saw on the logs that it also wasn't getting the utoc?

wild abyss
#

I feel like I must just be doing something wrong

wild abyss
#

The utoc is never even getting to TryCreateFile naotothink

#

It doesn't seem like anything is trying to access it at all... I'll have to go deeper

wild abyss
#

I've found out where stuff is breaking, apparently the pak is not valid. In FPakPlatformFile::Mount Pak->IsValid() fails 😦

dusky steppe
#

damn, i even got the pak from a scarlet nexus mod

#

i wonder if this is the same bit with ucas where fileemu doesn't hook the function that pak uses to get file size

wild abyss
#

It could be, I'm looking deeper try and find where it's dying when parsing the pak file

#

I think that is the problem, the reader is reporting a total size of 0 naodead

dusky steppe
wild abyss
#

Ok, I'm finally starting to get somewhere. The file size is got using GetFileSizeEx which in turn uses ZwQueryInformationFile which FileAccessServer hooks. This all happns when stuff is set up in FPakFile::GetSharedReader.
I'm still not sure why the file size is being reported wrong but hopefully I can work it out. Mainly putting this here so I don't forget what I was doing πŸ˜…

wild abyss
#

I've added a heap of logging to FileAccessServer and now I think the problem is TryCreateFile is failing after the first call. Multiple handles to the file are made so any after the first just don't work

#

You never set _pathToStream to anything other than null naodead

dusky steppe
wild abyss
#

Well the logs look right now but it still isn't working PensiveWobble

#

Weird, FileAccessServer reports the file size being overwritten but it's then still reported as 0...

[FileAccessServer] File Size Override | Old: 0, New: 43648124 | C:\Users\Me\Desktop\Reloaded-II\Mods\UTOC.Stream.Emulator\TargetFiles\UnrealEssentials.ucas
Opening C:\Users\Me\Desktop\Reloaded-II\Mods\UTOC.Stream.Emulator\TargetFiles/UnrealEssentials.ucas with handle 2162541958016 and size 0
wild abyss
#

Ok, so GetFileAttributesExW is returning a information with a length of 0, this in turn uses NtQueryFullAttributesFile which is hooked so it should work...

#

I think we've come across a weird edge case. I'm fairly sure NtQueryFullAttributesFile is being run before a handle has ever been created for the file so no emulated version exists yet

#

(This is possible because the function takes a path rather than a handle and seemingly never makes one in itself)

wild abyss
#

Well caling CreateFile from QueryAttributesFilee does not work, they call each other apparently so infinite recursion pain_snap

coarse niche
#

So, how's the pain here ?

wild abyss
#

Quite painful

coarse niche
#

Yeah, you seams to struggle a lot !

#

An apparently preload of reload won't let you access the files unfortunately.
On which game are your working for implementing the utoc file emumator btw ?

wild abyss
#

I'm working with Scarlet Nexus, Rirurin is working with Hi-Fi Rush

#

If I can fix this bug I think it'll be useable

#

I can think of a solution but it might not be the best way, I'll see if it works

coarse niche
#

good luck

steel fractal
#

As long as the signature bypass works.
Then the rest can come later TurboCheer

wild abyss
#

But we're soo close, it'd kinda suck if I couldn't get it working...

obsidian moon
#

Would this get tested on game pass version first

#

Technically that is unlocking soon

wild abyss
#

I don't plan to, if other people want to they can

obsidian moon
#

So steam ver first then

wild abyss
#

Probably, yeah

#

It could just work with both immediately. We'll have to wait and see

obsidian moon
#

That would the best case

steel fractal
#

<t:1706846400:R>

#

I suppose hifi-rush is on game pass if anyone wants to test it

#

I actually really want to test the utoc emu on ccff7
Had a mod I wanted to make but not really possible at the time

wild abyss
#

I've got the ucas reporting the right size now but it still doesn't work 😦

#

Why does this thing hate me

wild abyss
#

Indeed, I wish I had a solution to it

boreal fiber
#

So what do we have, a recursion lock for a file with name?

#

That would be a bit slow since need to hash string but it's most obvious way

wild abyss
#

I'm not really sure what you mean...

#

Sorry, I feel like my brain has gone to mush working on this all day

patent belfry
#

Obviously it’s super late but when it is a sane hour if testing is needed lemme know!!

dusky steppe
wild abyss
#

lol, well hopefully we'll get a rest soon

boreal fiber
#

(i.e. current path to file)

#

If same file is recursed into again, just call original method and skip hook

#

[sorry for delay, didn't notice response]

wild abyss
#

No worries, that makes sense thanks

#

Not sure about thread static though, I just googled it since I've not heard of it before. Like this?

[ThreadStatic]
private static int foo;
boreal fiber
#

Yeah, basically it creates a variable that's unique to the current thread

wild abyss
boreal fiber
#

It's one way to work around it at least :p

wild abyss
#

Well that fixed it but for some C:\Users\Me\Desktop\Reloaded-II\Mods\UTOC.Stream.Emulator\ModConfig.json.1fdume0l.ziy is now being queried infinitely (I'm pretty sure not recursively otherwise it would die)

#

I have a feeling something's wrong with utoc emulator, that's a weird file lol

#

Any idea where that file is coming from @dusky steppe?

boreal fiber
#

When launcher writes files, it creates a new file alongside the original file with a temporary name

#

then deletes the original and renames the temporary file (as single step)

wild abyss
#

Oh, ok. I didn't know that

dusky steppe
#

yeah that makes sense

boreal fiber
#

Usually launcher shouldn't leave these but I've had some cases where I've e.g. stopped debugging the launcher, or there was an error/crash during development

#

And that'd risk breaking your configs if you did it at the wrong time, which is no good. So, I changed config writing to use this system to make sure developers' configs don't break.

dusky steppe
# dusky steppe yeah that makes sense

this reminds me of a bug I had a few days ago where the output utoc and ucas file names had extra characters on them but that was because I forgot that rust string slices aren't null terminated

boreal fiber
#

true!

wild abyss
#

Well, any ideas as to how I'd stop this? I can't think of anything

boreal fiber
#

You can delete the temp files but it's weird it'd query them at all

#

probably indicative of something else

wild abyss
#

How would I actually delete them though?

boreal fiber
#

They're just there on disk

wild abyss
#

Yeah but a new one is made every launch

#

I did delete the ones that were there, that accomplished nothing

boreal fiber
#

That's kinda weird, it shouldn't leave a temp file behind.

#

Maybe some exception is being silently thrown and discarded in launcher

#

during serialization

#

weird situation

wild abyss
#

I think I'll just leave this for now, I had a workaround where I just forced the emulated files to be built before they're needed in utoc emulator. It seemed to work so it'll do for now

#

(I really don't want to spend another few hours fixing bugs)

boreal fiber
#

Ya, makes sense.

#

Can you put up an issue on GitHub for problem though?
Can even just be 1 paragraph.

#

So we don't forget for Rust port.

wild abyss
#

Yeah, I'll do that

wild abyss
#

I think I'll try logging file access in the utocs. As far as I can tell everything is right, all of the functions seem to be returning OK (literally). Maybe I'll get an idea from the log

wild abyss
#

I've changed my mind, I've done enough for today, I'm not going to accomplish anything else

boreal fiber
#

'I have altered the deal'

wild abyss
boreal fiber
#

πŸ˜‰

wild abyss
#

It seemed like stuff was working for Rirurin with hi-fi rush anyway. If that is the case I'm happy to put that stuff in main and release it tomorrow morning. We can get stuff working properly so it works with older versions later

#

I'm fairly sure P3R will be 4.27 anyway

junior rivet
wild abyss
#

How would you know that?

junior rivet
#

No .sig

wild abyss
#

I thought signatures could happen regardless of a .sig file (at least on utocs). Maybe I'm wrong naotoshrug

#

Doesn't really matter either way

boreal fiber
#

If in doubt, could always ask that one guy in the community who has connections, wealth and press copies of the game.

#

And has been playing the PC port already the past few days :v

junior rivet
#

Well from the ue games I modded with io store, paks mounted when there was no sigs on paks so utocs dont have sigs

wild abyss
#

You very well could be right, I'm new to ue modding.
All I'm saying is it really won't matter either way, we've already figured all this stuff out. UTOC emulator is the only thing that's incomplete and we can most likely work around it (it wouldn't be ideal but the full files it creates do work so worst case it writes them to disk and we get it working properly later)

runic void
#

Best of luck swine !

dusky steppe
wild abyss
#

Ah, ok

junior rivet
#

I'm still wondering what the purpose of loading loose Files is? Why not just paks like any other games?

wild abyss
#

Well maybe a more likely scenario is people load full utocs for a while, I thought it was further along

#

Because it's more convenient

boreal fiber
wild abyss
#

You can load full paks as well but if you have the option not to I don't see why you would

#

Same reason utoc emulator is valuable

boreal fiber
wild abyss
#

That and compatibility, if they're using something like bfs that we have a file emulator for you'd need to be loading them loose for that to work

#

As someone who built files both manually and with Aemulus for a while, having them just work loose is sooo much better

dusky steppe
#

i'm pretty confident that blueprints will be where all the scripting stuff is done
that was the case with smt v and they preferred it over binary flow

wild abyss
#

Yeah, you're probably right. I was just using it as an example

#

awbs is probably a more realistic one

boreal fiber
#

Since one group (e.g. PAK) would always win over another (e.g. Loose) if not explicitly handled.

wild abyss
#

It does do that

boreal fiber
#

Ah okay.

wild abyss
#

Unless someone does something purposely stupid and names their files _999_P.pak it'll be fine (I give each mod 1000 more priority from the last, you could technically overwrite it by naming the files something like that)

boreal fiber
#

Why 1000? Curious, never worked with Unreal

wild abyss
#

I just picked a number

#

_P gives 100

#

_2_P gives 200, etc.

boreal fiber
#

ah

wild abyss
#

I assume some people might do _P as it's what they're used to. I trust no one's going to go overboard and do stupid names

boreal fiber
#

Wait, you're not using load order from manager?

wild abyss
#

It uses Reloaded's load order

#

There's a function that gets a base priority then inside another one the stuff for _P is added

#

I just edit the base priority and that suffices

boreal fiber
#

Ah, I see.

junior rivet
boreal fiber
#

Thinking about this I get flashbacks to 2015

#

When I started programming/reversing, I started with the GameCube version of Sonic Heroes.

#

Every time I made a change I had to make a whole new 1.4GB ISO

#

Worst part, there was no CLI tool to do it, Dolphin wasn't able to load unpacked games back then either. I had to click like 4 buttons to rebuild the game every time

wild abyss
#

That sounds like hell

boreal fiber
#

Pretty sure I wrote like 140GB of data to SSD one day

#

Yeah, it was painful

steel fractal
#

The loose file loading is also an advantage if dealing with conflicts

#

2 mods changing the same asset

#

Also that's cheating!
Why do you already have the files xD

wild abyss
#

Gamepass preload I assume

steel fractal
#

Are they encrypted or anything?

wild abyss
#

Something like that, you can't access them

steel fractal
#

Damn

wild abyss
#

It's less than a day now anyway, there's not much longer to wait

steel fractal
#

<t:1706846400:R>

junior rivet
#

You cant do anything with them

#

Since you can only dump the files with the exe being open

#

But since its not released the exe doesnt launch

steel fractal
#

Double damn

junior rivet
#

the game use 4.27.2

wild abyss
#

Oh, nice

#

Well it should hopefully work out of the gate then

boreal fiber
#

Aren't you in the land of the Kangaroo?

#

You can find out yourself :P

wild abyss
#

I am

wild abyss
#

Steam comes out at the same tim for everyone

boreal fiber
#

Ah

wild abyss
#

I guess I could gamepass maybe?

boreal fiber
#

I remember that used to not be the case in the past.

junior rivet
#

gamepass works yes if you change to new zealand

wild abyss
#

Well I'm in Australia

boreal fiber
#

People would VPN on Steam back in the day to unlock games early

wild abyss
#

I don't need to change anything

junior rivet
#

well im dumping the files rn

wild abyss
#

Oh wait, so it's playable now on gamepass?

junior rivet
#

yes

wild abyss
#

damn

obsidian moon
#

can Fmodel read it?

boreal fiber
#

I only noticed just now aaaaaaa

wild abyss
#

lol

junior rivet
boreal fiber
#

that's illegal

junior rivet
#

aes from #p3-modding-chat works

obsidian moon
frosty terrace
#

geh i really want access to the files now

obsidian moon
#

soon

#

no need to rush for gamepass version files

frosty terrace
#

yeah true

#

we're not even gonna be modding that version anyway

patent belfry
#

I am curious to see what kinds of stuff are within the files, if there’s anything left over from development like how P5R has a bunch of unused files

obsidian moon
#

should be easier to dig than the atlus format as unreal engine have more common format

frosty terrace
#

i'm more interested in anything that might be left in the game code

#

can't wait to run ue4ss on this game and dump all the good shit

junior rivet
junior rivet
rough rose
frosty terrace
#

wingdk is technically a different target than windowsnoeditor, so there's a possibility that more stuff is different

rough rose
frosty terrace
hollow glacier
#

If people have access to the Microsoft version files won't it help towards modding support for the steam version

frosty terrace
#

there's the pak reloader mod

rough rose
obsidian moon
#

were some of the graphic tweak wont work the same

frosty terrace
rough rose
#

while with loose files you can even edit the file thats in game dir directly if needed

frosty terrace
#

oh definitely

obsidian moon
#

first time dealing with them

frosty terrace
wild abyss
#

If any of you with it on gamepass want to test unreal essentials that'd be cool. Hopefully it'll just work (this is without any of the utoc emulator stuff, full paks and utocs or loose pak files only)

#

I don't have gamepass (and don't really want to get it) so I'm not going to test it myself

frosty terrace
#

wish gamepass unlocked the game universally cuz i have gamepass but can't play

rough rose
junior rivet
late hollow
#

what’s the process for unreal essentials

frosty terrace
#

that actually worked lmao.

wild abyss
late hollow
#

gonna try to install on gamepass rn

#

oooo okay thx

wild abyss
#

lmk if anything's unclear

junior rivet
#

ue4ss works

frosty terrace
#

thank god

obsidian moon
#

what about Universal Unreal Engine 4 Unlocker

#

the paid one for ue 4.27

#

if that work free camera work

junior rivet
#

works aswell

obsidian moon
frosty terrace
#

hopefully the engine ain't too customized

obsidian moon
#

what features is available? looked like even console is working

#

free camera should be possible

junior rivet
#

console works yes

obsidian moon
#

lot of stuff to mess around with console is possible

frosty terrace
#

you can use console with ue4ss too, i find it more reliable

wild abyss
#

If anyone can confirm that Unreal Essentials works with gamepass I'll release it as tonight.

dusky steppe
#

ok turns out /UTOC/UnrealEssentials.utoc/Game/Content/... is what works lol

rough rose
#

lol?

dusky steppe
#

assuming P3RE doesn't inline OpenContainers, I had something that would work with it this morning

wild abyss
#

So it's useable now in theory?

dusky steppe
#

yeah in theory

wild abyss
#

pog

#

Could we get this into the hands of someone who has the game...

rough rose
#

that directory seems a bit redundant though lmao

dusky steppe
#

it's meant to be so that it's possible to replace files in both Engine/Content and Game/Content since swine had brought that up

#

although I doubt anything's really gonna be going on in the engine folder

rough rose
#

i mean the double utoc folder

#

lol

bronze shadow
wild abyss
#

there are people in here with it

bronze shadow
#

oh nice

dusky steppe
wild abyss
#

it's playable on gamepass

boreal fiber
#

I could reboot to Windows and download it, worst case scenario

#

Using my Employer's GamePass account for game testing

#

and VPN

#

πŸ˜…

steel fractal
patent belfry
wild abyss
#

I'm going to sleep for now, hopefully nothing explodes in the meantime πŸ˜„
Good luck with the emulator and stuff, I really hope I wake up to see it working in Reload

nocturne verge
#

Does this mean it works? its GP

wild abyss
#

Rip πŸ˜”

#

Signatures are different so no, it's not fully working

#

As I said I'm going to sleep though, hopefully one of you others can find the correct ones (if not I'll try tomorrow)

rough rose
#

that means custom UE4 version

#

fun!

rough rose
#

it's still a "everyone waits until tomorrow" situation

frosty terrace
frosty terrace
#

whoops i messed something up

boreal fiber
#

Oop

wild abyss
rough rose
wild abyss
#

Fair

visual bramble
wild abyss
#

Weird, that's new naodead

#

It worked with the older version I sent though didn't it?

visual bramble
#

ye

wild abyss
#

Ok, I'll check what changed, I didn't think I changed much...

wild abyss
#

Maybe there's some leftover stuff from Rirurin's fork in the folder I sent

#

Just delete what you've currently got and try that one again (the one I replied to)

#

If that does work (I really hope it does) I think I'll publish that version of Unreal Essentials. UTOC emulator can come later

#

Oh right, I need to get the missing signatures as well

wild abyss
#

Honestly, I kinda just want to play the game and ignore this whole thing for a bit...

#

I'll see if I can get my old laptop running an analysis so that finishes at some point and maybe I'll try a quick incomplete analysis to see if I can get the remaining signatures. After that though I don't really want to work on the rest of unreal essentials (utoc emulator stuff) for a while. I'll of course merge prs if Rirurin or someone else does though

boreal fiber
#

Quite honestly, understandable.
Don't become like me, it's unhealthy

wild abyss
#

Yeah, the last two or so days have been a bit too hectic for me

#

(I also bought a 3d printer today so I want to play with that at some point. Great timing, I know, it was a on a good sale lol)

boreal fiber
#

πŸ‘

hoary basin
wild abyss
hoary basin
wild abyss
#

A Creality Ender-3 V3 SE. It's my first time using one (if wanted one for years but they used to be so expensive) but it looks like fun, I have a friend who has one and he's made some cool stuff with it.
Seemed like a pretty good deal to me (if any of you are in Australia and want one :D)
https://www.jaycar.com.au/creality-ender-3-v3-se/p/TL4751

wild abyss
hoary basin
#

oooooo fuck yeah

#

my current printer is an ender 3 v2 pro, that's always been a pretty good starter printer. i'd imagine the v3 is better still (i didn't realize there was a new one)

dusky steppe
#

moment

wild abyss
#

Oh, you found the missing sigs already?

dusky steppe
wild abyss
#

Nice

#

Weell all but one it seems, think you'll find it as well?

dusky steppe
#

no

#

that's inlined lol

wild abyss
#

Oh no

dusky steppe
wild abyss
#

Umm, how do we deal with that...

#

I don't think it's actually that important. I'm pretty sure the only thing it's necessary is for loose pak files that don't exist normally

#

And that's probably only one call to it anyway, it could probably be worked around differently

dusky steppe
#

looking good so far....

wild abyss
#

Well I'm going to actually play the game for a while, if you get stuff to a point where it'd be useable lmk and I'm happy to merge a pr and upload stuff.

#

Well I'll play it in 5 minutes, it's still unpacking πŸ˜”

dusky steppe
#

ok i should go play the video game now lol

wild abyss
#

Oh we should also make the community configuration thing for reloaded so the game shows up correctly. I'm not going to do it now but remind me if it isn't done by the time we release all this

rough rose
wild abyss
#

Yeah, that would make sense

rough rose
#

so if you're putting it on hold ill gladly go back to that

wild abyss
#

Up to you, I'm not going to work on it for a little bit but if you guys still want to I'm happy to help a bit if needed

rough rose
# wild abyss Yeah, that would make sense

FileExist is actually easier to find than FindFileInPakFiles imo? I found FindFileInPakFiles and IsNonPakFilenameAllowed in like 10 different games by explicitly finding FileExist, and because that one calls the other 2

boreal fiber
# dusky steppe

You probably want to build the Rust project with something like

RUSTFLAGS="-C panic=abort -C lto=fat -C embed-bitcode=yes" cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-pc-windows-msvc --crate-type cdylib -n 100

With nightly toolchain and build-std (rustup component add rust-src --toolchain nightly).

And of course panic = "abort" in Cargo.toml

rough rose
#

that entire list of games I had, I found it in all of those and 90% of them without symbols lmao

boreal fiber
#

Just a FYI, the stacktraces and non-LTO'd std cake up a crapton of space in Rust binaries

rough rose
#

apollo justice trillogy came out recently for example but i havent even bought it yet lol

wild abyss
#

All good, have fun with whatever you do hee_approves

boreal fiber
#

I'm just porting my SEGA PRS compressor from D to Rust

#

Because it'll be needed down the road in 2 years and another project needs it

#

as a break from working on hooks for 6 months

dusky steppe
# rough rose FileExist is actually easier to find than FindFileInPakFiles imo? I found FindFi...

48 89 6C 24 ?? 57 48 83 EC 30 45 33 C9 45 33 C0 48 8B FA 48 8B E9 E8 ?? ?? ?? ?? 84 C0 74 ?? B0 01 48 8B 6C 24 ?? 48 83 C4 30 5F C3 33 C9 48 89 5C 24 ?? 48 89 74 24 ?? 8B D1 40 32 F6 48 89 4C 24 ?? 48 89 4C 24 ?? 48 85 FF 74 ?? 66 39 0F 74 ?? 48 C7 C3 FF FF FF FF 0F 1F 84 ?? 00 00 00 00 48 FF C3 66 39 0C ?? 75 ?? FF C3 85 DB 7E ?? 8B D3 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 8B 54 24 ?? 8B 4C 24 ?? 8D 04 ?? 89 44 24 ?? 3B C2 7E ?? 8B D1 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8B 4C 24 ?? 48 8B D7 4C 63 C3 4D 03 C0 E8 ?? ?? ?? ?? 48 8D 54 24 ?? 48 8B CD E8 ?? ?? ?? ?? 48 8B 4C 24 ?? 0F B6 D8 48 85 C9 74 ?? E8 ?? ?? ?? ?? 84 DB 48 8B 5C 24 ?? 74 ?? 48 8B 4D ?? 48 8B D7 48 8B 01 FF 50 ??

#

lol

boreal fiber
boreal fiber
#

It's not ideal if the program blows up, but I don't think you'd get a stack trace if you panic anyway; unless the Rust std prints to console as last resort

dusky steppe
#

it does

rough rose
#

wait rirurin

#

i dont get it

#

how is it the same signature as normal

#

if you say findfileinpakfiles is inlined

boreal fiber
rough rose
#

its the first thing it calls in FileExists

dusky steppe
#

OH

rough rose
#

well, it calls the top level one

#

with 4 arguments

dusky steppe
#

yea I couldn't find it earlier for some reason

rough rose
#

you have to go into that to find the "real" one

dusky steppe
#

oh it's the top level one

#

yea it's the inner one that gets inlined

rough rose
#

well, I think the top one should work for what swine needed it for anyway

boreal fiber
#

I'd imagine in an R3 future, we'd build mods with 'nightly' and point the panic handler at the crash handler (this is a feature in Rust nightly) https://github.com/Reloaded-Project/Reloaded-II/blob/2fe692b8c66c820696af029fa9ab9586d14544e5/source/Reloaded.Mod.Loader/EntryPoint.cs#L225

So it auto generates a dump file, and the whole Rust stack trace is intact (without the runtime code overhead, as the info for trace would be in PDB)

GitHub

Next Generation Universal .NET Core Powered Mod Loader compatible with anything X86, X64. - Reloaded-Project/Reloaded-II

rough rose
#

if im correct and its FileExist thats causing the issue anyway

boreal fiber
#

So you could debug it afterwards if you have PDB

frosty terrace
#

sometimes there's no debug prints from unreal essentials, sometimes there's all three, and sometimes there's just findfileinpakfiles

#

wacky

#

is there some sort of race condition?

boreal fiber
#

Technically possible, but rare

#

If it's being logged via R2's native logger, there shouldn't be any though

#

and if it's not it's technically possible but super super rare

wild abyss
#

It's using reloaded's logger, _logger.WriteLineAsync

boreal fiber
#

There shouldn't be in that case.

#

Normally there's a possibility if a native component prints to cout directly, because the console is created asynchronously

wild abyss
#

Is it just the logs or does stuff not work sometimes?

boreal fiber
#

and when it's done it clears the console

#

So it's sometimes possible for native code to print something for it to then be cleared

wild abyss
#

That could be the case with utoc emulator then, looks like you aren't using it though

boreal fiber
#

(note that it's a hypothetical, I've never seen that happen though)

frosty terrace
#

i'm wondering if there's some sort of race condition on finding the signatures actually

boreal fiber
#

It's possible, but the Reloaded sigscanner scans for sigs once all mods are loaded.

#

So say if UE4SS kept its original code for scanning sigs, it'd do it synchronously when it loads, and Reloaded would only do it later once all mods (incl. UE4SS) are done

frosty terrace
#

yeah i figured based on the debug print locations

#

it's just weird that sometimes it prints errors and sometimes it doesn't

boreal fiber
#

Unless UE4SS loads asynchronously, then it's technically possible to have race condition.

frosty terrace
#

this has to do with unreal essentials, not ue4ss

boreal fiber
#

ah

wild abyss
#

Wait, it's printing errors?

#

What errors?

frosty terrace
#

as in the "couldn't find signature" one

wild abyss
#

So sometimes in can find it, sometimes it can't?

frosty terrace
#

that's what i've been trying to say the whole time

wild abyss
#

Sorry, I didn't realise

frosty terrace
#

it's fine

wild abyss
#

I think we already know about that one, it's inlined apparently. DC came up with a solution that I'll try doing tomorrow

#

I'm not sure why sometimes it wouldn't show though...

dusky steppe
boreal fiber
#

It's there for a reason.

Aside from improving performance, it allows multiple mods to scan for the same sigs without conflicting.

wild abyss
#

It needs to be run prior to startup scanner unless there's some way to add new items to it after one's done (I don't think there is)

#

The only other solution I could think of is scanning for literally every signature for every version and not even bothering trying to work out the version

boreal fiber
#

That's what I did in CriFsV2Hook actually

#

I scanned for every sig and worked out the version based on results

wild abyss
#

You think that would be faster?

boreal fiber
#

More 'compatible' with unknown games, not strictly faster.

wild abyss
#

Yeah, I guess

boreal fiber
#

I mean, you can sigscan for the version, that's fine.

wild abyss
#

I kinda think what we've got here's fine

boreal fiber
#

Just sigscan anything you hook with the startup scanner

wild abyss
#

Yeah, I always do

boreal fiber
#

That's fine then, dw

wild abyss
#

This was just a special case

frosty terrace
#

and sometimes it prints that, gmalloc, and one other i can't remember

#

this time it was all three

wild abyss
#

I thought all three of those didn't work...

dusky steppe
#

yep, those are the sigs that are different

frosty terrace
#

this time it printed nothing

wild abyss
#

Idk what's going on

dusky steppe
#

oh

wild abyss
#

If you turn on debug mode in the mod's config it should also print when it finds sigs and what the addresses are. What do you get if you do that?

boreal fiber
#

btw you don't need to pull the full library from NuGet , you can use IScannerFactory to make a scanner from shared library.

wild abyss
#

Oh, can I use that for non startup signature scans? (I mean what I did for the versions)

boreal fiber
#

Yup

wild abyss
#

Oh, I didn't realise

#

Thought it could only do startup ones

boreal fiber
#

I don't blame you, the mod's readme isn't easy to find

wild abyss
#

I'll switch it to do that next time I look at it

frosty terrace
#

notably, when i have ue4ss off it never works

#

but when i have it on it works occasionally

wild abyss
#

Does ue4ss inject new code?

#

Maybe it's finding functions from it instead of the actual game?

#

(That's weird if it is the case)

dusky steppe
#

yeah that gmalloc address seems awfully high

boreal fiber
frosty terrace
#

plus p3r is denuvo'd

#

so the executable size is bloated

wild abyss
boreal fiber
#

Nah, it explicitly queries for the process' main EXE, and its size

#

and uses that as the scan range

wild abyss
#

I meant maybe when ue4 adds its hooks or whatever it's writing the code for them inside of the main exe. Just a guess

boreal fiber
#

I checked just in case, scanner usage seems fine at first glance

wild abyss
#

Ok, then idk what's happening

frosty terrace
#

i'm gonna keep running it to make sure the address doesn't change when it loads

#

...well. uh.

#

yeah something's def weird

dusky steppe
#

you could try using my latest build since that has signatures for p3re specifically

azure gorgeBOT
#
Jump

[Go to message!](#1195558171377422346 message)

UTOC.Stream.Emulator_P3RE_TEST.zip
UnrealEssentials_P3RE_TEST.zip
dusky steppe
#

the build you're using now def doesn't since it's reporting the normal ue 4.27 branch name

frosty terrace
#

yeah that looks more standard

wild abyss
#

Even if that does fix it I'd still be kinda concerned. Seems like the kind of thing that'd pop up again eventually (probably with some other game)

frosty terrace
#

uh

#

wait

#

that's the wrong screencap

#

yeah this is the right one

boreal fiber
#

I could reboot to Windows, download the MS Store version and see for myself if you guys want.

frosty terrace
#

it's fine dw

wild abyss
#

So to be clear it only gives you the funny addresses if you use ue4ss as well (on that older version of unreal essentials)?

frosty terrace
#

at least i couldn't find them otherwise

wild abyss
#

ok, I'll have a quick look then. I'm curious

frosty terrace
wild abyss
#

thanks

#

I seem to always not find them...

#

Do I need some mod that actually uses ue4ss or is just enabling ue4ss enough?

frosty terrace
#

just enabling ue4ss should be enough

#

you can press ctrl + o when the game is running to open the ue4ss gui console

wild abyss
#

The console works but it still doesn't find the signatures. Weird

frosty terrace
#

maybe it's just my pc being wacky?

wild abyss
#

You said it only happens sometimes, maybe I'm just getting unlucky

frosty terrace
#

it happens every couple times for me

#

like every 5-7 runs

boreal fiber
#

oh

#

that's actually hella weird

wild abyss
#

I tired a bunch of times and nothing

boreal fiber
wild abyss
#

Oh, thanks πŸ˜„

#

I'll test that tomorrow

dusky steppe
#

oh I just did that on my fork lmao

boreal fiber
wild abyss
#

lol

boreal fiber
#

bamboozled

wild abyss
#

Well I'm going back to palying the game. I guess we can just pretend that weirdness with signatures didn't happen until it comes up again

hollow glacier
dusky steppe
#

oh ik

#

it was just higher than what the value was supposed to be

hollow glacier
#

oh

boreal fiber
#

Just hex search support.codefusion.technology (UTF16) if you're ever in doubt

#

If EXE size isn't clear enough

boreal fiber
dusky steppe
#

i'll get a tutorial for making loose utoc mods done later today

visual bramble
#

wait can we not just use uassets do we have to make utocs then unpack or something?

dusky steppe
#

yea

#

it's not ideal atm bc extra steps but my dream would be to have a ue plugin that adds a "cook packages for unreal essentials" button that does all that automatically

#

and I don't plan on adding cooked package -> IO Store package conversion in the emulator itself bc I feel that'll increase boot times too much

wild abyss
#

If you cache the results maybe it wouldn't be too bad since you'd only have to go through it once

#

I think I mentioned the idea before but what about a uasset emulator so you just put loose files? Are uassets just archives or is there more to them so that wouldn't work?

dusky steppe
#

not really

#

they can be all different types of files internally, they just have the same header

#

though I suppose you could build the header on the fly with known values if it's targeting a specific file?

#

(e.g battle tables)

wild abyss
#

Alright, sounds like it'd be a lot more complex than I thought. Maybe one of us can come back to it at a later point

wild abyss
#

It'd be a bit unusual but it sounds like it'd save creators a fair bit of time and effort

dusky steppe
#

yea i thought about doing that

#

going off the assumption that everyone would test their mod at least once before publishing

wild abyss
#

I think that's a fair assumption

#

If it's something that you think you could do easily it sounds like it'd be worth it to me

dusky steppe
#

i had done some amount of work to do the package conversion earlier and I got as far getting names, imports and exports converted

#

which is more than half of the file

wild abyss
#

Well it's up to you, we can always add it later on. Having something is better than nothing, even if it means people will have to do a few extra steps for now

wild abyss
visual bramble
#

I can test, where do I put utocs

wild abyss
#

I think loose files go in UTOC\UnrealEssentials.utoc\Game\Content

#

That was another thing I wanted to ask about actually, could we decide on a different convention for the structure. Having loose pak and utoc files in completely different folders feels a bit weird.
I was thinking maybe UnrealEssentials\PAK has loose pak files (and full pak and utoc files if people wanted to for some reason) and UnrealEssentials\UTOC has the loose utoc files (don't bother with thee UnrealEssentials.utoc part, surely that can be handled by the mod since we're not directly using the emulator, we're passing the folder through the mod I assume)

rough rose
#

well, I do think a lot of people will ask about the double utoc folder lol

visual bramble
#

idk how I would do loose utocs ADAHCI

#

I thought it supported normal utocs too

wild abyss
#

yeah it does

wild abyss
#

they go in Unreal for now

visual bramble
#

gotcha

wild abyss
#

nice

wild abyss
visual bramble
#

alright ill give that a shot

visual bramble
#

Doesn't seem to be working? thinkfall

#

I "saved as" with umodel which gave me uassets and stuff, same process I did for naoto mod in sifu for loose file loading

wild abyss
visual bramble
dusky steppe
#

replace P3R with Game

visual bramble
#

omg xd

#

I thought it was like (gamename)

dusky steppe
#

it prob should be but I had it set as Game bc of how filenames get hashed into utoc

visual bramble
wild abyss
#

Maybe the capitalisation matters? I think it's meant to be UTOC

dusky steppe
visual bramble
dusky steppe
#

wait actually is IO Store Emulator set as a dependency

wild abyss
#

Do you need to do that?

visual bramble
#

oh

dusky steppe
wild abyss
#

Could we make it so Unreal Essentials is enough

#

Having to do both is a bit confusing

rough rose
#

Yeah id imagine a lot of people would ask why

dusky steppe
#

yea that'd make more sense

visual bramble
#

makoto yuki is real

dusky steppe
#

real

rough rose
#

Oh yeah swine, i propose you specify an explicit version cutoff for essentials

#

maybe 17 or 18 as oldest supported

#

dont want someone complaining it doesnt work on 4.13 or some shit like that

marble orchid
#

real

wild abyss
#

Yeah, well for release I was just going to say 4.25+ for now and we'll add support for older versions later

rough rose
#

did you test the FileExists hook

#

If it works it removes the need to hook FindFileInPakFiles

wild abyss
#

Rirurin found the signature for the higher up FindFileInPakFiles

rough rose
#

and like i mentioned, FileExists is so much incredibly easier to fimd blind

wild abyss
#

I guess I can still look for fileexists though if you think it's beneficial

rough rose
#

especially since fileexists doesnt change at all

#

while FindFileInPakFiles has that weird version difference

wild abyss
#

Fair, I guess I'll do that

visual bramble
#

Well time to take new screenshots for tutorial again

wild abyss
#

Maybe wait before you do that...

#

I also wanted to change the folders you put stuff in

visual bramble
#

I need to retake screenshots of p3r folder and r2 setup stuff

#

And uh, in game

#

before I was using your mother.exe renamed with gameass files, along with piss hair makoto to show mods working (they werent but it was future proofing)

wild abyss
#

oh ok lol

visual bramble
#

would look alot neater with bright af fes model

rough rose
#

oh my god FileExists signature is long lol

#

but it matches across games of the same version

#

i remember mentioning that some games on 4.26 have weird stuff

#

but the symbols sig matches on SIFU

#

matches on KoF too

#

this is the signature for 4.26 if you want to check SIFU again

#
48 89 6C 24 ?? 57 48 83 EC 30 45 33 C9 45 33 C0 48 8B FA 48 8B E9 E8 ?? ?? ?? ?? 84 C0 74 ?? B0 01 48 8B 6C 24 ?? 48 83 C4 30 5F C3 33 C9 48 89 5C 24 ?? 48 89 74 24 ?? 8B D1 40 32 F6 48 89 4C 24 ?? 48 89 4C 24 ?? 48 85 FF 74 ?? 66 39 0F 74 ?? 48 C7 C3 FF FF FF FF 0F 1F 84 ?? 00 00 00 00 48 FF C3 66 39 0C ?? 75 ?? FF C3 85 DB 7E ?? 8B D3 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 8B 54 24 ?? 8B 4C 24 ?? 8D 04 ?? 89 44 24 ?? 3B C2 7E ?? 8B D1 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8B 4C 24 ?? 48 8B D7 4C 63 C3 4D 03 C0 E8 ?? ?? ?? ?? 48 8D 54 24 ?? 48 8B CD E8 ?? ?? ?? ?? 48 8B 4C 24 ?? 0F B6 D8 48 85 C9 74 ?? E8 ?? ?? ?? ?? 84 DB 48 8B 5C 24 ?? 74 ?? 48 8B 4D ?? 48 8B D7 48 8B 01 FF 50 ??
#

this is the arguments

#

so a2 is just the filename

#

and you can check if it exists loose and force a return of 1 (true)

#

oh this matches on 4.27 too

#

convenient

#

yup, matches on symbols and granblue

#

matches crisis core also

#

lemme check 4.25

#

it matches arcade and retail Guilty Gear Strive and it matches default project with symbols

#

wow, it actually matches on Scarlet Nexus too

#

this is for 4.21

48 89 6C 24 ?? 57 48 83 EC 40 45 33 C9 45 33 C0 48 8B FA 48 8B E9 E8 ?? ?? ?? ?? 84 C0 74 ?? 32 C0```
#

anyway its my time to vanish into the sunset again

visual bramble
#

Wait so uh hypothetically

#

If we just name something the same as a vanilla file, we could then paste a vanilla uasset from the game and it'd just work right?

#

Ie; want to replace an acb/awb, so you name some png same as the acb/awb uasset, then after extracting from utoc you could put actual acb/awb in there?

wild abyss
#

I don't really get what you mean

#

The uasset format is different when it's in a utoc, that's the problem

#

Are you saying the awb is in a uasset?

#

Or it is a uasset? I don't really know how this works

#

I should really actually have a look at the game's files...

visual bramble
#

its fine im testing it rn

wild abyss
#

Hooking FileExists seems to work fine.

rough rose
#

ayy

#

and as you saw, that signature works even for Scarlet Nexus

#

which you know is a bit weird

#

wonder if it works in HiFi rush too

rough rose
#

what game

#

i checked DBZ Kakarot and Granblue and it worked

#

(both 4.21)

dusky steppe
#

assuming they're talking about hifi rush,
48 89 74 24 ?? 41 56 48 83 EC 30 45 33 C9 45 33 C0 48 8B F2 4C 8B F1 E8 ?? ?? ?? ?? 84 C0 74 ?? B0 01 48 8B 74 24 ?? 48 83 C4 30 41 5E C3 48 89 5C 24 ?? 48 89 6C 24 ?? 40 32 ED 48 89 7C 24 ?? 33 FF 48 89 7C 24 ?? 8B C7 89 44 24 ?? 8B CF 89 4C 24 ?? 48 85 F6 74 ?? 66 39 06 74 ?? 48 C7 C3 FF FF FF FF 48 FF C3 66 39 04 ?? 75 ?? FF C3 85 DB 7E ?? 8B D3 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 8B 4C 24 ?? 8B 44 24 ?? 48 8B 7C 24 ?? 03 C3 89 44 24 ?? 3B C1 7E ?? 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8B 7C 24 ?? 4C 63 C3 48 8B D6 4D 03 C0 48 8B CF E8 ?? ?? ?? ?? 48 8D 54 24 ?? 49 8B CE E8 ?? ?? ?? ?? 0F B6 D8 48 85 FF 74 ?? 48 8B CF E8 ?? ?? ?? ?? 48 8B 7C 24 ?? 84 DB 48 8B 5C 24 ?? 74 ?? 49 8B 4E ?? 48 8B D6 48 8B 01 FF 90 ?? ?? ?? ??

rough rose
#

damn, that hibiki engine really making things different

hollow glacier
rough rose
#

thats not 4.21?

hollow glacier
#

sorry i prob should've specified it

#

hi-fi is 4.27

rough rose
#

and you replied to my message posting a 4.21 sig saying it didnt work

hollow glacier
rough rose
#

that was about the previous one

hollow glacier
#

oh

rough rose
#

which works on 25/26/27

hollow glacier
#

oops

#

yea let me check that then

rough rose
#

rirurin posted one so i assume that one doesn't work

hollow glacier
#

yea

#

sorry 'bout that then

rough rose
#

no worries

visual bramble
#

@dusky steppe does uessentials ignore any file without a .uasset extension

wild abyss
#

Is this for utoc files? What are you trying to do?

visual bramble
#

some files in p3r arent uassets

#

theyre .awb, .usm, criware stuff

wild abyss
#

Directly in utocs?

visual bramble
#

ye

wild abyss
#

That's very weird

#

I'm fairly sure utocs should only hold uassets, uexps, and ubulks. Other stuff should go in paks...

visual bramble
#

i managed to get utoc stuff I hadnt baked loaded but its just ignoring awbs, im guessing because no uasset extension

#

oh, maybe its in pacs then? thinkfall

#

should I use another filepath for pak stuff?

wild abyss
#

Wait, where is the original file in the game?

visual bramble
#

ah it is in a .pak

#

so ig I could bundle it up normally

wild abyss
#

That makes more sense

#

You can load loose files from paks...

visual bramble
#

thats why I asked filepath feetplead

wild abyss
#

It's just Unreal rn

#

then the normal path in the game

visual bramble
#

so same way I setup the naoto sifu mod?

wild abyss
#

it's the same stuff you did for sifu

#

yeah

visual bramble
#

ill give it a shot, thanks

wild abyss
visual bramble
#

well theres no music playing, so ig it worked ADAHCI

wild abyss
#

It should log the file being redirected in the console

visual bramble
#

oh yup, it did

wild abyss
#

I'm having a look through the files and I now get what Rirurin meant about uassets sort of being anything. They're definitely be something that game specific mods would need to be made to work with if merging or stuff like that was needed.

#

Seems to me like we're nearly ready to release.
@dusky steppe would you be happy to make a pr with your utoc stuff and let me finish anything that's left (I think just changing the folder it looks for files in and writing some documentation)? I feel like working on it and you seem to be busy with bf stuff anyway rn

visual bramble
#

ping me when you guys near release so I can finish screenshots and paste tut in

wild abyss
#

Will do hee_approves

dusky steppe
wild abyss
#

damn that's a lot of additions πŸ˜„

dusky steppe
#

also there are some merge conflicts bc some of my stuff's too different

wild abyss
#

All good, I can sort that out

#

Thanks risepray

wild abyss
visual bramble
#

ye

wild abyss
#

ty

visual bramble
boreal fiber
#

Don't forget to trim dead code :p

wild abyss
#

Oh yeah, I usually do forget that lol. I'll definitely do it this time πŸ˜„

boreal fiber
#

:p

#

I did actually finally found out what broke it with .NET 8, haha

#

They moved the trimming .target file out of the SDK itself, so have to add a NuGet for that now

#

(I noted it in docs)

wild abyss
#

I'm having trouble getting the utoc emulator api working with unreal essentials (utoc emulator depended on unreal essentials before which is kinda weird).
_modLoader.GetController is failing for some reason πŸ˜”

#

I'm definitely just doing something wrong but I can't work out what

boreal fiber
#

Maybe you forgot to either:

  • Set UTOC Emulator as Dependency
  • Register on UTOC Emulator end
dusky steppe
wild abyss
#

No, I've definitely done both

visual bramble
#

sorry to jump in but does essentials happen to have an option to do a ProbingPath like crifs demi_woke

wild abyss
#

Yeah I do understand why you did it like that but it makes things awkward, other mods then have to depend directly on utoc emulator

#

I added an Initialise api to utoc emulator that gets everything that it needs from unreal essentials instead. That way nothing neeeds to directly depend on it (other than unreal essentials itself)

wild abyss
#

(Well it sort of did but I just removed it lol)

#

Once I've dealt with this I'll add that

visual bramble
boreal fiber
#

You'll also need to add an .Interfaces project for UtocEmu

wild abyss
#

That's all I need to add right?

boreal fiber
#

And register the interfaces

wild abyss
#

Yeah I've got that and IUtocEmulator is in it

#

Is that not what _modLoader.AddOrReplaceController does?

boreal fiber
#

Yeah it does add it.

#

I think you might be adding it as Api though

#

Specify the interface type on the generic

#

Otherwise it will infer the concrete type

wild abyss
#

You mean in GetTypes?

boreal fiber
#

In AddOrReplaceController

wild abyss
#

Oh I see what you mean

#

Yeah, that makes sense

#

Ok, that was it. Thanks

#

It worked femc

boreal fiber
#

πŸ‘

wild abyss
visual bramble
#

Makoto Yuki

boreal fiber
#

Me trying not to die summoning a Persona

#

It's just a phase mooooom

molten burrow
#

Trying it out, is it normal for the console to disappear immediately when launching when I have it enabled in config

wild abyss
#

So now loose pak files are loaded from UnrealEssentials/PAK and loose utoc stuff is loaded from UnrealEssentials/UTOC. I kinda want to merge the two given utoc files can only contain certain file types anyway...

wild abyss
molten burrow
#

yeah

dusky steppe
wild abyss
#

Which game are you trying with?

dusky steppe
#

of r2

molten burrow
#

Oh I don't, because it errors out when i do the auto updater lol

#

I'll try manually updating

wild abyss
#

Oh, you need it then

#

It was recently updated to make steam hook work with ue4 games (so Reloaded can work without requiring asi loader)

molten burrow
#

ok cool got it working

wild abyss
#

Nice

#

Is the pak_package stuff actually used is was that just wip stuff you left in @dusky steppe?

dusky steppe
wild abyss
#

Ah ok

#

I was trying to see if I could get it to accept the actual game name (so UnrealEssentials/P3R) instead of using Game and I just stumbled across that code

dusky steppe
#

the reason it uses game is because that's what's used to create the hash for FIoChunkId

#

the path starts with Game and removes the Content dir from path

wild abyss
#

So that's just how unreal engine does it?

dusky steppe
#

yeah

wild abyss
#

Oh, ok

#

I guess I won't be merging the two folders then since you use the actual game name for paks

#

That is really awkward though, having to use Game for some and the actual name for the other...

#

I guess what's confusing me is in a utoc from a Scarlet Nexus mod I see this which works but then somehow you having just Game also works. That doesn't really make sense to me, is Game some special thing it looks for?

dusky steppe
#

any name works fine for that folder

#

it's just that for path hashing specifically it's substituted out for "Game"

wild abyss
#

So that string I see has nothing to do with it? Sorry, I'm not sure what you're talking about with path hashing

#

Oh, I now realise that thee scarlet nexus utoc has ../../../ScarletNexus as the mount point whereas you have it as ../../../ and then Game is just a directory in there. That makes a bit more sense to me (I thought you were mounting it directly at Game), I am still a bit confusd why P3R wouldn't work though

#

Also, this could be my template being wrong but it says the DirectoryIndexSize is 601 in the header but it's actually 615. Presumably it either is actually right or just isn't a big enough problem for ue to care though

dusky steppe
#

the mount point isn't counted in DirectoryIndexSize

#

it's just files + directories + strings

wild abyss
#

Oh ok

#

Then it's just my template

wild abyss
#

I wanted to try and make it so if the root folder isn't named Engine it'd treat it as Game so you could use the actual game name but that seems kinda complex. My brain cannot comprehend the majority of the emulator code lol

wild abyss
#

I got it working, you can now use the game name instead of the word Game (technically you can use literally anything other than Engine but please just pretend you need to use the game name lol)

#

With that sorted I'll see about merging everything into one folder (thankfully I shouldn't need to look at more rust to do that lol. I want to learn it at some point but this isn't the way)

wild abyss
#

Alright that wasn't too hard, I think it should work fine. Everything can just go in UnrealEssentials now

#

Does anyone have a loose file from a pak that I could use to test?

wild abyss
#

Here's the current Unreal Essentials and UTOC Emulator @visual bramble. I think it should be good to go but I'd definitely appreciate testing (from anyone who is willing)
Now everything goes in the UnrealEssentials folder, no UnrealEssentials/PAK or UTOC. This includes loose files and full ones

#

(I haven't updated the readme to reflect this yet, I'll do that soon)

#

Oh also you don't need to set IO Store Emulator as a dependency of your mod, just unreal essentials (I'd remove IO Store Emulator as one since you had it before)

visual bramble
#

I will test in just a sec naobless

frosty terrace
#

oh, you should add umap to suitable file extension

wild abyss
#

Oh, ok. I'll do that

#

Is that all of them then? ("uasset", "ubulk", "uptnl", "umap")

frosty terrace
#

should be

wild abyss
#

cool

frosty terrace
#

i've never even heard of uptnl until now

#

umap is the format for levels

wild abyss
# boreal fiber You probably want to build the Rust project with something like ``` RUSTFLAGS="...

I'm having trouble running this (or something close to it). I've got the following (in a powershell script)

Set-Variable RUSTFLAGS="-C panic=abort -C lto=fat -C embed-bitcode=yes" 
cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-pc-windows-msvc --crate-type cdylib -n 100 --out-dir "$env:RELOADEDIIMODS\$emulator_name_csharp\"

But I get unexpected argument '--crate-type' 😦

#

(Sorry if it's a stupid question...)

dusky steppe
#

i did get it to start building when I put it in rustflags - -C crate-type=cdylib

#

but I wasn't able to get it to build with panic_immediate_abort

wild abyss
#

I removed the space inbetweeen the comma and it worked for me (it was build-std=std, panic_abort)

#

Now -n is an unexpected argument

dusky steppe
#

i tried looking up what that arg was and couldn't find anything

wild abyss
#

Yeah, it doesn't seem to exist in the help menu

dusky steppe
#

310 kb is the lowest I've gotten, which compared to all the reloaded dlls is massive lol