Repair, Construction and destruction
Within existing maps, there is no method that permits the 'repair' of the 'destroyed' bridge or roads, nor is there any way to construct roads / rail etc. Further, it is not possible 'destroy' a bridge or rail line, both things that a defender would normally have th option to do.
The essential issue is the whilst Units can be attacked, Terrain Tiles can not. This leaves two approaches :- 1a) To 'repair' or 'build' a bridge etc., a 'block Unit' is placed on the actual bridge Tile (or on Pontoon over water Tiles, at the position where a pontoon bridge could be constructed etc). The 'block Unit' simulates a destroyed bridge or 'normal' water thus making the Tile 'impassible'. The block Unit would have a move of 0 and an icon that 'looks like' a destroyed bridge or water Tile. To prevent the Unit being eliminated by normal 'attack', it would have a defence of 99. Making the blockage Unit of type 'mine' allows it to be 'swept'(picked up) by another unit (eg 'Engineers') with sufficient weight carrying capacity. This allows the Engineer to 'repair' the bridge - by 'sweeping' the block unit, or destroy the Bridge by 'deploying' the block unit. The same applies to pontoon bridge 'construction' (remove the water Unit to reveal the pontoon Terrain Tile below). This has the advantage of allowing everything to be set up using Unit definitions and CoMET. What's more, assuming the max,min and total weight carrying capacity is set correctly, Engineers of either side can 'sweep' and 'deploy' the block units ! 1b) The disadvantage is that Units can't be 'passed through'. So you can't use (for example) Engineers to remove grass icon Units to reveal a road Tile below because, unlike real grass Tiles, the grass Units would form a barrier that couldn't be crossed, not even by air units. In a map with no air units, however, you COULD use Units to represent terrain that can't normally be crossed - eg. rivers or mountains. For example, a sequence of 'mountain' icon Units could be swept (one per turn) to reveal a road or rail Tile underneath. 2) the second method means using [events] This is the only way to 'destroy' an existing Tile (such as a bridge) that allow units to pass across. Using [events], the tiles 'next to' the 'target' Tile position must be 'monitored'. When the Engineer Unit 'arrives' on a 'next to' tile, the 'target' Tile is then 'swapped out' for a 'destroyed' (or 'repaired' etc.) Bridge Tile. Whilst this allows (for example) a road to be built across grassland, it requires one 'event' for every location being 'monitored', so is only really practical when the Engineers etc. can only reach a limited number of places.
To 'destroy' a bridge (or simulate a 'blown bridge'), we just place a 'blockage Unit' (Demolition charge) onto the bridge Tile. So 'blowing the bridge' is just a matter of carrying the 'demolition charge' Unit to the target and 'deploying' or 'unloading' it from the Transporter.
To prevent the enemy simply 'killing' the blockage Unit, it can be given a very high 'armor' value, although in some cases (eg. barriers of various types) allowing the enemy to 'kill'** it to remove the 'barrier' may be exactly what you want **Concrete 'Tank Traps' might be an example of a Unit that should be 'destroyable', however remember than units can't pass through other units and you can't 'kill' your own Units :-)
Normal blocking units
Normal Units being 'transported' must have both sufficient move allowance and terrain permissions to 'unload' into the 'target' Tile. By combining the move and terrain values, the 'demolition charge' Unit can be constrained to a specific 'target' type.
A Bridge 'target' is easy - Bridge Tiles count as both road and shallowwater and have a move 'cost' (4) lower than that of 'normal' shallowwater Tiles (5). So the 'demolition charge' Unit can be set to terrain=shallowwater, move=4, which more or less guarantees it can't be unloaded anywhere else but onto a Bridge
The big problem with 'normal' blocking units is that the only way for the enemy to remove the blockage (i.e. 'repair' the bridge) is to 'kill' the Unit (which is rather 'counter-intuitive'). Luckily, there is one unit type that can be removed by both sides == the 'mine'
Blocking with Mines
A Unit of Type=mine' has the advantage that both sides can 'sweep' mines (with a transported with 'sweeper' capability), so both sides can remove the blockage. Mines also have a move=0 (which stops them being moved around)
To 'deploy' a Mine, the Mine must have terrain permissions for the 'target' Tile (the 'move cost' is ignored). To 'sweep' a Mine, the transporter must both sufficient weight carrying capacity for the Mine and have terrain permissions for the 'target' tile. This means it is possible for transporters to lay mines into Tiles from which they can't sweep them back up.
To 'repair' the Bridge, an Engineer unit (of type 'sweeper', and sufficient weight carrying capacity) then just has to 'pick up' the blockage.
Unique weights can be used to limit which 'sweeper' is 'allowed' to sweep a specific 'blockage'.
Bridges that start the game 'destroyed' can be blocked with Mines that have no terrain permissions at all.
This stops the Engineer unit that 'sweeps' the blockage from 're-using' it to block some other bridge :-) When building the Map, CoMET will complain when it discovers that 'Unit X is walking on invalid terrain', but it builds the .lev map just fine (be warned, however, that cfed will 'abort' a build of that map from it's .src file)
To allow each side to repair some bridges, but not others, means using the 'weights' system
The max/min settings can be used to limit the 'blockages' that can be 'swept' (and thus the Bridges that can be repaired). Any 'Demolition Squad' (with a Mine and sufficient carrying capacity) can destroy the Bridge. But only 'Repair Engineers' (with sweeper capability, and a max/min carrying capacity that includes the target Mine weight) can repair them. If you want one side to repair only the other sides Bridges, then one side gets 'light' mines (that only the other sides 'light sweepers' can lift), whilst that side gets heavy mines (that only the first sides 'heavy sweepers' can lift). Neither sides 'Demolition Squad' get 'sweeper capability' (so they can't just 'pick up' their own light/heavy 'demolition charges') To prevent the enemy simply 'killing' a mine 'blockage' Unit, just set the mine Unit armour=999
To 'construct' a road or railway means 'picking up' a 'mine' Unit with an icon that makes it 'look like' the surrounding normal, but impassible, terrain (mountains, swamp) to reveal the road/rail terrain Tile hiding underneath
Sweepers can only pick up from a 'next door' hex, so construction will proceed at the rate of one hex at a time
This approach is limited to what appears to be 'impassible terrain' (marsh or a mountain range) and to locations well away from the play area i.e. along the map edges (where a 'chain' of 'impassible units' will have minimal impact on game play) because no other unit (not even air units) will be able to cross the pre-positioned 'fake' mountains/swamps etc.
A 'chain' of 'impassible grass' units across the middle of the battle field would have a big impact = remember no unit (including air) can pass through any other unit :-) It is just about possible to 'get away with' one or two impassable 'shallowwater Units' (which are 'hiding' pontoon bridges). However the surrounding terrain must be carefully constructed so that the 'Pontoon Bridging Engineers' (sweeper Unit) can only approach those one or two specific 'shallowwater' hex's where the 'blockage' is waiting to be removed
The [events] system can be used to remove ('destroy') units and swap Tiles. This lets you set up 'watched tiles' and 'detect' the arrival of some specific unit type on that tile (for example a shallowwater Tile where a pontoon bridge could be deployed) and then 'destroy' the pontoon unit and 'swap' the shallowwater tile for a Pontoon Tile.
The drawback is the need for numerous [events]. For each Tile being monitored, 4 [events] will be needed = one pair of 'destroy unit'+ 'replace tile' [events] for each side. However careful Map terrain placement can limit the locations were the 'pontoon transporter' can reach the river / shore thereby making it more manageable
[events] can also be used to 'monitor' (all) existing bridge tiles 'watching' for the arrival of a 'demolition charge' = and, when found, 'destroy' the 'demolition charge Unit' and replace the bridge Tile with a 'destroyed bridge' Tile
This has the advantage of preventing re-use of demolition charges, but again requires large numbers of [events] be set-up To facilitate the building of maps with more than one or two bridges, the entire [events] generation can be automated (see below)
Bridge destruction/repair [events] automation
The Map .src file can be processed using a QBasic script. The [map] section is examined and the positions of each Bridge Tile noted
Water/deepwater:- There are 9 'loading dock' tiles. Shallowwater:- There are 3 road bridges (with co-responding 'destroyed road brides') Tiles, 8 'beach and bridge' tiles (all of which can be replaced with a 'bomb creator') and 3 rail bridges (which lack 'destroyed' version) Streams/rives:- There are 6 road, 6 rail, 6 'dirt track' and 3 'foot' over river bridges. In theory, any of the above could be the 'target' of Demolition Engineers. The 'Tank traps on road' (3 Tiles), 'Tank traps on grass' (6 Tiles), 'barbed wire' (15 Tiles), 'Houses, sheds and runways' (15 tiles) and (finally !) the 'shops' (19 entrances, 7 factory sides) could also be a 'target' for Demolition :-) Indeed, some scenario's may well include woods and mountains as 'targets' for 'Demolition'
'Destruction' just means checking for the appearance of a Unit, type = 'Demolition Charge', then 'destroying' that unit (i.e. the one on the target Tiler), and replacing the Tie with a 'destroyed' Tile
For bridges over shallowwater, if no specific 'destroyed bridge' Tile exists, the shallowwater Tile can be used (for the bridge over beach, the 'pond' tile can be used)
To 'repair' the bridge, [events] just looks for a Unit type='pontoon' to arrive at that location
When 'pontoon' is seen, the target tile is simply replaced with the original one (i.e. whatever was there before it was destroyed)
Automating the building of bridges
'All' the shallowwater tiles can be found in the [map] definition and monitored for the arrival of a pontoon unit
The problem is one of 'choosing' the 'correct' Bridge Tile = there are 3 possible 'directions' (unlike 'repair', when the 'original' tile can simply be 'put back') Rather than 'get clever', the 'solution' I adopted is to define a new 'Pontoon Bridge' Tile that is 'uni-directional' (i.e. can 'join up' at any of it's 6 sides
Next page :- Using Events - (for Bridging etc)