Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Frostbite model tools (Battlefield, Battlefront and others)

Post questions about game models here, or help out others!
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by daemon1 »

by "the attached version on ealayer3" i meant the one just attached
mono24
double-veteran
double-veteran
Posts: 840
Joined: Sat Nov 06, 2010 12:27 am
Has thanked: 435 times
Been thanked: 235 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by mono24 »

daemon1 wrote:by "the attached version on ealayer3" i meant the one just attached
lol, yeah, I realized second time I read the text, I'm like silly me, duuuh, lol
But so far testing it and it still converts, everything comes out right, including NFSPayback, which had same errors as SWBF2, so thank you for the third version of ealayer3.


MERRY CHRISTMAS EVERYONE !!!
GM000
ultra-n00b
Posts: 9
Joined: Thu Nov 23, 2017 3:02 pm
Has thanked: 1 time

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by GM000 »

.Smd and .ascii imports don't work in blender....
mono24
double-veteran
double-veteran
Posts: 840
Joined: Sat Nov 06, 2010 12:27 am
Has thanked: 435 times
Been thanked: 235 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by mono24 »

daemon1 wrote:
elementofprgress wrote:If you have any updated resTypes or something is wrong, let me know.
Sure:

0xf04f0c81:".Dx11ShaderProgramDatabase",
0x9C4FAA17:".HeightfieldDecal"
0x957C32B1:".AtlasTexture",
0xC6CD3286:".EnlightenStaticDatabase",
0xA23E75DB:".TerrainLayerCombinations",
0xE36F0D59:".HavokClothPhysicsData",
0x6BDE20BA:".Texture",
0x9D00966A:".UITtfFontFile",
0xC611F34A:".MeshEmitterResource",

Here's all your unknown types, if you have something else unknown, let me know.
@daemon1, you happen to know what resType these are? the letters in front are from the games I came across.

Code: Select all

    0x24A019CC:".DAI_resType24A019CC",
    0x5E862E05:".DAI_resType5E862E05",
    0x59C79990:".DAI_resType59C79990",
    0x76742DC8:".DAI_resType76742DC8",
    0x41759364:".NFSP_resType41759364",
    0x2EBF5E85:".NFSR_resType2EBF5E85",
    0x8D9E6F01:".MEA_resType8d9e6f01",
    0xAD1AC4FD:".MEA_resTypeAD1AC4FD",
    0xCB8BCD07:".MEA_resTypeCB8BCD07",
    0xBA02FEE0:".MEA_resTypeBA02FEE0",
    0x52EE0D39:".MEA_resType52EE0D39",
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by daemon1 »

mono24 wrote: @daemon1, you happen to know what resType these are? the letters in front are from the games I came across.

Code: Select all

8D9E6F01	PcaComponentWeightsResource
AD1AC4FD	LargeParticleCloud
BA02FEE0	MeshAdjacencyResource
52EE0D39	PlayerPresetResource
41759364	PhysicsResource
5E862E05	LocalizedStringResource
59C79990	FaceFXResource
I can't get the others because i dont have these games EXE's right now
mono24
double-veteran
double-veteran
Posts: 840
Joined: Sat Nov 06, 2010 12:27 am
Has thanked: 435 times
Been thanked: 235 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by mono24 »

daemon1 wrote:I can't get the others because i dont have these games EXE's right now
Now that was fast, thank you.

If I may ask, how you got them from the exe? id like to try the other ones myself, if its not a secret or something as usual lol
Lets say we take:

Code: Select all

0x76742DC8:".DAI_resType76742DC8",
Do I look for the offset:

Code: Select all

0x76742DC8
inside the executable of the game, then in front or after there is a hash of the actual name? what's the size to look for?

EDIT: yeah, I figured its not so easy, there's no such offset in the game, not even a hex value like that, so I guess its a bit more complex?

I'd really like to know for future games how to look for the unknownResTypes, ;)
Paja913
ultra-n00b
Posts: 1
Joined: Sat Nov 20, 2010 7:19 pm

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by Paja913 »

I'm looking for a sound extractor with guide. Can you help me?
Because I can't get sound files by UFE0.2.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by daemon1 »

mono24 wrote:inside the executable of the game, then in front or after there is a hash of the actual name?
yes its a hash of the actual name, but you wont find it is the EXE, because its not there. But if you take all string constants from the EXE, and calculate their hashes, some of them will be these numbers. The names are scattered across the data segment, so just hash them all and you'll find what you need. Good idea is to use some tool to do it for you automatically ;)
CZW
veteran
Posts: 151
Joined: Thu May 05, 2005 3:15 pm
Has thanked: 117 times
Been thanked: 15 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by CZW »

Daemon1 , my question is ... you export DX11 texture
Do you export DX12 textures ? As the option exist into the game .. CAS files have them ?

frostbite engine have this entrie if I’m right
0x6BDE20BA: ".Dx12Texture"
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by daemon1 »

CZW wrote:Daemon1 , my question is ... you export DX11 texture
Do you export DX12 textures ? As the option exist into the game .. CAS files have them ?

frostbite engine have this entrie if I’m right
0x6BDE20BA: ".Dx12Texture"
For your information, 6BDE20BA is just "Texture", not dx12 or anything else
mono24
double-veteran
double-veteran
Posts: 840
Joined: Sat Nov 06, 2010 12:27 am
Has thanked: 435 times
Been thanked: 235 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by mono24 »

daemon1 wrote:yes its a hash of the actual name, but you wont find it is the EXE, because its not there. But if you take all string constants from the EXE, and calculate their hashes, some of them will be these numbers. The names are scattered across the data segment, so just hash them all and you'll find what you need. Good idea is to use some tool to do it for you automatically ;)
LOL, you sneaky devil, hehehe, you do realize that just like yourself I too have English as "second" language, like most in here I assume, anyway not like its an excuse, but in past few days, I got as far as looking for and installing Explorer Suite and IDA, because obviously I never even heard of them yet alone know how to use them as should, hehe, but trying to learn, it fascinates me to the point I cant sleep at times from all this stuff.
So been trying to mess around and dump the game executable from Evolve Stage 2 to find the RSA new key that its hidden in the EXE apparently because game files can NOT be extracted any longer with the old method, got to do all of that but to follow the pattern of the old method its not easy because, well, you got to know what your looking for, right? and now I had to Google "hash calculation", "data segment" etc etc etc lol, so you see, most of us who are curious and really want to learn hit all these walls because information is never "clear" and I get it, it needs some sort of "decryption" even from hearing and reading stuff, BUT, if you have some clear point as to what to do exactly, then please at least PM if its too much of a secret, I'm being honest here, I want to try and learn.
Shit, I've even been begging to offer my help to learn how to dump properly the The Crew game, to update the extraction list, no one even wants to point in the right direction, I mean, damn its that big of a secret? anyway

So in conclusion, I know your a busy guy, and its amazing someone like yourself still pays attention to us little guys, we thank you, but when ever you have some free time and your bored id like more info on what can I do to make things work, if not I will continue to research at my own pase an try to learn what I can while hitting wall after wall after wall ....... :) you get the idea.
Paja913 wrote:I'm looking for a sound extractor with guide. Can you help me?
Because I can't get sound files by UFE0.2.
What are you talking about?
The tool extracts everything you need, literally everything from the mentioned games gets dumped.
And there's even a script to extract the entire game audios from it, just check the thread carefully and you'll find everything.
Try page 16
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by daemon1 »

mono24 wrote:I had to Google "hash calculation"
it seems you know nothing about hashes. ok i can tell you. there are many hash algorythms, but frostbite is not using any standard ones, they did their own, which works like this:

uint hash = 5381;
for (int i = 0; i < name[j].Length; i++) hash = (hash * 33) ^ (char)(name);

So essentially you start from number 5381, and then multiply it by 33 for every letter of the name, then do "https://en.wikipedia.org/wiki/Exclusive_or" with that letter

after that you get 32-bit hash value

Dont care much about data segments, just find a region in the EXE, which contains a lot of strings, it is usually about 4 MB in size, and extract all strings from it with strings.exe from sysinternals

There may be better ways do to it, but this is what I used
mono24
double-veteran
double-veteran
Posts: 840
Joined: Sat Nov 06, 2010 12:27 am
Has thanked: 435 times
Been thanked: 235 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by mono24 »

Hey guys, those of you that happen to know and came across this issue I'm having and know of an answer please help.

Every time I try to use a python script and if a pair of .toc/.sb archives where .sb archive is 4GB+ in size no matter what it throws this error:

Code: Select all

Traceback (most recent call last):
  File "D:\BF4_dump\bf4dumper.py", line 244, in <module>
    if "tocRoot2" in locals(): dumpRoot(tocRoot2)
  File "D:\BF4_dump\bf4dumper.py", line 234, in dumpRoot
    dump(fname,targetDirectory)
  File "D:\BF4_dump\bf4dumper.py", line 185, in dump
    LZ77.decompressUnknownOriginalSize(sbPath,entry.offset,entry.size,targetPath)
ArgumentError: argument 2: <type 'exceptions.OverflowError'>: long int too long to convert
>>> 
Now if I add this argument as explained by daemon1 in another thread:

Code: Select all

    for entry in toc.chunks:
        if hexlify(entry.id)=="2550ad6e0c4d281384a6bf767bb7a959 <-replace it with the chunk hash that causes the error" : continue
and then run the script again to ignore the .chunk with the issue, it doesn't help because the next .chunk up on extraction still throws same error, so on and so forth, now it might be the fact that its the 32bit python in use, but if I want to use the 64bit its not possible because there is no LZ77.dll 64bit version, as far as I know, right? I've looked around and couldn't find one.
So I assume there must be an argument to add in the script, that makes the extraction to continue with out excluding any chunks from the process.

Thank you, cheers.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by daemon1 »

mono24 wrote:So I assume there must be an argument to add in the script, that makes the extraction to continue with out excluding any chunks from the process.
No.

There is no argument in 32-bit .DLL to pass 64-bit offset to it. In theory you can make this, but you have to make a new .DLL for that.

p.s. whats the game using 4gb files?
mono24
double-veteran
double-veteran
Posts: 840
Joined: Sat Nov 06, 2010 12:27 am
Has thanked: 435 times
Been thanked: 235 times

Re: Frostbite model tools (Battlefield 1, Battlefront 1, 2)

Post by mono24 »

daemon1 wrote:There is no argument in 32-bit .DLL to pass 64-bit offset to it. In theory you can make this, but you have to make a new .DLL for that.
Oh, ok, understood, then is there any other .dll I can use you might know of, both 32bit or 64bit, I'd definitely like to try it out?
daemon1 wrote:p.s. whats the game using 4gb files?
Battlefield Hardline:
-one .sb is 4.32GB
-second .sb is 5.59GB
they are the only two that wont allow the extraction to continue, there for extraction gets disrupted, I'm sure something must be available, just haven't found it, yet.
Post Reply