Welcome to Close Combat Series
  Login or Register Home  ·  Downloads  ·  Forums  ·  Combat Camera  ·  Help  

  Survey
Do incapacitations count as a soldier's kills?

Yes
No



Results
Polls

Votes 1214
Comments: 1

  Shout Box!!

Only registered users can shout. Please login or create an account.

  Main Menu
Articles & News  
    Help
    Player`s News
    Site News
    Multiplayer
    Terrain Challenge
    Boot Camp
Community  
    Forums
    Downloads
    Combat Camera
    MOOXE @ Youtube
    Statistics
Members  
    Private Messages
    Your Account
    Logout

  Donations
Anonymous - $25.00
08/15/2022

Anonymous - $25.00
08/15/2022

Anonymous - $25.00
12/18/2021

Anonymous - $100.00
11/08/2021

Anonymous - $15.00
04/09/2021

Anonymous - $100.00
04/05/2021

Anonymous - $20.00
02/20/2021

Anonymous - $10.00
12/29/2020

Anonymous - $1.00
11/06/2020

ZAPPI4 - $20.00
10/10/2020

Find our site useful? Make a small donation to show your support.



Search for at
Close Combat Series Advanced Search


 Author
Message
 
GameRat

Rep: 44.8
votes: 2


PostPosted: Sun Dec 18, 2005 5:28 am Post subject: Hex edit question re: shadows.zfx Reply with quote

Hi,
In regards to the text taken from Zonbie's read-me file:

When Zonbie refers to "Paste that hex info into the appropriate slot in the temp file" ... how are you able to determine where that appropriate slot is?
It seems that after you edit a nsd/zsd file and repack it back into the shadows.zfx ... the file size of the edited file ends up being 0 kb, and therefore the game will crash. By entering in the appropriate hex data into the right place with a hex editor corrects the problem.
Trouble is I can't locate where to enter the data back into the Shadows.zfx from within the hex editor. Lenght size data F4BB for g88mmAT.nsd.

Thanks for any help with this.... David

SHADOW EDITING
CLOSE COMBAT III: THE RUSSIAN FRONT

TOOLS YOU NEED
Zfx utility at http://members.xoom.com/CloseCombat/
A hex editor, such as Hex Workshop from http://www.bpsoft.com

INTRO
This file explains how to replace vehicle shadows in CC3 using other vehicle shadows already in the game. This will sound complicated, but it's really quite easy once you get the idea. It helps if you know something about hex editing, but if not you should get by OK.

All the zoom and normal shadows for vehicles are in shadows.zfx, and the zfx tool extracts them to a folder called 'shadows'. The shadows are named according to the vehicle graphics they are married with - i.e. shadows rT34l.nsd (normal view) and rT34l.zsd (zoom) go with the rT34l tank graphics.

Once the zfx tool extracts all these shadows, you can copy them, rename them (using only existing shadow names), then pop them back into the shadows folder to give a vehicle a new shadow.

But, when repacking the shadows to shadows.zfx, the zfx tool fails to write the header information for the size of the shadow files. This can be fixed with a hex editor.

INSTRUCTIONS
Open an unedited shadows.zfx file with a hex editor. Select the data between decimal offsets 10204 and 12602. Save this block of data as a new file somewhere. Call it anything you want. It's just a temporary file. For this instruction, assume it's called temp file.

Extract shadows.zfx with the zfx tool. Go into the shadows folder, then copy the zoom and normal views you want to apply to a new vehicle. Rename them and reinsert them into the shadows folder. Start with just one shadow set (zoom and normal).

Run zfx tool to repack shadows.zfx. Now, this new file is missing that important information that tells the game the size of all the shadows. You thought ahead, however, and saved the info and put it aside as a temporary file (temp file), but before you pop it into shadows.zfx, you have to make an adjustment for the shadows you added.

Open a DOS window and go to the directory with your new shadows.zfx. Run this command "zfx shadows.zfx>shadows.txt". Then go back to Windows and open the shadows.txt file you just created. The file lists all the shadow names, their offsets and size (the key info here, in bytes). You can get the same size info by right clicking on the files in the shadows folder for their properties, but you need the text file anyway.

In shadows.txt, find the names of the zoom and normal view shadows you just altered, and note the index numbers. Zoom versions of each shadow always follow the normal view. Multiply both these numbers (separately) by four. These are the decimal offsets where you will find the shadow file size entries for your new shadows in the temp file. (Except the entries are incorrect at the moment.)

With me? Good. Almost done...

Crack open the base converter in your hex editor. Go back to shadows.txt and copy the file size (length) information for the first of the two shadow files (normal) you altered. Paste that info into the decimal window in the base converter, and that will create a hex entry such as 4E45. Paste that hex info into the appropriate slot in the temp file (the normal view entry you found by multiplying by four). But transpose the new hex entry values; if you got 4E45, input 454E. Repeat for the zoom shadow.

When done, copy the whole temporary file and paste into shadows.zfx again by using the same offsets you used to start the whole process off (10204 and 12602).

That's it! If there are no crashes when you play the game, you did it all right. Make sure you zoom into the vehicle that gets the new shadows, then go back to normal view. This is often the action that causes a crash if the hex editing has gone wrong!

Any questions?
contact Zonbie
Back to top
View user's profile Send private message
 
zon

Rep: 17.5
votes: 2


PostPosted: Sun Dec 25, 2005 3:24 am Post subject: Reply with quote

I think you use shadows.txt to find your slot.

Isn't there a tool that makes this method obsolete?
Back to top
View user's profile Send private message
 
Mafi

Rep: 2.7
votes: 17


PostPosted: Mon Jan 09, 2006 10:57 am Post subject: Reply with quote

zon wrote:
I think you use shadows.txt to find your slot.

Isn't there a tool that makes this method obsolete?


I'm not really sure. I posted this in December at Ryan's:

Concerning CC3's ZFX files:
does anyone know more about the 2400 bytes after the offset table??

Starting from 10204 to 12604 there are 2400 bytes of unknown purpose. For expanding functionality of my CC2Spriter it would be great to know:

- what is in this 2400 bytes
- does TinTin's ZFX-tool reproduces these bytes by code or does it ignore them when repacking, filling up with whatever else?
- anyone any experiences what happen when changing these bytes?

I found that ZFX tool stopped after extracting 36 files out of Shadows.zfx. Anyone else any idea why? Anyone ever tried to extract Shadows.zfx? CC2Spriter extract all the files. New tool version is planned to repack Shadows.zfx.



...
Now I think I must rework my CC2Spriter again. Will take a look if we can solve the secrets of the ZFX file format. ANY HELP IS NEEDED!

Mafi
Back to top
View user's profile Send private message Visit poster's website
 
Mafi

Rep: 2.7
votes: 17


PostPosted: Mon Jan 09, 2006 12:01 pm Post subject: ZFX file format Reply with quote

okay, I think its a file size table filled up with garbage data to cionfuse modders. Any one out there who think that any details can be provided ? As far as investigated now, the ZFX file format is:

// header
LongInt; // number of entries
array(600) of Char(13); // 600 ASCIIZ strings of DOS format 8.3
array(600) of LongInt; // 600 file offsets
array(600) of LongInt; // 600 file sizes
// datas
plain file datas concatenated without gaps

IF I'M WRONG, please let me know. New version of CC2Spriter will be tested soon. Any CC3 modder outthere who can make the testing ?? Please let me know!

Mafi
Back to top
View user's profile Send private message Visit poster's website
 
Mafi

Rep: 2.7
votes: 17


PostPosted: Wed Jan 11, 2006 5:59 pm Post subject: CC2Spriter updated again Reply with quote

Hi Folks,

CC2Spriter updated to handle wrong encoded ZFXs: v2.8.2 is online at my site.

Sorry for the inconvienience. And perhaps more is possible if I will find the time to investigate *.fx files.

Mafi
Back to top
View user's profile Send private message Visit poster's website
 
 
Post new topicReply to topic printer-friendly view Close Combat Series Forum Index -> Modding Workshop


 
   
 


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum




Forums ©





In August of 2004, Zappi, Homba, Bambam887, RedScorpion and MOOXE all pitched
in to create this Close Combat site. I would to thank all the people who have visited and
found this site to thier liking. I hope you had time to check out some of the great Close Combat
mods and our forums. I'd also like to thank all the members of our volunteer staff that have
helped over the years, and all our users that contributed to this site!