Dale's Combat Mod (BTS 3.19)

stolenrays

Deity
Joined
Aug 2, 2009
Messages
2,061
Dale's Combat Mod v2.6 for BTS 3.19

I have updated most components of DCM to 3.19. I did this by using the RevDCM source code and merging it with Better BTS AI and using Xenomorph's xml/art files. I have not incorporated Battle Effects. That proved a little trickier to convert, but I may try to incorporate them later with some help.

This Mod combines Dale's combat related Mod Components, such as airbombing missions, stack attack, and ranged bombardment, and the WWII style atomic bomber# All source code is available for this mod, fully commented to easily signify what component code relates to# All components can be easily turned off or on in a single XML file which can be edited in any text editor.

------The Team------
-Stolenrays & Roamty

------Included Components:------
Spoiler :

-Airbomb Missions: The air-bombing missions which featured in the BRS Mod Road to War are now available separately! Bombers can now air-bomb city defenses, city buildings, port air-bomb mission to attempt to sink ships, factories, or factory production.
-Fighter Missions: Fighters can air-bomb city defenses,port-air bomb, hangar airbomb, or participate in fighter engagement missions.
-Ranged Bombardment: Ranged Bombardment allows siege units to bombard in the field# By selecting the bombard icon you can select whether to bombard units only, improvements or cities.
-Combined Arms Stack Attack: Combined Arms Stack Attack allows a full stack of units to engage an enemy stack of units# It replaces the one-on-one combat concept and allows a full stack to work together to eliminate an enemy stack.
-Opportunity Fire: Opportunity Fire allows fortified bombard capable units #such as artillery# to automatically barrage enemy units which close on the position.
-Active Defense: Active Defense allows patrolling fighters to engage enemy troops closing on them. This includes fighters on patrol in any location #city, carrier, etc.
-Attack Support:
-WW2 Atomic Bomber: This unit is a bomber that delivers a WW2 style A-Bomb payload# It has bomber graphics coupled with Nuke graphics

-----Turning components on/off----
Spoiler :

-All components except for Route Bombing are enabled via a Custom Game Option
-Route Bombing is enabled with a Checkbox

-----------Mod-Makers------
Spoiler :

-This Mod is provided for the benefit of the whole community# Please use all/any parts as required, but please give me credit for the work I've done# Thanks to Roamty for testing and fixes and Dacubz request for the Hangar Airbomb Mission#
-A number of new XML tags have been added to certain files, please merge carefully into your own Mods# I suggest using WinMerge to help, as I will only provide "Best Effort" support of merging into your own Mods#
-All source code is included in the folder \C++ Changed\ inside the Mod's folder# I have made comments to help you identify which parts of the code belong to which components:
---New Tags----
Spoiler :
BuildingInfos:
iDCMAirbombMission -Allows and sets odds of air bombing building #should be applied to all new buildings you wish to be bombable#

TechInfos:
bDCMAirBombTech1 -If enabled DCM air bombing chances increased
bDCMAirBombTech2 -If enabled DCM air bombing chances increased

UnitInfos:
iDCMBombRange -If set the unit may bombard tiles up to the range defined
iDCMBombAccuracy -Accuracy of DCM bombarding
bDCMAirBomb1 -Allows fighter support
bDCMAirBomb2 -Allows bombing of buildings
bDCMAirBomb3 -Allows bombing of factories
bDCMAirBomb4 -Allows bombing of port facilities to attach ships directly in cities
bDCMAirBomb5 -Allows bombing #destroying hammers# invested in city's current production
bDCMAirBomb6 -Allows destruction of planes not in intercept mode
bDCMFighterEngage -Allows unit to engage enemy air units directly if in intercept mode

-----Commented Code-----
Spoiler :

// Dale - DCM: DalesCombatMod specific code #not related to any component#
// Dale - AB: Airbombing missions
// Dale - RB: Ranged Bombard
// Dale - SA: CASA, Opportunity Fire, Active Defense
"RevolutionDCM - ranged bombard"
"RevDCM"
"BETTER_BTS_AI_MOD"
"RevolutionDCM start" -->
"Dale -" -->
Dale - AB: Bombing
Hangar Airbomb
Dale - FE: Fighters
Dale - RB: Field Bombard
Dale - RB: Bug Fix
Dale - SA: Opp Fire
Dale - SA: Stack Attack
Dale - NB: A-Bomb

----Version History----
Spoiler :

---v2.6----
-Why does airbombing missions always destroy a building?
-AI for Airbomb Missions Hangar Airbomb, Port Airbomb, Fighter Engagement (from RTW)
-Fix AI for range bombardment
-GLobal Defines for min defenders to range bombard

-----DCM 2.5-------
-Added DCMBombAccuracyChange tag to Promotions.xml #accuracy promoction# from merged mod
-Added Critical hit chance against seas units from merged mod

-----DCM 2.4-------
-Removed uneeded DCM Nukesokay tag
-Removed max attempts SDK Code
-Made Commenting easier by labeling starts
-Modified RevDCM Defines to minimize SDK code
-Removed BBAI Code except getBombardTurns
-Removed uneed BBAI xml/python
-Removed Civ Changer
-Added Concept Text
-Removed uneeded Text entries

-----DCM 2.3-------
-unit alert button, unit specific message for Port/Hangar Airbomb missions#
-RangeBombard Gameoption Fix
-Archer Bombard Mission Code removed
-Unit Destroyed, hidden nationality, barbarian archer code added to rbombard code
-Merged parts from Ranged Bombardment 3.19 by Orion/Dale
-Active Defense Message includes "via Active Defense"
-Opportunity Fire/Range Bombard Message changed to include damage amount/defender/City Attacked
-Airbomb missions trigger plot recon
-Applicable Air Missions can only target visible plots
-Applicable Air missions only target plots with targetable buildings
-population decrease always a random chance on air missions victory/defeat
-Added a RevDCM CTD fix
-Route Bombing checkbox
-Messages need adjectives
-Prereq Tech RADIO & FISSION for Atom Bomber
-translation(later date)
-DCM Promos-later
-bitter winter/obsolete noTarget SDK code removed
-added missing bTarget SDK code

------DCM 2.2------
-Civ Changer is operational
-New Civ Changer Art
-Uneeded XML files Deleted

-----DCM 2.1--------
-Incorporated Roamty's sourcecode fixes
-Incorporated Roamty's XML changes
-Added Route bombing AI from Route AI Bombing Mod v1.1
-Enabled route bombing & no man's land bombing from Route AI Bombing Mod v1.1
-Included Documents for BetterBTSAI & Route Air Bombing
-Range Bombardment message fix from History in the Making-postponed for later
-Custom Game Option-postponed for later

----DCM v2.0-------
-Field bombardment can inflict damage on single units again.
-Hangar Airbomb Mission-Military planes not in intercept mode can be targeted and destroyed #similar to the port airbomb mission.
-Fighter Engagement Mission can ONLY target fighters that are intercepting.
-3 of the mission buttons changed
-Sunk message bug fixed
-Accuracychange xml tag removed from Civ4UnitSchema.xml

-----DCM v1.9-----
-added back in WW2 Style A-Bomb

-----DCM v1.8-----
-Isolated DCM standalone components from RevDCM

-----DCM v1.7-----
-Removed Civ Customizer

-----DCM v1.6-----
-Battle Effect length maxed at 10 turns
-MHP requires Fission
-Various bug fixes
-Port Airbomb ships in forts
-Solver's unofficial patch

----DCM v1.5-----
-Many bug fixes
-Many balance changes
-Been so long I've forgotten all of them

----DCM v1.3-----
-Added Fighter Engagement mission
-Added CASA complete
-Fixed Ranged Bombardment bug
-Fixed Battle Effects bug
-Fixed Nuke Bomber intercept bug

---DCM v1.2------
-Updated Airbomb Missions to 1.3
-Added Archer Bombard
-Added Nuke Bomber Unit
-Fixed Interface mode bug
-Fixed Battle Effect bugs

---DCM v1.1------
-Updated Airbomb Missions to 1.2
-Added Ranged Bombardment
-Added Civ Changer
-Added Combined Arms Stack Attack #beta#
-Added Opportunity Fire
-Added Active Defense

---------DCM v1.0------
-Added Airbomb Missions
-Added Civ Customiser
-Added Battle Effects
-Added required code for DCM Concepts and Status popup

-----Included Mods------
Original DCM 3.17
RevDCM Source Code for DCM only
Better BTS AI 1.01
Route Air Bombing v1.1

SVN Version Download
Download
 

Attachments

  • Civ4ScreenShot0040.JPG
    Civ4ScreenShot0040.JPG
    246.3 KB · Views: 2,292
  • Civ4ScreenShot0042.JPG
    Civ4ScreenShot0042.JPG
    243.9 KB · Views: 1,639
  • Civ4ScreenShot0049.JPG
    Civ4ScreenShot0049.JPG
    196.1 KB · Views: 1,348
  • Civ4ScreenShot0047.JPG
    Civ4ScreenShot0047.JPG
    237.8 KB · Views: 1,245
  • Civ4ScreenShot0045.JPG
    Civ4ScreenShot0045.JPG
    246.4 KB · Views: 1,156
  • Civ4ScreenShot0043.JPG
    Civ4ScreenShot0043.JPG
    246.9 KB · Views: 1,081
  • stackattack.jpg
    stackattack.jpg
    123.9 KB · Views: 1,502
  • DCM AI.JPG
    DCM AI.JPG
    149.8 KB · Views: 708
good mod any chance of adding bug and bull to it

Thanks for the praise.

Well, people have always been asking for only DCM for 3.19 so I wanted to release it as a seperate mod. I think thought that you could probably merge the mods pretty easily. I don't think there is much overlap between the two. I have always had problems merging BUG with everything.

If you want BUG/BULL and DCM 3.19 you could play RevDCM.
 
Now if I can figure out how to merge this with RoM1.03 the Original Rise of Mankind. An alternative RoM for those who prefer Not to play with Revolutions. There are still some of us out here who don't play REV(and probably never will either).

JosEPh :)
 
I've been testing this mod a little today and have some questions about CASA (Combined Arms Stack Attack).

I played around with worldbuildering some test armies to fight each other to test how well CASA functions. Between reloads, I would go into the XML editor and turn off CASA (or turn it back on) and then compare the combat results to the ones I would have gotten from just using Civ4's built-in Stack Attack option (which really just means "have all the units attack piecemeal like they would anyway).

I have some questions and am very confused.

For one thing, when attacking with CASA enabled, I am consistently getting different results when Quick Combat is turned on than I do when it is not turned on.

To be more specific, if both CASA and Quick Combat (Offense) are turned on, the aftermath of the resulting battle is the same as it would be if I did the same battle with CASA turned off, using Civ4's built in Stack Attack feature.

This fact is true even if I have Civ4's own Stack Attack option turned off in the game's options.

This is frustrating because I am always interested in mods that attempt to make warfare more realistic and tactical, which DCM certainly does. I am particularly interested in CASA because it addresses several inherent flaws in Civ4's combat design. But I want to make sure it's actually working properly.

Also, can the AI ever use CASA? Is the combat flow during CASA intelligent enough to make it always more preferable than attacking piecemeal with ideally chosen individual units? I'm curious.

And by the way ...

Thank you very much for isolating and updating this very ambitious and important mod into a form people can use in 3.19! Thank you!
 
Thanks for the comments.

After looking at DCM threads, Dale has said that the AI does use the components.

The CASA+Quick Combat difficulties sound like a compatibility bug. I am not sure how to fix it, but it is something to look at.

Edit: Here is a link for how CASA works. I think that you are going to get different results with fighters and siege weapons in the stack since they will use DCM components.
 
Hey added this to TTT, (thanks to roamty who helped so much:thumbsup:
something that aob86 requested for my mod, is similar to the port bombing, but you can bomb any aircraft in the city, he said it was common during the gulf war and ik the gulf war deifnatly had a lot of planes so i think it would be cool, the chances wouldnt be as high and you couldnt attack units that are patrolling (basically planes that are just sitting in the airport, just bomb the airport :D)
 
Hey added this to TTT, (thanks to roamty who helped so much:thumbsup:
something that aob86 requested for my mod, is similar to the port bombing, but you can bomb any aircraft in the city, he said it was common during the gulf war and ik the gulf war deifnatly had a lot of planes so i think it would be cool, the chances wouldnt be as high and you couldnt attack units that are patrolling (basically planes that are just sitting in the airport, just bomb the airport :D)

Sounds interesting. I'll see what I can do, but may need some sdk help to differentiate the planes on the ground from the intercept planes.
 
Hey added this to TTT, (thanks to roamty who helped so much:thumbsup:
something that aob86 requested for my mod, is similar to the port bombing, but you can bomb any aircraft in the city, he said it was common during the gulf war and ik the gulf war deifnatly had a lot of planes so i think it would be cool, the chances wouldnt be as high and you couldnt attack units that are patrolling (basically planes that are just sitting in the airport, just bomb the airport :D)

I think if I replicate the fighter intercept mission and add this to it, the mission should work as intended.

Code:
		if (DOMAIN_AIR != pInterceptor->getDomainType())
		{
			pInterceptor->setMadeInterception(false);
		}

It should probably give some sort of bonus against those units as well so it is not just a replication of the fighter engagment mission. Does anybody know if you normally get a bonus against those units not patroling?
 
found error in CIV4UnitSchema

iProductonModifier miss spell right spelling is iProductionModifier

and missing iDCMBombAccuracyChange

also in the SDK CvUnit wrong / / unit.cpp right is // unit.cpp
 
Hey added this to TTT, (thanks to roamty who helped so much:thumbsup:
something that aob86 requested for my mod, is similar to the port bombing, but you can bomb any aircraft in the city, he said it was common during the gulf war and ik the gulf war deifnatly had a lot of planes so i think it would be cool, the chances wouldnt be as high and you couldnt attack units that are patrolling (basically planes that are just sitting in the airport, just bomb the airport :D)

So a new mission in DCM would be required to do this. I was experimenting with the CvUnit.cpp code. Does this look right to anyone to hit the planes on the ground?

Code:
				if (GC.getUnitInfo(getUnitType()).getDCMAirBomb6())
				{
					iMis6 = 10;
					iCount = 0;
					pUnit = NULL;
					pUnitNode = pPlot->headUnitNode();
					while (pUnitNode != NULL)			
					{
						pLoopUnit = ::getUnit(pUnitNode->m_data);
						pUnitNode = pPlot->nextUnitNode(pUnitNode);
					
						if (pLoopUnit->getDomainType() == DOMAIN_AIR)
						{
							if (pLoopUnit->getGroup()->getActivityType() == ACTIVITY_INTERCEPT)
							{
								return false;
							}
							iCount++;
						}
					}
					iMis6 *= (iCount * 6);
				}
 
To make this new airbomb mission say called Hangar Airbomb I think it would be best to just replicate the port airbomb mission.

I did that, changed the target DOMAIN from DOMAIN_SEA to DOMAIN_AIR. I've experiemented with the code and can't seem to make it so that only non-intercepting fighters will be hit. In addition, the bombs drop far from the target city similar to if your fighter was intercepted. Thoughts or help are appreciated.
 
found error in CIV4UnitSchema

iProductonModifier miss spell right spelling is iProductionModifier

and missing iDCMBombAccuracyChange

also in the SDK CvUnit wrong / / unit.cpp right is // unit.cpp

Fixed it Roamty. Will upload v2.0 soon.:goodjob:
 
Hey added this to TTT, (thanks to roamty who helped so much:thumbsup:
something that aob86 requested for my mod, is similar to the port bombing, but you can bomb any aircraft in the city, he said it was common during the gulf war and ik the gulf war deifnatly had a lot of planes so i think it would be cool, the chances wouldnt be as high and you couldnt attack units that are patrolling (basically planes that are just sitting in the airport, just bomb the airport :D)

I got your request working. Here is what I did for other moders to see:
Code:
if (pLoopUnit->getGroup()->getActivityType() != ACTIVITY_INTERCEPT)
		{
			if (pLoopUnit->getDomainType() == DOMAIN_AIR)
			{
				iCount++;
			}
		}

Basically it is just the port airbomb mission that has substituted this code string in wherever there is:

Code:
if (pLoopUnit->getDomainType() == DOMAIN_AIR)
			{
				iCount++;
			}

It works perfectly in game. I just probably have to chang the resuting text messages and add some new icons.
 
Top Bottom