XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Wed Jan 24, 2018 12:44 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: NexusTK .epf Tile Palette
PostPosted: Sat Oct 07, 2017 1:31 pm 
Offline
VVIP member
VVIP member
User avatar

Joined: Wed Jun 30, 2004 3:01 pm
Posts: 536
Location: Australia
Has thanked: 0 time
Have thanks: 8 times

Hi Dizzy,

Not sure if you need any of this information for your tool, or even if you want your tool to work with other images in the game, but here is some additional information about the following archives...
arrow, body, bow, coat, emotion, face, facedec, fan, hair, hairdec, helmet, mantle, neck, shield, shoes, spear, sword

These archives all have 2 corresponding entries in the file char.dat with the extensions PAL and DSC. The PAL one is the format you describe on your GitHub, but the DSC one is different. It kinda takes the place of the TBL file used by the tiles.

This is the DSC format, to the best of my knowledge so far...

Code:
  15 - Header (PartDescription)
  7 - null
  1 - Unknown (1)
  4 - Number of Parts
 
  // for each part (610 bytes per part)
    4 - Part ID (incremental from 0)
    4 - Palette ID Number
    4 - First Tile Number for this Part
    4 - Number of Tiles for this Part
    1 - Unknown (2)
    4 - Unknown
    1 - Unknown (4)
    4 - Unknown
    4 - Unknown
    4 - Number of Chunks (12)
 
    // for each chunk
      4 - Unknown ID
      4 - Unknown (-1/0)
      4 - Number of Blocks (4x4, then 4x2, then 4x6, to make the total of 12 blocks)
   
      // for each block
        1 - Unknown ID
        4 - null
        4 - Unknown (-1)


On order to read the images from the EPF files and map them to the correct PAL palette, you need to use the following fields above...
Code:
    4 - Palette ID Number
    4 - First Tile Number for this Part
    4 - Number of Tiles for this Part


For each Part, you can read the 3 fields above. The first one gives the palette ID for all images in the Part. The "First Tile Number" is the ID of the first image in the EPF file that belongs to this Part, and the "Number of Tiles" tells you the number of images in the Part.

For an example, the first entry in the DSC file might have "First Tile Number" = 0 and "Number of Tiles" = 20. In this case, all the images from 0-19 in the EPF file belong to this Part, and all use the same Palette. The second DSC entry might have "First Tile Number" = 20 and "Number of Tiles" = 8. In this case, images 20-27 belong to the Part.

The EPF file is basically the same as you wrote on GitHub, but I needed to work out the width of the image data in the EPF file as "Width = Width + (0-X Position)" and similarly for the height of the image data.

As for the Chunks and the Blocks - I have no idea what they represent, and I haven't really looked further in to them, as it isn't needed for reading the images. That said, I assume it's either something to do with the animation of the images, or placement of the images relative to other images, something like that I guess.

Hope this helps.

You can make the ads go away by registering


_________________
Game Extractor - Read and write thousands of game archives!


Top
 Profile  
 
 Post subject: Re: NexusTK .epf Tile Palette
PostPosted: Mon Oct 09, 2017 12:28 pm 
Offline
VVIP member
VVIP member
User avatar

Joined: Wed Jun 30, 2004 3:01 pm
Posts: 536
Location: Australia
Has thanked: 0 time
Have thanks: 8 times
And for the remaining archives...

Effects (efx.dat)...

Code:
// FRM FILE...
  4 - Number of Tiles
 
  // for each tile
    4 - Color Palette Number


Very simple. Seemed to be 40 images short of the number listed in the FRM file, but the images looked ok when I applied the palettes to them, so not sure what's going on there.


Monsters (mon.dat)...

Code:
// DNA FILE...
  4 - Number of Monsters
 
  // for each monster...
    4 - First Image ID
    1 - Number of Blocks
    1 - Unknown
    2 - Palette Number
   
    // for each Block
      2 - Number of Chunks
     
      // for each chunk
        2 - Unknown ID
        2 - Unknown ID
        2 - Unknown (-1)
        2 - null
        1 - null


Pretty sure the chunks represent the direction that the "monster" image is facing, and things like that. Haven't really explored in to it though.


For the EFX and MON, they both have EPF and PAL files as well, which are the same as all the others.

Hope this helps you, if you're so interested.

_________________
Game Extractor - Read and write thousands of game archives!


Top
 Profile  
 
 Post subject: Re: NexusTK .epf Tile Palette
PostPosted: Tue Oct 10, 2017 6:22 pm 
Offline
n00b

Joined: Wed Aug 30, 2017 1:20 am
Posts: 16
Has thanked: 4 times
Have thanks: 5 times
friendsofwatto, thank you for the information, I appreciate it!

The file_reader module is intended to handle all TK file formats, so these are great additions!

As for where/how to present all the different image formats/types in the QT5 GUI is another question. I'm open to suggestions on GUI/layout structure as this is not my forte :)



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot] and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group