Page 1 of 1

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

Posted: Wed Aug 07, 2019 6:02 pm
by Kein
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.

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

Posted: Fri Aug 09, 2019 1:07 am
by rengareng
Can you provide a few example files?

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

Posted: Fri Aug 09, 2019 5:32 am
by Kein
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.

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

Posted: Sun Aug 11, 2019 2:54 am
by rengareng
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.

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

Posted: Sun Aug 11, 2019 6:04 am
by Kein
Pretty sure TextProperty's Hash is somethiing that is generic

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

Posted: Mon Aug 12, 2019 8:40 am
by rengareng
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.

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

Posted: Mon Aug 12, 2019 5:31 pm
by Kein
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

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

Posted: Tue Aug 13, 2019 1:28 am
by rengareng
Their name sounds like a hash interface and not actual a fixed hash implementation.