[SDK] Dale's Combat Mod!

Dale

Mohawk Games Developer
Joined
Mar 14, 2002
Messages
7,584
Dale’s Combat Mod v1.03!
For Vanilla & Warlords!

Civilization. The Grand Strategy Empire Builder. Millions of fans World-wide. Millions of games played, Empires forged, and battles fought. Hang on a second, one versus one combat? In a game of grand strategic depth and complexity there’s a 25-year old concept such as one versus one combat?

WELL NO MORE!

Introducing Dale’s Combat Mod v1.03! Bombard your enemy units, improvements and cities using ranged bombardment, rain terror on the cities and units of your enemies with your cruise missiles and strategic nuclear warheads, play Nuclear Chicken with your super-power rivals with targeted nuke MAD (Mutually Assured Destruction) systems, and last but not least, for the first time in the Civilization series, use full combined arms stack attacking to destroy the armies of your enemies!

12 months in development! Alluded to by Firaxians in interviews before Civ IV’s release! The result of an extended discussion between Soren Johnson, Jon Schafer and a number of stacked combat supporters.

The challenge has been met!

Installation for Vanilla Civ 1.61:

To install and run DCM follow these simple steps:
1. Download the mod from the file database: http://forums.civfanatics.com/downloads.php?do=file&id=2211.
2. Unzip the file to ..\Sid Meiers Civilization 4\Mods\
3. Run Civilization 4 then select Advanced then Load a Mod then Dales Combat Mod.
4. Game will restart to load the new settings. From this point begin a new game as normal.

Installation for Civ4 Warlords:

To install and run DCM follow these simple steps:
1. Download the mod from the file database: http://forums.civfanatics.com/downloads.php?do=file&id=2509.
2. Unzip the file to ..\Sid Meiers Civilization 4\Warlords\Mods\
3. Run Civilization 4: Warlords then select Advanced then Load a Mod then Dales Combat Mod.
4. Game will restart to load the new settings. From this point begin a new game as normal.

Features:

1. Ranged Field Bombardment:
In Civ IV the decision was made to change how bombarding units function. They lost the ability to bombard in the field (or ocean) other units. This rendered bombarding units as attacking units with their ability to cause collateral damage. The combat mod returns bombarding units to a defensive unit with the return of field/ocean/coastal bombardment. Further, bombarding units can bombard units, improvements and cities. With the ranged ability these units can now bombard a number of tiles away. EG: Artillery and battleships can now bombard 2 tiles away. This functionality is possible on any unit with a simple addition to the unit’s XML definition.

2. Missiles:
Missile units are sorely missed in Civ IV. The loss of such units as the V2 rocket, cruise missile and tactical nukes render the possibility of a Cold War impossible. These units make their return in the combat mod. Further, it is now possible to give the missile function (where the unit will be destroyed during combat) to any unit’s XML definition. So kamikaze zero’s are now possible in a World War II Pacific scenario. It is now possible to build cruise missiles and tactical nukes with my mod.

3. MAD System (Mutually Assured Destruction):
During the Cold War the USSR and the USA developed computerised automatic defence systems in case of an enemy Nuclear First Strike. These systems were known as MAD systems. This is now implemented within the combat mod. Simply target your nukes at potential enemy’s cities to begin the standoff. The MAD system will also provide valuable information on incoming targets from the enemy. Rest easy in the knowledge that if a nuke is launched at you, that you’ll take out the bugger as well.

4. Combined Arms Stack Attack:
By far this component of the combat mod is the most ambitious change attempted in Civ IV so far. Taking a mixture of the existing Civ IV un-modded one-on-one combat model and CTP2’s stacked combat model, a new model of combined arms stacks has been created. Now, your entire stack of units will battle an enemy stack of units, working in unison to eliminate the enemy. Your frontline troops will receive automatically air support, artillery support and ranged support. Flankers will automatically attempt to out flank the enemy to strike at their backlines. Fighters on carriers will automatically intercept enemy fighters, defending the fleet and striking at the enemy ships. Artillery will automatically bombard the enemy from the safety of their backlines, while melee troops take the brunt of the fight. Counter-battery fire will occur between archers and bombards. Cavalry will ride around the enemy frontline to harass their catapults. And more! Best of all, this can be easily defined using three XML definitions in the unit’s XML file.

How it works:

1. Ranged Field Bombardment:
The use of the ranged field bombardment component is very simple. When a bombarding unit is selected (eg: artillery or catapult) the unit’s bombarding range is highlighted on the map. If you wish to bombard an adjacent target simply select the bombard icon and click on the target. This will cause bombardment to occur. This will end the unit’s turn.

2. Missiles:
To use the new missile units you need to have the unit selected. Once selected you can choose to either rebase the unit (works the same as normal air units rebase) or to airdrop the missile. To utilise the missile unit you click the airdrop mission and then select your target from the range as highlighted on the map. Note that missile are use once units, and will be destroyed once used.

3. MAD:
Once you acquire some nukes you will begin to receive messages about incoming and outgoing targets. Incoming targets indicates how many nukes of other Civs are targeted at your cities, and outgoing targets indicates how many of your nukes are targeted at other Civs cities. To target a nuke you MUST be at peace with that Civ. With the unit selected click on the Nuke button and then click on the target city. A message will show indicating that a target lock has been attained. Your unit will stay active next turn in case you want to rebase the unit or change the target. Simple fortify the unit if you do not wish to give it any further instructions. Once a unit has a target the target can be changed at any time. Simple select the unit, click on the Nuke button and then click on the target city. The new target will be locked in. If an enemy Civ launches a nuke at you, any nukes you have targeted at their cities will automatically launch in retaliation. In this way you can ensure their destruction if they attempt your destruction. To cancel a nukes target select the nuke, click the Nuke button and then click on the unit itself. This will reset the MAD system and return the nuke to normal functions. Also, if a nuke’s target is lost (EG: the target city is razed or changes owner) then the nuke which is targeted to that city will have the MAD functions reset and it will become active awaiting orders next turn. You can then re-target the nuke or any other nuke function. NOTE: if you are at war with a Civ you can launch a MAD nuke normally at their cities, even though the nuke has a target.

4. Combined Arms Stack Attack:
The combined arms stack attack (CASA) is in force at all times. You do not need to do anything to “use” this function. CASA will be automatically used in every combat. Simply create a stack of units of up to 20 units (plus 10 transported units like fighters making 30 in total for the stack) and attack the enemy stack. Combat will be resolved using CASA. CASA works in the following way:

1. Setup attackers:
a. Missile units perform attacks and explode into the enemy
b. Units arranged in four lines: air, bombard, ranged, melee + flanking
c. Only 20 units possible per line
d. Transported units which can attack (EG: fighters, marines, etc) are included
2. Setup defenders:
a. Units arranged in four lines: air, bombard, ranged, melee + flanking
b. Only 20 units possible per line
c. Transported units which can attack are included
3. Defence phase:
a. Defender air units scramble to dog-fight attacking air units, and if no air units to dog-fight airstrike attackers
b. Defender bombard units pick a target and bombard (preference on counter-battery fire on bombarders)
c. Defender ranged units pick a target and strike (preference on counter-battery fire on ranged)
4. Attack phase:
a. Attacker air units dog-fight defending air units, and if successful they airstrike defenders
b. Attacker bombard units pick a target and bombard (preference on counter-battery fire on bombarders)
c. Attacker ranged units pick a target and strike (preference on counter-battery fire on ranged)
d. Attacker melee and flanking units do battle with defending units

For Mod-makers:

Mod-makers are free to use the altered DLL supplied with this mod-pack, as long as this file, credits and my name are supplied with it.

Source code: http://forums.civfanatics.com/downloads.php?do=file&id=2708

To implement the features of this mod-pack mod-makers are required to:
• Use the MISSION_BOMBARD from the file Civ4MissionInfos.xml
• Use the INTERFACEMODE_BOMBARD from the file Civ4InterfaceModeInfos.xml
• Create UnitClasses for their missile units in Civ4UnitClassInfos.xml
• Add all the required tags to Civ4UnitSchema.xml (10 lines in total)
• Add the required tags to their units in Civ4UnitInfos.xml
• Add this DLL file to their mod (or use the source code to add my code to your DLL)

NOTE:
If adding my code from the source code supplied, you MUST retain all of my comments within the code. All of my code is indicated with a comment beginning with “// Dale” so that is all you need to search the source files for. Take caution with the files referring to Python as comments are not located with the changes, but indicate how to find the changes.

Credits:

Original discussion:
• Dale Kent
• Jon Shafer
• Soren Johnson
• Rob
• Sirian
• Isak
• Solver
• Raccoon
• Kal-El

Design/coding:
• Dale Kent

Special Thanks To:
• Boneys26
• Strategyonly
• Jaybe
• Platypus Rex
• Kinjiru
• All other Beta testers
• CFC
• Apolyton

Thanks everyone!
Dale
 
Plot bombarding coming along nicely.......

 
Dale, you do know I'm already working on ranged artillary right? And that I already have a mod with nukes that can destroy cities?
 
Yep, fully aware. But I need field bombardment setup the way I'm doing it for stacked combat I'm doing. I refer to some of the same functions for modularity. Also, mine is not limited to artillery, but all units with a bombard range (battleships, arty, custom units, etc).

I'm also aware of your MAD Mod, but from what I read you cannot pre-target your nukes as a pre-emptive defense against nuclear attack (the true meaning of MAD). :) With my MAD mod you can set targets for your nukes (and the AI will too) so if you get attacked they automatically launch at their targets in response.

Dale
 
Dale said:
Yep, fully aware. But I need field bombardment setup the way I'm doing it for stacked combat I'm doing. I refer to some of the same functions for modularity. Also, mine is not limited to artillery, but all units with a bombard range (battleships, arty, custom units, etc).
Actually, that is exactly what I am doing, I am forking off of my sniper mod to do just that.

Dale said:
I'm also aware of your MAD Mod, but from what I read you cannot pre-target your nukes as a pre-emptive defense against nuclear attack (the true meaning of MAD). :) With my MAD mod you can set targets for your nukes (and the AI will too) so if you get attacked they automatically launch at their targets in response.
Well, all you needed to do was ask for that functionality and I would have provided it.
 
TheLopez said:
Actually, that is exactly what I am doing, I am forking off of my sniper mod to do just that.

Cool, didn't know as I couldn't find a thread about your mod.

Well, all you needed to do was ask for that functionality and I would have provided it.

No point, I already had that functionality as mine's already running. Just need to make sure it runs in 1.61. :)

Dale
 
Looks like the main difference will be python versus dll in our mods.

Dale
 
Dale said:
Looks like the main difference will be python versus dll in our mods.

Dale

Yep, the problem with releasing it as a DLL only mod is that some people don't know C++ and won't be able to merge it into their mods... hence the python only version.
 
There's pros and cons for both methods, and there's only so much you can do in python. This thread is not for the discussion of it, but of my upcoming mod. :)

Dale
 
Naval bombardment:

 
What is your stacked combat going to look like? Will you manage flankers or fast units the way CtP2 did it or everyone fights everyone else or... what?
 
Will there be any pseudo-simultaneity? You know, like ship & artillery counter-battery fire. One of the problems with a non-simultaneous turn game like Civ is that you can't simulate certain things well, like opportunity fire. SMAC at least artillery duels, to prevent a stack of 10 artilleries from wheeling up on a road, raping a city with opposing artillery without the slightest damage, and moving on.

The most problematic aspect is naval warfare, which lacks true CAP, and decent sub warfare. Yeah, like all planes that happen to be in sleep mode on the carrier when it's attacked aren't going to scramble immediately...
 
Excellent idea. I had some thoughts about stacked combat as well, maybe this will help:

Stacked Combat/Armies
Comparable to the fleet combat feature of GalCiv II. Allow for both human and AI players to group units together into armies in which each unit fights simultaneously, instead of the traditional one-on-one combat system. The goal here is to make combat more tactical and varied.
  • Maximum number of units allowed in an army goes up with logisitics skill, which increases with research and/or wonders
  • Each round of battle, every unit in the army gets one attack on an enemy unit
  • Targets chosen at random (can also implement algorithm here for greatest damage, attack weakest, etc.)
  • Impose rules in certain conditions, such as
    - melee units must deal with each other before being able to hit ranged units
    - catapults do a small amount of collateral damage to all enemy units each round
    - city and fort defenders get +1 army size
    - bonuses against certain units translate to preferred targeting (i.e. cavalry +50% vs. catapults = cavalry more likely to target catapults)
    - etc.
Of course that's just one way to do it... do you have your plans for the combat mechanics fleshed out?
 
Okay, to answer some questions above on how stacked combat will work I present this explanation:

Stacked combat will be implemented in a three phase process. This is to spread the programming load over time while still allowing for betas to get out for testing. Therefore, here is the proposed beta schedule:

Beta 1:
Field Bombardment:
- Full abilities of bombardment in the field / sea.
- Automatic target selection (human can't chose target yet).

True stack attack:
- Full stacking ability
- Sorting of units in stack into ranged/bombarders, flankers and grunts
- Sorting of groups into two rows (ranged/bombarders on backline, rest on frontline)
- Combat resolution similar to CTP2 where front row attacks front row etc

Beta 2:
Field Bombardment:
- Target selection enabled

True stack attack:
- Combat to occur on a virtual tactical map.
- Units will move over the virtual tactical map.
- Formation of units will only be "full frontal attack".

Beta 3:
True stack attack:
- Different formations (spearhead, frontal attack, pincer, "wall of arrows") able to be chosen by both sides.

Stack attack mechanics:
The mechanics of stack attack are actually fairly simple. Both sides will chose a formation. Defender chooses a formation, then attacker chooses a formation. Attacker gains the advantage of reply because defenders are traditionally already formed up and dug in when the attacking army reaches the field. After formations are chosen the virtual tactical map is filled. Units move over this map according to the strategy of the chosen formation (eg: centre charge with a spearhead formation). The defender performs ranged/bombard first, then the attacker performs ranged/bombard. After this the defender performs melee combat followed by the attackers melee combat. Repeat till one side has no units left. The defender earns right of first strike due to the nature of "defense".

So each side gains one advantage: attacker knows defenders formation first, and defender gains first strike in the battle.

Any comments please write. :)

Dale
 
Guessing city walls and forts will force the attacker to storm the walls while under defender fire, or they have to use siege units to bring down the walls before the grunts can do damage?
 
Dale, since you only want discussion about you mod in this thread here are my questions:
1) Will the AI know how to use all of the new features in your mod?

2) Will the features of this mod be configurable? If yes then how configurable?

3) How are you planning to implement your tactical map? Have you figured out a way to effectively load two maps in the same game?

4) Where is the MAD functionality in your planned betas?
 
How will Stacked Attack work in a PBeM or a Hotseat game? Especially if the defender has to choose a formation as the attack is happening? Will the Computer automatically choose a default formation if you do not pre-set one during your turn?

And I certainly hope that MAD only happens if you are attacked with Nuclear Weapons. I had a game that I had blown ahead of the other Civs by crushing the three most advanced Civs. I had Nukes, the most advanced of the remaining three had frigates, I would not want to be launching ICBMs if the stupid AI decided to declare war on me in this case.
 
Gyathaar:

That's correct, as well as the normal defensive bonus.

TheLopez:
1. Yes, fully integrated into the AI.
2. Well I see it a little differently to you. If someone is downloading the mod it's because they want to play with these changes. So it's either an all on or off situation because if they didn't want the changes they wouldn't download it. Besides, there isn't that much configurable. Battle resolution still uses the same method. It's a new process of how its done. :)
3. An array (currently 20*7). I can plug anything into the array that I want (units, plots, etc).
4. I haven't mentioned it, but it will probably appear in beta 3.

Sidewinder00Q:

It won't be able to work in PBEM due to the formation selection, however since both of you are standing there for hotseat shouldn't be a problem. I could set it to chose a default formation but that defeats the purpose of an attacker being able to chose one. As for MAD, it will only occur for nukes.
EG:
Nuke1's target is Paris.
Nuke2's target is Nice.
Nuke3's target is Washington.
France hits you with a nuke and nuke1 and nuke2 automatically fire hitting Paris and Nice. Nuke3 does not launch as its target is not France.

Dale
 
Top Bottom