Author Topic: Fixing combat mechanics  (Read 1026 times)

0 Members and 1 Guest are viewing this topic.

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Fixing combat mechanics
« Reply #30 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?

Offline tnevolin

Re: Fixing combat mechanics
« Reply #31 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.
Tim

Offline tnevolin

Re: Fixing combat mechanics
« Reply #32 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.
Tim

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Fixing combat mechanics
« Reply #33 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.

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Fixing combat mechanics
« Reply #34 on: December 29, 2019, 06:34:36 PM »
A surprisingly long thread on Ycombinator 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]

Offline tnevolin

Re: Fixing combat mechanics
« Reply #35 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.
:)
Tim

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Fixing combat mechanics
« Reply #36 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.

Offline dino

Re: Fixing combat mechanics
« Reply #37 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.
« Last Edit: December 30, 2019, 12:10:10 PM by dino »

Offline tnevolin

Re: Fixing combat mechanics
« Reply #38 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.
Tim

Offline tnevolin

Re: Fixing combat mechanics
« Reply #39 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.
Tim

Offline tnevolin

Re: Fixing combat mechanics
« Reply #40 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.
Tim

Offline dino

Re: Fixing combat mechanics
« Reply #41 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.

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Fixing combat mechanics
« Reply #42 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.

Offline tnevolin

Re: Fixing combat mechanics
« Reply #43 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.
  • No healing in the field at all. No healing with monoliths either. The Nano Factory still gives 10% healing rate in field.
  • No healing speed modifications when in "range of base ...". I think it is stupid and highly not visual. I would consider healing on own territory if such thing was implemented. Need to check.
  • Healing in base: 10%.
  • Healing in base with corresponding healing facility: 20%.

If one still like healing with monoliths we may make it 10%-20% per tun something.
« Last Edit: December 30, 2019, 06:34:51 PM by tnevolin »
Tim

Offline dino

Re: Fixing combat mechanics
« Reply #44 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.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
18 (6%)
XP Compatibility patch
-=-
9 (3%)
Gog version for Windows
-=-
76 (29%)
Scient (unofficial) patch
-=-
27 (10%)
Kyrub's latest patch
-=-
14 (5%)
Yitzi's latest patch
-=-
85 (32%)
AC for Mac
-=-
2 (0%)
AC for Linux
-=-
5 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
12 (4%)
Total Members Voted: 258
AC2 Wiki Logo

* Random quote

Objects once measured in meters have become so small that they cannot be seen by the naked eye, with revolutionary applications across the board. Gentlemen, forget what your courtisans have told you: size does matter!
~CEO Nwabudike Morgan, Morgan Industries Annual Report

* Select your theme

*