View Full Version : [WARLORDS 2.08] Ranged Bombardment


Dale
Dec 27, 2006, 03:40 PM
Ranged Bombardment for Warlords 2.08!

The most popular component of my full combat mod is now converted to WL 2.08 and available seperately from the rest.

File: http://forums.civfanatics.com/downloads.php?do=file&id=3863

To those new to this component, a brief explanation:
Siege units and some naval units now have a ranged bombardment ability that replaces the old bombard method. They can bombard tiles adjacent to them to attack units, cities or tile improvements. Simply select the unit, select bombard, then select the tile to bombard. In this way, siege units do not need to frontal attack to be useful. :)

Units with ranged bombardment abilities and their range:
- Catapults: 1
- Treb: 1
- Cannon: 1
- Artillery: 2
- Frigate: 1
- Ironclad: 1
- Battleship: 2

Everyone enjoy! :)

Dale

Thorn
Dec 27, 2006, 05:11 PM
:D Woo hoo!
I've been playing Alpha Centauri and I miss the bombard feature in Civ 4. Thanks Dale!!!

Exel
Dec 30, 2006, 05:06 AM
As DCM does not work with 2.08 Warlords, I tried installing this while waiting an update to the whole mod. However I couldn't get it to work. How do I install this correctly?

OrionVeteran
Dec 30, 2006, 04:41 PM
Hey Exel,

I was able to get the Mod to work by doing the following:


1. Create a folder:

C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Warlords\Mods\Ranged Bombardment

2. The Mod files from the zip file go under the Ranged Bombardment folder.

3. Clear the cache by deleting all files in the following foilder:

C:\Documents and Settings\John\Application Data\My Games\Warlords\cache

Create a new game and I’m sure it will work. :king:

V/R,


Orion Veteran :cool:

Roamty
Jan 01, 2007, 12:07 AM
Do you have to change the CvGameCoreDll.dll and CiV4unitInfos to add more units to your list. I like to see Tanks and Destroyer. I don't know how to work with the CvGameCoreDLL.dll. Think about it Tanks don't allways go head to head.

Dale
Jan 01, 2007, 02:33 AM
Just change it in Civ4UnitInfos.xml (add the "iDCMBombRange" line). See artillery for example (bottom line of xml for arty).

No need to change anything in the DLL. :)

Dale

BomberEscort
Jan 02, 2007, 03:03 PM
Dale,

Love the Mod!!! Is it possible to have the iDCMBombRange value set to 0 and function like default CivIV? If I leave the iDCMBombRange tag off or set it to zero it doesn't allow me to do any bombardment including reducing defenses. Thanks for any help!

adamamri
Jan 03, 2007, 03:11 AM
yesssss!!! thanks you very much

Dale
Jan 03, 2007, 06:01 AM
Dale,

Love the Mod!!! Is it possible to have the iDCMBombRange value set to 0 and function like default CivIV? If I leave the iDCMBombRange tag off or set it to zero it doesn't allow me to do any bombardment including reducing defenses. Thanks for any help!

Sorry mate, I just tested it and it won't work like that. I might have time to fix it up in 6 months. ;)

Dale

Gunner
Jan 04, 2007, 05:45 PM
Dale,

Love the Mod!!! Is it possible to have the iDCMBombRange value set to 0 and function like default CivIV? If I leave the iDCMBombRange tag off or set it to zero it doesn't allow me to do any bombardment including reducing defenses. Thanks for any help!
As I said a couple of months ago, I would also be extremely appreciative if you managed to get this implemented. It would really give a lot more flexibility to people (like me) who want to use the DCM Bombard mechanic to represent other concepts.

Exel
Jan 09, 2007, 07:56 AM
Dale, are you still working with the Bombardment AI? At least with just this ModComp (haven't got around to using the full mod yet, due to the patch issue) it still only uses the artillery to reducing city defences, after which it assaults head-on with any and every arty unit. It doesn't use the ranged attack to cause collateral damage. It'd be nice if you could fix this so it wouldn't give the human player such an advantage. Otherwise the bombardment (including naval :goodjob: ) works fine and solid.

OrionVeteran
Jan 14, 2007, 08:29 AM
Dale,

I have played a couple of games with your Ranged Bombardment mod and it plays nicely. :goodjob: The only improvements I can recommend are the ideas first stated by Roamty: Please add the following new units:

1. Destroyer - Bombardment Range 1
2. Tank - Bombardment Range 1
3. Modern Armor - Bombardment Range 2

The is one additional unit that I would like to see added to CIV4 Warlords:

4. The Privateer - Bombardment Range 1

Like Civ3, the Privateer should appear as a pirate ship that can engage in combat without the owning Civ declaring war. :D

Very Respectfully,


Orion Veteran :cool:

Dale
Jan 14, 2007, 12:42 PM
Hey Orion,

If you want to add bombardment to other units, following this simple procedure:

1. Open the file \Mods\<ModName>\Assets\Xml\Units\Civ4UnitInfos.xml in notepad.
2. Add the following code to the end of each unit you want to modify:

<iDCMBombRange>1</iDCMBombRange>

3. Play.

BTW, if you want a range other than 1, just change the number to whatever range you want.

As for the privateer, check out my Age of Discovery mod (see sig). :)

Dale

Exel
Jan 16, 2007, 04:14 AM
Please add the following new units:

2. Tank - Bombardment Range 1
3. Modern Armor - Bombardment Range 2

:eek: Why?

Dale: So how's the AI? Is it possible to make the AI use the ranged bombardment for collateral damage too?

Dale
Jan 16, 2007, 05:10 AM
Dale: So how's the AI? Is it possible to make the AI use the ranged bombardment for collateral damage too?

I've tested this, and the AI does bombard my units in the open (for collatoral). There's no collatoral whilst bombarding cities, it's defense reducing only. Also, the AI does bombard tile imps as well.

I've just tested all of this, and the AI is picking all three situations for the mission. Even as far as AI battleship coastal bombarding.

Just a question, can you bombard other things than cities? The only thing I can of is either the AI in your game hasn't seem anything more attractive than cities, or the mod isn't installed correctly for you.

LaCiencia
Jan 16, 2007, 08:29 AM
Ranged Bombardment for Warlords 2.08!

The most popular component of my full combat mod is now converted to WL 2.08 and available seperately from the rest.

File: http://forums.civfanatics.com/downloads.php?do=file&id=3863

To those new to this component, a brief explanation:
Siege units and some naval units now have a ranged bombardment ability that replaces the old bombard method. They can bombard tiles adjacent to them to attack units, cities or tile improvements. Simply select the unit, select bombard, then select the tile to bombard. In this way, siege units do not need to frontal attack to be useful. :)

...

Dale


Excellent! but how do I install this component? no instruction anywhere :confused:

Could this work together with other scenarios?

Thanks

OrionVeteran
Jan 16, 2007, 04:18 PM
Excellent! but how do I install this component? no instruction anywhere :confused:

LaCiencia,

Please take a look at my first post to Exel earlier on this page. It gives you a step by step procedure on how to install this mod. It's easy! :)

Very Respectfully,



Orion Veteran :cool:

Exel
Jan 17, 2007, 03:54 AM
I've tested this, and the AI does bombard my units in the open (for collatoral). There's no collatoral whilst bombarding cities, it's defense reducing only. Also, the AI does bombard tile imps as well.

I've just tested all of this, and the AI is picking all three situations for the mission. Even as far as AI battleship coastal bombarding.

Just a question, can you bombard other things than cities? The only thing I can of is either the AI in your game hasn't seem anything more attractive than cities, or the mod isn't installed correctly for you.

Yes, I can bombard units, terrain improvements, etc. But I can also cause collateral damage to units in cities after the city defences are reduced to 0 with the ranged bombardment. The AI however doesn't seem to do this and instead attacks with the arty units head-on. That gives the human player a significant advantage over the AI.

Has your intention been that you couldn't cause collateral damage to units in cities with the ranged bombardment? You most definitely can, and mind you, I think that's how it should be. In fact I would go even as far as giving all land-based arty units the "can only defend" flag if only that didn't cripple the AI.

Dale
Jan 17, 2007, 04:42 AM
Yes, the intention was to do collatoral damage.

The AI actually uses the same mission code as the human, so it can do collatoral damage. It's just the AI is deciding that frontal attack is more beneficial to it than continuing bombarding.

Does it follow up the frontal attacks with other units to try to finish you off?

Exel
Jan 19, 2007, 08:15 AM
The AI actually uses the same mission code as the human, so it can do collatoral damage. It's just the AI is deciding that frontal attack is more beneficial to it than continuing bombarding.

Does it follow up the frontal attacks with other units to try to finish you off?

That it does, but usually to not so great effect. I think the problem lies in the AI sticking to the manners of old (vanilla) while it would in fact be much more effective to use the arty in the ranged attack always. As it is, the AI wastes its artillery units assaulting the city, doing no more collateral damage than it would by using the ranged mode, and if it can't take the city on the same turn it then has no arty remaining for the next turn and the city defences are back up. Would adding the "can only defend" tag force the AI to use the arty in ranged attack mode all the time? Or does it realize at all that it can do collateral damage with the ranged attack and just stops because it thinks it can't use it beyond reducing city defences?

Yakk
Jan 20, 2007, 10:56 AM
If you want AI to bombard:
Drop artillery power by half.
Give artillery a 75%->84% withdrawl chance. (75% for primitive, 80% for gunpowder, 84% for modern).
Give artillery a +100% hillls and city defence bonus. (just as strong as before)
Give artillery a +100% collateral damage bonus. (just as strong as before)

If the unit had odd strength, round down, and grow the +100% bonus's. (ie, catepult goes from 5 to 2, and gains +150% city/hills defence & collateral. The trechpult goes from 4 to 2, and gains +300% city defence, +100% city attack, +100% hills defence, +100% collateral: 8 city defence (same as before), 4 hills defence (same as before), 4 city attack (1/2 before), 4 collateral strength (same as before), 2 general attack (1/2 before)).

Replace promotions with:
Supply Train:
I: +10% heal rate in friendly/neutral lands
II: +10% heal rate everywhere
III: +10% heal rate everywhere, +10% heal to units in stack
// artillery take lots of damage when attacking. This lets the artillery "reload" faster

City Assault:
I: +40% city attack, +10% bombard defences
II: +40% city attack, +10% collateral
III: +40% city attack, +5% bombard defences, +5% collateral
// at +120%, a new catepult is a 9.6

Fire Volume:
I: +40% collateral
II: +20% strength, +50% collateral
III: +10% bombard defences, +60% collateral

Range:
I: +5% withdrawl chance, 1 extra first strike
II: +5% withdrawl chance, 1 extra first strike
III: +5% withdrawl chance, 1 extra first strike

Precision:
I: +5% bombard defences, +30% strength, 1 extra first strike
II: +5% bombard defences, +50% city/hill defences
III: +10% bombard defences, +40% collateral, +40% strength

...

Note the bonuses above are large. This is because I halved the unit's stats -- doubling of the modifiers, adding +100% at the units specialty, and halving the stats, makes a unit that is half as effective. (ie, 2 +100% +40% is the same as 4+20%).

To bombard, you simply attack with a siege unit. Your base attack will be half what it used to be. (with city attack III you get +120%, but your strength was already halved. So you are are instead at your old strength +10%.)

You have a base 75% to 84% withdrawl chance, so your unit will probably not be destroyed. Improved range III boosts this to 90% to 99% withdrawl chance.

The city and hill defence bonus' make placing artillery in a city still useful, and in the field they can be used to defend difficult terrain. However, in the open, they are extremely vunerable. Cannon can still route primitive warriors in an open field battle, but it isn't very efficient.

The goal is that AIs know how to use this kind of unit. Your cannons "lead the charge", but this really reflects bombardment. Sometimes an enemy manages to destroy one of your cannons during the battle, which is relfected by a withdrawl failure. Increased range makes it harder for the enemy to take out your catepults (represented by increased withdrawl chance).

Exel
Jan 20, 2007, 11:53 AM
Sorry but I couldn't disagree more. I want to get away from the horrendously silly use of arty units as first-line kamikaze attackers. Even giving them high withdraw chances wont make them anything else but that.

Dale
Jan 20, 2007, 01:38 PM
Agreed! ..

OrionVeteran
Jan 21, 2007, 09:38 PM
Dale,

I added the <iDCMBombRange>1</iDCMBombRange> line to all of the following units:

1. Destroyer - Bombardment Range 1
2. Tank - Bombardment Range 1
3. Tank Panzer - Bombardment Range 1
4. Modern Armor - Bombardment Range 2

However, in a test game, the tank failed to work. Here is the fix:

Open this XML file: CIV4UnitInfos.xml

Add the following lines under the tank class: <Class>UNITCLASS_TANK</Class>

Look for this line: <UnitCombatMods/>

Replace with:

<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
<iUnitCombatMod>50</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>

This worked nicely. :)

I have one more unit to add, but I don’t know how to code it: The Privateer :confused:

Dale, how can I add the privateer to this mod?

Very Respectfully,


Orion Veteran :cool:

explorer2
Jan 21, 2007, 09:51 PM
Dale-
Great work, btw.
I would dearly love to add Ranged Bombardment to a couple of existing mods I play. I don't mod in Civ4, other than occassional dinking around with XML files, so I don't know how to modify dll files.
Any help or advice greatly appreciated.
Thanks.

Impaler[WrG]
Jan 21, 2007, 10:45 PM
OV: Are you talking about the hidden nationality aspect of the Privateer? If so I belive that FFH2 has a Hidden nationality mod by Kael. Also the <UnitCombatMods> affects has nothing to do with Dales mod.

OrionVeteran
Jan 21, 2007, 11:14 PM
;5011331']OV: Are you talking about the hidden nationality aspect of the Privateer? If so I belive that FFH2 has a Hidden nationality mod by Kael. Also the <UnitCombatMods> affects has nothing to do with Dales mod.

Impaler,

1. I'll lookup the Hidden Nationality mod, Thanks.

2. I respectfully must disagree about the coding. The tank was missing the code under the <UnitCombatMods> section of the subject XML file that Dale provided in his mod. Adding the lines I specified along with the <iDCMBombRange>1</iDCMBombRange> line, gave the tank ranged bombardment capability. Without the lines under <UnitCombatMods> ranged bombardment will not work for the tank. It took me a couple hours to figure that out. Compare with the German Panzer tank. You will find the code is already in place. I simply copied and pasted the code over to the tank. ...and now it works! :)

Very Respectfully,


Orion Veteran :cool:

Exel
Jan 22, 2007, 04:19 AM
I added the <iDCMBombRange>1</iDCMBombRange> line to all of the following units:

1. Destroyer - Bombardment Range 1
2. Tank - Bombardment Range 1
3. Tank Panzer - Bombardment Range 1
4. Modern Armor - Bombardment Range 2

Just an OT question: Why do you want tanks to have bombardment?

OrionVeteran
Jan 22, 2007, 07:56 PM
Just an OT question: Why do you want tanks to have bombardment?

Exel,

1. Tanks can attack 2 times per turn. Ranged bombardment will take up 1 turn, leaving you 1 more turn to attack.

2. You might wish to use ranged bombardment to take out a vital resource to your right and then attack the enemy on your left.

3. If you do not have enough artillery, you can use your tanks to soften up an inland city. This way you can attack without risking any damage, before you attempt to capture the city.

It's a cool feature that realistically portrays tank warfare tactics. ;)

Very Respectfully,



Orion Veteran :cool:

Dale
Jan 22, 2007, 10:50 PM
I hope you only gave it to modern armour. Even with rocket-assist shells, you're still pushing the boundary of armour firing into an adjacent plot.

There's no possible way that early tanks could fire into an adjacent plot.

Chazcon
Jan 23, 2007, 12:36 AM
Dale, huge thanks once again for your Ranged Field Bombardment mod. YOU got me into SDK modding and I can't even play Civ IV anymore without this mod. In my mind you 'saved' Civ IV with this, and Firaxis would be nuts to not include it in Civ V. Nice work!

Exel
Jan 24, 2007, 03:15 AM
It's a cool feature that realistically portrays tank warfare tactics. ;)


Well that's just it, because even if it undoubtedly is very effective, I can't see it being realistic by any stretch of imagination.

OrionVeteran
Jan 25, 2007, 07:46 PM
Well that's just it, because even if it undoubtedly is very effective, I can't see it being realistic by any stretch of imagination.

Easy guys! I'm just toying around with this mod, like a kid in a candy store. The ranged bombardment is a realistic capability for modern armor, but I am compelled to admit, that it is not a realistic feature for early tanks. Nor, is it realistic for the destroyer. Fact is we need a couple of more ships added to the game:

The Privateer and the crusier. The crusier should have ranged bombardment, Likewise the privateer. Anyone care to create these two units for this mod? My programming skills with DLLs, SDK and XML are in the infancy :cry: stage, as compared to you experts out there.

Very Respectfully,



Orion Veteran :cool:

Exel
Jan 26, 2007, 04:00 AM
The ranged bombardment is a realistic capability for modern armor ..

No, no it really isn't. :p

OrionVeteran
Jan 27, 2007, 09:15 AM
No, no it really isn't. :p

Exel,

I respectfully disagree. Ranged bombardment is a realistic capability for Modern Armor. Do you know anything about the range of the 120mm Ammo used with Modern Armor? New advancements in 120mm rounds can fire at targets beyond the line of sight 8 kilometers away. That's 5 miles! Please Read, to learn more:

http://www.fas.org/man/dod-101/sys/land/erm.htm

Targets that get destroyed may never know what hit them. Based upon this information it is clear the ranged bombardment capability applies to Modern tanks.

Compare the range of Modern Armor with a Trebuchet. The Trebuchet can fire very heavy projectiles up to 270 meters (300 yards) away. ...Not even 1/4 mile away, yet, in CIV4, the trebuchet gets a 1 square range. At the very least, modern armor should have a range of at least 1 square all around.

Modern Artillery: The M198 howitzer can fire a 155mm conventional projectile 22.5 kilometers (14 miles) away. With advanced shells, even further.

Battleship: An Iowa class Battleship has 16 inch guns that can fire projectiles weighing from 1,900 to 2,700 pounds (850 to 1,200 kg) at a maximum speed of 2,690 ft/s (820 m/s) up to 24 miles (39 km). At maximum range the projectile spends almost 1½ minutes in flight.

IMO, these units should get the following range bombardment capability in CIV4.

Trebuchet - 1
Modern Armor - 1
Artillery - 2
Battleship -2

Very Respectfully,


Orion Veteran:cool:

Chazcon
Jan 27, 2007, 09:41 AM
We are getting lost in the minutiae here I'm afraid. While a 120mm gun can actually fire a projectile out to X range, when mounted in a tank that is part of a modern armored division it is never employed as artillery for several reasons.

A tank is a weapons platform used to deliver direct fire on enemy targets. It is not equipped with the proper fire control equipment to employ indirect fire like artillery. Nor is the infrastructure of a tank unit (armored battalion or division) designed to employ tanks as indirect fire weapons systems. Artillery fire is directed and controlled by forward observers (either ground or air) or in emergencies, by commanders of combat units. Tank crews are not a part of this fire control communications net, nor are they trained to utilize their weapons in an indirect fire capacity.

There is some cross-training in some armies, but the experiment has never been sucessful or effective on the battlefield.

Also, let's not forget that Civilization IV does not have a strict scale in the traditional sense of the word as it applies to military simulation games. It is an entertainment vehicle and requires some suspension of disbelief. It works very well as a game. All of us like numbers and statistics, especially 18-24 year old males for some reason, but to Civ IV factual rationale does not often apply.

It makes perfect sense for cruisers, battleships, and modern artillery to have the ability to lob shells 2 tiles away. But it's not justified for any other units in my opinion, especially not direct-fire weapons systems.

Exel
Jan 27, 2007, 11:43 AM
Exel,

I respectfully disagree. Ranged bombardment is a realistic capability for Modern Armor. Do you know anything about the range of the 120mm Ammo used with Modern Armor? New advancements in 120mm rounds can fire at targets beyond the line of sight 8 kilometers away. That's 5 miles! Please Read, to learn more:

http://www.fas.org/man/dod-101/sys/land/erm.htm

Targets that get destroyed may never know what hit them. Based upon this information it is clear the ranged bombardment capability applies to Modern tanks.

You don't need to teach me tank capabilities. I know. The maximum practical engagement range for most tanks is 4000 meters, with few exceptions a click or two above that. APFSDS projectiles can theoretically be lobbed over 100 km ballistic, but that doesn't make an MBT a valid indirect fire platform. If you give tanks a ranged attack, then artillery should have a range of like 8 tiles, battleships even more. And Chazcon made the most important point - tanks are direct attack weapons with no ability whatsoever to fire beyond line-of-sight. The only way I could justify ranged attacks for tanks is if you wanted to simulate self-propelled artillery with them, but imho they should deserve a unit of their own.

OrionVeteran
Jan 27, 2007, 04:39 PM
It makes perfect sense for cruisers, battleships, and modern artillery to have the ability to lob shells 2 tiles away. But it's not justified for any other units in my opinion, especially not direct-fire weapons systems.

Chazcon,

Evidently you don't understand the concept of beyond line of sight targeting. Many modern tanks have data link capability that provide beyond line of sight targeting; just like artillery. Why would a modern tank fire beyond line of sight unless it is trying to hit something? What a waste of limitted ammunition.

One of the greatest things about Civillization games is the ability to adjust and modify the game to your particular style of play. If you don't like ranged bombardment for Modern Armor, then don't change this mod to give Modern Armor the capability.

Although this game is not based upon strict reality, if you are not aware of unit capabilities and statistics for combat and defense, you are going to get pile drived by someone who does. Using unit statistics to evaluate the success or failure of a military operation is CRITICAL to winning this game. Somehow, I don't believe numbers and statistics are limited only to 18-24 year old males. I suppose people would think this mod would not be very important, if their strategy is to aceive a diplomatic or cultural win. I, on the other hand, am an iron fisted war monger.

If you noticed my last post, I suggested Modern Armor be given ranged fire capability for only 1 tile in all directions, not 2. One square away is definitely in the line of sight, direct fire attack. ...And we both know Modern Armor has the capability to fire like artillery does, limited only by it's range.

Very Respectfully,


Orion Veteran :cool:

Exel
Jan 28, 2007, 04:53 AM
Evidently you don't understand the concept of beyond line of sight targeting. Many modern tanks have data link capability that provide beyond line of sight targeting; just like artillery.

Name one MBT that can engage beyond its line-of-sight.

Snake Pliskeen
Jan 28, 2007, 10:18 AM
How to add this mod to another one if possible?

OrionVeteran
Jan 28, 2007, 05:33 PM
Name one MBT that can engage beyond its line-of-sight.

Exel,

I'll give you two modern battle tanks that have the capability to engage targets beyond line of sight:

M1 Abrams
M1A2

Read: The MRM-KE (Mid-Range Munition - Kinetic Energy) is a 120mm precision guided munition for use by the M1 Abrams. The missile/projectile is designed to be used as a high velocity penetrator at both line of sight, and beyond line of sight (BLOS).

http://www.defense-update.com/products/digits/120MRM.htm

"Raytheon Projectile Scores a Direct Hit Against Moving T-72 Tank" Sep 2006

Raytheon successfully conducted the first beyond line of sight mission with a test firing of its Mid Range Munition Chemical Energy (MRM-CE) guided projectile with digital semi active laser sensor. The projectile, fired from an Abrams M1A2 SEP (system enhancement program) tank, scored an extended-range, guided direct hit. The test firing at the U.S. Army's Yuma, Ariz., Proving Grounds demonstrated the laser-guided seeker's ability to successfully target, acquire and track a moving tank and guide the munition to intercept at a distance of 5.4 miles (8.7 km).

http://www.spacewar.com/reports/Raytheon_Projectile_Scores_a_Direct_Hit_Against_Mo ving_T_72_Tank_999.html

Also read about Extended Range Munition [ERM]
XM1007 Tank Extended Range Munition (TERM)

The Tank Extended Range Munition (TERM) is a new 120 millimeter munition for the M1A2 Main Battle Tank, that will extend the maneuver commander's battlespace beyond line of sight (BLOS) to more than 8 kilometers.

http://www.fas.org/man/dod-101/sys/land/erm.htm

If these factual references don't convince you, then nothing will. As for me, I'm convinced of the capability and I have chosen to change the mod to give the Modern tank a 1 square Ranged Bombardment capability. You don't have to make the change if you don't want to, as the change is only a suggestion.

Dale, once again, thanks for a great mod. :goodjob:

Very Respectfully,


Orion Veteran :cool:

Exel
Jan 29, 2007, 03:05 AM
None of those rounds are in service, and it is not even sure if they ever will be employed to the Abrams. They are primarily intended for FCS platforms. They can be equipped to the Abrams as well (your own sources state this is a possibility) but that will require some modifications in the tank.

Dale
Jan 29, 2007, 03:52 AM
Guys, I think it's time to stop thread-jacking. ;)

Thankfully I've designed the mod openly so that you CAN make these changes if you want. If you don't want, then that's okay. :)

Exel
Jan 29, 2007, 08:09 AM
Guys, I think it's time to stop thread-jacking.

Just bumping the thread up. ;)

OrionVeteran
Jan 29, 2007, 03:45 PM
Exel,

Last word: In my humble opinion, if a Trebuchet, with 300 yard range, can have ranged bombardment of 1 square all around, then I see no reason not to give modern armor, with direct line of sight range capability, far beyond 300 yards; the same 1 square capability. As for BLOS capability, if it is available to a commander, he will use it to his advantage in the field of battle. ...and so would I.

Guys, I think it's time to stop thread-jacking. ;)
Thankfully I've designed the mod openly so that you CAN make these changes if you want. If you don't want, then that's okay. :)

Bottom Line is: I agree with Dale. The mod is so good, it allows changes to modify unit capabilities to match player preferences. Make any changes you, as the player of the game, desire! After all, CIV4 is a great game and the objective is to have fun.

Question to all: Does anyone have the code necessary to add The Privateer to this mod? ...and can you please post the code and/or files?

Very Respectfully,


Orion Veteran :cool:

cf_nz
Feb 11, 2007, 01:25 AM
Dale

I've merged your ranged bombardment mod with the BetterAI mod. I've started to experience crashes of late and I think a recent change in BetterAI is clashing with your mod. I have made an assert build (note I'm only vaguely aware of what I'm doing) and am getting an assert error in CvUnitAI.cpp; Expression: pDefender != NULL; this is part of bool CvUnitAI::AI_bombardCity().

What sort of errors would trigger this assert?

Many thanks.

Iustus
Feb 11, 2007, 02:47 AM
Dale

I've merged your ranged bombardment mod with the BetterAI mod. I've started to experience crashes of late and I think a recent change in BetterAI is clashing with your mod. I have made an assert build (note I'm only vaguely aware of what I'm doing) and am getting an assert error in CvUnitAI.cpp; Expression: pDefender != NULL; this is part of bool CvUnitAI::AI_bombardCity().

What sort of errors would trigger this assert?

Many thanks.

I responded with some thoughts on how to fix this bug (http://forums.civfanatics.com/showthread.php?t=206865)over on the BetterAI post.

-Iustus

Iustus
Feb 11, 2007, 03:06 AM
I've tested this, and the AI does bombard my units in the open (for collatoral). There's no collatoral whilst bombarding cities, it's defense reducing only. Also, the AI does bombard tile imps as well.

I've just tested all of this, and the AI is picking all three situations for the mission. Even as far as AI battleship coastal bombarding.

Just a question, can you bombard other things than cities? The only thing I can of is either the AI in your game hasn't seem anything more attractive than cities, or the mod isn't installed correctly for you.

Yes, the intention was to do collatoral damage.

The AI actually uses the same mission code as the human, so it can do collatoral damage. It's just the AI is deciding that frontal attack is more beneficial to it than continuing bombarding.

Does it follow up the frontal attacks with other units to try to finish you off?

(Forgive me if you have already done these, I have not looked over the code of this mod)

If you want the AI to get the best out of this, you probably want to look at changing the AI to have a much lower chance to attack with a bombard unit, when you could just bombard and not die, you could do in one or more ways:
- change getBestAttacker to return non-bombard units first
- change AI_attackCityMove and AI_attackMove to better deal with this new technique, probably splitting up groups into bombard groups and actual attack groups (you will want to leave behind defense on the bombard groups)
- change AI_cityAttack, AI_anyAttack (and AI_stackAttackCity in BetterAI) to know about ranged bombarding, spliting groups as necessary
- change bombard units so they cannot be UnitAI "city attack", but rather are both collateral and probably counter (and city counter). (AI_unitValue)
- change both groupAttack, AI_update, and AI_follow to know about splitting groups to bombard with those that can not bombard.

Probably a few more things I am not thinking of right off the bat.

One thing you do not want to do is to change AI_groupFirstVal to have bombard units come after non-bombard units, because in a mixed stack, you still want the bombard units to go first. You just do not want them to move first. Overall, I think the best solution is going to involve splitting the groups up.

In an ideal world, there would be a new MissionAI you could use for bombard groups, so they could get their own defenders, could shadow attack groups, and provide support. You could mimic this without your own MissionAI by just doing a check at the top whether the top unit in a group can bombard, and calling something like AI_bombardAttackMove rather than AI_attackMove or AI_attackCityMove. Of course, this does not solve the problem that you want to work on defense as well. Perhaps a AI_bombardDefenseMove also, or just incorporate the defensive logic into AI_reserveMove, AI_counterCityMove, and AI_collateralMove

-Iustus

Dale
Feb 11, 2007, 04:32 AM
I posted this in another thread, and place it here for reference:

----------------------------------------------------------------------------

Actually, the problems with that posted code go a lot deeper than you think. It's got nothing to do with how AI_BombardCity() (my one) works, but calls to it from other areas of the AI.

I post the CvUnitAI.cpp changes required here:

Add the following to (near the top, under the Heal() call):

// Dale - Field Bombard: START
if (AI_bombardCity())
{
return;
}
// Dale - Field Bombard: END

- AI_attackMove
- AI_attackCityMove
- AI_cityDefenseMove
- AI_cityDefenseExtraMove
- AI_attackSeaMove
- AI_assaultSeaMove

In AI_anyAttack comment out the line: if (iValue >= AI_finalOddsThreshold(pLoopPlot, iOddsThreshold))

In AI_anyAttack change the pBestPlot check to:

if (pBestPlot != NULL)
{
// Dale - Field Bombard: If odds are right, attack, else field bombard
if(iBestValue > iOddsThreshold)
{
FAssert(!atPlot(pBestPlot));
getGroup()->pushMission(MISSION_MOVE_TO, pBestPlot->getX_INLINE(), pBestPlot->getY_INLINE(), ((bFollow) ? MOVE_DIRECT_ATTACK : 0));
return true;
// Dale - Field Bombard: new method
} else if(DCMFieldBombard) {
if(canBombardAtRanged(pBestPlot, pBestPlot->getX_INLINE(), pBestPlot->getY_INLINE()))
{
getGroup()->pushMission(MISSION_BOMBARD, pBestPlot->getX_INLINE(), pBestPlot->getY_INLINE());
return true;
}
// Dale - Field Bombard: old method
} else if(!DCMFieldBombard) {
if(canBombard(pBestPlot))
{
getGroup()->pushMission(MISSION_BOMBARD);
return true;
}
}
}


In AI_followBombard change the bombardCity check to: (this is the one that causes the crash)

// Dale - Field Bombard: different AI checks under each method START
if(DCMFieldBombard)
{
if (AI_bombardCity())
{
return true;
}
} else if(canBombard(plot())) {
getGroup()->pushMission(MISSION_BOMBARD);
return true;
}
// Dale - Field Bombard: different AI checks under each method END


That'll do it. :) Just so you know, I've successfully merged ranged bombard with Better AI and it works seamlessly with no errors. Just need those fixes. :)

Dale

cf_nz
Feb 11, 2007, 05:35 AM
Just so you know, I've successfully merged ranged bombard with Better AI and it works seamlessly with no errors. Just need those fixesMany thanks Dale. I've been using your Ranged Bombardment mod for a long time without any problems (including with BetterAI). The crashes only started occurring about a month ago.

Edit: I've made the appropriate changes to:
- AI_attackMove
- AI_attackCityMove
- AI_cityDefenseMove
- AI_cityDefenseExtraMove
- AI_attackSeaMove
- AI_assaultSeaMove

The changes listed to AI_anyAttack and AI_followBombard were already part of CvUnitAI.cpp as they are part of your mod.

Iustus
Feb 11, 2007, 02:53 PM
That'll do it. :) Just so you know, I've successfully merged ranged bombard with Better AI and it works seamlessly with no errors. Just need those fixes. :)


Even with all the changes you list, I think more can be done.

In BetterAI you will tend to get relatively larger mixed city attack stacks. I could be mistaken about this, but I believe that in general what is going to happen is that if the stack decides to bombard, then that is all it will do that turn. AI_follow logic, even if it does result in some attacks, they will be much less directed than the attacks generated in AI_attackCityMove. But a mixed stack will never get to that code, because it will always trigger a bombard.

The reason for this is the action of the whole group is determined by the head unit of a stack. And unless the whole stack can still move, the only chance for any of the other units to take an action is through AI_follow, which as you can see by looking at it, has a lot less logic than AI_attackCityMove.

I think you might get better use of units that can field bombard if you made some bigger changes in the AI logic of these units, as I suggested above. I think the best approach might be to change the calls to AI_group and AI_groupMergeRange so that you can build stacks that have bombard units and stacks that do not have bombard units, and use the bombard stacks for bombardment, but not for direct attacks. (I have not used the mod, so I do not know whether or to what percent field bombardment is less effective than attacking with a collateral unit, this would affect this of course). My general feeling though is that if you can get nearly the same effect as suiciding a collateral unit by bombarding with it, that might be the way to go.

Changing groupAttack to have bombard units bombard rather than attack when the odds are low: changing the logic so that it checks for a bombard unit in the stack before looking for bestGroupSacrifice, and generates a bombard action rather than an attack might also work, although its a bit tricky because you cannot push a mission at that point, you would have to call the bombard function directly. I am not certain what effect that has on isBusy, you might need to make some changes there, so that the right animations are drawn before the next unit acts.

-Iustus

Dale
Feb 11, 2007, 05:30 PM
Let me just say, that I spent 12 months messing around with groupAttack (for my true stack attack component) and it's a nightmare.

I ain't going there again for quids! :p

But if you want, be my guest. :)

BTW, in my true stack attack, bombarding units actually did bombard (and animate as such) as well as ranged units range attacking (and animate). Unfortunately due to not having access to how GameBryo releases an animation, there are a couple of unsolvable bugs. So dev stopped on it. :(

Iustus
Feb 12, 2007, 12:41 AM
Let me just say, that I spent 12 months messing around with groupAttack (for my true stack attack component) and it's a nightmare.

I ain't going there again for quids! :p

But if you want, be my guest. :)

BTW, in my true stack attack, bombarding units actually did bombard (and animate as such) as well as ranged units range attacking (and animate). Unfortunately due to not having access to how GameBryo releases an animation, there are a couple of unsolvable bugs. So dev stopped on it. :(

I am not sure what your true stack attack component did, but BetterAI has made some significant changes to groupAttack. Including the following two things:

(1) if the odds are low enough, rather than using the bestGroupAttacker unit, it substitutes bestGroupSacrifice unit.

(2) if there is more than 1 unit in the group, it sets m_bGroupAttack using CvSelectionGroupAI::AI_queueGroupAttack(int iX, int iY), which is then used the next time around in AI_update to short circuit decisions on what to do next. This causes it to follow through and attack with an entire group, choosing the best sacrifice or attacker as appropriate without having to go through the logic of AI_follow (which it still does in the cases where it did not attack).

(3) groupAttack now returns whether an attack failed because there is an animation currently playing, so AI_update can abort, and return and wait until the animation finishes before trying groupAttack again.

While these changes were problematic at first, because of how convoluted the whole thing is, they now work pretty solidly.

-Iustus

Dale
Feb 12, 2007, 04:11 AM
I am not sure what your true stack attack component did, but BetterAI has made some significant changes to groupAttack. Including the following two things:

(1) if the odds are low enough, rather than using the bestGroupAttacker unit, it substitutes bestGroupSacrifice unit.

(2) if there is more than 1 unit in the group, it sets m_bGroupAttack using CvSelectionGroupAI::AI_queueGroupAttack(int iX, int iY), which is then used the next time around in AI_update to short circuit decisions on what to do next. This causes it to follow through and attack with an entire group, choosing the best sacrifice or attacker as appropriate without having to go through the logic of AI_follow (which it still does in the cases where it did not attack).

(3) groupAttack now returns whether an attack failed because there is an animation currently playing, so AI_update can abort, and return and wait until the animation finishes before trying groupAttack again.

While these changes were problematic at first, because of how convoluted the whole thing is, they now work pretty solidly.

-Iustus

It does what I believe should've been done to start with. ;)

http://forums.civfanatics.com/downloads.php?do=file&id=2509

Iustus
Feb 12, 2007, 04:20 PM
It does what I believe should've been done to start with. ;)

http://forums.civfanatics.com/downloads.php?do=file&id=2509

Well, looking at what your combined attack does, you might want to take a look at we do in BetterAI with m_bGroupAttack and returning bFailedAlreadyFighting. Using this technique, you should be able to do one phase of your attack inside groupAttack, then set up some variables in the same way (probably just add in a pointer to a struct/class in CvSelectionGroup showing what phase of the stack attack you are in), and you should be able to trigger re-calling groupAttack when the animation is done drawing (assuming that is the problem you ran into).

The calling chain looks something like this for BetterAI:

CvPlayerAI::AI_unitUpdate calls CvSelectionGroupAI::AI_update
CvSelectionGroupAI::AI_update called for a group that is going to attack
pHeadUnit->AI_update() pushes a MoveTo mission, calling
group->groupAttack which does the first attack, if an AI stack sets m_bGroupAttack true and stores the x,y coords, and returns
CvSelectionGroupAI::AI_update loops again not calling pHeadUnit->AI_update() when m_bGroupAttack is true, but calling groupAttack directly, with those x,y coords,
groupAttack finds the next unit to attack, then sees that there is already fighting going on in the target plot, so it sets m_bGroupAttack to true, returning bFailedAlreadyFighting true
CvSelectionGroupAI::AI_update bails out, giving up on that stack for now
CvPlayerAI::AI_unitUpdate bails its loop, it will be called again after the animation is finished
CvPlayerAI::AI_unitUpdate called again, even if the head unit was killed, it will not separate an AI group until m_bGroupAttack is false, to let the group continue to attack until there are no more foes.
repeat 5-9 until either there are no more foes (which will bring us back to step 1), or no more units in our stack (stopping after 4)


I am not sure what bugs you ran into, but if it had to do with not being able to trigger one animation, then wait to do the next one, we solved that for BetterAI.

-Iustus

Dale
Feb 12, 2007, 11:14 PM
The actual bug was if you queue up two animations for the one unit (IE: two rounds of combat) then the second would fail to respond back from GameBryo engine. This is only in the case where a ranged unit would be in battle with either a melee or air unit.

Anyways, I'd love to re-look at this mod again, but right now I don't have the time.

Iustus
Feb 13, 2007, 06:16 AM
The actual bug was if you queue up two animations for the one unit (IE: two rounds of combat) then the second would fail to respond back from GameBryo engine. This is only in the case where a ranged unit would be in battle with either a melee or air unit.

Anyways, I'd love to re-look at this mod again, but right now I don't have the time.

Fair enough.

It does sound like the solution I worked out for BetterAI would work for you. Since we specifically do avoid queueing up two animations. (By only doing one, then falling all the way back through the calling chain, but shortcircuit our way back to groupAttack once the previous animation is finished).

-Iustus

GyroLeader
Feb 15, 2007, 03:15 PM
Is any way to get this mod work with Modern Warfare mod? I tryed but i just error messages. If there is a way, could somebody tell how?

Sorry for my bad english.

ebo
Feb 15, 2007, 10:58 PM
I merged this bombardment mod, with my other mods it all worked great. I had a little trouble figuring out what was changed on the civ4missions.xml, because there were no comments, but I got it working, by replacing the bombard section of yours into mine. Thanks for a great addition to civ4.

ebo

garillo
Mar 04, 2007, 02:38 PM
Great job Dale. Makes an excellent game even better.

Bigben34
Mar 24, 2007, 12:27 PM
Great Mod Dale, but I want your whole combat mod!!! I discovered it out of time, and now can't use it with my warlords 2.08!! :-(

Bigben34
Apr 25, 2007, 01:12 PM
I've tested this, and the AI does bombard my units in the open (for collatoral). There's no collatoral whilst bombarding cities, it's defense reducing only. Also, the AI does bombard tile imps as well.

I've just tested all of this, and the AI is picking all three situations for the mission. Even as far as AI battleship coastal bombarding.

Just a question, can you bombard other things than cities? The only thing I can of is either the AI in your game hasn't seem anything more attractive than cities, or the mod isn't installed correctly for you.

Dale, I've noticed that the AI artillery seems to only bombard my units in the open field if I have a large stack of units. If i spread my units out into small piles, it won't even bombard me, but will just sit there. It seems the Ai will use bombard against cities only, improved tiles, or in situations where it normally might consider a suicide worthwhile.

Is there any way to adjust this, so that the AI will by default allways use it's bombard at least once per turn, against something? Would make AI much more effective with the weapon.

Bigben34

PS, if someone has a combination of Better AI and Ranged Bombardment, could they post it?

keldath
Apr 27, 2007, 08:16 AM
Bigben34 ,
hi check out visa mod we have better ai with dake ranged bombarded - wrking like charms

MatzeHH
May 05, 2007, 03:10 AM
Hi!

I tried to set DCMFieldBombard to false for testing reasons but my units aren't able to do the normal bombardment at all. Any suggestions?

Matze

MatzeHH
May 12, 2007, 04:44 AM
*bump*

Matze

ripple01
May 17, 2007, 12:32 PM
Check out post 9 of this thread...

Cheers,
ripple01

MatzeHH
May 17, 2007, 03:54 PM
I read the thread but setting iDCMBombRange to 0 is not the same as setting DCMFieldBombard to false. So I thought there may be another solution.

Matze

Dale
May 23, 2007, 06:39 AM
Normal bombardment won't work unless you reset the bombard missions in Civ4MissionInfos.xml

Shiggs713
Jul 04, 2007, 08:06 PM
thank you Dale... I just included this, and a couple other mod components into this American Civil War mod I'm experimenting with. :) Works great.

http://forums.civfanatics.com/uploads/112285/civilwar4.JPG

Portus
Jul 18, 2007, 09:13 AM
Hi
I want give that funtion to archers and longbowman, is that possible, how can i do that, add the iDCMbomberdement line dont appear the bombard button
thanks

I got it(bombard rate):)

Portus
Jul 20, 2007, 11:43 AM
humm that gave me not the result i was expecting(direct ranged combat only), it works fine out of cities but reduce city defences and its not what i want.

Jeckel
Jul 25, 2007, 05:33 PM
Hey Dale, any kind of eta on a BtS version? With the stuff the expansion added, this is now one of the only two SDK mods that I have to have in all my games. :)

Dale
Jul 25, 2007, 10:19 PM
"Coming soon".

I want to get the Road to War add-on out first, then I'll convert my mods (including this one) to BtS. :)

Grave
Jul 25, 2007, 11:42 PM
Any chances of adding the ability for artillery to destroy a random building in a city? :mischief:

doronron
Jul 26, 2007, 05:04 AM
I'd like to see bombers do that, actually.

Dale
Jul 26, 2007, 06:20 AM
I'd like to see bombers do that, actually.

Played Road to War? Bombers can do that now. You can target defense (normal bombing), factories or civil buildings. :)

doronron
Jul 26, 2007, 06:24 AM
Haven't had the opportunity to do more than make sure the game isn't super slow on my laptop, yet. I'll give Road to War a shot over the weekend, but I must admit my preference in Civ leans towards the core random map games and not the scenarios -- kinda wished the code for ranged bombardment and bombers targeting buildings had made it into the core game, though. Greatly missed opportunities on the part of Firaxis.

Grave
Jul 26, 2007, 11:20 AM
Played Road to War? Bombers can do that now. You can target defense (normal bombing), factories or civil buildings. :)

Neat! I'll have to take a look at that. I'm guessing that's done in Python?

Can that be used in the epic game, or is it Scenario specific only?

Jeckel
Jul 26, 2007, 03:01 PM
Thanx Dale, can't wait. :)

And correct me if I'm wrong, but it seems the Starbases in the Final Frontier BtS senario has ranged bombardment.

Dale
Jul 27, 2007, 07:56 AM
Haven't played FF yet, so can't confirm yeah or nay. :)

avain
Jul 31, 2007, 06:04 AM
This is one of the best mods out there.
I sure look forward to see this one ported to BtS!

Emporer
Aug 01, 2007, 11:16 PM
Is there still a version compatible with vanilla 1.61 available?