Gildor's Forums

English Forum => Other games => Topic started by: MetaKirb7 on June 29, 2018, 01:14



Title: A Hat in Time
Post by: MetaKirb7 on June 29, 2018, 01:14
Hello.

I'm attempting to extract a model from the game, "Hat in time" and use that model for mods to be used within the game. The model I am attempting to extract cannot be loaded into the preview field and gives me an error, "Wrong name index" afterwards.

Pics for the error can be found here:

https://imgur.com/TKuB7BY

https://imgur.com/Bo8oF1H

I'm very new to unreal engine and using umodel and trying research on this problem proves to be unsuccessful and hoping to clear some smoke here. Thanks for any help.


Title: Re: "Wrong name index" error when attempting to extract skeletal mesh and textures
Post by: Gildor on June 29, 2018, 12:03
I've been reported that game works. However, in compatibility table, it mentioned as having file version 877.5. In your case it has version 881.5, i.e. it has been updated since that. Probably that update was intended to not let open files anywhere else than in a game itself.


Title: A Hat In Time (has been updated)
Post by: Grendor on January 05, 2019, 11:13
Hey uh, turns out the engine for A Hat In Time, I'm not sure to what degree. However I'm wondering if now it can be figured out as the prior error has been replaced by a different one I believe. I'll add a few excerpts shortly. I really need a way to get some of the assets from this game.


Title: Re: A Hat in Time
Post by: Juso3D on January 05, 2019, 16:27
What models where you looking for?


Title: Re: A Hat in Time
Post by: Grendor on January 06, 2019, 02:21
I specifically wanted the model of Hat Kid's 'Shadow' outfit that is unlocked by completing the Death Wish challenge.

Here's the error I receive when opening 'Startup.upk' which contains Hat Kid and all of her costumes.

Quote
UnPackage::SerializeFName:pos=0539C97F <- FMeshBone<< <- TArray::Serialize:2/47 <- USkeletalMesh3::Serialize <- LoadObject:SkeletalMesh3'Startup.MafiaGreg', pos=539C97F, ver=885/5, game=ue3 <- UObject::EndLoad <- CUmodelApp::ShowPackageUI <- Main:umodel_build=898


Title: Re: A Hat in Time
Post by: Juso3D on January 06, 2019, 07:25
Have a picture?

(https://i.imgur.com/PK7G6hAm.png)


Title: Re: A Hat in Time
Post by: Grendor on January 06, 2019, 08:46
(https://vignette.wikia.nocookie.net/a-hat-in-time/images/d/d2/Shadow_Puppet.png)

Oddly enough when skeletal and static mesh is disabled on umodel, one can extract all the textures. I found most of her shadow textures, which upon examination lead me to believe it has it's own model.

https://www.dropbox.com/s/crt1dzt3ta0zp7e/ShadowKid.zip?dl=0


Title: Re: A Hat in Time
Post by: Grendor on January 21, 2019, 20:49
So do I need to upload any of the game files for research purposes? Because I'd really like this game to be supported again. It's one of my absolute favorites and the recent update added loads of new content and models that otherwise cannot be accessed. Here, this is the Startup package that includes a good majority of the main content used throughout the game.
https://www.dropbox.com/s/mbpi8ozbrj1sww5/Startup.upk?dl=0


Title: Re: A Hat in Time
Post by: Gildor on January 21, 2019, 22:18
You may use older game version with umodel.


Title: Re: A Hat in Time
Post by: Grendor on January 23, 2019, 01:14
That's...not what I'm trying to do though. I'm trying to access the new content of the recent update which includes Two-Player mode, a new chapter, DLC content, new models and characters...I'm aware the old version still works but I don't have the old version as mine is the steam release, and there would be no point to use the old version either way as it doesn't include the content I'm trying to access...which is the entire reason I revived this topic and supplied files from the current version to be looked at in hopes of this game being supported again so I can access said new content properly...


Title: Re: A Hat in Time
Post by: Gildor on January 23, 2019, 08:46
Sorry, I won't work on this game. I've explained reasons so many times everywhere, not worth mentioning again.


Title: Re: A Hat in Time
Post by: Manndarinchik on February 03, 2019, 17:27
You can try to use its modding tool in Steam.
It's located in "Tools" tab and called "A Hat in Time - Modding Tools". I exported smug dance animation with Anim Set Viewer that's built in it.

I think it's just a UE3 editor with AHiTs assets, but I've never worked with any of UE tools.
(https://imgur.com/A3C1eoA)


Title: Re: A Hat in Time
Post by: mark2580 on May 01, 2019, 20:45
You can try to use its modding tool in Steam.
It's located in "Tools" tab and called "A Hat in Time - Modding Tools". I exported smug dance animation with Anim Set Viewer that's built in it.

I think it's just a UE3 editor with AHiTs assets, but I've never worked with any of UE tools.
(https://imgur.com/A3C1eoA)
just the problem is that besides the Anim Set Viewer, nowhere else can I export resources, this editor has been slightly redone.


Title: Re: A Hat in Time
Post by: Theamazingnater on June 28, 2019, 00:00
Spawn the model you want to extract from the game files into the scene with Modding Tools.
Select your model and then right-click.
Go to "Preferences" and disable Simplified Editor.
Right-click on the model once again and click the option: "Export FBX"

Remember, Hat Kid's model has seperate body parts, so you need to export those if you need.

-Theamazingnater


Title: Re: A Hat in Time
Post by: MrSoup678 on February 03, 2020, 14:42
With vanilla UEViewer I have managed to extract Textures and Sounds.

It fails on models though.
Here are the needed files: https://www.mediafire.com/file/tv34bmxs9fwsuxf/HatinTimeSubmit.7z/file


Title: Re: A Hat in Time
Post by: Gildor on February 03, 2020, 19:12
Just a few lines above ...
https://www.gildor.org/smf/index.php/topic,6228.msg31620.html#msg31620


Title: Re: A Hat in Time
Post by: MrSoup678 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.


Title: Re: A Hat in Time
Post by: Gildor 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 ...


Title: Re: A Hat in Time
Post by: MrSoup678 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.


Title: Re: A Hat in Time
Post by: MrSoup678 on February 11, 2020, 18:32
Got it: https://github.com/gildor2/UEViewer


Title: Re: A Hat in Time
Post by: 09williamsad on May 23, 2020, 13:04
Got it: https://github.com/gildor2/UEViewer
Which fork is yours?, that link is to the main github and there are 221 forks.


Title: Re: A Hat in Time
Post by: MrSoup678 on June 13, 2020, 19:35
Oops. Wrong link.

Here: https://github.com/SlawekNowy/UEViewer (https://github.com/SlawekNowy/UEViewer)


Title: Re: A Hat in Time
Post by: 09williamsad on November 19, 2020, 01:01
Oops. Wrong link.

Here: https://github.com/SlawekNowy/UEViewer (https://github.com/SlawekNowy/UEViewer)

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


Title: Re: A Hat in Time
Post by: spiritovod 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 (https://drive.google.com/file/d/1qF1fdnDp1noSt_0EH0V7KF8C0JcQjeBm/view?usp=sharing) of SlawekNowy's fork with UE3 -> "A Hat in Time" override.


Title: Re: A Hat in Time
Post by: 09williamsad 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 (https://drive.google.com/file/d/1qF1fdnDp1noSt_0EH0V7KF8C0JcQjeBm/view?usp=sharing) 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)


Title: Re: A Hat in Time
Post by: spiritovod 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.