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

Fixing issues (Map, Unit and Tile changes) for my -x3 maps

The x3 maps

What can be changed (without modifying the crimson.exe source code)

On my previous Annoyances and issues page, I listed quite a few things I found 'too unrealistic' in CF. In the next few pages I detail how I went about 'fixing' things more to my liking (by all means 'fix' things to your own liking :-) )

Some things are 'easy to fix', others somewhat harder - so, in order of difficulty / complexity :-

Using the 'easy' 3 steps below (to build my -x3 map set)

If you just want to play my 'modified' x3 Map set (and skip the rest of this section), you can Right click and 'Save link as' to download steves-x3en-Map-set.zip

It should be obvious where everything goes, if not, just look in the READ-ME.txt :-)

1) Using CoMET

The CoMET tool allows you to 'open' an existing Map and make simple changes. You can :-

Manually change the existing Map terrain, one tile at a time.
 
Delete, Add and Modify (change a Units 'strength' (from the default 6) or 'Experience' level (from the default 0)) the combat units on the Map.
 
Delete, Add and Modify buildings on the Map - names, contents (including 'crystal' replenishment rates) and add/remove 'factory' capability and set the unit types that a Factory may build.
 
Add or Modify some of the 'messages' = it's easy to add or change Building names (including the 'battle Map name' used by CF in it's 'select battle' menu).
 
With some difficulty, it is just about possible to modify multi-line messages. Deleting a message will likely upset all other use of messages.
 
Add, Modify or Delete 'Events', especially to modify victory conditions
 
Events can be used on individual Units or Terrain, however this is hard to do via the CoMET event GUI
 
Create 'entrance-less buildings' to add 'extra units' (or to build reinforcements) for a 'human handicap' (since only the AI player can access them)

CoMET will always build a playable .lev and Export to a .src, HOWEVER if the .src contains 'Errors' cfed will refuse to compile it (it's OK with Warnings) = in CoMET use the Project / Validate to check for Errors before you Export

One such error is the 'shop without entrance' (see above re: human handicap)

Repair and resources

One of the easiest annoyance to fix is that most Maps contain 'neutral' buildings (typically 'Depots') that are worth taking to grab the contents (which typically then give you an overwhelming advantage over the enemy) but have so few resources (and a zero replenishment rate) that after Repairing 2 or 3 units the building becomes worthless (and not even worth defending)

So, one of the first things I did was to open each of all the existing Maps and modify all the buildings.
 
First I cut down the 'neutral' contents (so capturing the building no longer leads to such an overwhelming advantage) and next adjusted each and every building so they get a crystal 'generation' rate of at least 2-3 per turn.
 
This makes the building 'worth capturing and holding'.
 
I then saved each modified Map as both a .lev (so I could play test' it) and a .src (so I could hand-edit the Map further, see below)

2) By hand-edit of the Map .src

The Map 'source' (.src) is a simple text file. CoMET can be used to 'save as' any Map (.lev) to a .src. This can be opened and modified by any text editor. You then have to 'recompile' the .src back to a .lev file in order to 'play' the Map.

The problem is that CoMET can't open a .src file. To 'recompile' the .src (to a playable .lev), you must use the cfed tool (note == this needs access to the compiled Units and Tiles files == see later).

Hand edit of the Map .src text allows you to :-

Add / Modify multi-line 'messages'
 
Globally replace one Terrain type for another
 
Globally replace one Unit type for another
 
Expand the Map width (to the right) and Map height (actually, the 'depth'), by adding additional tiles to the right and bottom of the play area
 
Adding to the right and bottom has no effect on the existing 'co-ordinates' i.e. the Unit and building deployment positions remain the same. To expand the Map to the left or top means you have to adjust the 'map co-ordinates' of every existing Unit and building
 
Modify and add 'events' (events are so powerful I dedicate a separate page to them = see Using Events for Bridging)

3) By edit of the Unit and Tile definitions

You can modify the Terrain Tile and Unit 'definitions' files, .usrc and tsrc.

After making changes, you have to 'recompile' the units and tiles (using the 'make units' and 'make tiles' tools)

You then have to recompile all the Maps (using the cfed tool, mentioned above)

For more details, see the rest of this topic, starting with Units and Tiles definition fixes, the Next>> page

The Units (.usrc) and Tiles (.tsrc) files are simple text files.

NOTE that Maps reference (link to) Units 'by name' (so watch out if you change a Unit name :-) ) and reference (link to) Tiles by their definition order (so don't move the existing Tile defs :-) )

Each Terrain Tile is defined as one or more 'types' - and each (ground, ship) Unit has a list of the 'types' it is 'allowed' to enter.

So it's easy to fix things like boats 'not allowed' under bridges (by adding shallowwater' to the bridge definition), and 'AA Tanks allowed up mountains' (by removing 'mountains' as an allowed terrain type in the AA Tank definition)).

Types are:- water, trenches, swamp, shop, shallowwater, rough, road, restricted, rails, plains, mountains, forest, deepwater.
 
Each Tile has a 'cost to enter' - and each Unit a 'movement allowance' (so you can fix things like 'dirt tracks = same speed as cross-country' and 'tanks on road move faster than helicopters')
 
Each Unit is defined as a 'type' (ground, ship, air) and may have an 'attack' value against each of these types.
 
Each Unit can also have one or more 'special function' ('medic', 'transporter', 'sweeper' or the ability to capture buildings)
 
Each Unit must have a 'defense' (armour) value of 1 or more (which applies when it's attacked by anything) a defense of 0 will crash CF when it come to combat
 
Each Tile can modify (add to, or subtract from) the 'attack' and 'defense' strength of a unit attacking from, or defending in, that Tile.
 
A Tile can be defined as a 'shop' (entrance)

To rebuild the 'compiled' versions, use the mkunitset/mktileset tool, for example :-

mkunitset default.usrc default.units {(path to bmp's} Note that the {path to bmp's} parameter is only needed if the icon files are not in the same folder as the source)

4) By creating new Units and Tiles (new artwork and definitions)

Step 4 is the biggie. It's modifying and adding to the Unit and Tile artwork. This allowed me to create totally new tiles and new units - and even totally new Maps (see my WW2 'scenario' Maps section pages)

The .bmp files are easy enough to modify, HOWEVER there are a few things to 'watch out for' :-
 
New unit icon artwork (bmp's) should be added in 'sets' of 4 (because CoMET shows units in rows of 4 and will 'wrap around' unless you stick to complete rows). You don't have to 'reference' every bmp and you can define 1,2 or 3 'blank' icons as 'space-holders' (to pad out to the 4 set).
 
In the definitions (.usrc, .tsrc) file, when referencing unit and tile bmp icons, remember these are counted from '0'.
 
Maps link to Units by their name (so change a name in .usrc, change all occurrences in all Map source files).
 
Maps link to Tiles by their 'ID number' = a sequential count of their entry in .tsrc. This is the same as the tile display order (in CoMET) - so change the order (to get a better display sequence) or add a tile and the 'knock-on' effects can result in the need to make massive changes to the ID codes in every Map source file [map-raw] battlefield definition.
 
As a rule, you should fill in the 'undefined' slots first, then add to the end of the bmp file. At all costs try to avoid inserting a tile into the middle of the file (it's better to swap out one tile for another to 'make room').

For more details, see my next Topic, New Maps, Units and Tiles

The next two pages (rest of this topic) just contain details of the changes I made using the first 3 steps above. If you just want to play my 'modified' x3 Map set (and skip the rest of this section), you can Right click and 'Save link as' to download steves-x3en-Map-set.zip.

It should be obvious where everything goes, if not, just look in the READ_ME.txt :-)

The pages in this topic are :-

  + Unit and Tile definitions file fix

  + Unit and Terrain - (tips and tricks) == Latest changes (modified 2nd Jan 2018 17:10.)

  + Building my x3 maps

  + The actual map fixes - (whats changed in x3)


Next page :- Unit and Tile definitions file fix

[top]