DataExtractor
From DoonLunacy
About
Dune Legacy uses Dune 2's data, but since it's copyrighted, we cannot modify and distribute it ourself.
To circumvent this issue we have an extractor which will extract and adapt the data from a player's own copy of Dune 2.
The extractor is based on sandtools by Joachim Schiele who abandoned this project in 2001, unfortunately it wasn't completed at the time. (but 2006-10-15 it's complete)
You can find latest version of sandtools at http://dune2.de/sandtools/
The Extractor
- Main tools of the extractor:
- unpack - archive extractor for PAK files
- cps2png - cps is a graphic compression for single graphics, converts cps to png
- shp2png - shp is a graphic compression for multiple graphics, convert shp to png
- wsa2png - wsa is a graphic compression for multiple graphics xor'ed to each, converts wsa to png
- icn2bmp - custom icon graphics, convert icn to bmp
- scripts - this folder contains some scripts for using the tools, creating graphics, converting sounds etc. for Dune Legacy deprecated
- Remarks:
- wsa2png is broken, some magic is missing rendering png output files in a non-fubar manner
- icn2bmp is just ripped from the old dune legacy data extractor for windows, written in c++, ported to unix with ugly hacks (it works, though...)
- bash scripts should be using Imagemagick c++ API (magick wand) or similar to make them portable
- palette for graphics gets screwed up after patching things up with Imagemagick, so they won't work properly in game
- for midi we only use an old xmi2mid converter for dos through wine, which doesn't support multiple songs in xmi files - we should look at code for converting the xmi files to midi from the exult project. (should not be a default, fm synth should)
- Missing:
- Seed decoder
- Font converter
New plan
While originally the plan was to extract the data with the extractor and have it modified afterwards, the new goal is to have Dune Legacy read the game data natively from the PAK files and draw custom graphics based on components from it. Not only will this eliminate the need for an extractor, it will make Dune Legacy create it graphics on it's own suited for your resolution, create new buttons, etcetcetc. We also want to have FM Synth playing midi as a default too
Efforts on this will be put into a separate library for handling the data.

