READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Looking for C++ daddy, who dabbed into UE4 internals before

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
Kein
advanced
Posts: 44
Joined: Fri Nov 06, 2009 12:57 pm

Looking for C++ daddy, who dabbed into UE4 internals before

Post by Kein » Wed Aug 07, 2019 6:02 pm

I'm working on a primitive *.uasset serializer for Data Tables and String Tables and there are few issues I could use help with. I'm not really verse in C++ and to be frank just seeing C++ syntax and structure make me want to puke. Anyway, most of the relevant info is here:
https://github.com/EpicGames/UnrealEngi ... oreUObject


A few properties give me the headache: TextProperty and Fname.
In the cooked uasset TextProperty is basically FPropertyTag data
FName::Name (2x int32 values)
FName::Type (2x int32 values)
Int32:Index
Int32:Size
+ TextProperty only data:
FPropertyGuid (usually almost always 0)
Unknown Int64 value
FPropertyGuid (another)
Hash (string)
Data (string)

Relevant data looks like:
hash: "05B979BD4162033D70E51B87219AA9F4"
text: "Oh, I see..."

That hash part is the one of the issues I'm having right now. It does not look like any of the standard hash algos. Nor
https://github.com/EpicGames/UnrealEngi ... operty.cpp
nor
https://github.com/EpicGames/UnrealEngi ... Property.h

have any mention of the hashing. I assume I need to check some includes for inherites types but this is where space in my brane ends.

Any help would be appreciated.
Last edited by Kein on Sun Aug 11, 2019 4:32 pm, edited 2 times in total.

rengareng
veteran
Posts: 128
Joined: Fri Feb 18, 2011 10:23 am
Has thanked: 5 times
Been thanked: 44 times

Re: Looking for C++ daddy, who dabbed into UE4 internals before

Post by rengareng » Fri Aug 09, 2019 1:07 am

Can you provide a few example files?

Kein
advanced
Posts: 44
Joined: Fri Nov 06, 2009 12:57 pm

Re: Looking for C++ daddy, who dabbed into UE4 internals before

Post by Kein » Fri Aug 09, 2019 5:32 am

rengareng wrote:
Fri Aug 09, 2019 1:07 am
Can you provide a few example files?
Sure, added to files.

PB_DT_DialogueTextMaster.uasset
Skip to 373056 (decimal offset) and you will see first TextProperty in action. 373 061 is lenght of the hash, then ANSI hash itself (Fstrings in UE4 assets terminated by \0), then the length of the UTF16LE string (negative) and then TextProperty body itself (UTF16LE, japanese).
https://github.com/EpicGames/UnrealEngi ... Property.h
https://github.com/EpicGames/UnrealEngi ... operty.cpp

I've looked here but no mention of any hashes.
You do not have the required permissions to view the files attached to this post.

rengareng
veteran
Posts: 128
Joined: Fri Feb 18, 2011 10:23 am
Has thanked: 5 times
Been thanked: 44 times

Re: Looking for C++ daddy, who dabbed into UE4 internals before

Post by rengareng » Sun Aug 11, 2019 2:54 am

uasset is similar upk, just a serialized Unreal Package which is collection of objects depending on the game.
Unreal Packages are very sensitive to version, and they change in each version. You can look at an open source project which parses Unreal Engine *.uasset files here: https://github.com/gildor2/UModel
So, it's easy to do a custom tool for specific game, but it's not possible to do a generic tool to do handle all games. Each game might use their own classes.

Kein
advanced
Posts: 44
Joined: Fri Nov 06, 2009 12:57 pm

Re: Looking for C++ daddy, who dabbed into UE4 internals before

Post by Kein » Sun Aug 11, 2019 6:04 am

Pretty sure TextProperty's Hash is somethiing that is generic

rengareng
veteran
Posts: 128
Joined: Fri Feb 18, 2011 10:23 am
Has thanked: 5 times
Been thanked: 44 times

Re: Looking for C++ daddy, who dabbed into UE4 internals before

Post by rengareng » Mon Aug 12, 2019 8:40 am

It's just a string. Hash calculations won't fixed in Unreal Engine. Each user of the engine can convert any hash result to a string.

Kein
advanced
Posts: 44
Joined: Fri Nov 06, 2009 12:57 pm

Re: Looking for C++ daddy, who dabbed into UE4 internals before

Post by Kein » Mon Aug 12, 2019 5:31 pm

rengareng wrote:
Mon Aug 12, 2019 8:40 am
It's just a string. Hash calculations won't fixed in Unreal Engine. Each user of the engine can convert any hash result to a string.
You probably should avoid talking about things you don't have knowledge on. There are a lot of fixed hash-algorithms in UE4 like CasePreservingHash or NonPreservingHash for FName entries, some other hashes based on some custom CRC32 methods for other types, etc

rengareng
veteran
Posts: 128
Joined: Fri Feb 18, 2011 10:23 am
Has thanked: 5 times
Been thanked: 44 times

Re: Looking for C++ daddy, who dabbed into UE4 internals before

Post by rengareng » Tue Aug 13, 2019 1:28 am

Their name sounds like a hash interface and not actual a fixed hash implementation.

Post Reply