Author Topic: Combat mechanics  (Read 5528 times)

0 Members and 2 Guests are viewing this topic.

Offline jdlessl

Combat mechanics
« on: August 07, 2014, 08:35:01 PM »
Are there any mods out there that mess with the way unit combat works?  The vanilla SMAC system always really stuck in my craw: my weapons vs your armor?  Even if your unit's weaponry consists of sharpened rocks, failing to overcome your armor will kill my rocket launcher-equipped unit?  How's that make sense?

Always seemed to me that combat should be my weapons vs your weapons, moderated by our respective armor ratings.  For instance, Attack*(morale & bonuses) - (opponent's defense)*(opponent's terrain, morale, & bonuses), do the same for the other side, then dice roll repeatedly as normal.

For that matter, the AI is always building units that are both heavily armed _and_ armored, even though this is an extremely wasteful approach (better off spamming the countryside with much cheaper dedicated offensive or defensive units).  A weapons vs weapons calculation would massively improve the effectiveness of the AI's approach without having to actually mess with the AI.

Offline Yitzi

Re: Combat mechanics
« Reply #1 on: August 08, 2014, 04:42:20 AM »
This matter has been discussed before (fairly recently, actually, in this thread), and there's been some ideas on alternate rules, though it's not one of the highest priorities.  (I'm currently working on, and almost done with, giving more options to mod the retool exemption/penalty based on the types of the old and new production items.)

The proposal there (weapon vs. armor with a random factor, then reverse, repeating finitely many times) was fairly different than yours.

Note, however, that according to your method, if one side's defense is higher than the other's attack, they'll take no damage and automatically win, unless the same holds in reverse (in which case it's not clear what should happen...maybe end the combat with no damage?)  While weapons are usually stronger than armor and this can be modded, this would mean that a solid tech advantage, or a bunch of bonuses combined (e.g. any two +100% modifiers) would make a unit pretty much unkillable no matter how many forces were thrown at it.  To fix this, it may be best to have the dice roll not use attack-defense, but rather some specific function of that value; I'll need to think a bit to figure out what properties the function would need and therefore what would be the best one to use.  (The property where 2 defense is nearly as useless as 1 against 16 attack is a very sensible one, so I'd like to preserve that if possible.)

It's also not clear how psi combat would work.

Also, according to your proposal, there would be no benefit to being the attacker; you sure you want that?

Offline jdlessl

Re: Combat mechanics
« Reply #2 on: August 08, 2014, 02:19:53 PM »
Ah, excellent.  I had looked but couldn't find any such discussion.

Could set a minimum (attack-defense) value of 1, no matter what the actual ratio.  Or divide by armor rather than subtract, though that would significantly reduce the marginal effectiveness of better and better armor types.  But simply alternating reversing the combat works too, with the advantage of not having to dream up and balance a new function.  I do like Qes's idea about armor representing hitpoints (10*armor?) and reactor handling cost, because insta-doubling how much damage all your units can take once you get Fusion is so ridiculously OP.

Well, as in real life, when you are the attacker, you get to choose the time and place of the battle, while the defender gets the benefit of the terrain they're in, if any.  Beyond that, I don't really see why there should be an advantage.

With psi combat units have a constant weapon/defense rating, rather than anything based the equipment they're carrying, no?  Should just stay the same, and then apply whatever new function you come up with.

Offline Nexii

Re: Combat mechanics
« Reply #3 on: August 08, 2014, 04:12:03 PM »
Fusion reactors are no worse than going from say Laser to Impact.  Techs should be quite strong, otherwise there's no incentive to builder/tech.  But I do agree having it both reduce costs and increase HP was a bit much.  Hence I play with the simple unit cost of:

Unit cost = chassis factor * special ability cost modifiers (ignore weapon, armor, reactor entirely)

This way, the AI gets units that are good at both attack and defense at a decent cost.  It also makes weapons and armor both relevant, and keeping older high morale units around to upgrade can be more important also.  Slow and cheap units like infantry generally get stuck on defense, faster and more expensive units go on attack.  It works pretty well from my game play experience. Thematically I guess combat could be redesigned but does it add much fun to the game?  That's where I have a harder time with it...having to calculate out each battle for X rounds just doesn't seem fun.  But I guess it can be an option.


Offline Yitzi

Re: Combat mechanics
« Reply #4 on: August 08, 2014, 08:09:49 PM »
Ah, excellent.  I had looked but couldn't find any such discussion.

Could set a minimum (attack-defense) value of 1, no matter what the actual ratio.

If so, armor would be useless against hand weapons, which is sort of ridiculous.

Quote
Or divide by armor rather than subtract, though that would significantly reduce the marginal effectiveness of better and better armor types.

More importantly, it would mean that each unit would effectively have a single "power" value equal to armorXweapon, i.e. a 2/4/1 behaves identically to an 8/1/1 (except in the relationship to psi-weapon or psi-armor units).

Quote
But simply alternating reversing the combat works too, with the advantage of not having to dream up and balance a new function.

Actually, I did figure out what function would work: ln(e^x+e^(e^x)).  That'd still be fairly complicated to compute, though.

Quote
I do like Qes's idea about armor representing hitpoints (10*armor?) and reactor handling cost, because insta-doubling how much damage all your units can take once you get Fusion is so ridiculously OP.

According to the current plan, it would actually have damage taken inversely proportional to armor...which comes out to the same thing.

However, I don't think we quite worked out what effect, if any, reactor would have on combat.  Do you have any suggestions?

Quote
With psi combat units have a constant weapon/defense rating, rather than anything based the equipment they're carrying, no?  Should just stay the same, and then apply whatever new function you come up with.

I suppose that makes sense.

Fusion reactors are no worse than going from say Laser to Impact.  Techs should be quite strong, otherwise there's no incentive to builder/tech.

Although fusion and quantum reactors do come with techs that are fairly strong anyway.

Quote
Thematically I guess combat could be redesigned but does it add much fun to the game?

Some people will find it more fun to have a game where defensive units can serve as "walls" that can't be killed but don't kill the attacker, others probably won't.  When I'm ready to start taking requests, I plan to take votes among the requests, so depending on who wants what mods the most, that'll determine priorities.

Quote
That's where I have a harder time with it...having to calculate out each battle for X rounds just doesn't seem fun.

Yeah, calculating exact probabilities would probably not be too feasible by hand or by assembly-level programming, though if someone can find a good javascript chi-square calculator (that can be copied to put in another program) I can use that to produce a javascript calculator for the site.  It wouldn't be too hard to get a rough approximation of the probabilities, though.

Offline jdlessl

Re: Combat mechanics
« Reply #5 on: August 08, 2014, 08:46:43 PM »
If so, armor would be useless against hand weapons, which is sort of ridiculous.

Good point.

Quote
More importantly, it would mean that each unit would effectively have a single "power" value equal to armorXweapon, i.e. a 2/4/1 behaves identically to an 8/1/1 (except in the relationship to psi-weapon or psi-armor units).

Ah yes.  Still, it certainly shows off the benefits of heavy armor.  Doesn't last forever, though.  After 6 or so, weapons strengths start to truly outstrip armor ratings.

Also, it means that the difference between field and garrison units isn't so much the weapons and armor, but the specials, which makes sense.

Quote
Actually, I did figure out what function would work: ln(e^x+e^(e^x)).  That'd still be fairly complicated to compute, though.

Err, what does x represent here?  The combined attack*defense rating?  That double exponent all but eliminates the the single one, the result is basically no different from e^x.

Quote
However, I don't think we quite worked out what effect, if any, reactor would have on combat.  Do you have any suggestions?

Bump up unit movement speed by 1 per reactor level?  Or (reactor lvl-1)^2?  Cost reduction?  Apply an attack bonus?  Extra range?  Mix and match these effects depending on the chassis?  Infantry on foot wouldn't benefit in speed from having a better power source, but vehicles certainly would.  I really need to thumb through that other thread and see what's already been discussed and brainstormed.

Quote
Thematically I guess combat could be redesigned but does it add much fun to the game?

Like I said, the AI especially loves its armed and armored units.  But with the current mechanics they're such a waste.  Improving the efficacy of them would at a stroke make the AI a better opponent.  Right now, the economics are dirt simple.  Pump out all the X/1 units you can for attacking, and garrison with 1/X units.  But having mechanics where armed _and_ armored units are vastly more expensive but equally vastly more effective means you have to balance having fewer kickass units vs lots of weaker ones.  Sparta vs Drone, basically.

Offline Yitzi

Re: Combat mechanics
« Reply #6 on: August 08, 2014, 09:29:46 PM »
Ah yes.  Still, it certainly shows off the benefits of heavy armor.  Doesn't last forever, though.  After 6 or so, weapons strengths start to truly outstrip armor ratings.

Well, any change would presumably come with adjustments to weapon and armor strength anyway.

However, I think that the vast increase of weapons over armor is due in large part to the fact that many weapon techs are on the path to things you'd want anyway, while most armor techs aren't, and the fact that air units (especially copters) are powerful and depend only on weapon.  Moving the hab complex up to Silksteel Alloys and nerfing air somewhat will probably help armor keep up with weapons somewhat better.  (Weapons still have the advantage, of course, but only up to a point.)


Quote
Actually, I did figure out what function would work: ln(e^x+e^(e^x)).  That'd still be fairly complicated to compute, though.

Err, what does x represent here?  The combined attack*defense rating?  That double exponent all but eliminates the the single one, the result is basically no different from e^x.[/quote]

x is the weapon-armor.  But actually, you're right that it won't work; I made a mistake in figuring it out and I think I'll think about it some more (I don't think we'll implement that plan anyway, but I'm curious what it would have been.)

Quote
Bump up unit movement speed by 1 per reactor level?  Or (reactor lvl-1)^2?  Cost reduction?  Apply an attack bonus?  Extra range?  Mix and match these effects depending on the chassis?  Infantry on foot wouldn't benefit in speed from having a better power source, but vehicles certainly would.  I really need to thumb through that other thread and see what's already been discussed and brainstormed.

I think a mix based on chassis might be best.

Offline Nexii

Re: Combat mechanics
« Reply #7 on: August 08, 2014, 09:43:21 PM »
Yea though a 1/X unit will be bad in a system where combat power is the product of weapon and armor.  Much less powerful than it is now, by many orders of magnitude.  I'd say the AI would fare even worse.  A human player would just build all cost-optimal (full weapon/armor) troops, whereas the AI builds more on certain presets (a mix of X/1, X/X, and 1/X, generally).  And if you make cost = weapon*armor, well then that makes pretty much every weapon and armor tech useless.  And that also tends to make weapon&armored troops *very* expensive by endgame.  Creating a weird situation where native crushes high tech troops, but low tech beats native.  The unit counters should center more around unit abilities than between attack, defense, and combined A/D troops.  Because in the latter there's always native that unbalances it.  At least that's my POV for more interesting war and gameplay.  In the former at least you'll have a triangle rather than what exists by default (make as much X/1 on the best chassis).

The AI is weak more because of how it uses units and clogs up its support, to the detriment of growth.  These are things that are quite hard to fix, I don't think changing the combat would really do all that much.


Offline Yitzi

Re: Combat mechanics
« Reply #8 on: August 08, 2014, 09:46:49 PM »
I think that the best function to use in the "weapon minus armor" method would actually be the error function (integral of the bell curve); this would mean, though, that super-powerful weapons would not be substantially more effective than moderately powerful weapons against unarmored troops.  Which does sort of make sense, but would require a change in the unit cost formula to be remotely balanceable.

And if you make cost = weapon*armor, well then that makes pretty much every weapon and armor tech useless.  And that also tends to make weapon&armored troops *very* expensive by endgame.  Creating a weird situation where native crushes high tech troops, but low tech beats native.

Well, you could always make weapon and armor costs grow with tech, but slower than weapon and armor power.  That can be done just by modding alphax.

And yes, you do get a "native beats high tech beats low tech beats native" structure...which is probably a good thing, as it adds depth to the game.

Offline Nexii

Re: Combat mechanics
« Reply #9 on: August 08, 2014, 10:03:18 PM »
Sort of but not really.  In practice it means native life is always hard countered by scouts, which take no tech.  And also means that native life isn't useful at all until your opponent even has high tech - which is most of the game.  By that point mineral production is high enough that you can easily churn out a bunch of 1/1 troops in time.  Where by default 1/1 are 1/5-1/10 the cost of native, its never close.  That's why I put MWs to about the cost of a rover throughout the game.  They're good in/around fungus vs infantry, and have 'Clean' built in when in fungus (most of the reason I don't cost them = infantry).

I think the devs didn't really consider cost effectiveness of units, but rather just the combat effectiveness to make PSI neutral.  An example is that they didn't balance air costs well at all.  So I wouldn't consider everything they did as great on the combat side of the game.  But just my POV, it feels pretty balanced by doing this.  Not sure I'd change all that much.  *Maybe the option to make unit abilities be a flat cost increase rather than multiplier*.  But I'd have to think more on that one.

If the AI could better consider and use units that would help a lot, but also make it very difficult to beat due to inherent bonuses.

Offline Yitzi

Re: Combat mechanics
« Reply #10 on: August 10, 2014, 03:43:11 AM »
Here's an idea I thought might work, building on the ideas I've seen here and some of my own:

Each unit has hit points equal to some number (I'm thinking 3) times the reactor power (which I intend to make moddable for this, I'm thinking having each reactor be 1.5 times the power of the previous.)  Combat is a set number of rounds, alternating attacker dealing damage and defender dealing damage (with the attacker dealing damage first).  (I'm thinking maybe 4 of each for normal combat, 2 of each when the attacker is an air unit and the defender isn't, and 1 of each for artillery.)  Each round would be calculated as follows:
-If the damager is a non-artillery unit in an artillery battle, or lacks the SAM ability and the unit to be damaged is a needlejet, no damage is done and the defender has to simply take 1 or 2 rounds of damage without doing any in return.
-Take the damager's weapon value (without modifiers) and add a random bell-curve distributed variable with 5 standard deviation.  If this is less than the armor value of the unit to be damaged (also without modifiers, with one exception I'll mention below), no damage is done.
-Otherwise, take a chi-square-distributed variable, multiply by the damager's reactor, then multiply by the effect of all the damager's modifiers, and divide by the effect of all the modifiers of the unit to be damaged.  This is the damage done in this round.  Repeat until all rounds are complete or one of the combatants is killed.
-In psi combat, the weapon and armor values are both replaced by some multiple (I'm thinking 2) of the relevant unit's morale/lifecycle, plus some bonus/penalty for the weapon (probably +2) so that an even match can have a different-than-50% chance of success.  Reactors would still be relevant in psi combat, except that native life would imitate the reactor level of its opponent.

Many modifiers will of course need to be adjusted to compensate for the fact that this results in a much weaker attacker's advantage; most notable is the bonus granted by the perimeter defense etc., since that isn't currently moddable.  Armor and weapon values would also have to be completely reworked, and the cost formula possibly changed too (though formula 2 should work well.)

There are a few modifiers, though, that I'm thinking of changing to a different type:  The tachyon field would give some flat bonus (I'm thinking 5) to the defender's armor value.  Hypnotic trance and empath song would also, instead of a percentage modifier, give a bonus (again, I'm thinking 5) to the effective weapon/armor of the unit in psi combat.

Some interesting consequences of this system:
-A singularity/unarmored against missile/unarmored is a fairly even match, decided more by morale than by the technological advantage.  This makes sense; it doesn't really matter that much whether you kill your unarmored opponent by rending the fabric of space-time or with simple missiles; the only advantage of the former is that it's not going to be stopped by a bit of neutronium.
-As a result, if you have the technological advantage over your opponent, armor is usually more important than weapon (as once your armor is substantially ahead of your opponent's weapon, their chances to do damage go down quite fast); if you're a bit behind, weapon is more important (to avoid that extreme lead).  (If you're a lot behind, you might want to invest in psi combat and hope he's got weak morale.)  Reactors remain important throughout.

Thoughts?

Offline Nexii

Re: Combat mechanics
« Reply #11 on: August 11, 2014, 03:38:15 AM »
I'm not sure I'd really give up to the death combat though - that's a separate issue from armor not being 'thematic'.  It's already fairly difficult and costly to conquer a good opponent.  I'd say that early war is never worth it vs a good opponent, and even in the mid-game it's a risky play.  I guess my point is just because the AI isn't strong, doesn't mean that invasion speed necessarily needs to be slowed down.

I really like the idea of reactors giving more movement speed to chassis other than air units though.  In fact that makes more sense than +HP or cost modification.  Logically more powerful engines can propel a vehicle quicker.  I'd like to see faster rovers/hovers, and sea units as the game goes on, to keep them relevant against air.  And it does seem a bit silly to keep advanced air units at a static 6/8 move with the 0 reactor increase option.  Infantry can remain defensive in nature and Monopole/Drop/Elite give Infantry a lot of increased mobility later game anyways.

I'd also stick with %-based modifiers over flat numbers even if trying to represent armor as damage reduction.  One thing is you'll see portions of the curve as more damaging.  Unit damage will go up, as the game goes on if you just use flat numbers.  Granted reactor can smooth that out some but it would still be wonky (although, it's constant 2:1 if to the death).  Elite being 7x stronger than Very Green would overpower Morale for PSI, etc.  One other thing is that 'defensive' modifiers might not really make sense to be increasing armor in such a system.  For example AAA/ECM wouldn't make a unit more hardy against air attack or fast units.  It'd be a weapon modifier, thematically.  Though you could make arguments for it being an armor modifier too...I think there'd be some debate.  So you'd probably need variables where such modifiers can be given +% to weapon or armor power.  Sensor arrays are probably another good example.

Offline Yitzi

Re: Combat mechanics
« Reply #12 on: August 11, 2014, 04:29:57 AM »
I'm not sure I'd really give up to the death combat though - that's a separate issue from armor not being 'thematic'.

Point.  However, it would be fairly easy to allow alphax modding to split the "combat to the death" issue from the other stuff; I think (since I think the change will make the short list) I'll start a separate thread asking for what methods people would like to see once I resolve the reactor issue.

Quote
I really like the idea of reactors giving more movement speed to chassis other than air units though.  In fact that makes more sense than +HP or cost modification.  Logically more powerful engines can propel a vehicle quicker.  I'd like to see faster rovers/hovers, and sea units as the game goes on, to keep them relevant against air.

I think air will always have the mobility advantage, though, which is as it should be.

Perhaps there is a better way to apply reactor than just boosting hit points/damage...I'll have to think about the best way to implement it.

Quote
And it does seem a bit silly to keep advanced air units at a static 6/8 move with the 0 reactor increase option.

The idea there was really more of (1) giving needlejets an important advantage over choppers and gravships, and (2) keeping choppers' multiple-attacks capability from making them too powerful.  (Actually, #2 was the primary consideration.)  If choppers have high movement, it makes them too powerful.

Quote
I'd also stick with %-based modifiers over flat numbers even if trying to represent armor as damage reduction.  One thing is you'll see portions of the curve as more damaging.  Unit damage will go up, as the game goes on if you just use flat numbers.

I'm not sure what you're saying here.  The way I'm envisioning it, stronger weapons won't directly increase damage, but will rather create increased ability to avoid being blocked by armor.

Quote
Elite being 7x stronger than Very Green would overpower Morale for PSI, etc.

It wouldn't be a function of 7X, but rather "12 points higher"...and yes, Elite vs. Very Green (or, more likely, Demon Boil vs. Very Green or Elite vs. Hatchling) would be a foregone conclusion in psi combat.  Which I think makes a lot of sense, and will mean that the answer to psi is more complex than just "throw cheap units at it".

Quote
One other thing is that 'defensive' modifiers might not really make sense to be increasing armor in such a system.  For example AAA/ECM wouldn't make a unit more hardy against air attack or fast units.  It'd be a weapon modifier, thematically.  Though you could make arguments for it being an armor modifier too...I think there'd be some debate.  So you'd probably need variables where such modifiers can be given +% to weapon or armor power.  Sensor arrays are probably another good example.

I think many would be clear, and those that aren't could have separate modifiers for each of the possibilities.

Offline Nexii

Re: Combat mechanics
« Reply #13 on: August 12, 2014, 02:09:29 AM »
Yea I was thinking +1 move for Rover/Hover per reactor.  Perhaps +2 move per reactor for sea.  Nothing too drastic, but something significant to offset the loss of HP gain.

I think the copters problem stems from that:
Sea units only ever get one attack, and get slower when damaged down to minimum move: 2
Land units can multi attack but also get slower when damaged down to minimum move: 1
Copters can multi attack but never get slower when damaged (as they likely would crash)

Personally I've never been a fan of the damage slowdown or the limitations on sea units to a single attack.  Though sea can bombard which is very strong.  Copters, yes, 8 and +2/reactor was a bit much.  I put them at move:6 and +2/reactor myself.  The main way I nerfed copters was to make them expensive, 50 minerals compared to 20 for infantry (30 for AAA infantry).  Also the extra attacks aren't quite as significant when every unit including formers/crawlers have armor (and you'd see likely the same in the proposed combat system).

One other thing, though not combat mechanics related that I'd like to see is native life getting the +1 movement bonus at Demon Boil.  Though I'm not sure how feasible that is since it's a preset and not a chassis..

Offline Yitzi

Re: Combat mechanics
« Reply #14 on: August 12, 2014, 02:52:15 AM »
Yea I was thinking +1 move for Rover/Hover per reactor.  Perhaps +2 move per reactor for sea.  Nothing too drastic, but something significant to offset the loss of HP gain.

+1 move per reactor on a speeder, or +2 on a sea unit, is pretty drastic; that'd mean singularity hovertanks would have 7 movement and singularity cruisers would have 14.  I'd say +1 per 2 reactor levels on speeder/hovertank (so fusion gives +1, and it increases to +2 with singularity reactors), and +1 per level (with probably -1 base so that a fission reactor is the same) for sea.

Any idea what a reactor would give to infantry, though?  Unless it shouldn't give any, on the theory that infantry doesn't really have any use for a reactor...

Quote
I think the copters problem stems from that:
Sea units only ever get one attack, and get slower when damaged down to minimum move: 2
Land units can multi attack but also get slower when damaged down to minimum move: 1
Copters can multi attack but never get slower when damaged (as they likely would crash)

I think it's less a question of "get slower when damaged" and more the fact that they have so much movement, enabling them to easily attack "soft" targets (possibly several a turn).  Although now that I think of it, you are right that under the new system, it wouldn't be an issue (as any attack-capable units would do solid damage to choppers even on defense.)

Quote
One other thing, though not combat mechanics related that I'd like to see is native life getting the +1 movement bonus at Demon Boil.  Though I'm not sure how feasible that is since it's a preset and not a chassis..

Nah, it'd be easy; wherever it says "elite gets +1 movement unless it's native life" I'd just have to remove that last part.

The real question is whether it makes sense; after all, Demon Boil is a function of size/number of worms, so I wouldn't expect it to translate to superior mobility/logistics the way a highly trained force would.

 

* 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)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Some would ask, how could a perfect God create a universe filled with so much that is evil. They have missed a greater conundrum: why would a perfect God create a universe at all?
~Sister Miriam Godwinson 'But for the Grace of God'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 37.

[Show Queries]