logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,677
Total Threads: 8,798
Posts: 95,842

Administrators:
DeeZire, Redemption

There are currently 32 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > LOTR: Battle For Middle Earth I & II Editing » Christmas present: reverse-engineering Asset.dat

LOTR: Battle For Middle Earth I & II Editing Discuss any modding related issues to do with the Lord Of The Rings: Battle For Middle Earth I and II RTS games here.

Reply
 
LinkBack Thread Tools
Old 12-28-2004, 05:39 PM   #21 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: The Netherlands
Posts: 141
Send a message via ICQ to Rene
Default

Code:
Entry #1: 204_wp_01.tga 01C4C95E4C5EF408
  Sub #0: 204_wp_01.tga TEX 0 0
Entry #2: 205_wp_01.tga 01C4C95E4C5EF408
  Sub #0: 205_wp_01.tga TEX 0 0
Look at the unknown number, they are the same.
Rene is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-28-2004, 09:16 PM   #22 (permalink)
Senior Member
 
Join Date: Apr 2003
Location: Derby, UK / Den Haag, NL
Posts: 590
Default

Quote:
Look at the unknown number, they are the same.
I've noticed that, but that sheds no light to me on what it actually is. It could be some sort of 'format type' twiddly listing of sorts.
Ambershee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-28-2004, 10:49 PM   #23 (permalink)
Member
 
Join Date: Mar 2004
Posts: 37
Default

Not to sound dumb, but what is this asset.dat file and what are you trying to accomplish. Sorry, not a data whiz, but I hope it will help with performance in that game, been having some serious issues, despite how great it is.
cncforme is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2004, 04:42 AM   #24 (permalink)
Administrator
 
DeeZire's Avatar
 
Join Date: Dec 2002
Posts: 1,913
Send a message via ICQ to DeeZire
Default

Its not a performance related issue - its about being able to add custom assets such as models and textures into the game. Basically, if your asset is not referenced in that file, the game wont use it. Being able to edit the file/add your own content to it is critical to being able to modify the game (properly at least).

BTW Koen and Rene this is superb collaboration, absolutely fantastic to see! Ive mailed two guys at EA, hopefully they can shed some light on things.
DeeZire is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2004, 05:18 AM   #25 (permalink)
Senior Member
 
Join Date: Dec 2002
Posts: 1,031
Send a message via ICQ to Phoib Send a message via MSN to Phoib
Default

With a Russian Char set installed, I get .ДЙ^L^ф. when I put 01C4C95E4C5EF408 into an hex editor. =\

[edit]Someone else gets 127448096318616584.

Could this be a number for which W3D file it is referring to?
Phoib is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2004, 06:16 AM   #26 (permalink)
Senior Member
 
Join Date: Jan 2003
Location: Netherlands
Posts: 206
Default

I have found it
The fixed differences put me onto something... what if it is a date/time? As the Windows timer only has a limited resolution... that means there'd be fixed differences.
Anyway, the unknown value is a Windows FILETIME structure, which contains the number of 100-nanoseconds since the year 1601. Something like that
Anyway, using GetSystemTimeAsFileTime function in Windows we can create a new one which is only slightly bigger (2 months ) than the current ones in the file.

The subentries types are the following btw:
SubAssetTypes.Add('TEX'#0);
SubAssetTypes.Add('MESH');
SubAssetTypes.Add('HLOD');
SubAssetTypes.Add('ANIM');
SubAssetTypes.Add('HIER');
SubAssetTypes.Add('BOX'#0);
SubAssetTypes.Add('PART');
So I think you are only missing 'PART'.

There is now just one unknown number, it is the second dword in the file (258) and I do not know what it does. But perhaps we can just ignore it.

Now I haven't looked at your code yet and if it can extract all the strings needed for StringEntries, but otherwise things should be able to work in theory. Still have to write the tools of course
Koen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2004, 12:20 PM   #27 (permalink)
Senior Member
 
Join Date: Jan 2003
Location: Netherlands
Posts: 206
Default

I've made added 'PART' to my W3D reader, it is of type EMITTER ($00000500) and has a header like the others.
And now for the StringEntries...
Koen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2004, 01:36 PM   #28 (permalink)
Senior Member
 
Join Date: Jan 2004
Posts: 231
Send a message via MSN to HorseAss
Default

I just say, BURN EA, BURN FOR THIS!!!!!!
HorseAss is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2004, 02:19 PM   #29 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: The Netherlands
Posts: 141
Send a message via ICQ to Rene
Default

I post the string entries reader this evening. The header file I included is not the complete w3d header, just the part of it that was needed to read and understand the file structure. IF you need/want more info in it, just say so.

BTW, I left a huge bug in the file I posted. The bug is in the default case. I must have been drunk when thinking that one up and I used three different ways of filling them up where only one is correct .

The correct line for the default condition in every switch I used so far would be:
Code:
default: 
{
    fseek(f,w3dChunkHeader->ChunkSize,SEEK_CUR); 
    break;
}
The current code on some places jumps to the end of the superchunk instead of the sub chunk. The reason for this condition is to skip all unkown/uninteresting sub chunks.
Rene is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2004, 03:41 PM   #30 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: The Netherlands
Posts: 141
Send a message via ICQ to Rene
Default

I just uploaded my new code at the same location:

compiled exe
source files

Every w3dChunkMesh struct now contains the number of textures and an array with texture names. This should provide enough information to reconstruct the string entries. The format would be:

for every mesh
StringEntry #n: w3dfilename meshcontainername.meshname
list of texture names

then a reference to all meshes in a file
StringEntry #n: w3dfilename hlodname
h*hlodhierarchyname
meshcontainername.meshname


EDIT:
alright, this does not provide enough information. I noticed that there is an aggregate array used in an animation of the mumakil. It is also listed in the StringEntry for mumumakil_diecf. I have to go now but I'll update my code again tomorrow...
Rene is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merry Christmas Renegade Red Alert 2 & Yuri's Revenge Editing 5 12-25-2005 06:51 PM
Asset Builder Sy LOTR: Battle For Middle Earth I & II Editing 79 04-18-2005 04:43 PM
Are these items present in BFME? Hostile LOTR: Battle For Middle Earth I & II Editing 2 03-27-2005 01:51 AM
Merry Christmas Renegade Red Alert 2 & Yuri's Revenge Editing 7 12-25-2004 09:12 PM
Any way to reverse animations in Renx/3ds? Kuja Generals & Zero Hour Editing 4 06-17-2004 06:08 AM


All times are GMT -4. The time now is 02:49 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.