Yeah, templates would have been nice, or, even better, if the standard stuff in the game had been implemented through the modding interface (with human-readable text file definitions for all the game contents). Alas, this isn't the case. Still, there's a fairly decent number of good mods published, for you to study.
As for your questions, I think the modding manual makes it fairly clear what's moddable and what's not.
- Chapter 3 is on GUI modding (i.e. the visual appearance of boxes and text etc.).
- Chapter 4 is on the modding of "weapons" (i.e. attack types, including combat summoning as well as defensive actions in combat).
- Chapter 5 is on the modding of "monsters" (i.e. any types of creatures in the game, including humans).
- Chapter 6 is on the modding of classes (or "factions").
That's it.
So, no, no modding of terrain, unfortunately. (This really would have been nice.) And none of music. As for sound effects, you can change an attack sound ("weapon" sound) to some other, existing sound (see weapon modding), but you can't edit those sounds or add new ones.
This said, it's probably not entirely impossible to change the music (and sound effects) or perhaps at some point even the graphics for terrain
anyway. Looking back at the earliest modding discussions on Desura, it seems that the very first mods where created before there was a modding interface. They were made simply by replacing certain data files in the game's data directory. Standard targa image files are used for GUI graphics, so people could create images of their own, with the same metrics, and have them replace the default ones provided with the game.
Background of Terrain TilesFor the
background of terrain tiles, standard targa images are also used. There is a file
water.tga for the sea,
mapgrass.tga for land tiles, and a file
mapgrasswin.tga for land tiles in winter. So these would be pretty easy to replace. (In fact, I believe someone posted replacements that he found made it easier for colorblind people to see things on the map.)
Terrain FeaturesTerrain features like farms and castles etc. are however stored in the non-standard
trs format, special to Illwinter games. Specifically, you can find them in the file
terrain.trs, except that decorations like trees, bushes, grass, mushrooms, cacti etc. are found in the file
tree.trs. (By the way, all the sprites for the creatures in the game are also found in a trs file:
monster.trs.)
Extracting images from a trs file is possible with a
python script by _noblesse_oblige_. (In order to download the script from the GitHub page, right click on
Raw and select
Download Linked File As...; if you are on Linux you must then also set the script file to be executable, of course. As for how to use it, see notes below.*)
Re-inserting edited images in the trs file will be more problematic, unfortunately, as nobody has at this point published any corresponding script or program for this task.
MusicMusic is found in twelve files,
tune1.al2 – tune12.al2. Tune1 is the intro music, tune12 is the end music, tune10 and tune11 are battle music, and the rest are, I
think, basically divided by seasons. (spring: 2&3, summer: 4&5, autumn: 6&7, winter: 8&9.) Except that tune4 seems to be always played when you start the game, even if you do it from a save file from some season other than summer. (This is based on rather superficial tests of mine, so I may be wrong about some of it.)
Replacing these 12 music files with other files should be doable – the one complication perhaps being the sound file format. It
seems to me, though, that they are A-law compressed 44100 Hz 8-bit
mono files (
raw, i.e. without any file header) – even if the "2" in the file name extension "la2" might imply stereo. You can use for instance
SoX (or Audacity) to produce such files. (So this should at least be easier than changing terrain features.)
Sound EffectsSound effects are stored in a plethora of formats. Some seem to be standard
wav files and are obviously easy to replace. Many have the file name extension "smp", but in reality, just like the music files, seem to be A-law compressed 8-bit mono files without file header. The difference is, their sample rate seems to be only 11025 Hz. Finally some are
sw files, where sw stands for signed word. These, if I'm not mistaken, are uncompressed signed 16-bit mono samples (Little-Endian) at 22050 Hz (again without file header). Like with the music files, SoX should be able to do any conversion needed to and from these formats.
* The script by _noblesse_oblige_ needs Python 3, so if you don't have that on your system, you need to install it first. You also need PIL (the Python Imaging Library) for Python 3. Then you can call the script from a command line window, something like this:
python3 dump-trs-data terrain.trs -o some_directory_for_the_sprites
(assuming you first navigated into the directory where terrain.trs is).
This will give the sprites as uncompressed targa images without any alpha channel, with black for transparent areas and magenta for shadows (RGB 248,0,248, though 255,0,255 will also work; This magenta will become half transparent black in the game; alpha = 128.) Also, RGB 240,0,248: smoke origin (e.g. in farms and hamlets). RGB 232,0,248: fire origin (e.g. in brigand lair).
There is when writing this a
discussion on this script to be read on Desura. (That site may go down any time though.)