M:C Medieval Combat

Kailric

Jack of All Trades
Joined
Mar 25, 2008
Messages
3,100
Location
Marooned, Y'isrumgone
Watching a recent show on medieval combat got me to looking ahead to the planned Medieval Combat expansion. I wanted to write my ideas down before I lose them.

In M:C we have several new combat equipment, factors, and features listed below...

Armor Types (XML code)
UNITARMOR_LEATHER
UNITARMOR_SCALE
UNITARMOR_MAIL
UNITARMOR_PLATE

Combat Tactics (XML code)
UNITTACTIC_PARRY-> chance to completely block attack
UNITARMOR_SHIELD->Shield Block-> chance to completely block attack

Weapon Attributes (XML code)
UNITWEAPON_BLUNT-> chance for Crushing Blow

Promotions
-First Strikes-> Archers can get some free attacks before the enemy closes
-Immune to First Strikes

Combat Effects
Glancing Blow->each swing has a chance for this, does half damage
Crushing Blow->vs Plate Armor(I think), only from UNITWEAPON_BLUNT, each swing has a chance for this, does double damage

New Ideas below this line
-Mail Armor and greater causes Glancing Blows to do no damage
-Lances->Bonuses vs Any armor but Plate
-Pole Axe or Billhook->bonus vs Plate Armor, but chance to become vulnerable
-Vulnerable-> you are at risk, opponent has greater chance to hit for greater damage
-Critical Strike-> does double damage
-Falchion->bonuses vs Mail Armor
-Flail->bonuses vs Plate Armor, but chance to become vulnerable, resistance to Block and Parry
-Godendag->Peasants weapon, bonuses vs Mail or greater
-Unhorsed->Knights lose their horse and must fight on foot

New Combat State: Endurance->each swing weakens each combatant, they lose endurance, lessening their damage.

New Yields or Requirements

Aketon or Gambeson-> This could be a weak armor type made from wool cloth, and also it could be an additional requirement for Plate Armor units as Knights wore this under their Mail

War Horse->armorsmiths can create this Yield with Ore, Tools, Wool, and Horses, some Mounted professions would then require War Horses, there would be two types of Barding: Chain or Plate

New Techs or Techniques
Steel Plates-> allow for first type of Plate Armor
Blast Furnace->allows for Full Plate, most advanced armor, UNITARMOR_FULL_PLATE
Tempered Steel-> a technique called Quenching hardens armor, making Full Plate Immune to First Strikes or Archer missile attacks.
Ulfberht->Elite Viking sword, Increased chance for Critical Strike

Master Craftsmen

-Instead of normal techs on tech trees, the new Techs could only be learned by Masters that are working in their shops. After certain techs are learned there is a chance each turn that they could learn a new Technique.
 
We need a completely reworked combat system at some point. The current system is flawed in a number of ways.

Imagine a combat system like this:
Each round there each unit tries to hit the enemy. If it hits, it causes damage. Both units has a chance meaning both units might be hurt. The combat can then end after a certain amount of rounds if nobody died.

Using a system like that, we can give each unit numbers like:
  • chance to hit
  • damage type
  • damage
  • damage type (like piercing, cutting and so on)
  • chance to avoid (counters hit chance)
  • damage avoidance/modifier vs different damage types (armour)
I haven't really worked out ranged attacks yet, but presumably the first strike system would do the trick. If coded correctly, this will make as much sense for pikemen vs archers as it would with machinegun vs tanks.

Also if we have an internal representation of numbers where they are all multiplied by 100, it would scale better. Right now if we have strength 3 and we gain +25%, it becomes 3 due to int scaling. 300 + 25% = 375.

It would be a huge task to implement, particularly because the AI has to be able to handle it well as well as humans.

I can't really avoid linking to this video when the topic is medieval warfare.

Master Craftsmen
-Instead of normal techs on tech trees, the new Techs could only be learned by Masters that are working in their shops. After certain techs are learned there is a chance each turn that they could learn a new Technique.
It should gather points somehow and increase chance as the number of points increase. It would be unfair if the chance is the same every turn as it could make one player invent this after one turn and another after 120 turns.
 
Imagine a combat system like this:
Each round there each unit tries to hit the enemy. If it hits, it causes damage. Both units has a chance meaning both units might be hurt. The combat can then end after a certain amount of rounds if nobody died.

Yes, those are great suggestions

I can't really avoid linking to this video when the topic is medieval warfare.

Umm, I have a new found respect for Master Archers. That is inhuman skill, thanks for sharing. I use to think Legolas was bad ass, but this guy takes him out hands down. Legolas would still take him in a sword fight :ninja: though.

It should gather points somehow and increase chance as the number of points increase. It would be unfair if the chance is the same every turn as it could make one player invent this after one turn and another after 120 turns.

Yes, at some point it would be 100% chance, even 99% chance could never happen :cry:
 
That video was epic!

Now I want to make an rpg where you can play as an archer and unlock those perks to become a badass bowslinger!

With the special 'Master Techs' would it not be easiest to make some of the 'FF' style points gatherers, like merchant techs, so that armourers pay into an armoury 'tech line', weaponsmiths into a weapon line, etc.

So the more of your economy you gear to it, the sooner you will unlock these master techs.

Or is it that you want the possibility that you will never get the tech and it be random?

There are a lot of Civ mods that add ranged attacks for archers and the like, some expand it further with accuracy levels as well. So you can attack without risk to yourself, but with the risk of missing, or you can close toe to toe and be cetain of damage on both sides.
 
Never gain the tech? Hmm, it would be neat to have some techs that are allowed to be only researched by certain Civs. Like in history there where plenty of Techs that only one Civ had access to for extremely long times. Perhaps we can come up with a system where we can implement this and at the same time prevent this from being overpowered. Perhaps some kind of Unique Invention Points you can gain much like accumulating points for Great Generals. After you have accumulated enough Science Points you gain a Unique Invention Point and are then able to gain a Unique Tech. Perhaps, we can bring back the Prolific Inventor points and you gain a Prolific Inventor, which has a unique ability to gain a Unique Tech, perhaps random or perhaps based on where you put him to work. These Unique Techs would be extremely valuable and hard to trade for.

For Archers, I do want something special. Range should be limited to 1 plot though for Archers and perhaps all Medieval Units, except perhaps Trebuchet, to keep it more realistic. I am thinking that Ranged attacks could be like Bombards, you get one shot per turn (or more depending on promotions). If you move the Unit into an Enemies plot this will be considered a Melee Attack and not ranged. Siege Engines cannot move into Enemy occupied plots, therefore can not attack outright.

Archers can Barrage Attack, raining arrows down on the enemy, doing collateral damage. The Enemy can have resistance to Barrage Attacks also modified by their Fortified Defense.

Also, I don't want what they had in Civ4, which was totally unbalanced Collateral Damage. If two equal stacks of Troops fought, the one who attacks first would win nearly 100% of the time because of Collateral damage. So, to prevent this if you attack with a Barrage attack the defender gets to attack with his as well.

How could this be exploited? A player could keep his Archers separate from his main force to prevent Collateral damage. You could move your units up to a City or Stack of Troops and place your Archers separate, however, the move will end their turn, and they cannot Barrage after moving. Then the next turn the Archers will be undefended and exposed, especially to Calvary flanking attacks.

Also, what if you are advancing and the enemy has left his Archers separate from his main force. If you move up next to the Archers they can Barrage you the next turn. For Foot Soldiers they would be at a huge disadvantage unless they have a good Shield Defense value or massive health. Calvary could use their Speed and close quickly gaining a huge Flanking attack (in Civ4 Flanking ability let you do collateral damage to Siege Engines IIRC, it M:C it will be all Missile units). Archers would be on the same terms, as the next turn if the enemy launches Arrows you will launch yours back.

So, I think we can prevent any Exploit and remove the unbalancing of "first to attack victories" with adding Collateral damage.
 
Never gain the tech? Hmm, it would be neat to have some techs that are allowed to be only researched by certain Civs. Like in history there where plenty of Techs that only one Civ had access to for extremely long times. Perhaps we can come up with a system where we can implement this and at the same time prevent this from being overpowered. Perhaps some kind of Unique Invention Points you can gain much like accumulating points for Great Generals. After you have accumulated enough Science Points you gain a Unique Invention Point and are then able to gain a Unique Tech. Perhaps, we can bring back the Prolific Inventor points and you gain a Prolific Inventor, which has a unique ability to gain a Unique Tech, perhaps random or perhaps based on where you put him to work. These Unique Techs would be extremely valuable and hard to trade for.
It can be done in a much simpler way. We have code to tell if this civ is the first to invent a certain tech. We can add restrictions that you can't research a tech if it is already researched. If it is an era 2 tech, it might be given free to be researched in era 3 or 4.

I just thought of something. We have a city state, which starts with all sorts of techs. Somehow I think that's wrong. It spoils the first to discover feature and for some reason it gives the city states 41 techs. Yeah, 41. We should at least make it depend on XML length. I would say that it should be given a certain amount of research points to get a head start and possibly city states shouldn't count towards first to discover.

For Archers, I do want something special. Range should be limited to 1 plot though for Archers and perhaps all Medieval Units, except perhaps Trebuchet, to keep it more realistic. I am thinking that Ranged attacks could be like Bombards, you get one shot per turn (or more depending on promotions). If you move the Unit into an Enemies plot this will be considered a Melee Attack and not ranged. Siege Engines cannot move into Enemy occupied plots, therefore can not attack outright.
I'm way ahead of you. I have BTS code on my HD, which might be a full implementation of this. I haven't looked at it yet though.
 
It can be done in a much simpler way. We have code to tell if this civ is the first to invent a certain tech. We can add restrictions that you can't research a tech if it is already researched. If it is an era 2 tech, it might be given free to be researched in era 3 or 4.

I just thought of something. We have a city state, which starts with all sorts of techs. Somehow I think that's wrong. It spoils the first to discover feature and for some reason it gives the city states 41 techs. Yeah, 41. We should at least make it depend on XML length. I would say that it should be given a certain amount of research points to get a head start and possibly city states shouldn't count towards first to discover.

I already attempted to compensate for City States and Free Techs...

Code:
///First To Research Bonuses must go before this
//Any Civ with Free Techs can effect Global Techs
if (!isNationState() && GC.getGameINLINE().getGameTurn() > 1)
{
	GC.getGame().changeIdeasResearched(eCivic, 1);
}

So, that shouldn't be an Issue. We could put a Tech Points to spend for City States. Yeah, I see I hard coded 41, I also had a TODO to finish that, so I have plans to remove the hard code and add a better system. States that did not lose all that Rome had discovered should be allowed to have those Techs. We could simply mark Techs in the XML as "Roman" tech, and only those are given as Free techs. As obviously, things like Plate Armor, where not invented till later years. I think we'll have to compensate if I haven't already for the REF, as units in the REF can require certain Techs.

I think the Tech Era idea would be good. Like, FreeToResearchEra, once you reach that era it shows on your Tech Screen and anyone can research it. While first to research may be more simpler, the question is would it be more fun or intriguing? We also have the Spy profession coming at some point, who can sniff out these unique Techs and tilt the balances.
 
We could simply mark Techs in the XML as "Roman" tech, and only those are given as Free techs.
We can assign starting techs in XML already (in leaderhead I believe). Why not simply add the "marked" techs there and it will work without any DLL modifications. Also I don't like adding something like Roman to XML. XML should be generic and should be able to handle other mods and other city states.
 
We can assign starting techs in XML already (in leaderhead I believe). Why not simply add the "marked" techs there and it will work without any DLL modifications. Also I don't like adding something like Roman to XML. XML should be generic and should be able to handle other mods and other city states.

Well, I was thinking of a Random system where the Civ pics Techs, or spends Research Points as you mentioned. The "Roman" tag would let them know which ones they can choose from. When I say, "Roman" in quotes I was just using that until we figure out something else to call it. Perhaps simply bAllowNationStates or bIsInitialTech.

Techs are assigned in CivilizationInfos, and without some AI to choose we would need to put lots of Techs. I would rather have the AI choose techs, that way we could put the code to choose techs after it has setup its Cities and perhaps it would chose techs that are fitting to its surroundings.

Edit: Perhaps Techs could have a InitalEra, which tells which Era it is most likely to appear. That way, if an AI Player appears later in the game it could pick Techs up to the current Era.
 
Techs are assigned in CivilizationInfos, and without some AI to choose we would need to put lots of Techs. I would rather have the AI choose techs, that way we could put the code to choose techs after it has setup its Cities and perhaps it would chose techs that are fitting to its surroundings.
Right, it should be able to get research points, but then why restrict what they can be used on other than general restrictions, such as era, requirements and stuff like that.

Another issue is when to get the techs: before or after placing cities. If it gains techs first, it can value the land based on tech bonus. If it get the techs after placing the cities, it can value the techs based on how the cities will gain bonuses. It's like the chicken and the egg issue and they can't both be first.
 
Well, technically, the AI Cities didn't just appear they built up over time. So, in theory if we place the Techs after Cities it means the Techs they acquired where based on their Environment. If the Techs come before it means the Cities grew up based on their Preexisting Techs. So, according to that, the Egg must have come first:p

But for game play, the Techs should come first, so then they can have the Buildings, Improvements, and such for their Cities.
 
Using the Advanced Start setup system from vanilla Civ4BtS enables you to allocate your startup points for Techs as well as units, cities, improvements, etc paying the appropriate point cost for each. This doesn't work in M:C only because it doesn't recognize the M:C "Civic/Techs" as Techs you can buy, but maybe it could be possible to do so :king:
 
Well... how about complete overhaul of combat? Tactical battles! In style of Heroes of Might and Magic series. Somehow I'd just like to see and test this feature in civ style game. But also leave the option to auto resolve combat like it is now.

Some technical requirements:
  • Tactical map.
    There issome kind of parallel maps mod component for civ4. But I think it would be more easy to just have the tactical map laying for example south of the 'real' map. 'Strategic' map units could never land there and 'tactical' units could never leave it.
    The terrain of the tactical map would be randomly defined by the terrain of the plot of the defending units.
    I believe this feature is possible.
  • Initing units for tactical map.
    This shouldn't be hard. You could also make 1 real map unit to represent for example 5 tactical units, to spice things up.
    I believe this feature is possible too.
  • Adjusting game loop for tactical battles.
    This one might be more tricky. But I believe it's possible to for example edit the CvGame::doTurn function NOT to update when tactical battle is on. Also for the sake of fairness I think that tactical unit should be moved 1 piece at time. I mean first player 1 moves 1 unit and then player 2 moves 1 unit. And then player 1 moves next unit etc. Only if other player has more units, (s)he can move unit after another.
  • Combat should be stack vs stack if there is tactical units. Makes no sense to fight dozens of one archer unit vs one knight unit battles of tactical map...
    Possible, but takes some programming effort.
  • Units like archers should be able to do ranged attacks on tactical battles.
    It would work much like air strikes in civ4.
    So... it should be possible.
  • Formations
    Maybe with modding advanced starts system it could be possible to allow player to drop the tactical units on the map on desired formations(locations).
  • 1 Unit per tile.
    On tactical map no 2 units should be able to be on same plot.
    Should be quite easy to program.
  • AI for Tactical combat.
    Ok, it's more difficult of course. But it can start simple. Basically AI would just somehow calculate score for each possible action, and then execute what seems best.
    This is possible of course, but takes some brain work...

And no, I have not started working on this feature. I just want to start discussion. Or am I missing something obvious that makes tactical combat impossible for game engine? I know that there are hundreds of things one need to consider when implementing this, but I think it is possible still.

I just think that this could be something really special for the mod and might attract new players for it.
 
I personally have never really been that into this idea for civ, it would certainly be an impressive achievement, but there would be many other things I would prefer to see.

My favourite combat innovation was from ROM:AND for Bts, which was Surround and Destroy, that simply gave each of your units a bonus strength modifier for every tile you had a unit on around your enemy.

As well as more 'anti-stack' content like collatoral and flanking damages, so that unit combinations and placements become more vital and interesting, along with the ideas of 'combo stacks' that improve the abilities of units in a stack depending on the stacks composition.

I find this more interesting than the 'chess board' style tactical battle map.
 
Yes, I somewhat agree with you Lib.Spi I don't think Tactical combat might fit very well on Civ game that goes through many eras. But for more detailed scenario it might be very interesting. For something like World War II or Cortez vs Aztecs or something... Maybe it would best fit to era with tanks, where you could have things like accuracy, armor strength etc.
 
Well... how about complete overhaul of combat? Tactical battles! In style of Heroes of Might and Magic series. Somehow I'd just like to see and test this feature in civ style game. But also leave the option to auto resolve combat like it is now.
You know, I have been playing Master of Magic not long ago and I started wondering how much M:C can do that is in MoM. Completely ignoring work regarding graphics and XML and only thinking DLL and python, I would say that the only things, which the current DLL can't handle would be two interconnected maps, spells and combat. Interestingly, spells wouldn't be that hard to implement and some of the features are half implemented. For instance change terrain can be done by pioneers in RaR. Enchant Road is simply changing all routes on a 5x5 plot grid to a specific route. CivEffects already do what the diplomacy spells are doing. Unit affecting spells do what promotions do and so on.

Thinking about combat, I started wondering about writing some python screen, which I kind of discarded due to being too much work. However if I read you right, what you want to do is to toggle the game into combat mode. Doing that will generate a new really small map (the old one is kept in a safe location to be restored after combat).

You can then move the units on the battlefield, where you can move them into each other and they will fight. Once all units from one player has died, fled or a timer has run out (counting unit moves, not seconds), then the combat ends and the regular map is restored.

It would be a lot of work, but I don't think there are any hardcoded limits, which prevents us from doing that. There might be an issue regarding having both the combat map and the real map having the same indexes. For instance if somebody place a unit at plot (2,5), that unit could be at that plot during the combat even though the combat takes place somewhere else. In fact we have a bunch of such issues. All can be solved in the DLL and/or python, but it will take a lot of playtesting to discover all issues.

  • Adjusting game loop for tactical battles.
    This one might be more tricky. But I believe it's possible to for example edit the CvGame::doTurn function NOT to update when tactical battle is on. Also for the sake of fairness I think that tactical unit should be moved 1 piece at time. I mean first player 1 moves 1 unit and then player 2 moves 1 unit. And then player 1 moves next unit etc. Only if other player has more units, (s)he can move unit after another.
There is an easy solution to that. Just don't trigger doTurn() in the game loop. We trigger our own function, which does precisely what we want it to do.

As for who to move when. One thing I would consider would be a combat timer". Say we call them ticks. A unit ending it's move can then wait 8-12 ticks before it get the next turn, depending on what it did and possibly randomness. This mean it can be possible to make units, say catapults, which does massive damage at a range, but enemy units can move 2.5 times on average for each time the powerful unit can attack. Heroes of Might and Magic has a system like that to determine the order of unit movement.

All in all an interesting idea and I would love to have it implemented at some point. However not a top priority and it will require a lot of work.
 
However if I read you right, what you want to do is to toggle the game into combat mode. Doing that will generate a new really small map (the old one is kept in a safe location to be restored after combat).

You can then move the units on the battlefield, where you can move them into each other and they will fight. Once all units from one player has died, fled or a timer has run out (counting unit moves, not seconds), then the combat ends and the regular map is restored.

Well, my post maybe wasn't the most clearest ever. But what I meant that instead of having separate combat map, the combat map would be a specific area of the game map. For example it could be located north or south of the real map.Of course, there will be some limits for the bigger maps.

It would be just easier to create than saving and restoring the world map/ game data and switching all graphics again and again, I believe.

It would be a lot of work, but I don't think there are any hardcoded limits, which prevents us from doing that. There might be an issue regarding having both the combat map and the real map having the same indexes. For instance if somebody place a unit at plot (2,5), that unit could be at that plot during the combat even though the combat takes place somewhere else. In fact we have a bunch of such issues. All can be solved in the DLL and/or python, but it will take a lot of playtesting to discover all issues.

That would be not be problem if maps aren't separate. And the normal map area and normal units would be 'frozen' during combat mode. And the tactical combat units would be different objects from the 'real' world map units.

All in all an interesting idea and I would love to have it implemented at some point. However not a top priority and it will require a lot of work.

Yes, lot of work...
 
Well, my post maybe wasn't the most clearest ever. But what I meant that instead of having separate combat map, the combat map would be a specific area of the game map. For example it could be located north or south of the real map.Of course, there will be some limits for the bigger maps.
I'm not sure that would prevent more problems than it causes.

If it's part of the main map, we would have to hide that section while playing normally (from GUI and rendering it unpassable). Also by moving units, we have to move them back afterwards.

By creating a new map each time, we can have different combat terrains, possibly saving the random seed in CvPlot, ensuring that a specific plot has the same combat terrain each time.

If we somehow overload the movement to make it act on combat vs real map mode, we can have a unit standing on a plot in both combat and real map at the same time, meaning it will not move on the real map if it is moved in combat.

Graphics is less of an issue now that I think about it. If I recall correctly, CvPlot caches which unit should be drawn on the plot in question. This mean in theory we can draw the same unit in multiple plots at the same time.

Modcomp regarding multiple maps (haven't looked at the code or even read the thread, but it appears to do what we would need)
[thread]458248[/thread]

The more I think about this, the more I think it could be realistic to implement. However if we start doing anything in this regard anytime soon, we will never release. We have to focus, finish what we are doing now and make a stable release because it's already significantly overdue.
 
Although I do understand this is essentially empire building / trading game, I'm curious to hear why was there decision to have only 1 yield type for weapons? Ok there are armors but somehow I feel that I would like to produce and buy more different types of weapons to field different armies.

Well at least there could be the Ulfbert swords you could buy from the Silk road:
https://www.youtube.com/watch?v=YVSsRunJ2K4

I think I 've seen this video linked here somewhere before, but it's really interesting.

Hmmm... maybe... maybe it would make sense to make master weapon smiths to produce better weapons? So the weapon yields would be: tools, weapons, advanced weapons.

Just some thoughts...
 
Well, to answer your question, the reason there is only Weapons is because we haven't added any more. In the beginning I simply changed Guns to Weapons and grouped all the weapons together and saved that for an expansion all to its own. Perhaps with the planned military expansion we can look into this more. We would need to think of who makes what weapons and how. We could introduce a new profession for Bows, the Fletcher.

I've mentioned ideas on the Ulfbert sword before. Instead of an actual weapon it would be a Promotion that some of your elite units could have.

Anyway, we can discuss these things more in depth when we start working on the military parts.
 
Top Bottom