AntonioDePau / KHPCPatchManager

A tool based on OpenKH to allow modders and users to easily mod the PC release of the Kingdom Hearts collection
Apache License 2.0
55 stars 14 forks source link

Add HD asset support for new MAP files #15

Closed 1234567890num closed 2 years ago

1234567890num commented 3 years ago

Any chance .map files can also be supported by this? The problem currently:

  1. The area name that pops up when you enter a room is put in separate folder within the map folder while in PS2 both the area popup and the map objects/textures are in the same .bar file.
  2. All the object model and texture have the same name: BOB. I don't know how to differentiate them just from the header.
AntonioDePau commented 3 years ago

Something for @o0DemonBoy0o to have a look at, I suppose. Although the map files might be similar to IMDs, where the offset for the texture is always the same?

AntonioDePau commented 3 years ago

Any chance .map files can also be supported by this? The problem currently:

  1. The area name that pops up when you enter a room is put in separate folder within the map folder while in PS2 both the area popup and the map objects/textures are in the same .bar file.
  2. All the object model and texture have the same name: BOB. I don't know how to differentiate them just from the header.

@1234567890num can you provide more info please?

1234567890num commented 3 years ago

Game: KH2 Path: map/[filename].map (for example map/hb26.map with area popup at map/us/hb26.map Screenshot: (using SD .map file) portal

o0DemonBoy0o commented 3 years ago

I don't think you need to have HD asset support for your specific issue (just redo the edits with the PC version of the hb26.map) but if support would be added for custom ones then all you would need to do is search for the 0x07 identifier in the BAR header image

The .map (and a lot of other files) use 0x07 as an identifier for texture info. .maps in this case, use TIMs for textures so you would just run the code the same way you do for .mdlx for .map. The main issue i see is that .map has multiple different TIMs for all the BOBs in addition to the main map geometry so a scan for each TIM in a map would need to be done.