Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Alpha Centauri Bear on December 24, 2019, 03:55:20 AM

Title: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 24, 2019, 03:55:20 AM
Fellow mod lovers, I am ready to fix combat mechanics in my The Will to Power mod. However, I'd like to discuss it with others to pick better implementation. Therefore, separate topic.

First let me review what is wrong with vanilla implementation even though this was discussed like thousand times already.

1. Combat round odds are NOT as shown on TV (on odds display dialog). :)
This is regular bug that needs to be fixed. Oddly enough the wrong formula has been propagated here from Civ1, thought Civ2, and then SMACX without modifications. Even though right formula is as easy to implement. Either no one it all three teams can compute probabilities or maybe nobody just cared.

2. Introduction of multi round combat and HP/healing in Civ2 broke combat balance.

In Civ1 unit combat effectiveness was simply ratio of corresponding combat strength (attack/defense) to cost. Meaning if one side places fortified Phalanxes in plain field (cost 2, defense 3, effectiveness = 3/2) and other side sends Legions (cost 2, attack 3, effectiveness = 3/2) to crush them - both sides incur equal losses in unit cost and the side with higher production power will advance. It wouldn't matter if attacking side sends Catapults in battle instead (cost 4, attack 6, effectiveness = 6/4 = 3/2) - the effect would be same.
Overall strategy revolved around three things:
1) Increase sheer empire production power.
2) Discover more effective units. Chariot effectiveness = 4/4 = 1. Armor effectiveness = 10/8 = 1.25. Armor is slightly more effective than Chariot.
3) Use units properly to increase their effectiveness.
From protection side: use defense bonuses of fortification, terrain, structures, etc. Prepare defense on anticipated attack directions. Build fortress and defend key spots: hills and mountains as well as just important resources.
From invasion side: research defense pattern and attack weakest spot to pay as little units as possible for captured bases.
#3 was actually most strategical fun. Imagine fighting two enemies from opposite sides. Without enough power to wipe them both at once one could seal one border shut with limited number of well placed defenders. Then throw the rest of units against other enemy. Makes you feel a strategical mastermind.

Now let's see what it turned into in Civ2. Multi round combat skews winning odds toward strongest side very much. In Civ1 combat with 3:2 odds is won 60% of times. Meaning 40% of times stronger unit just dies. In Civ2 it is won 80% of times (94% with infamous combat probability bug O_O). Meaning stronger unit almost never dies. The mere loss of HPs can be healed to restore unit to full capacity = zero loss for stronger unit owner. In this game sending Catapults and not Legions against Phalanxes makes a whole lot of difference! This introduced an indestructible army phenomena. Large enough group of strong enough attackers captures city without losses -> heals in captured city -> repeats. With reinforcement it gets bigger and snowballs turning into absolutely unstoppable swarm. I recall one Civ 2 game when I captured whole world with couple of Frigates carrying like 5-6 Crusaders. As if this is not enough, SMACX emphasized weapon even stronger turning conquest into easiest and fastest victory among others by far. People have to actually willingly stop the conquest to enjoy ascent to transcendence. Otherwise, it is plainly not achievable. Sad story.

Back to our bug fixing business.
#1 above should be fixed easy-peasy.
#2 is not so straightforward. I consider few solutions here.

Solution 1
Adjust individual round odds so that cumulative multi round combat odds are as advertised. I am listing this one just for the sake of completeness. I don't believe it is feasible. Too complex math and too much of fine tuning prone to errors. Besides, it would be exceptionally difficult to explain players how it works.

Solution 2
Use one round combat. One unit lives another dies. This immediately restores proportional losses. Now one does not need concentrated fire to be able to kick out opponent units from well defended base one by one. Attacker still incur quite large losses due to defense bonuses but the chance to kill a defender with a single unit now is not zero anymore. Helps AI who doesn't know how what concentrated fire is. This also completely eliminates indestructible units of all kinds. For example it is not possible to hunt natives with a single Scout Patrol forever. With 3:2 odds it is bound to kill 1-2 natives on average and then die. Now player would need to think whether hunting is worth the cost building new unit.
Cool stuff is that bombardment and collateral damage still deliver partial damage. Thus effectively and proportionally reduces winning chance. Which is an intended design.

Solution 2a
Even if bombardment and collateral damage deliver partially damage they are not that often in game. Especially not in early game. Ignoring healing would be undesirable loss in functionality. So I was thinking to amend above solution with random damage to winner. That does force winner to retract for healing or continue with reduced winning chance. Player's choice. Strictly speaking that slightly tilt combat balance toward loser as throwing damaged winner into further battle reduces this unit effectiveness. However, this also benefits base defenders. They do not need to go anywhere to heal and they are healing faster. Attackers in turn need to rotate for healing or otherwise sacrifice themselves for cheap.

Solution 2b
Same as above but fixed damage instead of random. Probably somewhere around 50% configurable. Benefit is in adjustable configuration. The effect can be toned up or down.

Both 2a and 2b above have nice tactical twist in them: player need to decide whether to waste time healing unit to full strength or continue with lower success chances.
No more stupid and 100% safe needlejet raids against formers for mere purpose of free promotions. Now needlejet may just DIE. With above rules there won't be stupid free attacks anymore. One needs to weighs cost/benefits for EVERY attack.
 :luv:
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 24, 2019, 05:02:29 AM
Quote
No more stupid and 100% safe needlejet raids against formers for mere purpose of free promotions. Now needlejet may just DIE.

But that is not a good goal.  It's completely nonsensical.  A Former should just die when attacked by a Needlejet.  If you don't like that players can destroy Formers with Needlejets, I have to ask why.  Going after enemy infrastructure is very basic to warfare.  If you think a Needlejet promotes too easily when going after a weak unit, then you should change the promotion formula somehow.  Personally I think that is a non-problem, I do not see the big deal.

I really hate game designers who implement "It is always possible to fail, and it is always possible to succeed".  I just got done lambasting the designer of King of Dragon Pass and Six Ages because of that.  It introduces nonsensicality and gaslighting into a game.  You never know what reality actually is.  Did you win because you applied a skillful insight, or because you got lucky?  Ditto why did you lose?  Especially when the game doesn't even tell you how anything works, when it is formula opaque, it's severely annoying.  So annoying I'm not playing those 2 games now.

As for other things... who is "combat balance" for?  Is it for multiple human players trying to kill each other?  Is it for a single human player trying to beat AIs?  Those are really different requirements.  Much depends on what the AI is capable of doing, and how capable you are of tweaking the AI's behavior.  You wonder why buggy formulas didn't get changed.  But for all you know, you could fall down a rabbit hole where the AI suddenly doesn't work very well anymore, if you change it.

AI does actually mass units against me all the time.  I rely on splash damage to deal with it.  Don't assume your personal play style is the only way people fight in SMAC.

Some games, I do actually use artillery on targets.  If you don't, that's your bias of play style.  Sometimes artillery is the best option available.  Sometimes options are limited.

Winning, but getting badly wounded, isn't necessarily victory.  You could lose everything on a counterattack.  Sending units back to be healed somewhere is also not a completely free lunch.  You are losing time and momentum.  There's a big difference between taking a base and not quite taking a base.

I don't know how your Scouts are surviving Psi combat without taking wounds, unless they've leveled to Elite or something.  I find that Psi combat usually chews up the participants.  If you think it's too easy for a unit to be good at Psi combat, you can't fix that by changing your effectiveness odds around.  It doesn't take any weapons to do Psi combat.  That's the point, that's a basic part of the game design of SMAC.  The only production decision is whether someone is going to make another Scout, which costs nothing.

In the past I recall conversations where you were really against Planet Pearl collection.  You went to some length to change combat odds around, in ways that I proved didn't work.  It just changed the best way to game the fungus fights.  Defense became better than offense.  Consequently after several rounds of experimentation, I gave up on your proposed changes for that.  If you really hate Planet Pearls, I suggest you change the amount of wealth they produce, and not how the combat works with mindworms.
Title: Re: Fixing combat mechanics
Post by: dino on December 24, 2019, 10:58:02 AM
I'm not sure it's in need of further fixing.
As far I'm concerned it's already fixed in your mod with reactor, collateral changes and increased defense ratings and the current system fixes "destroying an ironclad with a trireme" issue.
The changes proposed here have less naunce than original rules and the main advantage seem to be an easy formula to calculate accurate odds.

It's very hard to gain more than one tier of tech advantage and without multiround combat, tech advantage would be almost diminished, since 3 weaker units could be as effective as 2 stronger ones.

As for odds, just Att*HP/Def*HP while inaccurate, is enough of estimation for decission making.
Especially if player understands, that the further from 50%, the more uctual odds differ from estimation and lets be real, your mod won't be played by not experienced SMAC players.

If you really wanted, to calculate odds correctly for the purpose of presenting them to the player, you could with a tree algorithm.
Generate a probability tree, calculate probabilty of reaching each leaf and add them up. It's a second semester in computer science kind of excersise, but I don't think it'd improve the game experience much.

As for issue #2

With current system, you can achieve everything you want just by reducing numeric differences in units strenght: slightly smaller percentage bonuses for morale, base defenses and smaller differences between weapon/armor ratings and lets say 4/3 Psi odds, would bring actual odds of destroying a unit, closer to what you want, while keeping all the naunce of the current system.
I'm not sure, it's necessary beyond increasing armor values closer to weapon, which you already did, though.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 24, 2019, 01:51:31 PM
First of all, as I said, everybody has different vision on what game they want to play. Therefore the discussion.

Quote
No more stupid and 100% safe needlejet raids against formers for mere purpose of free promotions. Now needlejet may just DIE.

But that is not a good goal.  It's completely nonsensical.  A Former should just die when attacked by a Needlejet. 

If you are judging game sense from real life point of view you should be in "Phalanx cannot beat the Tank" discussion. I am not pro or against it - I just don't care about real life mechanics implementation in games.

If you don't like that players can destroy Formers with Needlejets, I have to ask why.  Going after enemy infrastructure is very basic to warfare.  If you think a Needlejet promotes too easily when going after a weak unit, then you should change the promotion formula somehow.  Personally I think that is a non-problem, I do not see the big deal.

I really hate game designers who implement "It is always possible to fail, and it is always possible to succeed".  I just got done lambasting the designer of King of Dragon Pass and Six Ages because of that.  It introduces nonsensicality and gaslighting into a game.  You never know what reality actually is.  Did you win because you applied a skillful insight, or because you got lucky?  Ditto why did you lose?  Especially when the game doesn't even tell you how anything works, when it is formula opaque, it's severely annoying.  So annoying I'm not playing those 2 games now.

I never said I want to prohibit player doing things. On the contrary, I want to enrich their options. Going for enemy infrastructure is an essential part of this game which I very like.

"It is always possible to fail, and it is always possible to succeed". This is called randomization and it is an cornerstone part of all games in the world. What is wrong with it? It is still possible for needlejet to die attacking former in vanilla. I am just proposing different probability distribution. This change is not that significant either. It does not turns odds upside down. I was jokingly exaggerating the danger a little. In vanilla needlejet change to die is about 0.0001%. In my version it'll be ~10%. Noticeable but still not that much to discourage purposeful former hunting.

I don't care about promotion in this particular topic. I care about impunity. That adds mouse clicks without much thinking. Why just not have a special button in vanilla "automatically destroy all enemy formers in the 10 square radius around your bases"?

As for other things... who is "combat balance" for? Is it for multiple human players trying to kill each other?  Is it for a single human player trying to beat AIs?  Those are really different requirements.  Much depends on what the AI is capable of doing, and how capable you are of tweaking the AI's behavior.  You wonder why buggy formulas didn't get changed.  But for all you know, you could fall down a rabbit hole where the AI suddenly doesn't work very well anymore, if you change it.

Aid AI. Now even single unit attacking a stack is not futile.
Remove some more cakewalks for human for more challenge and less thoughtless mouse click.

AI does actually mass units against me all the time.  I rely on splash damage to deal with it.  Don't assume your personal play style is the only way people fight in SMAC.

How can I not assume it? I am playing it myself, you know. I am completely aware my changes may be disgusted by some part of humankind. Do you think I should stop doing this then?
You among all others have an opportunity to introduce your own vision into my changes. I believe this is quite democratic and the best I could do.

Some games, I do actually use artillery on targets.  If you don't, that's your bias of play style.  Sometimes artillery is the best option available.  Sometimes options are limited.

Never said I don't. Quite the opposite.

Winning, but getting badly wounded, isn't necessarily victory.  You could lose everything on a counterattack.  Sending units back to be healed somewhere is also not a completely free lunch.  You are losing time and momentum.  There's a big difference between taking a base and not quite taking a base.

I don't know how your Scouts are surviving Psi combat without taking wounds, unless they've leveled to Elite or something.  I find that Psi combat usually chews up the participants.  If you think it's too easy for a unit to be good at Psi combat, you can't fix that by changing your effectiveness odds around.  It doesn't take any weapons to do Psi combat.  That's the point, that's a basic part of the game design of SMAC.  The only production decision is whether someone is going to make another Scout, which costs nothing.

Yes, yes, any change in mechanics change the strategy and the play stile to some extent. I am aware of it. I do want to change it. The question is how and to what extent.

In the past I recall conversations where you were really against Planet Pearl collection.  You went to some length to change combat odds around, in ways that I proved didn't work.  It just changed the best way to game the fungus fights.  Defense became better than offense.  Consequently after several rounds of experimentation, I gave up on your proposed changes for that.  If you really hate Planet Pearls, I suggest you change the amount of wealth they produce, and not how the combat works with mindworms.

Yep. I did. Then I cooled down about this topic. Partially due to your arguments and testing as well. Thank you for contribution! I appreciate it.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 24, 2019, 03:34:25 PM
What is wrong with it?

Probabilities should have a rational window of applicability.  If you've got way more stuff than you need, you should always succeed.  If you've brought way too little stuff with you, you should always fail.  In your alternate universe, if I sent a 3 year old bare handed child against a Marine with a M-16, you'd allow that child to win 10% of the time, 'cuz Random.  That's completely stupid.

Quote
It is still possible for needlejet to die attacking former in vanilla.

Screenshot please.  I don't believe you.  An unarmored Former has a -50% non-combat unit penalty.  I think you are getting confused about Air Superiority ground attack penalty for Interceptors.  A plain Needlejet without Air Superiority and a reasonable weapon on it, should always blow away a Former, even if it is sitting on Rocks and Fungus.  I think even a strength 2 Laser would work, but it should be certain with an Impact weapon.  Now if you don't train your Needlejets at all, and you are taking MORALE penalties from Wealth etc., and your faction has a MORALE penalty as well, maybe a Very Green Needlejet could fail.  I haven't tested that, because it's a pretty contrived situation.

I don't think Air Superiority rules are all that great BTW.  Unnecessarily tweaky.  I think they wanted to make a big difference between a Fighter and a Bomber.

Quote
In vanilla needlejet change to die is about 0.0001%. In my version it'll be ~10%.

Which is completely stupid.  Yes I think phalanxes killing tanks is completely stupid too.  Drives me up the wall.  I wouldn't play your mod with a system that stupid.

Quote
I don't care about promotion in this particular topic. I care about impunity. That adds mouse clicks without much thinking. Why just not have a special button in vanilla "automatically destroy all enemy formers in the 10 square radius around your bases"?

Needlejets have to be manufactured.  If the player is able and chooses to manufacture them, then they are allowed and should be allowed to use them effectively.  What are you trying to do, rubberband the player so they can't succeed?  If you think it's too easy to manufacture a Needlejet, then make them more expensive.  Making them nonsensically unreliable is lazy ass game design.  You as a designer think there's a problem with the player's resources, so you've said ok, let's just throw the player's resources away for no logically defensible reason.  Just because you haven't actually figured out how to fix the problem in the complex production system.

Quote
How can I not assume it? I am playing it myself, you know.

Because other people tell you what's up.  Because the mechanics exist in the original game, regardless of whether you use them frequently or not.

Quote
I am completely aware my changes may be disgusted by some part of humankind. Do you think I should stop doing this then?

You should respect how a lot of people actually play the game, and not seek to undermine systems that actually work.  Where that line is drawn is a matter of judgment, but dismissing fundamental mechanics as rare and irrelevant, shows a serious bias in your play style.  The antidote for that is to get feedback and also playtest.

Quote
Never said I don't. Quite the opposite.

Your concerns about splash damage are most confusing then.

Quote
Yes, yes, any change in mechanics change the strategy and the play stile to some extent. I am aware of it. I do want to change it. The question is how and to what extent.

Think hard about what it means to debuff Scout Psi combat.  You could end up turning the mindworm into the One True Unit of Death.

Quote
Yep. I did. Then I cooled down about this topic. Partially due to your arguments and testing as well. Thank you for contribution! I appreciate it.

Happy to help.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 24, 2019, 03:35:36 PM
Thanks for thoughts, guys.
I am going to fix #1 anyway, since it is a bug.

I am still thinking about singe round vs. multi round combat, though. Not entirely convinced I want to implement it.

I agree with dino on research advantage emphasis thing. Although, I do not agree that is very hard to get more than 1 level ahead, though. Just mere inherent faction RESEARCH bonuses makes a difference between UoP and Believers as 1.2 / 0.8 = 1.5 advantage! Add to this different starting conditions, different neighbors composition, different land masses, etc. Even in relatively early game I often see strength 5 weapon against strength 2 armor. That is so big advantage even PD cannot fix. And this is just random fluctuation that leads to a faction extermination. It is like somebody rolled dies and whole faction is wiped out. It doesn't add more challenge to the game.

It would be nice if research advantage, economical development, politics, combat tactics, strategical unit placement - all of these contributed to the winning. In vanilla, unfortunately, only better weapon rules the world. This is in big part due to multi round combat. I am all for it but it seems to be adding too much skew.
:(

Another problem is that such deterministic combat outcome make difficult to work with different bonuses. They become either absolutely decisively important or not important at all. Both extremities are not good. Example, weapon 4 against base defenders with armor 2. Without PD defenders have intrinsic base defense of 50% resulting in 4/3 attackers odds = ~90% winning chance. With such odds they take base almost without losses. Now we build sensor and PD for combined bonus of 100% + 25% turning attackers odds to 4/5 = ~10% winning chance. Boom! Now base is unpenetrable. Of course, I am exaggerating here. You still can take it with artillery and lots of units but you got the point. It is too much rounds in multi round combat that adds that instability. The problem is not that you just need to make all bonuses smaller. The problem is that previously with highly randomized outcome each bonus added to your success is a simple well understood linear fashion. Whereas, with highly deterministic outcome they are either not relevant at all or crucially important. And you cannot understand which is which without CALCULATOR! That is what I don't like.

I agree that single round combat may undermine technology advantage. Maybe we can find a compromise of how many rounds we should use? Like more than 1 but less then 10?
Title: Re: Fixing combat mechanics
Post by: dino on December 24, 2019, 04:02:41 PM
Example, weapon 4 against base defenders with armor 2. Without PD defenders have intrinsic base defense of 50% resulting in 4/3 attackers odds = ~90% winning chance. With such odds they take base almost without losses. Now we build sensor and PD for combined bonus of 100% + 25% turning attackers odds to 4/5 = ~10% winning chance. Boom!

I've never actually do the math, if it's this bad, then you have a point, something should be done with it.

For starters I'd make units in a base with command center/naval yard/aerospace complex heal at double rate, not to 100% in a single turn.
That, combined with no splash damage from loosing a unit, should assure looses on both sides during prolonged combat situation involving constant streams of reinforcements.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 24, 2019, 04:11:57 PM
Fine fine, guys. You'll have you multi round combat and impunity to kill formers. Sheesh. It's not that it is too important for me anyway.
:)

I still plan to tone it a little. Or maybe just expose some switches in configuration so you can play with it and fine a best combination.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 24, 2019, 04:27:50 PM
Example, weapon 4 against base defenders with armor 2. Without PD defenders have intrinsic base defense of 50% resulting in 4/3 attackers odds = ~90% winning chance. With such odds they take base almost without losses. Now we build sensor and PD for combined bonus of 100% + 25% turning attackers odds to 4/5 = ~10% winning chance. Boom!

I've never actually do the math, if it's this bad, then you have a point, something should be done with it.

Yep. Unfortunately. I also got your point about killing Ironclad with Trireme. So I agree not to revert to plain Civ1 battle odds. However, it may make sense to find some gold middle. You see roughly each combat adds a power on top of single round odds. So 4:3 round odds turns into 4:3 ^ 2 = 16:9 for 2 round combat and into 4:3 ^ 10 = 1048576/59049 = 18:1 for 10 round combat. 10 round combat is just way too much of emphasis. I am thinking something like 3 rounds or so. That still favors stronger unit and research advantage. For example, it turns 5:1 odds into 15:1 allowing killing much weaker units with impunity. However, it goes easier on more comparable strengths. Like 3:2 psi combat now would resolve with 2:1 success ratio instead of 4:1 in vanilla.

For starters I'd make units in a base with command center/naval yard/aerospace complex heal at double rate, not to 100% in a single turn.
That, combined with no splash damage from loosing a unit, should assure looses on both sides during prolonged combat situation involving constant streams of reinforcements.

Interesting. You are reading my thoughts. I also think 100% healing rate is too much. I didn't even plan to touch it any time soon, though. However, now I'll put it on my todo list.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 24, 2019, 04:36:08 PM
I think what you should actually do, is make some conservative changes and then get others to playtest.  You are chasing a big web of numbers around and it's easy to ruin stuff that way.

I think a major problem with SMAC's combat system, is one unit has to die.  There are some exceptions: artillery, land vs. sea artillery duels, and disengagement of a Speeder or fast ship.  The emphasis on decisive outcomes makes the combat pretty unstable.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 24, 2019, 04:50:51 PM
I think I'll do exactly that. Starting from conservative and then exposing switches for more disputable changes.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 24, 2019, 05:52:49 PM
Some numbers for reference on what I am talking about. Hope I can bore you with them.

Numeric odds. Initials and for each N round combat.
Chart for the same. Cut some skyrocketed odds. I don't think anyone would bother for anything beyond 10:1. It is almost certain win.

It is educational to see how 2:1 odds got magnified by the number of rounds.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 25, 2019, 12:30:43 AM
BTW my informal point of certainty, as reported by the current Odds Checker which I have on all the time, is 3:2.  Given such reported odds, I expect to win.

4:3, I might not win, but I'm likely to fight anyways.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 25, 2019, 01:36:58 AM
You gave me idea, guys. I think I'll calculate and display exact battle winning odds. That would be my gift to everyone. No more needs for "inaccurate, but enough of estimation for decision making".
 ;)
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 25, 2019, 04:21:17 AM
I think that would be helpful.  Especially since the game is gaslighting me about some of those odds.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 25, 2019, 04:00:52 PM
I came up with few ideas. Help me choose.

I assume we do not care about internal combat mechanics as long as we get desired outcome: one unit gets destroyed with certain probability/odds, another gets damaged to some extent. Let me know if you think otherwise and definitely want to preserve current mechanics.

Few terms.
unit strength: the corresponding final (all bonuses combined) attack/defense value unit uses in the battle.
HP: hit points left.
power: strength * HP.
firepower (FP): damage dealt to unit that loses the combat round. In current WtP implementation it is 10% or 1/10.

degree of odds emphasis: some degree/power showing how much we skew odds in favor of stronger unit. For example, virtual one round combat does not emphasizes odds at all - each unit wins proportionally to their strength. In vanilla regular fight of fully healed units raises based odds in the power of 6.6 approximately.
If we somehow apply power of 2 for odds emphasis that would turn base 2:1 odds into (2:1)^2 = 4:1 actual winning odds.

Idea 1
Keep existing multi round combat mechanics but multiply everybody's firepower so each round inflicts more than 1 HP damage. This effectively decrease number of rounds and degree of odds emphasis. The firepower should be whole number for assembler code to work the same but can be configurable.
Pros: easy fix, easy to change configuration.
Cons: 1) Unclear dependency between firepower and odds emphasis. Needs a lot of testing just to understand the effect. 2) Too coarse grained HP jumps. If we set say FP = 5 then unit will lose HP in chunks of 5 and unit with HP = 1,2,3,4,5 all have equal chances in battle.

Idea 1a
Same as above but add some randomization to damage. Say hard 5 turns into random number from 1-9 range. That somewhat overcomes fixed HP chunk loss. Now it is random too. However, this makes real battle winning odds calculation a huge task. It may even noticeably slow down the program.

Idea 2
Abandon combat rounds mechanics altogether and instead calculate chances as we pleased. My proposition is to use Att1*HP1/Def2*HP2 as base odds. Very simple and very transparent to the player. Unit chance to win is proportional to both item strength and HP left. Half damaged unit is exactly twice as weak.
This way we can set up arbitrary odds emphasis degree directly. For example set it to power of 2 which translates 4:3 -> 1.78:1, 3:2 -> 2.25:1, 2:1 -> 4:1, 6:1 (early needlejet vs unarmored former) -> 36:1.
Pros: easy for player to understand and visualize, easy to explain in help, easy to calculate final battle odds, custom functionality is easy to configure and adjust = less testing needed.
Cons: we probably lose this cool fshooh-fshooh-fshooh sound and animation of multi round combat.

Idea 2a
Same as above but introduce guaranteed winning odds threshold instead of relying on big emphasis degree. For example, we can even do not emphasize odds at all but require that odds 4:1 and above result in guaranteed win. If this is what you guys actually want. Winner still may receive some damage, though.
This seems to not overemphasize odds for close strengths combat and do not let trireme kill ironclad at the same time.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 25, 2019, 06:17:27 PM
I assume we do not care about internal combat mechanics as long as we get desired outcome: one unit gets destroyed with certain probability/odds, another gets damaged to some extent. Let me know if you think otherwise and definitely want to preserve current mechanics.

As preamble to further thought, I'd add 2 additional requirements to this:


If (2) is to be changed, then it should be changed on a well ordered basis that a player can perceive and readily adapt to.  In short, if you're going to mess with a player's expectations about how things work, then you have an obligation to successfully reprogram those expectations.  Not just provide new gratuitous confusion and gaslighting.  There's a point at which the player can say "this is not enough like the original game, this is not rational, I don't know what's going on" that they just put down the game as sucky.

Now having read some, I think your proposals 1 and 1a simply introduce capriciousness.  Looks like a wild goose chase with a totally new combat mechanism.  Would take lots of testing iteration to figure out how it "feels" to the player.  More iteration than you've got playtesters to give you feedback about, TBH.  Smells like a bad idea relying on change for change's sake, without solving core problems of consistent player perception.

2 and 2a are more workable proposals to start from.  Their problem though, is they say nothing about how much damage is going to be done to the victor.

Quote
Cons: we probably lose this cool fshooh-fshooh-fshooh sound and animation of multi round combat.

That might not be a trivial consideration.  Terminated combat noise, is the cue for disengagement of fast units, or standoff for land vs. sea artillery.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 25, 2019, 09:55:56 PM
Quote
Cons: we probably lose this cool fshooh-fshooh-fshooh sound and animation of multi round combat.

That might not be a trivial consideration.  Terminated combat noise, is the cue for disengagement of fast units, or standoff for land vs. sea artillery.

I didn't test it yet but I think the terminal blowout animation will stay.
However, I see that there are cases of disengagement or one round artillery combat those need to be programmed too.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 25, 2019, 10:00:59 PM
I suppose the sound of the enemy exploding is a good cue that you won.  It's quite different from disengagement which has no such sound.  Just a pause, during which time the "disengaged" text displays at the bottom of the map window.  I do have Fast Combat Resolution always on.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 25, 2019, 11:13:15 PM
OK. Let's go path 2 then.
Base odds are A1*HP1:D2*HP2. Then we may raise them in some power to get winning odds to emphasize stronger unit.
Stronger victor gets random damage around same average as in vanilla.
Weaker victor gets random damage around 100%.

Here are other use cases. Did I get them all?

Everything except #1 can be left as is.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 25, 2019, 11:39:15 PM
Quote
Weaker victor gets random damage around 100%.

I don't recall what the game actually does.  There's a lot of policy to be decided here.  Consider when odds are close to 1:1, for instance 1.1 to 1.  Let's say Defender wins.

Saying Attacker is dead, Defender is all but dead, is a policy in favor of attrition.  Nearly equal odds means no combat advantage can be gained.  Strategically, whoever can produce more combat value in their units, will invariably win by attrition.

Saying Attacker is dead, but Defender survives with 25% or even 50% HP intact, is a policy in favor of combat is risky.  This would encourage players to build up large forces rather than commit small numbers of them, for fear that the luck of war could go against them.

I won't be surprised if the original game actually implements a broad range of outcomes.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 26, 2019, 12:31:32 AM
Quote
Weaker victor gets random damage around 100%.

I don't recall what the game actually does.

It does this exactly. I plan to mimic vanilla in every way where it is not critical for me.

Saying Attacker is dead, Defender is all but dead, is a policy in favor of attrition.  Nearly equal odds means no combat advantage can be gained.  Strategically, whoever can produce more combat value in their units, will invariably win by attrition.

Saying Attacker is dead, but Defender survives with 25% or even 50% HP intact, is a policy in favor of combat is risky.  This would encourage players to build up large forces rather than commit small numbers of them, for fear that the luck of war could go against them.

I won't be surprised if the original game actually implements a broad range of outcomes.

It doesn't implement anything specifically beyond combat rounds exactly as they are described in wiki. The "broad range of outcomes" comes from random distribution.

I don't think any random outcome in 1:1 combat encourages any kind of strategy. If you don't kill damaged survivor with second unit pretty soon it'll heal up regardless of how damaged it is.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 26, 2019, 01:11:20 AM
I am a fountain of wild ideas today. They may be not all suitable but they are beautiful nonetheless. Or at least they appear to me as such now.
:)

Apparently all use cases 2-4 in my last analysis those do not result in imminent destruction are fine. It is completely natural when stronger unit delivers bigger damage to opponent. Weakened units then could be much easily destroyed in following turns. The cornerstone problem that ignited me to combat mechanics analysis was too high chances of winning isolated combat with 3:2 odds as survivor owner does not incur losses after healing damaged victor. Soooo, I was thinking, would it be acceptable to allow regular combat use case #1 to not end with ultimate destruction? For example, do at most 5-10 combat rounds or so. This way close odds like 3:2 would result in both units partially damaged proportionally to opponent strength. Whereas, too unbalanced odds like 4:1 would still result in very weak unit destroyed outright.

Don't beat me up yet. I clearly understand that this drastically change positioning tactics. Now battle of fully healed units with close strength may last more than one turn. However, look at advantages.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 26, 2019, 11:22:04 AM
It does this exactly. I plan to mimic vanilla in every way where it is not critical for me.

So a defender can never hope to survive the attack of a stronger attacker without getting completely chewed up?  I find that a bit hard to believe, but maybe I've been very good at avoiding being on defense lately.

Quote
It doesn't implement anything specifically beyond combat rounds exactly as they are described in wiki. The "broad range of outcomes" comes from random distribution.

The probability shape of the breadth is still a design.  It can emphasize different outcomes.

Quote
I don't think any random outcome in 1:1 combat encourages any kind of strategy.

Your next claim is false, so doesn't support this view of yours.

Quote
If you don't kill damaged survivor with second unit pretty soon it'll heal up regardless of how damaged it is.

Not all combat occurs in bases with insta-healing.  Wandering out in the bush, it takes many turns to heal, and you'll never heal more than 80%.  Some Secret Projects make it otherwise: the Nano Factory everywhere, and the Pholus Mutagen on fungus.

Artillery suppresses healing.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 26, 2019, 02:44:50 PM
So a defender can never hope to survive the attack of a stronger attacker without getting completely chewed up?  I find that a bit hard to believe, but maybe I've been very good at avoiding being on defense lately.

Of course it can get win without a scratch. It's all random chances but its average damage when survived is close to 100%. See table attached. Left column is odds. Right column is an average HP left if unit survived. You see it gets closer and closer to 1 with decreasing odds.

Besides, you are the seasoned play tester. Set up a scenario and test/prove it if you are sure this is too off.

Even more besides, who cares about weaker unit HP left? Just winning a battle is pretty hefty piece of luck already. It will either crawl back to safety and heal up for isolated combat or will die anyway by second strike from a swarm of enemies.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 26, 2019, 05:46:39 PM
The probability shape of the breadth is still a design.  It can emphasize different outcomes.

That is correct and that is what this fuss and topic is about. Vanilla distribution is extremely narrow due to multi round combat. I am seeking ways to widen it back without breaking other features like averages, etc.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 26, 2019, 06:53:35 PM
That table has to be wrong somehow.  a/d=0.1 describes 1:10 odds in favor of the defender.  With odds that grossly favorable, the defender should be left with 10 HP.  Otherwise we'd always attack with Scouts for the massive amount of damage they'd do as they committed suicide.  Game doesn't work that way.

I assumed the right column is the defender surviving, because that's what we've been talking about.  If it's the attacker surviving... reanalyzing, BRB.  Ok, I am unclear what columns 1 through 10 mean.


Quote
Even more besides, who cares about weaker unit HP left?

The defender does.  They may be sitting in base and that's all they've got left.

Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 26, 2019, 07:05:44 PM
That table has to be wrong somehow.  a/d=0.1 describes 1:10 odds in favor of the defender.  With odds that grossly favorable, the defender should be left with 10 HP.  Otherwise we'd always attack with Scouts for the massive amount of damage they'd do as they committed suicide.  Game doesn't work that way.

I assumed the right column is the defender surviving, because that's what we've been talking about.  If it's the attacker surviving... reanalyzing, BRB.

Sorry for for confusion. Right column is an average attacker HP left if survived.
The probability of weaker unit (attacker in this case) survival is much less than 50%. The table shows how many HPs it has if it happens to survive. Doesn't tell you anything about winning chances. This is just an illustration what games does to weaker victor HPs.

For 0.1 odds (1:10) if it happens that attacker wins it usually left with ~2 HP on average. Which means either 1 or 2 most of the time.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 26, 2019, 07:36:33 PM
What are columns 1 through 10?  Some kind of ongoing per round survival but it's not clear what's being measured.

Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 26, 2019, 07:40:51 PM
What are columns 1 through 10?  Some kind of ongoing per round survival but it's not clear what's being measured.

A chance for attacker to get left with exact so many HPs. Don't pay detailed attention to this table. It has little to do with this topic. It is just an illustration that weaker unit if survived most likely lose almost all of their HPs. That's all.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 27, 2019, 12:12:05 AM
How are you generating all these numbers?  Have you hooked into the game's combat routines somehow to run a bunch of trials and log the output?
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 27, 2019, 02:30:20 AM
How are you generating all these numbers?  Have you hooked into the game's combat routines somehow to run a bunch of trials and log the output?

Yep. Me and all others before me. Algorithms are also posted somewhere in the net.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 29, 2019, 04:37:06 AM
Sorry, everybody.
I broke my head thinking about it. UN-very-fortunately the combat round is not just an internal computational model to determine battle outcome. There are a lot of things dependent on it besides regular to-the-death variant.

Regular battle. It includes artillery duel, missile attack.
Bombardment. It uses one round only.
Sea-land artillery duel. It uses one round only.
Disengagement. It checks disengagement condition after every round.
(let me know if I am missing anything)
Planet buster?
Probes?

Any change in internal mechanics for outcome probability tweaking will affect above use cases. I have to come up with something that does not break them too much.

The problem is too fine unit health granularity. I need to decrease number of combat rounds to reduce stronger unit emphasis. Thus effectively means each round will burn more than 1 HP. That is easy to do. However, it'll confuse players a lot. They won't understand why to display 10 HP when they are disappear in chunks of 5 anyway. Ignoring reactor power is already confusing in UI. Units with Fusion reactor show 20 power. Whereas, they actually possess only 10 HP (2 power per HP). Direct increase in firepower to all units makes it worse.

If we ignore above inconveniences there are still mechanical problems.
Increasing firepower increases artillery damage. That may be not such a bad things. People complain  about artillery do quite a small damage. One need to bombard a base for 5-10 times in a row to decrease defenders' health significantly. That is why artillery is even given special multiplier coefficient in alphax.txt.
Disengaging requires at least two actual combat rounds.

So far I was able to come up with one solution: Take out 5 HP every shot. This way fully healed units will fight two rounds and half and more damaged units just for one. This satisfies me from probabilities point of view. This does not change HP losing rate and, therefore, unit economical effectiveness - which is very important. This completely supports disengagement.
There are two problems still pending, though.
First, unit with 10 HP and 9 HP will perform identically. They should not. I am thinking on forceful prorating unit strength so damaged units becomes actually slightly weaker.
Second, I probably need to somehow randomize damage to victor instead of burning its health in fixed 5 HP decrements.

The second path with precalculated victory probability doesn't appeal to me at all due to this damn disengagement thing. There are too many things to emulate. Too many opportunities to break game. I don't have that kind of time.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 29, 2019, 08:33:19 AM
Well, this evening I've been attempting to rebalance the cost of weapons for Speeders and Needlejets in the early game.  Although I think the stock game is crazy with Needlejets, I think my mod has made them too expensive.  I'm having a hard time making a satisfactory transition over the Fission-Fusion boundary.  I don't want a Fusion Gatling Needlejet that costs only 30 minerals.  This or that case becomes too expensive in the Fission era though.  I'm tired of iterating on it, I'll pick it up again in the morning.

Sometimes you just have to back off for a bit and let the dust settle.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 29, 2019, 06:34:36 PM
A surprisingly long thread on Ycombinator (https://news.ycombinator.com/item?id=21901268) appeared today.  Lots of dissection of SMAC as a game.  The following bit is relevant to retooling combat odds:

Quote
Quote
evanweaver 17 hours ago [-]

There have been talks at GDC and elsewhere about this...my memory is that humans don’t like being surprised by a smart AI that silently builds up resources and suddenly and mercilessly betrays and annihilates them, which is the obvious winning strategy. Humans don’t even like the random battle results to be truly random but expect them to hew very closely to the outcome of the odds as presented. The AI is grindy and unsophisticated on purpose.
   
jcrites 4 hours ago [-]

I believe you're thinking of Sid Meier's GDC 2010 keynote "Everything You Know Is Wrong" [1]. The entire talk is interesting, but section on player perception of probability is about 20 minutes in.

One takeaway is to be careful about how strength numbers translate into odds. If your strength is 100 and mine is 1, does that mean I have a 1% chance to out-and-out beat you? Your armored tank shouldn't have an even 1% chance of being completely annihilated by my club-wielding warrior (that's somehow still around by then).

The later Civ games have taken odds out of the equation, and I think it's for the better. Instead, the amount of damage each unit takes per combat depends on the difference in their strength deterministically. From my own perspective, this is overall more fun than 'randomly' having really strong units lose against weak units occasionally.

[1]
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 30, 2019, 03:05:39 AM
Interesting. That discussion will never end I guess. As somebody properly commented in the forum, many people do not care about probability vs. deterministic outcome. They just want to win and feel great and see ending movie and send completion report to friends, etc. For them AI is made dumb on purpose to make users happy. For the same exactly reason too much of randomness is bad as it disrupts player's plan. It is much much better for such type of users to stick to same never failing plan. Then play it again and again and again and get happy every time.
For such people the question of Phalanx vs. Tank is spelled out like this: It is ridiculous and should never happen that THEIR Phalanx kills MY Tank. At the same time it pleasurably exciting when occasionally MY Phalanx beats THEIR Tank.

Other people may seek more challenging AI to exercise their brains. For them a failure is an opportunity to learn mistakes and become better. Such people don't get scared of randomness. It is just an additional challenge that presents multi branched decision tree. I hope we are working for such people here. Not that it is a large auditory, though.
:)
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 30, 2019, 04:20:38 AM
Randomness should be a tool, not a gratuitous end.  Phalanx vs. Tank battles are annoying to some of us.  It isn't about having an exploit.  Even putting both those units in the same game at the same time is annoying.  Granted, the Italians did actually fight the Ethiopians in WW I and lose.  But it wasn't due to random die rolls.
Title: Re: Fixing combat mechanics
Post by: dino on December 30, 2019, 10:21:52 AM
With multiround combat randomness is about how much HPs stronger unit will be left with and less about the chance to win, a weaker unit winning is just unlikely, but possible outcome.

I like this approach in principle, but designers didn't thought it through. It plays horribly with stack wipes and one turn healing in a base.
These two forces you to either resolve the whole battle in a single turn, or don't even try. This is why defensive structures give only parity with attacking units in vanilla.

And AI can't into this kind of planning and even if it could it would become extremely frustrating, it's "fun" mostly because AI can't do it to you.
Just get rid of stack wiping and one turn healing in bases and simple attrition strategies AI is capable of will work.
And then increasing defense ratings wouldn't break the game, even without heavy randomness of the combat outcomes.

Regarding the direction you want to take it, which I don't agree with, the best solution would be to increase the chance of winning a round, if previous one was won.
This way the first round would be the most important and you would have more random outcomes, without screwing HP granurality regarding artillery and disengagement.

And the idea that artillery is weak is a nonsense, it's weak in the early game, once you start dealing with stacks it's extremely powerfull as it is, especially for a base assault.
The only reason, people perceive it that way is because normal combat splash damage and low armor ratings in vanilla.
Which makes just attacking a stack in the open even more effective than arty, get rid of stack wipes and increase armor and arty will become essential.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 30, 2019, 02:48:16 PM
Funny, I first wrote a comment and then watched the video and Sid said exactly same thing: players want to win. They want all goodies to them. They expect their 3:1 win 100% of the time. At the same time they also expect their 1:3 win sometimes. In other words gaming industry goes toward making games easier and easier to win. Specifically but not making AI smart enough and by adding hidden bonuses to human to make them win more often.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 30, 2019, 03:00:46 PM
Randomness should be a tool, not a gratuitous end.  Phalanx vs. Tank battles are annoying to some of us.  It isn't about having an exploit.  Even putting both those units in the same game at the same time is annoying.  Granted, the Italians did actually fight the Ethiopians in WW I and lose.  But it wasn't due to random die rolls.

I don't get your "gratuitous end". Nobody makes game just to proclaim randomness in it. That would be ridiculous. Of course it is a tool.

It is impossible to get rid of weaker units in SMACX. Items do not get obsolete from design. You can always design weaker unit if you please. So does AI quite often. We should account for unequal units battles all the time. We also should account for unequal battle all the time because of bonuses those easily range from 12.5% to 100%. Two equal 1:1 strength units fighting each other in plain field resulting in 1:1 winning odds - that is normal. Now one of them step on a forest getting not that big 50% defense bonus. Now their strength ratio is 2:3 and attacker winning odds suddenly drop into abyss from 1:1 to 1:14 turning forest into an impenetrable fortress with 10 yard high stone walls or something. THAT is not normal.

I am all for guaranteed win with 4:1 odds but this is secondary comparing to smoothness of the game and sane AI. If I need to sacrifice such guaranteed 4:1 win for better AI I'll do. Of course, I will try to preserve it as much as possible but let me reiterate that it is secondary concern in this mod particularly.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 30, 2019, 03:29:36 PM
Thank you, dino. A lot of interesting ideas.

I like this approach in principle, but designers didn't thought it through. It plays horribly with stack wipes and one turn healing in a base.
These two forces you to either resolve the whole battle in a single turn, or don't even try. This is why defensive structures give only parity with attacking units in vanilla.

Yep, that's the problem. The too-many-round combat makes the distribution too narrow for a range of item strengths and bonuses. There is nothing unusual in twice different strength combat. For example, weapon 2 vs. armor 1 or when someone builds a PD effectively doubling defense strength. With all the terrain/structures/abilities bonuses combined the strength ratio easily varies from 1:2 to 2:1 and this is with more or less equal technology advancement. With difference in techs it could be easily 1:3 to 3:1. We should allow such ratios to affect war outcomes to some extent. Instead, due to too narrow multi round combat distribution, only ratios of 2:3 to 3:2 matter. That essentially cuts off near 75% of experience in the game.

My goal is to widen this distribution a little bit just to include 1:3 to 3:1 ratios into equation. That will aid AI and will make game for human more variate. Anything beyond 4:1 may stay a sure kill - I don't absolutely mind.

And AI can't into this kind of planning and even if it could it would become extremely frustrating, it's "fun" mostly because AI can't do it to you.
Just get rid of stack wiping and one turn healing in bases and simple attrition strategies AI is capable of will work.

I am with you on that. First one you have already. Second one is in TODO.

Regarding the direction you want to take it, which I don't agree with, the best solution would be to increase the chance of winning a round, if previous one was won.
This way the first round would be the most important and you would have more random outcomes, without screwing HP granurality regarding artillery and disengagement.

Sorry didn't get what direction you don't agree with?

Your increase round chance idea is brilliant. That may solve a lot of problems without breaking a lot of others. I am now on this path actually. However, for implementation I need some spare variables those I can use to track number of rounds passed, previous values, etc. There is not much of free variables in current code. I need to insert them somehow. That is a lot of programming efforts.

Assuming I'll pass through this how do you envision such chance change? Is it constant proportion for all subsequent rounds until luck changes? Like with base 1:1 round odds should they change to something 3:1 for a previous round winner?
Or maybe we should implement variate change? Like first subsequent round after luck change we make it almost a sure win and then it degrades to let luck change more easily?

And the idea that artillery is weak is a nonsense, it's weak in the early game, once you start dealing with stacks it's extremely powerfull as it is, especially for a base assault.
The only reason, people perceive it that way is because normal combat splash damage and low armor ratings in vanilla.
Which makes just attacking a stack in the open even more effective than arty, get rid of stack wipes and increase armor and arty will become essential.

I didn't say it is weak. People do. I am quite satisfied with the artillery and use it all the time especially against bases.
:)
You are right that people don't use it in the field because it doesn't seem useful. With equalizing weapon-armor ratio and without collateral it should be pretty useful in a field too.
Title: Re: Fixing combat mechanics
Post by: dino on December 30, 2019, 04:32:38 PM
Sorry didn't get what direction you don't agree with?

Your increase round chance idea is brilliant. [...] Assuming I'll pass through this how do you envision such chance change?

"Don't agree" was maybe too strong wording. I'm not sure if more randomness is necessary and would prefer to explore possibilities within the current system.

About idea, I don't know, the easiest way would be fixed percentage bonus to unit strenght.
You would only need a single bit to pass information which unit won the previous round and apply this "morale" bonus accordingly.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 30, 2019, 05:24:53 PM
Just get rid of stack wiping

Bear in mind that when attacking a base, there's no stack wiping.  The same is often true when attacking anything at sea, but the rules seem to be inconsistently implemented.  Air units also do not stack wipe when attacking ground units.  Because there are a fair number of cases where stack wiping isn't even involved, I think you are overstating this actually being a problem in the game.

I removed Bunkers from my mod, because the AI obsesses about building them, doesn't know how to use them, and they just become a handy invasion route for a human player.  Bunkers are another case where stack wiping doesn't happen.

Quote
and one turn healing in bases

That's just a way of making base defenders more vulnerable.  Any assault strategy has to shock a base into submission before it can reinforce.  A human can certainly manage the logistics of organizing units to assault in 1 turn rather than multiple turns.  Whether it's a serious problem for the AI to do or not, I don't really know.  But there are plenty of ways to weaken the defenses of a base at the *.txt modding level, if bases are deemed to have too much defensive capability.  I don't see that removing "one turn healing" has to be the way to address this.  I've played with Perimeter Defense values and Sensor Array values.  I actually decided in favor of stronger defense via Sensor Arrays, not weaker.  It keeps early AI factions from being summarily overrun.

Also, it's not clear to me that defenders actually heal in "one turn" anyways.  Seems to me like they just heal "more quickly", although perhaps I'm not paying sufficient attention.  Maybe I haven't always built a Command Center at every base in practice, because that's boring.  Secret Projects are harder to get in my mod, so it's not a given that you're going to have the Command Nexus.  It's not easy to rapidly run through every Secret Project available and have all those goodies.

Quote
And then increasing defense ratings wouldn't break the game,

Well that's just it though.  If you weaken defense by one method, and strengthen defense by another, it's likely a wash and you've likely achieved nothing.

Also, fiddling with this stuff does need long term testing.  I'm currently reworking my weapon, armor, and production costs because I think I may have blown it in the early Fission pre-factory era of the game.  I was worrying about Fusion and Genejack Factories not being a cakewalk and I think my production weights may not be refined enough for the early game.  The most visible evidence is the AI doesn't make many Needlejets.  Although I did want it toned down compared to vanilla, I think I overdid it.  At least nowadays my tech tree is basically stable, so I know what the pace of Fusion and Factories is.  They don't come for a long time, so I need to be more careful about how I weight the early part of the game.

Quote
Regarding the direction you want to take it, which I don't agree with, the best solution would be to increase the chance of winning a round, if previous one was won.

I'm unclear.  Doesn't the game recalculate the odds every round?  That would seem to be the obvious way to simulate stuff.

Quote
And the idea that artillery is weak is a nonsense, it's weak in the early game, once you start dealing with stacks it's extremely powerfull as it is, especially for a base assault.
The only reason, people perceive it that way is because normal combat splash damage and low armor ratings in vanilla.

I can definitely say that if you're trying to survive a big stack mindworm holocaust, you want the biggest pieces of artillery you can get your hands on.  Resonance Lasers don't mean squat!  It's about the biggest gun doing the greatest splash damage.  Air Superiority combined with Heavy Artillery is the antidote to giant Locust stacks.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 30, 2019, 06:19:33 PM
dino, you are right on point that multi round battle is about proportional HP destruction rather than battle winning chances. In theory, if we omit healing, single battle winning chance is irrelevant. Even if stronger unit with 2:1 attack/defense ratio has sure win it loses half of its HPs. Then next battle same type weaker unit will finish it off with 50% chance. On large scale the speed at which one destroys enemy HP is proportional to their unit weapon/armor strength. Which is absolutely fair.
Healing distorts it all off. Now stronger unit survives 100% and then heals up to full strength and then wins again - never dies against weaker opponents. Of course, damaged unit is less likely to escape mass battles where everybody hits on everybody but for more isolated one-to-one battles the above is true. It is even true for every case when damaged unit can heal up (like in base or when the side has local superiority, etc.). Overall, about 3/4 of the battles allow following healing. Especially natives encounters in the beginning. That is huge part of the game affected.

So, if we would tone down healing speed maybe it would solve our indestructible unit problem. It may still be healed but with slow speed its rotation will be acceptable and would practically remove effect of indestructible army. This way you still may have such an army but it will advance 10 times as slow or one would need to build 10 times more units to use them in 10 waves.

Maybe I should concentrate on this first and leave combat mechanics unchanged for the time being? I guess it is much more logical and visually simple to tweak healing rate rather than tweaking fractions of probabilities.

Here is what I have in mind for healing rates.

If one still like healing with monoliths we may make it 10%-20% per tun something.
Title: Re: Fixing combat mechanics
Post by: dino on December 30, 2019, 07:05:29 PM
I'd leave 10% healing in the field, since I suspect it'd break the AI, that would put some damahed units on infinite sentry to heal them, such units would become useless and eat support.
Healing in the base still has an advantage of being able to heal 100%, while in the field only to 80%.

With increased armor, the base defensive bonuses will make base assault looses much higher then in vanilla, which offset the new ability of attacking forces, to survive counterattacks.

Well that's just it though.  If you weaken defense by one method, and strengthen defense by another, it's likely a wash and you've likely achieved nothing.

My goal would be to make it possible to defend outside a base, without making bases unreasonably hard to conquer at the same time.
What AI does is just give a unit a goto order to enemy base and thats's it, if another base, or enemy unit will be encountered on the path, it'll be eventually attacked instead.
Proposed changes will hopefully make this basic AI strategy actually work to much bigger extend against human.

With these changes the ability to outproduce enemy will be more important, than who will catch who in the open, or who can concentarte just enough units to take down a base in a single turn.
While human player can still gain some advantage by smart use of terrain bonuses, artillery, while taking a base in a single turn, to hide forces inside it, still would be advantegous, but not absolutely necessary.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 30, 2019, 08:01:42 PM
Updated.

Title: Re: Fixing combat mechanics
Post by: dino on December 30, 2019, 08:18:19 PM
I'd leave it at 80%, unless you'll also code AI to return units to the base for healing.

With multiround combat, 80% is a huge disadvantage, but yet not useless, it's a good balance imo.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 30, 2019, 09:30:10 PM
No healing in the field at all.

You are setting yourself up for games that are logistically extremely tedious.  Get in a fight, have to walk all the way back to a freakin' base to heal up.  I predict this idea is a complete fail.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 30, 2019, 09:45:33 PM
Two equal 1:1 strength units fighting each other in plain field resulting in 1:1 winning odds - that is normal. Now one of them step on a forest getting not that big 50% defense bonus. Now their strength ratio is 2:3 and attacker winning odds suddenly drop into abyss from 1:1 to 1:14 turning forest into an impenetrable fortress with 10 yard high stone walls or something. THAT is not normal.

If terrain is the major problem, an alternative to redesigning how the combat system works, is to change the bonus that terrain gives.  I'm surprised to find out it's not moddable in alphax.txt.  Some other things are moddable like the bonus a Sensor Array gives.  I simply adjusted it upwards until it did what I wanted.  It wasn't a theoretical, formula driven, or complicated exercise, my tweak was strictly empirical.  The game design effect is you're strongly incentivized to destroy Sensor Arrays when attacking, as otherwise you're likely to die on the enemy's walls.  And if you're placing your Sensor Arrays defensively, it's best to think about putting them inland and away from enemy artillery routes, because the AI loves to shell Sensor Arrays.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 30, 2019, 10:03:05 PM
What AI does is just give a unit a goto order to enemy base and thats's it,

That's not it.  The AI does mass with armored infantry, make the "5 unit spread" formation outside a base, and move all units in simultaneously on the next turn, so that you can't pop them all in 1 stack.

Quote
With these changes the ability to outproduce enemy will be more important, than who will catch who in the open, or who can concentarte just enough units to take down a base in a single turn.

I'm not seeing why favoring attrition should even be a goal.  Do you have any idea how tedious it is to babysit a defensive base that's being attacked by the AI over and over and over again?  It gets seriously old.  Any time you say "I want to solve problems in this game by adding lots more units", you get more mouseclicks that the human player has to deal with.  It's not challenge, it's asymmetrical boredom.  The AI doesn't care about doing tedious things over and over and over again, but you the human player sure do.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on December 30, 2019, 10:09:28 PM
Two equal 1:1 strength units fighting each other in plain field resulting in 1:1 winning odds - that is normal. Now one of them step on a forest getting not that big 50% defense bonus. Now their strength ratio is 2:3 and attacker winning odds suddenly drop into abyss from 1:1 to 1:14 turning forest into an impenetrable fortress with 10 yard high stone walls or something. THAT is not normal.

If terrain is the major problem, an alternative to redesigning how the combat system works, is to change the bonus that terrain gives.  I'm surprised to find out it's not moddable in alphax.txt.  Some other things are moddable like the bonus a Sensor Array gives.  I simply adjusted it upwards until it did what I wanted.  It wasn't a theoretical, formula driven, or complicated exercise, my tweak was strictly empirical.  The game design effect is you're strongly incentivized to destroy Sensor Arrays when attacking, as otherwise you're likely to die on the enemy's walls.  And if you're placing your Sensor Arrays defensively, it's best to think about putting them inland and away from enemy artillery routes, because the AI loves to shell Sensor Arrays.

No. Terrain is not a major problem. Forget about terrain. That was just an example how 50% bonus changes things. The major problem is a combat calculation that turns not so big 50% bonus into a problem. You won't be able to fix it though bonuses themselves as 50% advantage is very common in this game. Even 100% advantage is common when you use freshly discovered strength 2 weapon against strength 1 armor. That should NOT be a big problem by player expectations but it IS.
Title: Re: Fixing combat mechanics
Post by: bvanevery on December 31, 2019, 12:18:27 AM
An additional +25% is a big advantage.  That's why my Sensor Arrays have +50%, not +25%.  They really make you work for you base kills.  All sorts of stats in the game could be tweaked like that.  It doesn't matter what the absolute number is.  What matters, is if the player can distinguish the bonus or penalty as actually mattering.  In the case of my Sensor Arrays, they definitely can.

With weapons and armor, I find that what the player can distinguish, is largely a matter of gut feel.  Especially in the early game.  I know I feel that Gatling Lasers are "more powerful" than  Particle Impactors by quite a bit.  Which really they should, because 5 vs. 4 is a 25% increase in power.  It's not just in my mind.  Missile Launchers are 6 vs. 4, a 33% increase in power over a lot of the "old inventory".  The trick is deciding how much these power steps should cost.  I think I don't have it right, so I'm reworking it.

What I do have right, is there's a long time gap between getting better weapons and armors.  You don't just fly up the tech tree and get all these snazzy guns the way you do in vanilla.
Title: Re: Fixing combat mechanics
Post by: Alpha Centauri Bear on January 02, 2020, 06:57:37 PM
I've implemented the change I've planned and I am quite satisfied. Thank you all for sharing your opinions and ideas. I am going to abandon this discussion since it fulfilled its purpose as a dedicated topic.
You are welcome to continue sharing your thoughts in a main http://alphacentauri2.info/index.php?topic=21359.75 topic.
Title: Re: Fixing combat mechanics
Post by: Nexii on March 20, 2020, 07:26:21 PM
With one round combat I think you'd have to significantly increase unit movement to compensate. Otherwise it skews the conquer/build balance too much in favor of build.
Title: Re: Fixing combat mechanics
Post by: bvanevery on March 20, 2020, 07:38:11 PM
I have no reason to agree with that theory.

My mod already recommends Huge maps, and my world generator has more land mass in it.  I did speed up sea and air units, but land units move at the same speed as always, so they come into fighting range more slowly.  I gave everyone early defensive advantages over offense, such as a +50% Sensor Array instead of +25%, Synthmetal available at Tier 1 and no prototype required for it, no Infantry assault bonus on bases, and no Particle Impactors until Tier 3.  You're not guaranteed to be able to just blitz someone at the beginning.  Especially, Clean Reactors are available from the beginning of the game, and I trained the AI to stack up bases with Clean Synth Garrisons.  I've taken some Recon Rovers into enemy territory like the old days, thinking I'd wreak havoc, and was surprised to find stacks of 5 to 10 defenders that I wasn't able to do anything about.

I like my game balance just fine.  I like the AI's not being able to summarily run over each other at the beginning.  I prefer them to dig in, survive, and thrive.  Mega violence comes later.  Most of the time, nobody's got any "gimmie" for immediate blitzing.  You have to work up to it.

Title: Re: Fixing combat mechanics
Post by: Nexii on March 20, 2020, 07:47:04 PM
I meant more the proposed model where units would not always do fatal damage and fight more like artillery. Maybe I misunderstood it.

I did similar mods to combat to make it more interesting than suicidal X/1 units smashing everything. 50% sensors, 50% base defense (same as rocky/forest), and more reasonably costed armor are all helpful. Though it did make native life a lot less scary so I had to give the aliens a higher planet rating
Title: Re: Fixing combat mechanics
Post by: bvanevery on March 20, 2020, 08:06:25 PM
I made Hypnotic Trance cost 1, instead of being a free lunch for units.  The main motivator wasn't actually combat balance.  It was all the ridiculous math of trying to minimax "perfect" units where you "get a bargain" for some unit design.  I did away with all of that, in favor of a uniform "it's gonna ding you 25% if you want an ability" idea.  With the more powerful abilities costing 50% or 100% extra.

I think in my mod, mindworms are proportionately too powerful in mid to late game.  Their cost doesn't go up, and they fight as well or better than any of the advanced weaponry.  So why spend on the expensive advanced weaponry?

Anyways, "combat doesn't resolve immediately" is a way of slowing down the violence.  So's increasing the distance between empires, or their defenses.  They're all fungible, and they're all only a question of balance.  You implement, then you test to see if something needs rebalancing.  In my mod they don't.  I've been at this almost 2 years, it's balanced.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 15.

[Show Queries]