![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Open the Hex Editor, select Tools and put a check on data inspecter.
Open Tools again and select Options, then appearance. set columns to 25 I work with text on the left but select the way that suits you. select Data inspecter, I have the 1st 6 boxes on the left checked. Select OK. Now open the NavalMine.dat and you should see something like this image. ![]() Notice I have Ref's dat file format info. This is our main guide. The 4 bytes in BLUE are important! You are going to see this alot so make sure you understand this part. The data Inspecter tells us the info to come is 51 bytes long. Count the GREEN area and it's 51 bytes. If you delete Kashmir in the left window, you need to lower the count in blue to match the new length. Click on the 33, open tools and select Encode number, and set it up like below ![]() Click OK and you should see that the 33 00 00 00 is now 2C 00 00 00 ![]() |
![]() |
![]() |
#2 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Make sure you save the file then open version 5 of Pack3d and open the file.
![]() click on the left window and find address 80 as marked in yellow. This is the start of this block of data. select the numbers marked in blue and notice the data inspecter We're looking at chunks now. All chunks are like this: 01 00 00 00 = 1 ChunkType 4 bytes 65 00 00 00 = 100 Chunk Subtype/Version 4 bytes CB 28 00 00 = 10443 chunk_size long (4 bytes) = Data (chunk_sizebytes) The data chunk size is the same type info we changed in the header, just telling us how big this block of data is. RED is the ID the game engine uses to work with this block which, in this case, is the actual 3d object of the mine. All ID's are 8 bytes long. |
![]() |
![]() |
#3 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Now, select the NavalMine under this and note the location.
In the hex editer select address and set it up like this. ![]() Hit OK and your right at the start of this block. Change the name from NavaiMine to Mine and fix the size info and save. Re-open the dat in pack3d and check it. if you've got it right you now know how to Re-name things anyway you like. The next thing we'll do is Dis-arm the mine! ![]() |
![]() |
![]() |
#4 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Ok, today we'll work with the NavalMine.zon file.
It's nice and small so you won't get lost, will reinforce what we know already, and has plenty of new areas we need to learn. Opening NavalMine.zon with Pack3d 5 will show you several limitations of Pack3d right off the bat. And I'll point them out as we go. Now open the same file with Hex Editor and look at all the pretty numbers! While I try to get some images up (Nets a bit iffy today) pickout what you learned earlier as best you can. We will dis-arm the mine by setting min and max areas = 0 Then we'll take the zon file apart, one piece at a time. We are going to save the sections we remove as we will re-assemble everything later on. |
![]() |
![]() |
#5 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]() ![]() 1st, the 0A 00 00 00 should be all YELLOW, My goof. ![]() But, Yellow tells us the type/subtype = 10/-1 Everything in RED is size, and we'll break this all down in a moment. GREEN is this files ID number as Pack3d shows you. Now the BLUE is the PARENT ID. If you look at NavalMine.dat you'll see this same ID and what it belongs to. So what this first chunk is telling the Game Engine goes like this. I am a Type 10, SubType -1 (YELLOW) 28 bytes of information follows. (RED) My name (ID) is AD FD 71 B8 E4 C0 71 9B (GREEN) I belong to 9A 88 45 36 F1 24 3C B1 (BLUE) I am an Explossive. |
![]() |
![]() |
#6 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Now we'll start tearing apart the zon file from the top down.
With the zon file open in Hex Editor, click the very 1st byte in the file, click on edit then click Block mark. We know 0A is the start of a new chunk so click on the 00 BEFORE the 0A. Again click edit, Block mark and you should see this. ![]() Click edit, select Clipboard, then Copy as hex string. Now we open another Hex Editor. Same one your using now just another instance of it. Click on the 1st empty byte in this second Editor, Click edit, select Clipboard, then Paste as hex string. Save this as headerz.bin then close this second copy. Back to the main part shown above, click edit, select Block delete, and save the file. We now have the header saved for later use and our zon file is smaller and easier to work with. |
![]() |
![]() |
#7 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Do a block mark again at the 0A that should be at the start of our zon file now.
Following what we know so far this chunk is 28 bytes starting the count at the 1st byte of the ID, which is the AD. Click on the AD. Now, I don't want to count 28 bytes, and in bigger files we may need to move 1000's of bytes! Select Address, then Jump width. Set this to decimal, then enter 28, click OK. Select Address again, Jump down and block mark this. Do your copy and save just like before calling this introz.bin Then Block delete, and save this file again. We haven't lost anyone so far have we? |
![]() |
![]() |
#8 | |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]() Quote:
5 bytes of info. Go to the start of this chunk which is position 76373. 1st 4 bytes = 4 next 4 bytes = 100 The next 4 bytes are the size, reduce this by 5. Pay attention to the lesson before this one as they show you how to do this. |
|
![]() |
![]() |
#9 |
Officer
![]() Join Date: Oct 2006
Location: filton england
Posts: 246
Downloads: 0
Uploads: 0
|
![]()
cool thanks alot
![]() |
![]() |
![]() |
![]() |
#10 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Learning to identify the parts of the dats is easy once you get these basics.
The final goal of working with these files will be to build your own Barrage Balloon! |
![]() |
![]() |
#11 | |
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
must to be "Skip the first 12 bytes. It's file header and we pass it". Next data block is usual data block (chunk?) Type 1000 it can to have a name "Author's Description" (for exemple). It is important for creation of the program of Pack 3D type. Next it's data block (chunk?) Type 0, SubType (version) 0 and size = 0 (all 12 bytes). It's marker-block of beginig of data interesting us. In the end of a file we have a marker-block of the end of data interesting us. It's data block Type 0, SubType (or Version) 1 and size = 0 (all 12 bytes). P.S. What is it chunk? In the programming language (for example C ++) it refers to the data block ...
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... Last edited by Anvart; 03-09-07 at 11:21 AM. |
|
![]() |
![]() |
![]() |
#12 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Thanks Anvart
![]() I'll change my reference files to match this info! |
![]() |
![]() |
|
|