March 28, 2024, 17:02
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: A Hat in Time  (Read 7072 times)
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #15 on: February 03, 2020, 19:12 »

Just a few lines above ...
https://www.gildor.org/smf/index.php/topic,6228.msg31620.html#msg31620
Logged
MrSoup678
Newbie
*
Posts: 5


View Profile
« Reply #16 on: February 11, 2020, 17:46 »

OK. In my free time I'm working on support for A Hat in Time.

I fixed the USkeletalMeshes and UAnimSets.

However I'm stumped at UStaticMesh.

Apparently FStaticMeshLODModel3 has some data appended to it.

It's not a problem when I have one LOD, but it crashes on multiple LOD.

Here's my question.

Where to find that struct in IDA?

PS: Size dif between serialized single LOD data and stopper is 133 B. Even then I'm not sure if that's variable.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #17 on: February 11, 2020, 17:51 »

Where to find that struct in IDA?
It's hard. The chain of findings is roughly this:

1. Find UStaticMesh constructor, it's linked to "StaticMesh" string with UClass::UClass.
2. Find class VMT (virtual method table).
3. Find Serialize method in VMT.
4. Recognize basic functions, e.g. TArray<UMaterialInterface> serializer, etc.
5. Compare code in IDA with e.g. UModel's UStaticMesh::Serialize code, find where LODs are serialized - in assembly.

And so on ...
Logged
MrSoup678
Newbie
*
Posts: 5


View Profile
« Reply #18 on: February 11, 2020, 18:15 »

And unfortunately I'm not that versed in assembly.

I'll soon post what I have so far as fork.
Logged
MrSoup678
Newbie
*
Posts: 5


View Profile
« Reply #19 on: February 11, 2020, 18:32 »

Got it: https://github.com/gildor2/UEViewer
Logged
09williamsad
Sponsor
Jr. Member
*
Posts: 49



View Profile
« Reply #20 on: May 23, 2020, 13:04 »

Which fork is yours?, that link is to the main github and there are 221 forks.
Logged
MrSoup678
Newbie
*
Posts: 5


View Profile
« Reply #21 on: June 13, 2020, 19:35 »

Oops. Wrong link.

Here: https://github.com/SlawekNowy/UEViewer
Logged
09williamsad
Sponsor
Jr. Member
*
Posts: 49



View Profile
« Reply #22 on: November 19, 2020, 01:01 »


Is your fork for a specific version?, if so then which?

I have tried it with the current version and it has errors with animations, static meshes and skeletal meshes.

FStaticMeshUVStream3<< <- FStaticMeshLODModel<< <- TArray::Serialize:1/4 <- UStaticMesh3::Serialize <- LoadObject:StaticMesh3'castle_mu.Snot_Bubble', pos=605425E, ver=888/5, game=8000 <- UObject::EndLoad <- LoadWholePackage:castle_mu <- Main:umodel_version=305

UnPackage::SerializeFName:pos=0248D244 <- TArray::Serialize:2/66 <- USkeletalMesh3::Serialize <- LoadObject:SkeletalMesh3'castle_mu.CoffeeClerk2014', pos=248D244, ver=888/5, game=8000 <- UObject::EndLoad <- LoadWholePackage:castle_mu <- Main:umodel_version=305

TRawArray<< <- TArray::Serialize:1/31 <- UAnimSequence::Serialize <- LoadObject:AnimSequence'castle_mu.AnimSequence_4', pos=42E1E0, ver=888/5, game=8000 <- UObject::EndLoad <- LoadWholePackage:castle_mu <- Main:umodel_version=305
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 1901


View Profile
« Reply #23 on: November 19, 2020, 02:20 »

@09williamsad: Not sure what you're using, since 305 build is like from years ago. Try this compiled build of SlawekNowy's fork with UE3 -> "A Hat in Time" override.
Logged
09williamsad
Sponsor
Jr. Member
*
Posts: 49



View Profile
« Reply #24 on: November 19, 2020, 21:58 »

@09williamsad: Not sure what you're using, since 305 build is like from years ago. Try this compiled build of SlawekNowy's fork with UE3 -> "A Hat in Time" override.

Thanks, that one works on all but the static meshes

Latest
appMalloc:size=1342177280 (total=67 Mbytes) <- FArray::Empty:1728053248 x 48 <- TArray::Serialize:0/0 <- FStaticMeshLODModel3<< <- TArray::Serialize:1/4 <- UStaticMesh3::Serialize <- LoadObject:StaticMesh3'castle_mu.Snot_Bubble', pos=605428C, ver=888/5, game=ue3 <- UObject::EndLoad <- LoadWholePackage:castle_mu <- ExportPackages <- CUmodelApp::ShowPackageUI <- Main:umodel_build=(unversioned)

DLC2
appMalloc:size=-1073741824 (total=87 Mbytes) <- FArray::Empty:67108864 x 48 <- TArray::Serialize:0/0 <- FStaticMeshLODModel3<< <- TArray::Serialize:1/2 <- UStaticMesh3::Serialize <- LoadObject:StaticMesh3'castle_mu.hub_pillowpile_structure_board', pos=723AEE1, ver=888/5, game=ue3 <- UObject::EndLoad <- LoadWholePackage:castle_mu <- ExportPackages <- CUmodelApp::ShowPackageUI <- Main:umodel_build=(unversioned)

Pre DLC1
appMalloc:size=1811964384 (total=63 Mbytes) <- FArray::Empty:1648361994 x 48 <- TArray::Serialize:0/0 <- FStaticMeshLODModel3<< <- TArray::Serialize:1/3 <- UStaticMesh3::Serialize <- LoadObject:StaticMesh3'castle_mu.ClubCrowHair', pos=587EBB4, ver=881/5, game=ue3 <- UObject::EndLoad <- LoadWholePackage:castle_mu <- ExportPackages <- CUmodelApp::ShowPackageUI <- Main:umodel_build=(unversioned)

Pre DLC2
appMalloc:size=-1073741824 (total=88 Mbytes) <- FArray::Empty:67108864 x 48 <- TArray::Serialize:0/0 <- FStaticMeshLODModel3<< <- TArray::Serialize:1/2 <- UStaticMesh3::Serialize <- LoadObject:StaticMesh3'castle_mu.hub_pillowpile_structure_board', pos=724894D, ver=885/5, game=ue3 <- UObject::EndLoad <- LoadWholePackage:castle_mu <- ExportPackages <- CUmodelApp::ShowPackageUI <- Main:umodel_build=(unversioned)
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 1901


View Profile
« Reply #25 on: November 19, 2020, 23:54 »

Judging from posts above and the fork commits, static meshes were never fixed there. It's still a great work nonetheless.
Logged
Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS