Witchaven/Modding Tips

From ModdingWiki
Jump to navigation Jump to search

Map Editing

Ideally, use a version of the BUILD editor that works directly with version 6 of the .MAP format. Having the Witchaven NAMES.H is also helpful as it will label tiles with special properties according to their given name in the source code.

Format Conversion

If it is desired to use version 7 .MAP tools for Witchaven, the following are needed:

  • A BUILD v7 editor. The one from Witchaven II will work fine. Mapster probably or other third party tools might also work. You need the TABLES.DAT that goes with it as well.
  • The utilities CONVMAP7 and BACKMAP6.
  • PALETTE.DAT and LOOKUP.DAT of Witchaven's palette in BUILD version 7 format. The utility TRANSPAL should be able to convert these. Using the ones from Witchaven II is possible but not recommended as a few of the palette swaps are different.
  • The Witchaven .ART files, and if editing or examining them is desired, the .MAP files run through CONVMAP7.
  • Optionally, the Witchaven NAMES.H which will let BUILD display special names for those tiles that have them (usually sprites which have special functions when placed.)

Once the above items have been gathered in a folder (NOT your main Witchaven folder, as the converted files may impair running the game), editing may proceed as usual. To edit the map, it must be in version 7 format, and to run it in Witchaven, it must be version 6. Swapping between the two is achieved through CONVMAP7 and BACKMAP6. One important note: slopes should be avoided, they may work poorly or not at all in version 6 of the engine.

Music and Sound

In Witchaven, the FM and wavetable versions of the soundtrack are both lumped together in a single SONGS file in JOESND format. It is necessary to insert them in the correct file slots for them to play in the correct sound card mode. The music is in HMP format, version 2 (HMIMIDIP013195).

Sound effects from JOESND are stored as raw PCM. The correct settings to use when loading them in an audio program are unsigned 8 bit PCM, mono, and 11025 sample rate. (In Audacity, this can be done with the menu option Import > Raw Data). In both Witchaven and Witchaven II's source code, the file SNDMOD.H attaches names to the sound index numbers. They are unnamed in the archives themselves; JOESND format does not store file names.

GRP files

There is some support for placing the MAP and ART files in a GRP archive under the filename STUFF.DAT. GRP utilities for Duke Nukem 3D can work with these. However, there are apparently some issues with reading the palette files out of STUFF.DAT. It's possible that this was an incomplete feature in the versions of BUILD used in these games.