bigianb / bgda-explorer

Code written to try and figure out the data files used in Baldur's Gate Dark Alliance for the PS2
10 stars 6 forks source link

Feature request: be able to import/edit textures/models etc. #5

Closed mkavidas closed 3 years ago

mkavidas commented 5 years ago

I was wondering if it is possible to export textures from the game, modify them, then import them back in. This would be so cool.

Let me know what you think.

bigianb commented 5 years ago

Apologies for the late reply - I missed this when you entered it. I agree it would be cool and was one of my first reasons for looking into the data. It's really quite a difficult thing to do though because the data is stored in native PS2 format and some tables hold sector references to the file in the ISO. So whilst it is possible, it would involve rebuilding the entire ISO properly which is a lot of work.

BryceBarbara commented 3 years ago

PCSX2 allows you to boot raw ELF files. My assumption is that you could extract the ISO into a folder and run that. Would that make modding easier?

bigianb commented 3 years ago

PCSX2 allows you to boot raw ELF files. My assumption is that you could extract the ISO into a folder and run that. Would that make modding easier?

Pretty sure that would not work because the code reads the iso table and then reads the texture files by sector. You would also still need to swizzle the textures and pack them into the correct lmp too.

John-Barleycorn commented 3 years ago

I don't know if i should ask here or open a new thread, but i would like to know of someone has extracted models from champions of norrath. I did (using this program) and aside a small issue with some faces it works perfectly. But i can't find where the characters equipment is stored. Someone happens to know?

bigianb commented 3 years ago

The main targets have been BGDA I and Return to Arms ... but Justice league heroes, Champions of Norrath and BGDA II should also work. Objects live in Armor.yak (https://github.com/bigianb/bgda-explorer/wiki/Armoryak) in BGDA. The WorldExplorer can view the yak file.

John-Barleycorn commented 3 years ago

There's armor.yak inside dark alliance data, but not inside champions of norrath.. The only file with characters bodies and basic armor is inside select.vif, although it's just the appearance you see when you chose your character. Then there's a file called equipmnt.lmp where there's some weapons and misc objects, and then there's eqchache.dat, where i suspect it could be the other equipment, but it can't be opened it seems.

bigianb commented 3 years ago

yes the champions games have eqcache.dat/.hdr and wcache.dat/.hdr files. I'll dig into them and see what I can find.

John-Barleycorn commented 3 years ago

Thank you. Ah, by the way, a friend of mine told me that your program can extract also models & textures from a game known as "Bard's tale" (or something like that) i've never played with it though, so i don't know more.

bigianb commented 3 years ago

I don't know about bards tale. I think it uses the same engine so you may be lucky.

bigianb commented 3 years ago

@John-Barleycorn The 0.0.6 release supports the viewing of the .HDR (and associated .DAT) cache files in Champions. I've only tested with Return to Arms but I guess it should also work in the first Champions of Norrath.

I'm closing the issue now because the original request is out of scope .. i..e. it's really difficult to support game modding with BG. Someone may be able to do it using the info in this project but it won't be me :)