Practical Implementation of Landmines

Smellincoffee

Trekkie At Large
Moderator
Joined
Jun 29, 2003
Messages
7,117
Location
Heart of Dixie
I think I've found a pretty good way to implent landmines in the game. You might be curious as to why the player would need landmines; typically, you don't. But, they can be very useful, and sometimes having units to play with is fun. One practical use is that mines can be deployed on your borders if you want to force limits on the routes the AI can use to invade you.

The way I have incorporated mines into the game is the following. I give them the following stats: 0/20/0. They only have one HP point. Obviously, they're invisible and in my game, are immobile.They are also hidden nationality. I make the mines available with Motorized Transportation. These values make mines as realistic as they can be, in my opinion.
- mines cannot attack and have no means of locomotion. They can however serve as a deterrent and prevent civs from occupying certain styles.
- the use of mines will be frowned on by the other civilizations (because of the hidden nationality), which is realistic given how much trouble undetonated mines cause in the real world.
- the mine's negative-2 HP means that while it is possible to destroy units that accidently "attack" it, it will most likely be destroyed. It only has one HP, so the damage it inflicts before being destroyed is realistic: while an infantry regiment may be completely wiped out, a tank unit will survive more or less intact. Artillery can be used to destroy the "minefield".

I mark the mines as immobile in the interests of realism: they have to be deployed in some way. I use mines in my modified version of the game, and this version of the game has combat engineer units. Engineer units have a transport capacity of one: I use the engineers to "deploy" the mines by unloading them onto tiles. The mines are produced in cities but are stuck there until they are "loaded" into engineering units. The engineers can deploy them wherever they're needed. (You can add a transport capacity of 1 to workers if you want to limit the amount of new units in your game.)

I only know of two problems with this system. The first is that the AI isn't very savvy. They can't grasp the idea of using Marines, let alone this. They can however build the mines to defend their city; take that as you will. The second problem is that if the mine survives the "battle", it may gain experience and gain HPs -- which is a fairly asinine idea. This is especially true if the mine was produced in a city with a barracks, which gives the mine two hps and thereby doubles the chances that the mine will "survive". The player can just disband the unit if s/he doesn't want to "cheat".

The fact that the landmines can share the same tile with other units is also pretty silly, but it's a trifling matter. The "invisible" tag keeps the AI from attacking the mines (seeing that the AI enjoys attacking hidden nationality units) on purpose.
 
It's a very interesting hypothesis; there is only one other flaw. I was able to observe landmines under most of your conditions in EFZI2, and the 'invisible' tag offers only marginal deterrance to the A.I. when seeking targets. If a mine lies in a unit's path, the computer will not learn to avoid the square; it will keep sending units blundering into the mine until they get through or are met by a visible unit.

Apart from that, it's a great idea! :)
 
The landmines in EFZI2 are capable of being airdropped to the preferred position, which, if the AI uses it, might be better than the combat engineer method which the AI will not use since it is a land transport.

to try and solve the "promotion" problem, try giving the landmines something like -5 HP. i havent tried this, but i have a feeling that might stop the landmine gaining an HP after victory

EDIT: as for units sharing the same tile as landmines, the army might know where they put the mines, so are able to avoid them during manoevures :)
 
to try and solve the "promotion" problem, try giving the landmines something like -5 HP. i havent tried this, but i have a feeling that might stop the landmine gaining an HP after victory
You're right, having a minus 4 (or more) HP bonus will solve this problem. :)
 
The landmines in EFZI2 are capable of being airdropped to the preferred position, which, if the AI uses it, might be better than the combat engineer method which the AI will not use since it is a land transport.

to try and solve the "promotion" problem, try giving the landmines something like -5 HP. i havent tried this, but i have a feeling that might stop the landmine gaining an HP after victory

EDIT: as for units sharing the same tile as landmines, the army might know where they put the mines, so are able to avoid them during manoevures :)



I hadn't thought of the airdrop ability: thanks for mentioning that. Has anyone ever tried a unit in combat that didn't have any hit points? I'm thinking of using -3 HP.
 
I'm pretty sure having -5 HP would just would just have the affect of reducing it to 1 and keeping it there even if it got elited.
 
If you gave it one attack and move, while keeping the immobile, invisible, and hidden nat. flags, you might be able to set the AI strat. flag to offense and let 'em airdrop 'em (airdrop anim' could be a mine getting burined or being activated or something). I don't know how the AI would handle this, but they might use it to try and 'attack' oncoming units, and since the landmine can't move, they'd only defend where they're dropped. Also, a high defensive bombard and very low hp/def value solves the promotion problem. No real chance of survival, but still inflicts damage. Just some thoughts; I toyed around with mines, and it doesn't seem like the AI ever gets the point, so I'm not sure how useful they can be.
 
I only know of two problems with this system. The first is that the AI isn't very savvy. They can't grasp the idea of using Marines, let alone this. They can however build the mines to defend their city; take that as you will. The second problem is that if the mine survives the "battle", it may gain experience and gain HPs -- which is a fairly asinine idea. This is especially true if the mine was produced in a city with a barracks, which gives the mine two hps and thereby doubles the chances that the mine will "survive". The player can just disband the unit if s/he doesn't want to "cheat".

Ah just pretend the engineers went out and replaced the mines and rigged some good booby traps to them:p
 
I had an immobile cannon in my game once. High def, low att, high bombard, high rof, long bomb range, airdrop, lethal land/sea, zoc, bomb effects, AI strats off and arty, and of course immobile. The AI did actually use it; when I got into a war with them, they airdropped a few on to the edge of my continent and start their barage. With 0 bomb range and a few tweaks (invisible, hid nat) that might make a fairly usable mine unit. Since it would have the same stats as the above, but with no bomb range, the AI'd probably (being as dull as they are) airdrop 'em into your territory with the hopes of bombarding you, and then they just sit there. You would never know... Neither would they, in the reverse. Just some thoughts.
 
Remember that defensive bombardment only works when another unit in the same tile is being attacked, so if a mine is alone it won't use defensive bombardment.



A few ideas... I don't remember if or how I tested the AI with these. Both are immobile, airdropped, and invisible.

Active mines: 0 def, HN, high bombardment, 0 range, bombard ability, cruise missile (optional). Enemy units can enter the mined tile (0 def/HN "bug"), then mine bombards (via bombard order) and is destroyed (if cruise missile). IIRC the cruise missile ability means no defensive bombardment (?). If not a cruise missile, may be used multiple times, and any units entering the tile may be bombarded (even friendly units may not know where the mines are).

Passive mines: high attack, low def, low HP, high defensive bombardment, ZOC. Can be placed with friendly units as an extra defense. Friendly units know where the mines are and thus navigate around them unharmed, while hostile units may be harmed by defensive bombardment when attacking or ZOC when maneuvering nearby. If the tile is undefended hostiles may clear the minefield with minimal damage.
 
Hidden Nationality is what Barbarians have and we all know hw the AI goes straight after them. IF Hidden Nationality is used, the AI will directly attack the Mines as they do Barbarians.

The AI will use Mines effectively if set with Immobile, Airdrop, Invisible and Foot Unit. Use high Attack and adjust the Defense according to the general strength of units in your game. The Foot Unit Setting allows Mines to be carried in Transports and placed as well as Retrieved.
...The Immobile setting will prevent the Mines from Moving around as well as prevent them as a foot unit from capturing a city, lol.
... Use a Low Cost setting and Flag Attack and Defense for the AI. Flag Requires support or the AI Will Build far too many of them. The AI Will Keep some inside buildings as Defense but use Airdrop to place them to Terrain Squares.
...as for the Mines gaining hit points or "winning in battle", the settings for Defense must be adjusted by testing to limit this in your game and even when a mine does Kill a unit and gain a hit point, this just represents many mines on the Square just as all units do.
...I made a Parachute and Sound for the Land Mines that work well and just finished a couple of new Explosions for the Mines for EFZI2.
 
Back
Top Bottom