LHCGreg / DFOToolBox

Libraries and tools for working with Dungeon Fighter Online's data files
Apache License 2.0
20 stars 10 forks source link

Mass dumping of NPK contents #29

Open TeoTwawki opened 8 years ago

TeoTwawki commented 8 years ago

Is this already possible, say by command line? If not consider this a feature request.

See I'd like to dump the old Nexon client and the new client, and compare. Before I can do that I have to actually be able to dump them to separate folders.

LHCGreg commented 8 years ago

No, no tool to mass dump currently. If you can program in C# you can make one yourself easily enough using the DFO.Npk library. If your end goal is compare the presence of images (but not their content), there is the npkdiff tool that is bundled with DFOToolBox, which will give you output like

+sprite/character/knight/equipment/avatar/cap/kn_cap0400a.img (201): sprite_character_knight_equipment_avatar_cap.NPK
+sprite/character/swordman/atequipment/avatar/cap/sg_cap3900a.img (222): sprite_character_swordman_atequipment_avatar_cap.NPK
+sprite/character/swordman/atequipment/avatar/cap/sg_cap3900a_mask1.img (222): sprite_character_swordman_atequipment_avatar_cap.NPK
+sprite/character/thief/equipment/avatar/belt/th_belt9100c.img (176): sprite_character_thief_equipment_avatar_belt.NPK

However, I am not certain if the DFOToolBox code will work with NPKs from the Nexon era. There are two NPK formats, an old one and a new one, and DFOToolbox only supports the newer one that is currently in use by DFO Global. I do not know which format was in use at the end of Nexon DFO, although I do know that the old format was in use circa 2010.

TeoTwawki commented 8 years ago

Drat. I probably will have to write something for the old client format then (I have some documentation for it, I think).

Is mass exaction a thing you are interested in for the toolbox? I dunno if I can pull it off in C# though. I have some learning to do for that lang.

I'm accustomed to simply ripping everything at once when I start to tear into a games client. Usually starting with its dialog trees and event chains but this time I wasn't looking to reverse engineer instead I was actually just planning to nab whatever sprite images the older client had that the new one does not (we are missing so many avatar packs ya'know, unsure how many from the old Nexon client actually exist in today's KDNF/CDNF/DFOG).

LHCGreg commented 8 years ago

Mass extraction is not something I'm personally interested, and this is the first I've heard of someone wanting to dump everything. If you dumped every frame in every NPK, that would be a crapton of files. In the "all in one" patch, over 21,000 .img files were added or changed, and each of those has multiple frames. I'm too lazy to get a count now but there's probably over a million frames in the image packs.