logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>

Making Crimson Fields battle maps

Making your own battle maps

Overview

Battle Maps are defined by their text source, .src, files. These have to be 'complied' into a 'level', .lev file, before they can be played using crimson.exe. You can directly edit a .lev using the CoMET map edit utility, which also allows the .lev to be converted back to .src.

Note that the CoMET can't actually open or edit the text .src file. You have to use the cfed.exe tool to do that (see below)
 
All the required tools and the default tiles and units definitions can be found in CF-Units-and-Tiles.zip

Building your own battle Maps

All the Units, Tiles and Maps start as simple text files (the unit and tile icons are simple BMP files). These all have to be 'complied' to make a playable battle map

To 'compile' a map.src to a (playable) .lev you use the cfed command line tool, along with the (combat) Unit and (terrain) Tile definitions files. eg :- cfed {map_name}.src --tiles ..\default.tiles --units ..\default.units (where 'default' is the name of the assembled Unit and Tile definition files, see later),

NOTE: If an 'error' (as opposed to a Warning) is encountered by cfed when compiling the .src, no .lev is generated ! Often the only way to discover what went wrong is to go look for the 'std.err' text file.
 
CoMET will let you edit a .lev in a way that will generate a .src with an error, however CoMET will still let you save the modified .lev (and 'export' to a .src that cfed will not compile).
 
To 'guard against' this, CoMET offers a 'Validate' function (Warnings will compile, Errors won't). The Error list is sufficiently informative that it is often faster to Export to .src anyway and then hand edit the .src to make it 'compilable' by cfed.

The .units and .tiles files are in turn compiled versions of the Unit / Tile definitions file, together with the relevant .bmp icon files. By default, definitions are in the /tools folder, whilst the icons are in the /gfx folder eg:-

If you defined new Units or terrain Tiles, and want to include them in your Map, then you have to compile the definitions and icons before the map can be made
mkunitset my_units.usrc my_units.units {relative path to bmp's} the relative path to bmp's is only needed if the Unit icon files are not in the same folder as the Unit definitions source .usrc file. for example if the bmps are in the /crimson/gfx folder at the same whilst mkunitset.exe and my_units.usrc are in the /crimson/tools folder, then the relative path is '../gfx') mktileset my_tiles.usrc my_tiles.tiles {relative path to bmp's} relative path to bmp's is only needed if the icon files are not in the same folder as the Tile definitions source .tsrc (see above)

Modifying and adding, units and terrain

By modifying the units and terrain tile definitions, you have a huge range of options - indeed, a 'World War 1' terrain and unit set (together with appropriate maps) already exists

You can, in fact, add to the existing units (say to define a dozen or so different 'missile' types) as well as modify existing ones (fix the 'mines' which are simply stationary (or floating) rocks and stop trains moving faster than helicopters)
 
The same applies to the terrain tiles = you can add your own beach and dessert tiles etc. as well as adjusting the movement 'allowances' (eg giving some advantage to using 'dirt tracks' whilst reducing the massive speed advantage of using roads).
 
By modifying the units and terrain definitions you can 'fix' many of CF's 'sillies' (like tanks can't cross barbed wire, but (AA) tanks can climb mountains :-) )

You can 'recompile' the existing maps to use your modified units and terrain definitions and thus change how the game plays without needing to touch one line of C code !

Tweaking how the battle plays

The map.src contains an ASCII 'list' of the units, where they are and the terrain tiles. It also contains a list of the 'Events' for that battle.

CF Events is an extremely powerful system that allows a huge number of 'clever tricks' to be built into a map.
 
Whilst Events is typically just used for assigning reinforcements and 'victory points' (you need 100 to win and Events controls how you gain points - for example 100 for capturing the enemy HQ), it's actually able to 'watch' specific positions on the map and 'take action' (such as swapping one terrain tile - eg a building - for another - eg a destroyed building).
 
Events can 'award' you points for capturing (or holding onto) not just a building but in fact ANY tile - so 'occupy (the 5 tiles of) Stalingrad to win' is quite possible (Events would just award you 20 pts. for each tile one of your units (currently) occupies)

For details on how the Units, Tiles, Maps (and Events) are defined, see my following pages

The pages in this topic are :-

  + CF Units and icons

  + CF Terrain tiles

  + CF Map definitions

  + CF Events - (Map part 2) == Latest changes (modified 8th Jul 2020 03:35.)


Next page :- CF Units and icons

[top]