C2C Combat Mod Introduction - Step I (SubCombat Classes)

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,920
Location
Las Vegas
c843a580.jpg

C2C Combat Mod Introduction
Step I: SubCombat Classes


Introduction and Statement of overall Combat Mod Intent


As some of you know, the first stage of design on the Combat Mod is finally pushed to the SVN now. It's in the process, still, of streamlining, cleaning up, and generally improving. But now that its there, design work can finally start getting under way in the XML.

Furthermore, I'm sure many, if not all of you, are wondering "What's in this thing? What's this all about?".

I know we have a lot of projects in mind here. Some are extremely pressing in priority such as the Nomadic Start option and Multi-Maps, addressing the exterior edges of development from Caveman era to Cosmos era.

So why did I feel combats, promotions and units needed so much immediate attention? Because we have SO many of them! To the extent that we're rapidly beginning to lose the ability to focus units on unique and necessary roles. Yet, history has prompted the development of these units we're representing here, each with their own purpose, focus, abilities and strategic applications.

We have so much additional depth in so many areas here in C2C and I strongly felt that we were, in the process, bypassing adding depth to the heart and soul of Civilization, strategic warfare. At its core, this is the most elaborate war-game ever designed.

When I first played CivIV vanilla, moving over from CivIII, I was struck by the added strategic complexity. I had a hell of a time taking back the first city Montezuma took off my hands and was thoroughly impressed with how the new combat system required so much more thought on how to arrange and build your armies to be effective.

Unfortunately, in C2C, we've come a long ways but haven't really done much to enforce new strategic layers of consideration to be an effective Commander in Chief. We're still relying on most of the basic methods of checks and balances that came with the core - one unit type clearly trumping another, bring enough collateral, specialize your units in your stacks so you can make sure to guard against all the usual threats etc...

I wanted C2C to have more strategic layers - to the point that it takes another complete revamping of your strategic considerations to account for all variables, to test the boundaries of the capacity to really be prepared for anything, even for the best strategy heads.

Civilization has also been a history lesson in the making. I wanted to more effectively represent the evolution of warfare and troop design as it constantly adjusts to overcome the latest tricks to achieve military superiority. We already do this to a degree but there were some elements of weapon and armor and strategy development I felt could use some further detail.

Additionally, I've been listening to a lot of requests, desires, goals, and complaints being thrown about on this forum for a while now and I'm making a whole-hearted attempt to address quite a few of them, as well as answer to a lot of things I'd personally like to see of course.

So now that the first half or so of the combat modifications I'd like to introduce overall are now made possible by the new coding (which has been a project throughout which I've grown a lot as a coder and am seeing a lot of growth still yet to earn...), it has become time to pull aside the curtain on the project and give it the full reveal.

I didn't want to do this all in one lump post either. This is because I only have so much time in one evening to explain things and because I want to leave a thread for further discussion on the particular issues covered that's unfettered by conversation on the other issues.

In otherwords, there's just too much to discuss for the scope of one thread.


SubCombats

Tonight, I'm going to address the heart of what makes a lot of the Combat Mod possible, the SubCombat Class.

On the surface, this seems like such a simple and minor tag, but the manipulations and game crafting abilities its going to open up for us is absolutely tremendous, beyond what I even imagined when I started working on it as a side project just after I begin working on the combat mod.

As you probably realize by now, Units all have a Combat Class definition. These are the categories units are largely sorted by, Melee, Archery, Mounted etc... While vanilla Civ didn't even deign to define every unit with a Combat Class at all, in C2C we've given every unit a Combat Class definition.

Combat Classes are not to be confused with UnitAI settings but do have some relationships between the two.

Largely, Combat Classes govern access to promotions, are handed bonuses on training by buildings in the cities they are trained in, and are subject to combat modifiers from units with promotions that may be particularly set against them (ie Shock line promotions are Anti-'Melee' promotions.)

With SubCombats in play, Units will still require their primary Combat Class definition. But they will also be able to possess multiple additional Combat Classes. This allows us a huge new realm of unit definition that can be amazingly useful. So many times I've seen comments here saying 'we can't do that' where this will unlock our ability to 'do that' with ease.

Modder Info:
Spoiler :

I believe to make this system work to its fullest, we must adopt a liberal approach to Combat Class definitions, rather than trying to keep them to a minimum.

Now, not only do Unit Infos now carry the ability to have an unlimited number of SubCombats per unit, but promotions may grant any number of additional SubCombats.

The tag for Units is expressed as follows:
Code:
			<Combat>UNITCOMBAT_ANIMAL</Combat>
			<SubCombatTypes>
				<SubCombatType>UNITCOMBAT_MELEE</SubCombatType>
			</SubCombatTypes>
I show the Combat tag simply to express where it should be located in the Unit entry. You can add more <SubCombatType> in a list from there.

In the PromotionInfo for a promotion that gives a subcombat to the receiving unit:
Code:
			<bLeader>0</bLeader>
			<SubCombatChangeTypes>
				<SubCombatChangeType>UNITCOMBAT_MELEE</SubCombatChangeType>
			</SubCombatChangeTypes>
There are other tags that come before SubCombatChangeType after bLeader but I'm not showing them yet to avoid confusion. If you know the schema files, this is easy enough to sort out where tags should go of course.


When a Unit possesses a SubCombat it acts in all ways as if it has that Unit Combat type. There's a few display issues, the Pedia for example, was an area I couldn't sort out how to get to display SubCombats that come stock on units. But for all game effects, SubCombats act exactly like Combat Classes.

Stock SubCombats defined on unit infos will be just as effected by any building that modifies the experience, free promotions, production modifications, etc... on units built there.

Leader traits that interact with combat classes will have the same effect on a SubCombat as they do on a Primary Combat Class. Combat Modifiers against a particular combat class will have the same effect (yes, if you are somehow (which should be rare) both a Melee and an Archery combat class and you're fighting a unit with Anti-Melee and Anti-Archery bonuses, they combine into one cumulative bonus against you.) All modifiers are cumulative if you have multiple combat classes being modified along the same lines.

Now, you might be thinking that the goal here is to mix and match the definitions we have now, as the above example, Melee-Archers, Mounted-Melee etc... This isn't really the point. (Although Mounted-Archery certainly applies well to units like Horse Archers!)

Primarily, the system allows us further definitions to guide promotion access and deepen combat interactions.

Now, Combat Classes can be used to define a lot of other kinds of Unit definitions. Here's a list I wrote up of suggested new Combat Classes for use on units to deepen their layers of game definitions:

Size Categories
Small (Dogs and smaller)
Medium (Human size)
Large (Horse size)
Huge (Elephant size)

Note to Hydro: thanks for prompting me to factor size in - I've got more to say on this below...

Appetite
Predator
Herbivore
Omnivore

Animal Genus
Mammal
Avian
Reptile
Amphibian
Fish
Arthropod
Insect
etc...

Species
Hominid
Feline
Ursine
Canine
Pachyderm
Dromedary
Rodent
Equine
Bovine
Serpent
Lizard
Shelled Reptile
Swarm
Mutated forms of humanity in the future???

Combat Approach
Footman
Operated Construct
Vehicle
Mounted (stock Unit Combat)

Standard Combat Method
our usual suspects:
Melee
Archery
Gunpowder
etc but also:
Throwing
Healer
Automaton
Warship
Interceptor
Submersible
Transport

Deeper Definition
(to aid players in understanding unit roles and further guide promo access)
Civilian
Scoundrel
Law Enforcement
Mercenary
Pirate
City Attack Siege
City Defense Siege
Field Attack Siege
Field Defense Siege

etc...

Special Attack Forms
Fire Wielding
Poison Using

Weapon Categories
(critical for guiding equipment upgrades to be discussed in the next installment)
Club
Spiked Club
Mace
Flail
Small Blades
Throwing Knives
One-Handed Blade
Two-Handed Blade
Dual One-Handed Blades
Blowgun
Light Crossbow
Heavy Crossbow
Repeating Crossbow
Sling
Shortbow
Longbow
Javelins
Throwing Axes
Throwing Rocks
One-Handed Axe
Two-Handed Axe
Short Spear
Long Spear
Advanced Polearm
Staff
Ballista
Flung Boulders
Launched Fireworks
Fist Fighter
Boomerang
Lance
and then on into guns and vehicles and so on...

Armors
(a bit simpler)
Light Natural
Medium Natural
Heavy Natural
Light
Medium
Heavy
Ultra Heavy
Advanced versions of all the above for modern+
Armorless

Shields
Buckler
Small
Large
Tower

Mounts and Animal extra categories
(though not necessary to define on all)
Pack Mule
Pack Llama
Light Horse (the faster ones)
Heavy Horse (the more tank-like ones)
etc...


and there's probably more types I'm not bringing to mind right now that will emerge as necessary to add later.

I'm sure many of you are thinking, "why would we want to create so many new combat classes and overlap units with so many definitions like this?"

There's numerous reasons.
  • Guide disease and poison vulnerabilities, resistances, and immunities.

  • Additional layers of combat modifiers become incredibly expandable (I actually found the need for SubCombats when trying to establish a tag for animals to get a bonus against all 'Human' units. But this also allows us to really get into finer definitions on counteractive combat values to the nth degree.

  • As usual, guide unique promo lines for various subcombat layers - for example, Hydro mentioned Elephants should be able to 'Stomp', which could be a line of promos, available to Pachyderms who have the 'Large' promotion(more on that below) that gives a significant combat bonus against all of Medium and Small size. A Two-Handed Sword equipment could get a bonus against Long Spears (they were good at cutting off polearm tips). There's tons of potential in all of this alone.

  • A subcombat earned from a promotion could unlock skill promotion accesses that unit wouldn't normally have, as in the graphic above, Flaming Arrows giving an Archer the Fire Wielding Combat class and thus access to promos that access an ability to develop a new Knockback ability reserved mostly for Fire Wielding units (more on that to come in another release.)

  • Guide Equipment access (this is a big key factor here!)

  • Establish automatic promotions for those of a given combat class to add game effects to Combat Class definitions previously impossible at any layer of coding.

    You can't add tags to the Unit Combat without messing up the game core. So I added a new tag on Promotions, <FreetoUnitCombats>, that allows you to make all units of a given combat class get that promo for free.

    Thus, for example, a Large SubCombat class can automatically be given a 'Large' promo that defines the base game effects of being large in the first place.

    There's tons of potential here! Law Enforcement units could get a free Law Enforcement I promo. Then, soldier style military units could earn a Military Police promo after something like Combat V, that gives them the Law Enforcement SubCombat class.

    This, then in turn, automatically gives them the first Law Enforcement I promo by default! (I still need to add a quick check on this free assignment after any given promotion assignment so it won't work quite like a charm yet but this game mechanic potential is mostly in place now.)

  • As soon as a SubCombat is removed, perhaps by an improved Equipment overriding the previous promotion (such as an Archer getting access to more damaging arrows than Flaming Arrows and thus losing Fire Wielding SubCombat), or an upgrade obsoleting a promotion only accessible by a particular combat class that no longer exists on the unit (such as above example Archer upgrading into an Arquebusier, thus losing Flaming Arrows, thus losing Fire Wielding SubCombat), any Promotions that the original SubCombat could have that can no longer be possessed by the unit are removed (as insinuated above.)

    If those include skill promotions, such as the Knockback promos earned by having access to Fire Wielding as a Flaming Arrows firing Archer, you will lose those too, but you will have the opportunity to 'retrain' and thus pick new ones from the list of those you can access to take their place (without needing to re-earn the levels that got you those originally.)


In short, if a modifier or game effect would apply to or affect all of the same type of unit of any major bracket, its likely to be most easily assigned to a combat class and perhaps through a free promo linked to that combat class.

On a future design note: I'm planning on adding the ability to define entire promotion line access to subcombats rather than requiring so much individual prereq micromanagement as it does in many ways now.


Now then, I could probably go on but I've come to the end of my immediate thoughts on the subject of SubCombats. In short, its the key that unlocks a whole new dimension to combat strategy design!




Note: since these will now display properly on unit help popups, we should probably find and redefine their Text headers to remove the 'Units' portion that displays there. Otherwise the list will get way too long on a given unit. Easier to show and read (Melee, Hominid, Footsoldier, Two-Handed Axe, Medium Armor) than (Melee Unit, Hominid Unit, Footsoldier Unit, Two-Handed Axe Unit, Medium Armor Unit)! This is simple 'bookwork' for the Combat Mod in XML that wasn't yet critical to getting the dll code developed and still needs to be done. If anyone volunteers to do this, GREAT, otherwise, its simple and I'm happy to get'r dun!


So, feel free to comment and question on this subject. I'm sure I've left a lot of questions remaining and I've only really scratched the surface on the Combat Mod but I'm establishing a basis of understanding for the rest of the divulging to come.


Tomorrow: New Promotion Categories - Equipments and Afflictions (Poisons/Diseases/Critical Injuries)!
 
Animal Genus
Mammal
Avian
Reptile
Amphibian
Fish
Arthropod
Insect
etc...

Species
Hominid
Feline
Ursine
Canine
Pachyderm
Dromedary
Rodent
Equine
Bovine
Serpent
Lizard
Shelled Reptile
Swarm
Mutated forms of humanity in the future???

These are rather laughable. If you want groups I can sort them for you. The biology nerd in me cringes.

EDIT: Thunderbrd this look very epic. So will each unit need to define its defenses vs every possible sub-class that might apply? Such as if a unit has anti-melee will it need to define every melee sub-class?

Also I noticed some units have Flank vs Catapult or Trebuchet, etc. It would be nice to just have them the bonus vs early siege units rather than having to name every siege unit.

I suppose this also opens up a better refining of culture units. Since they will need to be redone too. Thus making them as unique as we want I suppose. Such as a Samurai using a Katana. Which would be different than any other sword in the game.
 
Armors why not:
light leather armor
heavy leather armor
bamboo armor
light hauberk
heavy hauberk
light plate armor
heavy plate armor
Kevlar armor
Nanomaterial armor
Nanobotic armor

Maybe now i dont undersatnd the goal behind your armor system.
 
Good, I guess I should add GOM_UNITCOMBAT to the expression system.

If I get you correctly, combat type and sub combat type are equivalent in their effect. Then you should probably use a method that returns true for either or instead of treating them differently like you do now with hasSubCombatType. So add a hasCombatType and this kind of code gets easier (instead of doubling equivalent calculation code):
Code:
iExtraModifier += pPlot->getPlotCity()->getUnitCombatExtraStrength(getUnitCombatType());
				//TB SubCombat Mod Begin
				for (iI = 0; iI < GC.getNumUnitCombatInfos(); iI++)
				{
					if (hasSubCombatType((UnitCombatTypes)iI))
					{
						eUnitCombatType = ((UnitCombatTypes)iI);
						iExtraModifier += pPlot->getPlotCity()->getUnitCombatExtraStrength(eUnitCombatType);
					}
				}
				//TB SubCombat Mod End
is reduced to:
Code:
				//TB SubCombat Mod Begin
				for (iI = 0; iI < GC.getNumUnitCombatInfos(); iI++)
				{
					if (hasCombatType((UnitCombatTypes)iI))
					{
						eUnitCombatType = ((UnitCombatTypes)iI);
						iExtraModifier += pPlot->getPlotCity()->getUnitCombatExtraStrength(eUnitCombatType);
					}
				}
				//TB SubCombat Mod End
 
I imagine the various armor and weapon subtypes would be used to give various bonuses or maluses against each other. Much like the current Bamboo Armor gives a bonus against Archery units, but in much more detail. Also, the plans for equipment upgrades as mentioned.

However, I feel like the weapon categories may be rather too complex, especially for new players and the AI. I think something along the lines of a few broader categories, combining to give a rough overall description, may be better than going into quite so much detail. Also, there is such a thing as too much micromanagement.

I imagine a fair bit of inspiration could be found in FfH's typed damages/resistances as well.
 
Hmm if we are discussing armors here are some from D&D 3rd Ed ...

Light Armor
- Padded
- Leather
- Studded Leather
- Chain Shirt
- Cord Armor
- Bone Armor
- Ashigaru Armor
- Leather Scale

Medium Armor
- Hide
- Scale Mail
- Chainmail
- Brestplate
- Dhenuka (Rhino Hide)
- Brigandine (Leather/Split Mail)
- Partial Armor
- Lamellar

Heavy Armor
- Splint Armor
- Banded Mail
- Half-Plate
- Full Plate
- Great Armor

Shields
- Buckler
- Small Wooden Shield
- Small Metal Shield
- Large Wooden Shield
- Large Metal Shield
- Tower Shield
- Kappa Shell (Tortoise Shell)

Extras
- Armor Spikes
- Gauntlets
- Shield Spikes
- Chahar-Aina
- Dastana
- Tessen

----

In addition we can always have different metals for different armor such as ...

- Copper
- Bronze
- Iron

Also if we ever apply the Morale system we may want to give our Bard type units various musical instruments.

EDIT: And if we set up the various Dojos we may want to have units learn different Martial Arts styles or just combat styles in general. For instance the Spartans had a very unique way to fight. Which could lead to I suppose also troop formations maybe?

EDIT2: I should also bring up D&D size modifiers ...

Fine (6 in or less) = +8 Attack and AC
Diminutive (6 in &#8211;1 ft) = +4 Attack and AC
Tiny (1 ft - 2 ft) = +2 Attack and AC
Small (2 ft &#8211; 4 ft) = +1 Attack and AC
Medium (4 ft &#8211; 8 ft) = 0 Attack and AC
Large (8 ft &#8211; 16 ft) = -1 Attack and AC
Huge (16 ft &#8211; 32 ft) = -2 Attack and AC
Gargantuan (32 ft &#8211; 64 ft) = -4 Attack and AC
Colossal (64 ft or more) = -8 Attack and AC
 
on training by buildings in the cities they are trained in[/B], and are subject to combat modifiers from units with promotions that may be particularly set against them (ie Shock line promotions are Anti-'Melee' promotions.)

Hmm, how will this work? When the unit is trained it has NO promotions except those given by player mods and the buildings present, so it won't have subcombat-providing promotions yet to trigger the addition of other promotions from buildings.

For example suppose I build a melee unit with 5 exp points from general civic/building bonuses in a city with a building that gives extra bonuses to archers. I then spend the 5 exp points on a (hypothetical for the purposes of illustration in this example only) promotion that adds the subcombat 'archer'. Net result is that I have trained a melee-archer, but he didn't get the bonuses from buildings that give extra stuff to archers built there, because he wasn't an archer at the very point he was built (only became one later when I spent his exp points).

In what cases would you envision buildings that give combatclass predicated effects to actually operate on subcombats? (since in general most units won't have subcombats at the point of being built, will they?)
 
These are rather laughable. If you want groups I can sort them for you. The biology nerd in me cringes.
By all means, this was just a thrown out list to get the creative juices flowing. If anyone with Biology Nerd expertise can better craft the categories here, PLEASE DO! :D

So will each unit need to define its defenses vs every possible sub-class that might apply? Such as if a unit has anti-melee will it need to define every melee sub-class?
Negative. We'll still have more generalized combat class settings as the primary combat class, much as they are now. Thus an Anti-Melee will still be anti-melee. So if I have +25% vs Melee and +25% vs Advanced Polearms, I probably have a total modifier vs the Advanced Polearm using unit of +50% (unless that unit is for some reason not considered melee as well but rather, an archer or some weird illogical combination. Though I could see a Mounted, Advanced Polearm)

Also I noticed some units have Flank vs Catapult or Trebuchet, etc. It would be nice to just have them the bonus vs early siege units rather than having to name every siege unit.
NICE! First spot on how to use the system I had not yet thought of myself! See what I mean about how well this can help?!? It keeps revealing itself even to me!

I suppose this also opens up a better refining of culture units. Since they will need to be redone too. Thus making them as unique as we want I suppose. Such as a Samurai using a Katana. Which would be different than any other sword in the game.
Yes, to assist a future project, if the Cultures themselves came stock with a Combat Class definition(Ex: Combat Class: Japanese) and gave those to their special units, that would be a good thing. There's also perhaps each should get a Culture Promotion that comes free with the Combat Class. The system will aid in political interplay methods I have in mind to come down the road too. Thanks for reminding me... I'd been loosely considering this but forgot to mention it in the above ramblings.


Armors why not:
light leather armor
heavy leather armor
bamboo armor
light hauberk
heavy hauberk
light plate armor
heavy plate armor
Kevlar armor
Nanomaterial armor
Nanobotic armor

Maybe now i dont undersatnd the goal behind your armor system.
Tonight... I'll explain it all. For now understand that SubCombats are just ways to include on the unit definition CATEGORIES of armor and weapons (far different from the actual equipments.)

Good, I guess I should add GOM_UNITCOMBAT to the expression system.
Wow... that would be exceedingly helpful from here on!

@AIAndy: I would've loved to have done it that way. In fact, I'd like to be able to remove the initial Combat Class definition entirely but there's too much python linked to it. I actually found I needed to remove the isCombatClass() from being possible to be included in hasSubCombat on a unit due to the potential to have the same Combat Class definition twice. I also did it this way for now in case I somehow missed any places where the original was. Perhaps down the road, with some python programmer coordination and some UI programmer coordination, some adjustment could still be made there to improve on that in a way you suggest. You'll notice in the 'CvButton something or other' I left a note where I wasn't able to decipher how SubCombats should be expressed there. Perhaps this was for the Unit Pedia? Wasn't sure what it was for in the first place.

I imagine the various armor and weapon subtypes would be used to give various bonuses or maluses against each other. Much like the current Bamboo Armor gives a bonus against Archery units, but in much more detail. Also, the plans for equipment upgrades as mentioned.

However, I feel like the weapon categories may be rather too complex, especially for new players and the AI. I think something along the lines of a few broader categories, combining to give a rough overall description, may be better than going into quite so much detail. Also, there is such a thing as too much micromanagement.

I imagine a fair bit of inspiration could be found in FfH's typed damages/resistances as well.
Ah, yes... I forgot to mention the application on that last bit. I mentioned it the other day to Hydro... That's probably best expressed as SubCombat definitions defined by the weapon and armor equipments themselves so they transfer onto the unit and can change based on the individual weapon selection.

As for the second paragraph there, I would like to agree but after a lot of speculation on how to manage the Units and Weapons, I think its necessary to have such fine definitions on that. Let me know what you think after tonight's Equipment explanation.

Heavy Armor
- Splint Armor
- Banded Mail
- Half-Plate
- Full Plate
- Great Armor
You're following my intentions here pretty closely, yes, but I wanted C2C to define those last two as armors that can hardly be functional without being mounted (as that was generally the reality of those armors.) thus I added to the list a heavier armor category. Most of the items on your list there would be the specific equipments themselves, some of which would be equal yet differing. I'll explain how that will work later tonight. Materials is obviously another way to differentiate the level values of equipments within armor and weapons categories as well. For example, a clubman could have a Crude Bone Club or a Crude Stone Club, possibly even a Stout Icecycle Club etc...

Also if we ever apply the Morale system we may want to give our Bard type units various musical instruments.
Quit giving out spoilers! lol! Yes... I had this in mind too.

And if we set up the various Dojos we may want to have units learn different Martial Arts styles or just combat styles in general.
I posted a proposal that probably didn't make as much sense as it might make now back where you were discussing this with Vokarya a bit ago... went along similar lines.

Which could lead to I suppose also troop formations maybe?
An outstanding idea!

RE: size Modifiers - Yes, something like that... I didn't want to go into detail there yet because I have yet to divulge the new tags those would represent effectively. Much much more to come on the Combat Mod in full.

Sounds fun, thx Thunderbrd.
Thanks! There's still a lot of xml work to get this going yet.

Hmm, how will this work? When the unit is trained it has NO promotions except those given by player mods and the buildings present, so it won't have subcombat-providing promotions yet to trigger the addition of other promotions from buildings.

For example suppose I build a melee unit with 5 exp points from general civic/building bonuses in a city with a building that gives extra bonuses to archers. I then spend the 5 exp points on a (hypothetical for the purposes of illustration in this example only) promotion that adds the subcombat 'archer'. Net result is that I have trained a melee-archer, but he didn't get the bonuses from buildings that give extra stuff to archers built there, because he wasn't an archer at the very point he was built (only became one later when I spent his exp points).

In what cases would you envision buildings that give combatclass predicated effects to actually operate on subcombats? (since in general most units won't have subcombats at the point of being built, will they?)
Actually they would. The majority of the Combat Classes that define a unit will be included on their base definitions. Promos CAN add combat classes, but its not even really the primary way they get those extra definitions. Yes, those later addons would sadly avoid any 'on built' benefits, but I have some compensations made possible for those scenarios too that I'll explain once I get more into some of the specific building tags.

But primarily units come mostly subcombat pre-defined out the gate with the SubCombatTypes tag.
 
I've always felt that archery units should do collateral instead of siege.
 
So, good luck getting the AI to understand this. :hammer2:

Now what's step two?
 
@AIAndy: I would've loved to have done it that way. In fact, I'd like to be able to remove the initial Combat Class definition entirely but there's too much python linked to it. I actually found I needed to remove the isCombatClass() from being possible to be included in hasSubCombat on a unit due to the potential to have the same Combat Class definition twice. I also did it this way for now in case I somehow missed any places where the original was. Perhaps down the road, with some python programmer coordination and some UI programmer coordination, some adjustment could still be made there to improve on that in a way you suggest. You'll notice in the 'CvButton something or other' I left a note where I wasn't able to decipher how SubCombats should be expressed there. Perhaps this was for the Unit Pedia? Wasn't sure what it was for in the first place.
When I added GOM_UNITCOMBAT, I sneaked in a hasCombatType method that works similar to hasSubCombatType but considers main combat type and sub combat types equally.
 
Hydromancerx, stop playing DnD3 :p (I say that ofter answering a thread about massive dommage in another forum ^^')
The good news is archery horse will be Archery AND Mounted ^^ Hunters wont be anymore the "no one have bonus against them"
But I think too that having too many subclasses will totally lost AI :s
 
@Thunderbrd

I have another question ...

So lineages like the Law Enforcement, Medic, Recon and Criminal line cover many types. Are you saying that we can have combos such as ...

- Medevac Helicopter = Healer + Helicopter
- Police Car = Law Enforcement + Wheeled
- Adventurer = Recon + Mounted
- Medical Ship = Healer + Diesel Ships
- Mobster Car = Criminal + Wheeled
- Pirate Ship = Criminal + Wooden Ship

Hydromancerx, stop playing DnD3 :p (I say that ofter answering a thread about massive dommage in another forum ^^')
The good news is archery horse will be Archery AND Mounted ^^ Hunters wont be anymore the "no one have bonus against them"
But I think too that having too many subclasses will totally lost AI :s

I have not played D&D for years. I played it in high school (and a little in college). That's why I am familiar with D&D 3rd ed and not 3.5 or 4.0 or whatever version they have out now. Which is why I got out my old books on them since they deal with attack vs damage for specific armors and weapons.
 
@Thunderbrd:

*head hurts* man this is a lot of new ideas for one mechanic in the Combat Mod. I can hardly imagine how much XML will be needed just to clean up references in Units and Promotions to unitcombats for this. For instance, if we made Cavalry units UNITCOMBAT_CAVALRY and UNITCOMBAT_MELEE, then Axemen would get +50% against them, Shock would apply against them, and so on and so forth. Ditto for almost any other combination of combats that I can think of.

The other nightmare I see from this is the AI. It is already not good at unit selection, and I can't imagine that it will get better now that we are giving units arbitrarily high quantities of unitcombats. I know that much of the Unit selection logic is handled by UNITAIs, but I think that if all that the AI sees is the unitai, then it will be oblivious to the opportunities presented by the subcombats. I think that before implementing any of the features of the Combat Mod into the XML that we should make sure that the AI will not be inconvienenced by them.
 
@Thunderbrd:

*head hurts* man this is a lot of new ideas for one mechanic in the Combat Mod. I can hardly imagine how much XML will be needed just to clean up references in Units and Promotions to unitcombats for this. For instance, if we made Cavalry units UNITCOMBAT_CAVALRY and UNITCOMBAT_MELEE, then Axemen would get +50% against them, Shock would apply against them, and so on and so forth. Ditto for almost any other combination of combats that I can think of.

The other nightmare I see from this is the AI. It is already not good at unit selection, and I can't imagine that it will get better now that we are giving units arbitrarily high quantities of unitcombats. I know that much of the Unit selection logic is handled by UNITAIs, but I think that if all that the AI sees is the unitai, then it will be oblivious to the opportunities presented by the subcombats. I think that before implementing any of the features of the Combat Mod into the XML that we should make sure that the AI will not be inconvienenced by them.

True, but why would you ever flag cavalry as melee???

I actually don' think this will be too bad for the AI. It already takes into account all the combat modifiers, and this won't change that (just changes where they come from). As far as evaluating stuff it's really just more promotions, and with a few tweaks the existing promotion evaluation should cope fine. The existing code for building-based unitCombat modifiers should also work fine (it's just more unitCombats that a unit can have)
 
True, but why would you ever flag cavalry as melee???

I actually don' think this will be too bad for the AI. It already takes into account all the combat modifiers, and this won't change that (just changes where they come from). As far as evaluating stuff it's really just more promotions, and with a few tweaks the existing promotion evaluation should cope fine. The existing code for building-based unitCombat modifiers should also work fine (it's just more unitCombats that a unit can have)
1. That was just an example, I was actually thinking of giving Horse Archers the Archer unitcombat, and then realized all of the implications of that.

2. OK, That makes sense.
 
Well I was thinking of the Horse Archer. We have a Horse Archer and A Horse Crossbowman. What if it worked like this?

- Archer = Archer + Human + Bow
- Crossbowman = Archer + Human + Crossbow
- Horse Archer = Mounted + Horse + Bow
- Horse Crossbowman = Mounted + Horse + Crossbow
- Camel Archer = Mounted + Camel + Bow
- Llama Archer = Mounted + Llama + Bow

Thus you can have specific bonuses vs Bows but not Crossbows. Likewise you can have a bonus vs Horses but not Camels.
 
1. That was just an example, I was actually thinking of giving Horse Archers the Archer unitcombat, and then realized all of the implications of that.

2. OK, That makes sense.

Ok, I take your point. I guess there would probably be a need for some rebalancing. The horse archer example is worth thinking about - it might be a significant disadvantage because the unit would be counterable by many more unit types than either a simple archer or mounted unit would (spears and javelins for example would both get big plusses against it). Of course, it would also be eligible for a wider variety of promotions, and bonuses from buildings...I'm not sure where the balance woud lie, hit there's a good chance it will change things around enough that well need to do some unit rebalancing.
 
Back
Top Bottom