[SDK] Dale's Combat Mod!

Well folks, stacked combat is almost complete. :)

Here's a series of shots from a naval battle:

Shot 1: beginning


Shot 2: air combat from scrambled carrier fighters


Shot 3: ship to ship combat progressing


Shot 4: the aftermath!



Comments welcome. :)

NOTE: Unfortunately the air mission animations aren't compatible with combat animations, so none show up. :(

Dale
 
I've combined my mod with the regiments mod. So there will be two mod options now. :)

Some screens:






 
Looks great.
This, along with Ryle's, is the most exciting mod in devlopment at the moment (some prople are trying to get a real resource and economics system off the ground, but that is a long ways away).

My main question is whether or not the AI knows how to use combined arms effectively?
 
those screen shots look amazing

by the way did you finish the ranged artillery portion of the mod?

is it possible to make the artillery bombardment capable of destroying improvements?and choosing targets?...

thanks
 
MrThing:

Thanks. :) As for the AI, it's going to be a matter of "wait and see". I've been asured by Firaxis programmers that under the vanilla coding the AI knows how to stack, does stack, and stacks with combined arms. So let's hope that it's adequate, otherwise I'll have to become an AI expert to fix it. ;)

boneys26:

Well, you don't have to wait long. I'll be uploading Beta 2.7 after I write this, which is at the point of stacked combat finished (only bug hunting remaining).

Spartan117:

No, ranged targetting and TI destruction isn't implemented yet. Been concentrating on stacked combat so far. It's coming in the near future. :)

Dale
 
Beta 2.7 uploaded!

See first post for details. :)

Dale
 
I very much doubt it. I haven't looked at Sevomod.
 
Suggestion: To reflect that all battles were not fought to the death, it would be neat if all units had a chance for withdrawal, also the defending stack. The more flanking units the victorious stack has, the lower the chance for withdrawal for the defeated units would become, to reflect chasing after routed units.
 
EDIT: sorry DP.
 
M@ni@c:

All you would need to do is set the withdraw probability in Civ4UnitInfos.xml to some percentage.

Remember, this mod is designed to be a mod component for all mod makers. I simply put a wrapper around it using vanilla Civ settings (and recently the Regiments mod settings) so that folks can play with the dll to see if they want it in their mods. With that in mind, you could create your own settings using this dll file with the withdraw settings you want.

Essentially, any mod maker can use the dll file, and set the required flags in the unit infos xml file. Once done, any mod can have the enhanced combat presented within this dll. :)

Dale
 
Dale said:
Spartan117:
No, ranged targetting and TI destruction isn't implemented yet. Been concentrating on stacked combat so far. It's coming in the near future. :)
Dale


would cruise missiles be in that;) I've spent almost 2 months teaching myself C & C++ and trying to find a code that works but I can't do it programming just doesn't agree with me :cry: :cry:
all the codes i got given or done myself dont work and all the code look the same apart from little changes

Code:
def onCombatResult(self, argsList):
		'Combat Result'
		pWinner,pLoser = argsList
		playerX = PyPlayer(pWinner.getOwner())
		unitX = PyInfo.UnitInfo(pWinner.getUnitType())
		playerY = PyPlayer(pLoser.getOwner())
		unitY = PyInfo.UnitInfo(pLoser.getUnitType())
		if (not self.__LOG_COMBAT):
			return
		if playerX and playerX and unitX and playerY:
			CvUtil.pyPrint('Player %d Civilization %s Unit %s has defeated Player %d Civilization %s Unit %s' 
				%(playerX.getID(), playerX.getCivilizationName(), unitX.getDescription(), 
				playerY.getID(), playerY.getCivilizationName(), unitY.getDescription()))
		if pWinner == gc.getInfoTypeForString("UNITCLASS_CRUISE_MISSILE"):
			pWinner.kill(0, pWinner.getOwner())
			CvUtil.pyPrint("The Cruise Misile has detonated!")
 
Okay, I'll set something up so you only have to add a xml flag to a unit to specify it as a missile (cover all missiles, not just cruise).

Cool? :)

Dale
 
Dale said:
Okay, I'll set something up so you only have to add a xml flag to a unit to specify it as a missile (cover all missiles, not just cruise).

Cool? :)

Dale


Thank you so much Dale your ace you will never know how much i wanted this unit back in the game :beer: :thanx: :bounce: :banana: :banana: :banana: :woohoo: :woohoo:
 
Hey dale, i love the work you have done, i feel its the most satisfying when playing as the romans and attacking/being attacked by the germans and their swordsman, especially with the regements mod. However, as was addressed a few posts back, artillery is really somewhat of a super weapon. I had about 7 praetorians, a pikeman, a longbowman and a catapult in my stack outside a persian city and ONE catapult destroyed the entire stack without a loss of HP. Whats more, when i counterattacked the catapult, it only took one unit, no loss of HP, and no combat i dont think at defeat the catapult. Then after capturing the city, i placed over 20 units, including 5 longbomen and 4 pikemen in the city and the city was taken by a war elephant and a catapult with no problem (for them). so my question is, is there any way to make it so catapults dont/cant defeat the entire stack? im fine with weakening it and withdrawing or defeating a single unit and hurting the others, but instantly killing 20+ units? that sucked! haha

Again though, this mod is amazing, dont take what im saying as criticism as much as sort of bug reporting/confirming
 
King Coltrane:

Was that the latest beta 2.7 you used?
 
Dale said:
M@ni@c:

All you would need to do is set the withdraw probability in Civ4UnitInfos.xml to some percentage.

Remember, this mod is designed to be a mod component for all mod makers. I simply put a wrapper around it using vanilla Civ settings (and recently the Regiments mod settings) so that folks can play with the dll to see if they want it in their mods. With that in mind, you could create your own settings using this dll file with the withdraw settings you want.

Essentially, any mod maker can use the dll file, and set the required flags in the unit infos xml file. Once done, any mod can have the enhanced combat presented within this dll. :)

Dale

Currently only attacking units can withdraw.
What I'm wondering about is if it would be possible to:
1) Also have defending units withdraw. And perhaps at a higher strength than now when then usually only have 0.5 strength left or so.
2) Give units with the flanking ability the ability to have a free strike at a withdrawing unit.

So eg if there was some ancient battle:

1)Phalanx versus Phalanx: the attacker wins, the defender withdraws somewhat in panic but as there are no units to pursue, most units survive weakened but alive.

2) Phalanx with auxiliary troops such as skirmishers and cavalry versus Phalanx only: the attacker wins, the defender withdraws in panic and is harrassed along the way by the auxiliary troops, with as result much higher casualties for the defender.
 
boneys26 said:
Thank you so much Dale your ace you will never know how much i wanted this unit back in the game :beer: :thanx: :bounce: :banana: :banana: :banana: :woohoo: :woohoo:


The closest I got to a working code so far was given to me by "The Great Apple"
but when the code runs the game crashes anyway heres the code (python)

Code:
def onCombatResult(self, argsList):
		'Combat Result'
		pWinner,pLoser = argsList
		playerX = PyPlayer(pWinner.getOwner())
		unitX = PyInfo.UnitInfo(pWinner.getUnitType())
		playerY = PyPlayer(pLoser.getOwner())
		unitY = PyInfo.UnitInfo(pLoser.getUnitType())

		if pWinner.getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_CRUISE_MISSILE"):
			pWinner.kill(0, pWinner.getOwner())
			CvUtil.pyPrint("The Cruise Misile has detonated!")

		if (not self.__LOG_COMBAT):
			return
		if playerX and playerX and unitX and playerY:
			CvUtil.pyPrint('Player %d Civilization %s Unit %s has defeated Player %d Civilization %s Unit %s' 
				%(playerX.getID(), playerX.getCivilizationName(), unitX.getDescription(), 
				playerY.getID(), playerY.getCivilizationName(), unitY.getDescription()))
 
Very impressive. Might change the game play a bit too much for my taste though.
 
Top Bottom