Thunderbrd
C2C War Dog

Introduction to the C2C Combat Mod
Step II: New Promotion Types
Last night we discussed the Sub Combat Classes and how many new options it would open up for us. There, I mentioned, on a couple of occasions, Equipments, Diseases, Poisons, and Critical Injuries.
Tonight, I'll detail how the setup for those have been designed in the Combat Mod.
But first, I'd like to take a moment to establish a little groundwork for further understanding. (I also just debugged this element in the SVN.)
If you're running the SVN version, you may have noticed that the Combat promotions are not displaying all the steps underneath the level you've promoted up to. Thus, when you have Combat II, you don't show Combat I (but the effect of both exists on the unit - this should be working correctly now.) When you have Combat III on a unit, it does not display the unit as having Combats II and I and on and on... each step up overrides the previous step but maintains its values on the unit.
How has this been done? Well, I must preface this discussion by saying I've got a tweak or two to come to finalize this method for us to get moving on updating all the current promotion sets. You'll notice that ONLY the Combat (star) line is acting in this manner so far. I didn't update them all because I had a feeling I'd make a small change to make this easier for us to keep things straight down the road.
But in short, the method is as follows:
Each Promotion chain is defined by a LineID. It's currently a number but the tweak to come (VERY soon) will make it a name definition instead (but it will still act as a number in the code.) Of course, right now, only the Combat line has a defined LineID.
Each Promotion in a given Line has a Line Priority as well. This is the step along the chain definition. Thus Combat I has a Line Priority of 1 while Combat V has a line priority of 5 and so on.
Without getting into the amazingly complex details of how this works, suffice it to say that it retains knowledge that you 'have' the previous promos for purposes of fulfilling prerequisites of other promotions.
Alright this sounds simple enough, but I wanted to mention it here because the Line Priority works a bit differently for the new kinds of Promotion Categories. And once I get further in here I'll explain that in more detail.
Largely, this became critically necessary for the Combat Mod to include this method of overriding promos, not just because we'd all wanted it for a long time to help unclutter the Unit Box, but because the Combat Mod will add a lot of new promos to units of these new types and its critical to be able to see what you've got without it stretching too many promos off the screen.
We have the following new Promotion Categories (only completed the first one tonight - more to come here tomorrow):
Afflictions
This is an overall category that includes Diseases, Poisons, and Critical Hits. Defining a Promotion as an Affliction is as simple as changing the bAffliction tag in the Promotion Infos file to 1 (defaults to 0 otherwise and is also otherwise unnecessary to include on all promotion definitions.)
These three sub-definitions of Afflictions were necessary to lump together under the definition of an Affliction because new healing functions act on Afflictions in a common manner.
But here's some definitive differences between these three sub-categories:
Disease: Depending on settings, may spread, with a random chance to do so that is influenced by numerous factors, from a city to a unit, from a unit to a unit by being on the same plot, from a unit to a unit after combat is resolved, and from a unit to a city.
Diseases are defined by a building/promotion pair and the mechanisms and tags here are numerous and intricate. I'm a bit short on time tonight so I'm making more of a player overview tonight and will return to the subject of Diseases on a more intense level in another installment to come.
Diseases wear on units and we've seen some of the earliest defined Building disease forms already in play. Diseases can kill, can impede, can even offer counterintuitive benefits. Most importantly, this system allows diseases to be defined in a manner that reflects their real world dynamics among populations to a shockingly accurate degree.
Also... strategy note: when your units are infected, not only is it necessary to get them the hell out of any allied stack they may be traveling in to keep them from infecting the rest , but they can also be used to spread infection to your enemies!
(Here's an area that could really use some improved AI that I didn't want to include until I could work with Koshling and LS612 on this complex matter.)
It may even be necessary to define a fort somewhere as a quarantine and get your healers and similarly infected units out there for repair or at least isolation if they can't be fixed up.
Some diseases grow easier to overcome over time. Others grow harder to overcome over time. Some can never be overcome. Some are not communicable. Some only affect certain combat classes (like Human or Canine for example).
Anyhow, for an introduction to diseases I think this suffices. This is one area that is causing enormous processing delays until it gets much more streamlined in the coding which is going to be an ongoing project here on out. In the meantime, I've designed the Disease system to be fully compatible with the generic Disease method (or at least a simple approach of it.) so I'm also planning to patch the delays in processing by making it a bug option. Especially since there's no cause to delay this much without diseases fully defined yet.
Poisons: When a Unit with a poison use promotion attacks another unit and at least injures that unit, even if it then withdraws or dies, it passes along a Poison Affliction promotion (which is different than the Poison USE promotion that allowed the first to poison the other.)
There's no chance of failure here, aside from possibly failing to injure, but some unit combats could be immune to certain poisons. Otherwise, its an automatic effect applied on injury but won't take effect until after the combat is over. (A future plan could open up the ability to have a unit skill or promo that allows it to get a poisoning in effect on the enemy as soon as the injury takes place, thus affecting the rest of the battle immediately.)
Other mods have something similar, sure, but I wanted C2C to have tags that allow poisons to:
* Do damage over time
* Wear down the unit's abilities until the affliction is healed or overcome
* Paralyze the unit
and more...
In short, I wanted to be able to let us use real world poisons and be able to convert their debilitating effects into game terms.
In the future this may also get into self-poisoning (drugs) etc... but for now I thought I should leave that for some pre-discussion on the topic first.
Critical Injuries: This is a pool of Affliction promotions that also has the bCritical tag set to 1. It is infinitely expandable at will and requires no real tricks aside from simply creating the injury affliction promotions themselves.
Every round in battle, the amount of damage that a unit suffers is divided by 10 and becomes the base % chance that the unit also incurs a Critical Injury. Combat is chaotic and the injury itself is defined by a random check through all possible Criticals so far designed.
The chance for criticals can be manipulated by the skills and abilities of the unit that may potentially inflict them as well but I'll get more into that when I get into the Unit ability tags.
Criticals could include:
[*] Broken Arm
[*] Fractured Hip
[*] Twisted Ankle
[*] Concussive Daze
and on and on the list could go. They may be limited by SubCombat class too so you can have, for example: a severed tail only applicable to animals with tails etc...
Criticals are a vast wildcard that can immediately throw off all of the best assessments of odds by an attacker as they immediately go into effect on the unit and can become the crippling effect that ends that unit's ability to effectively fight (or even retreat), spelling its doom. It's impossible to predict that this somewhat unlikely event will happen.
Generally, the chance per round caps out at something like 6% and if you've got that high a chance to take a critical, you're probably in over your head already! (Damage is largely defined by the odds comparison in the first place.) Of course, added skill and ability to inflict a critical on a unit is like a stealth factor that gets around odds assessments for a potentially nasty little surprise.
There are lots of tags that allow us to inflict a wide variety of pain on units and that define how hard or easy it is to overcome or resist receiving (largely in the case of poisons) a given affliction (a severed tail could be made simply impossible to overcome until regenerative technologies are developed for example.)
Each type of Affliction is meant to deepen the strategic decision making layer of the game, not to be a way to pick on units. Poisons are a deliberate method of inflicting Afflictions, Diseases must be managed as a normally unwanted problem but can be harnessed against your enemies, and Criticals deepen the combat mechanism itself with a wild card factor that cannot be assessed by odds.
Overcoming Afflictions: There's two ways to overcome Afflictions. You can be Cured by a healer who knows how to cure that specific type of affliction (missions with skill access granted by healer promo lines and upgrades adding basic knowledge that expands their set of curable afflictions.) Such a mission may only be performed by a healer once in a given round and on one unit with the selected affliction in the same stack.
You can allow your unit to try to shake it off. Much like healing, this requires some R&R for the unit so it can't happen if you've moved the unit. Units have varying abilities to throw off afflictions individually - more on this once I detail the Unit ability tags in full, and as noted different afflictions are more or less easy to overcome and some may get easier or harder over time.
This will all be quite easy to track and understand with mouseover informations added to both the unit and the Affliction promotion button. But suffice it to say... attempting to weather it out and heal an affliction is a random chance to overcome every round.
Also, the very proximity of a healer with a generic Aid ability will add to the probability of overcoming an Affliction as well. Note: Healers themselves could inadvertently fall prey to a powerful disease they're trying to treat! Always research the afflictions you're dealing with to form a plan on the best means to address it. (and again, some AI planning could help a lot with this on the Computer Player side of the fence. If done right, it will be another way the AI can really get an edge on the player.)
Step II continued...
Equipments
We've discussed the extra possible Combat Classes and its critical to understanding how Equipment promotions will work.
Equipment promotions guide a lot of the combat information on a unit. There's a lot of new tags for more specific adjustments to a unit's ability than simply additional strength % in combat. And these will help to differentiate varying weapons and armors significantly.
But equipments don't have to be just weapons and armors. They can also be clothing, special tools, musical instruments, and even, breaking the mold on what's expected to be an equipment - Unit Formation promotions.
The main things to consider with equipments are this:
- Equipments are handed out by buildings in cities and really should be free on moving into the city, not just for units built there.
- They will only be handed to units that qualify for them - thus one reason to be very defining on equip category subcombat classes.
- Equipments are handled in LineIDs and Line Priorities. If a 'better' equipment along a line exists, units will automatically pick those up and override what they are already carrying. However, although I still have a little tweaking to do to allow for this, units should be able to choose to switch equipments when same lineID and same Line Priority access is encountered in the same city. As I currently intend it, it will take up the move of the unit to switch but it leaves you with some options to make some equipments equal yet different along the same path (defined by lineID). Thus, while you can't have, say, Poison Dart Frog Arrows I and Flaming Arrows I at the same time, your unit will naturally default to picking up one of them if both are in the city, but will give you the option to switch if your unit stays there. But if you pick up Poison Dart Frog Arrows II later on, you'll override either selection.
- Many who are looking for equipment mods are looking to charge gold to have a unit pick up an equipment. I believe that the taxes earned from the free market sale of any given new equipment type developed in a city will naturally balance out to automatically wanting the best for your units and thus it should be unnecessary to charge for equipment upgrades, but rather make them automatic.
- The ability to create a given equipment from a building will be defined largely by tech and bonus (resource) access, but the unit evaluates what's available. Thus, one building like an armory can have a lot of free promos it can hand out. A new tag to allow for an infinite amount of free promotions a building assigns is in place now. The unit itself filters what promos it can take so the building is always trying to give them all and allows the unit to guide the selection process by evaluating what techs and bonuses are available. Equipments can also obsolete.
Therefore, an armory could hand out a whole line of armors but the unit will see what's really available.
- Unlike normal promotions, Equipments (and Afflictions) completely replace any previous version of themselves on a given line. If I take Flaming Arrows III it will override all lesser arrow forms and remove them from the unit. They don't add up to a total like the Combat line. At Combat IV, you still see its worth only +10% combat value but It's really going to compound the full effect of every promotion along the line to get there (thus it's worth +40% in all reality.) These special promos won't... what you see is what you get.
- You can't take an Equipment or Affliction the same way you earn a Level based Promotion... they are handed out only by the cities that have them to offer thanks to the buildings, bonuses, and techs that combine to define what can be offered, filtered out by what the unit will allow itself to have, largely as a result of its Combat Class definitions.
Ok, some of that may have been getting redundant but I'm hoping saying it all in different ways will help if you're at all confused.
- For the modders: If you can rationalize the cause for a unit's ability to be based on its equipment selections, then the equipment promotion should carry those definitions, not the unit itself, even though the unit definitions craft the definition of the equipment lines available with their subcombat definitions. The unit type itself largely indicates its Combat Class definitions, Basic Training variations, graphics and base power more than anything at this point. Even movement could be relegated to defining various mounts and armor penalty counters, though that's not necessarily what I envision, just a possible way to go about it. Additionally, no unit should be trainable without the basic same qualifications for the minimum quality assumed to go on a unit, making the unit automatically always pick up at least the lowest quality available base equipments when it is trained. There are a few new tags that define the unit's abilities (Armor, Puncture, Dodge, Precision and more) that should really not be defined on the unit at all except in rare cases, but defined through the Equipments they are using.
This is an area where AI evaluations could be improved to adjust to this method of unit values inherited from the locally available equips.
I think that covers equipments fairly well... not sure if I'm leaving something out.
Footnote: if someone with some graphics skills wants to help us get REALLY tricksy, there is a tutorial on how to get promotions to change the specific graphics on a unit in the main Creation and Customization thread. I'm going to be perpetually too busy to adapt that in here but it would really be cool to see if some new modder wants to make that their specialty here as this Equipment system would work so nicely with that.
OK, so later I'll come back and give some really in depth notes for the mod team on the Advanced Disease system so you can fully understand all the toggles and switches to make that machine work just how you want it to and take requests on tweaks to make it do things you may find missing.
Also, to come soon:
Part III: The New Behaviors of Combat