Design: Battle Math

Past public reviews and discussions.
Message
Author
User avatar
General_Zaber
Space Kraken
Posts: 130
Joined: Wed Jan 09, 2008 6:43 am
Location: Iserlohn Fortress

Re: Design: Battle Math

#46 Post by General_Zaber »

Tactics, IConrad is exactly right, nothing ruins RTS more for me than the fact that it lives up to the S standing for Strategy.

I know that Strategy is very important to 4X games, but I oppose the idea that a battle's outcome should be determinable from the start. The greatest Generals in our history always made the best of what they had wether it was superior to their enemy's or not. The many books written on warfare in China by Sun-Tzu and the like advocated changing the outcome of a battle to your terms. What you bring into combat is important, but what you do with the forces at your command should be even more so.

Introducing Tactics certainly doesn't mean micromanagement, and keep in mind that they won't always change the outcome, no matter what you do, being outnumbered 10 to 1 is still a significant disadvantage.

A concept I mentioned previously is a moving ship having lower Stealth as well as Weaker Shields and Weapons, as a tradeoff however it would take less damage because most hits on it would likely glance off easier. Provided the effect is noticeable this would add much needed depth to the combat system.

Also while it doesn't have to be implemented immediately the idea of Stances is easily managed and provides a significant boost in possibilities on the battlefield.
The enemy is retreating! As always, there is no cuteness about them. Dammit

User avatar
Krikkitone
Creative Contributor
Posts: 1559
Joined: Sat Sep 13, 2003 6:52 pm

Re: Design: Battle Math

#47 Post by Krikkitone »

IConrad wrote:
Also, as an alternative route, another thing that somewhat worked out alright w/ MoO III was the AI that was used for combats. But I would much rather see something akin to what the cRPG series Star Ocean uses for automated units -- where you can establish a number of priorities and allow your fleets to operate based on which AI prioritization scheme you have decided. As long as you have the //ability// to override your AI's and take direct control at a fleet level, this leaves the player open to much more macromanagement yet still feeling "in control" -- even with complex strategies and approaches. So, complex commands are by no means unscalable. This goes back to my suggestion of "having the cake and eating it too" -- leave the complexity there, but don't require the player to confront all of it at the lowest-order. That's the difference between micromanagement and macromanagement: scalability. As the game scales up in dimension, so too should the tools the player has available to him to command the game itself scale up in dimension. This would make early-game combat as relevant as later-game combat... something that thus far it really seems (again, this is purely a personal observation; I do NOT want to imply that I'm claiming any sort of superiority to or expertise over anyone else here!!) that I've been the only person to give a suggestion to aside from shrugging one's shoulders and saying, "It can't be done."
This is something I have to seriously disagree with. If you want to make it so that a player doesn't have to deal with details, you have a few options

1. let them ignore it, because it doesn't do much anyways
2. give them the Option of having an AI do it
3. give them a customizable set of tools for simplifying the commands (so they give a general order and an AI handles the details)
4. eliminating that game mechanic

looking at each of those
1 ... doesn't fly if it does ANYTHING then it will be necessary to play on the higher levels (if it doesn't see 4)
2 ... If the AI is better, then why give the player the option, if the AI is worse, then why is it there
3 ... This is just # 2, except #2 at the detail level
4 ... this is preferable

As a variation on 4, combine #4 with #3... the details are not part of the game Mechanic
This is what what was done with FO's economy... You could have done something like MOO2 and given a planet the "Food AI" so it would focus on building Soil Enrichment, Weather Controllers, etc. or the "Production AI" for Auto Factories, etc. However, instead we still give the planet those "targets" BUT there are no things to build, no buildings to manage.
IConrad wrote:
I agree with the majority of what you right about strategy -- but let's not forget that there is another aspect to combat: tactics. I'm seeing a strong theme of high disregard for sophisticated tactics, to be totally honest -- and that does not make for an enjoyable combat sequence. I'll give an example of what I mean. So far, with the system of battle-damage being implemented as a ubiquitous value, we are over-prioritizing for stealthiness at the cost of scouting. Scouting devices and stealth devices would have to take up a certain amount of space on a ship, and if combat damage is applied ubiquitously then the overwhelming prioritization goes to getting to be the first person to lay the blows down in combat. This over-prioritizes stealth over detection. (Why? Because stealth and detection units will be weighted against one another -- they //have// to be. This means one will have to choose between more stealth and more detection. Which means players will always choose stealth -- as it guarantees you, effectively, the first strike; you out-stealth the opponent's detection, you get to hit first.) What does that lead to? Entire 5-minute combats (or potentially longer if there's no "time's up" limiter) where nothing ever happens -- because neither side's fleets can detect one another.
This Should not be a problem... the Battle sequence should begin when you First SEE (or ar attacked by) enemy forces in the system. (not when you enter the system)

Normally those forces you first see should be Planetary Defenses, but if there are no planets belonging to either side in the system, the combat may never take place....
Blue scout ship enters system A
Red scout ship enters system A

IF they see eachother this turn there may be a combat.... they should be able to pass right by each other...(depending on if they are passing through, surveying the planets OR searching for enemy ships.

If possible we should try to have battle begin at different time for different sides... If Red scout ship has "super sensors"+"Super stealth" then they will begin battle with Blue's "terrible sensor"+"terrible stealth" ship at the edge of their detection... they could then shadow it, or engage [which would bring Blue player into the combat] or pass on.
Only in the second option would combat actually be initiated.

This would make scouts+stealth important because they would give you the option of totally avoiding combat (and knowing the strength/position of enemy forces in the system)

IConrad wrote:
IMHO I would //like// to see the game take a course where the in-built systems are robust enough that the player will only have to take intercessionary actions; much the same way a general would. Hence the previous idea of giving fleets strategies (I.e.; 'keep your distance'/'go in for the kill', 'lie in wait'/'hunt-and-destroy', etc.) These strategy-choices would be tiered, and that should keep a fleet operating the way a player wants without the player being forced to give a fleet direct commands. (Always, of course, allow for direct commands to be given in a way that over-rides the ships' actions.)
The fact is those strategies will only Really be valuable if they are the ONLY means by which you interact with your troops (my favored approach, but not for the tacticians I know) if you can give them exact orders, then the human will be better than the AI at executing a lie in wait, so a Human will Have to do it on higher levels.

IConrad wrote:
One area I would disagree with is this:
eleazar wrote:concealing your objective and trying to guess your enemy's
-- this is something that is only viable in with a combat engine that is sufficiently sophisticated. Otherwise, there is only one possible objective: pounding your enemy to dust. While that's //always// the goal, if there's only a limited number of ways to go about it, there's really no guesswork at all.
That should not be the only objective... while it is always a nice BONUS to destroy your enemy's fleets in battle and if you can do that it will allow you to achieve almost any goal. Your goals may be to
1. Capture a Planet
2. Destroy a Planet
3. Defend a Planet
4. Blockade a Planet
5. Break a Blockade
6. Destroy enemy forces
7. Stop enemy forces from going further
8. Spy on enemy forces

Only # 6 requires destroying enemy forces, all the others work just fine with enemy forces retreating (on the battle field)
It can be just as effective to destroy enemy forces by taking the planets that maintain them [had that happen in MOO2 occasionally... ... I couldn't take their Fleet, but a few of my ships could take any of their planets... split it up conquer the planets with a little more than the minimum, eventually I wiped out their forces because they had to scrap most of them... I was taking more planets from them than they were taking from me. (it helped that they were just destroying while I was conquering)]

User avatar
IConrad
Space Kraken
Posts: 163
Joined: Mon Nov 10, 2008 5:55 pm

Re: Design: Battle Math

#48 Post by IConrad »

This is something I have to seriously disagree with. If you want to make it so that a player doesn't have to deal with details, you have a few options

1. let them ignore it, because it doesn't do much anyways
2. give them the Option of having an AI do it
3. give them a customizable set of tools for simplifying the commands (so they give a general order and an AI handles the details)
4. eliminating that game mechanic

looking at each of those
1 ... doesn't fly if it does ANYTHING then it will be necessary to play on the higher levels (if it doesn't see 4)
2 ... If the AI is better, then why give the player the option, if the AI is worse, then why is it there
3 ... This is just # 2, except #2 at the detail level
4 ... this is preferable

As a variation on 4, combine #4 with #3... the details are not part of the game Mechanic
This is what what was done with FO's economy... You could have done something like MOO2 and given a planet the "Food AI" so it would focus on building Soil Enrichment, Weather Controllers, etc. or the "Production AI" for Auto Factories, etc. However, instead we still give the planet those "targets" BUT there are no things to build, no buildings to manage.
I'm afraid I don't understand what you mean by "doesn't fly if it does ANYTHING then it will be necessary to play on the higher levels". This statement, I simply cannot comprehend. Could you break it down further for me?
2 ... If the AI is better, then why give the player the option, if the AI is worse, then why is it there
The idea was to give the player control over how the AI itself behaves in general -- assign the AI priorities, and then allow the player to override in specific cases where there's a unique situation or opportunity the player sees that the AI does not. This reduces overall micromanagement to a minimum but leaves the tacticians happy.

It really seems to me that again this conversation is having an overwhelming focus on the end-game scenarios where there would be a large number of vessels, to the detriment of early game scenarios where there is a sufficiently limited number of ships that total micromanagement is feasible in realtime. For the life of me, I simply do not understand this blindspot on the part of the current design team. I am at a loss. Am I simply missing something?
However, instead we still give the planet those "targets" BUT there are no things to build, no buildings to manage.
Frankly, I'm not too precisely keen on this idea, but since in any game I would play, there were generally thousands of planets within my empire (MoO III anyhow) I can understand the intent and yeah -- I'm sure it would be quite useful. I would make my comment about scalability once again, but... that was messy in MoO III and FO isn't MoO.

The point I'm trying to convey here -- and maybe I'm just too poor of a communicator -- is that combats scale gradually over the course of a game. And there's no reason why the command&reporting side of the UI can't scale up just the same. Let the AI handle the obvious so the player can handle the subtle. This enriches the combat experience of the game, which only adds to the total replayability of the finished product.

Let's not forget; by and large combats are going to be interruptions. This means, given the way human memory works, that they will also be some of the most memorable aspects of the game. Depending on the study you want to review, people remember the first and last 15% of any given sequence and tend to blur out the middle material. Since combats will be interruptions, this means that however great the rest of the game is, combat will always be much more memorable -- especially since we want to limit the total amount of time the player spends in combat. The way it seems to be going right now, I -- and at least a few others -- would have the strong impression that one of the most memorable aspects of the game was an afterthought.

That's not good for the total game quality.
This Should not be a problem... the Battle sequence should begin when you First SEE (or ar attacked by) enemy forces in the system. (not when you enter the system)
And what happens when one side sees the other, but then looses sight? (I actually had that happen in MoO III a few times. Quite obnoxious.)
The fact is those strategies will only Really be valuable if they are the ONLY means by which you interact with your troops (my favored approach, but not for the tacticians I know) if you can give them exact orders, then the human will be better than the AI at executing a lie in wait, so a Human will Have to do it on higher levels.
Why is this even remotely a problem? Again, we're limiting a combat to ten units per player, here. Hardly unreasonable for a player to directly control one or two units and leave the rest to a competent AI because it's obeying generalized orders as issued by the player before combat began. After that, it's mostly supervision and tweak an action here, an action there. The player is left with the feel of total control without having to execute every single action. And, again -- an AI wouldn't be better than the player at these things; that's the point. But it would be sufficiently competent at executing generic actions on behalf of the player's whims that 'routine, run-of-the-mill' actions would require little-to-no player input. Once you get to the grind-and-gut-em phase, the player can sit back and enjoy.

Here's a more visceral example; Long range v. short-range ships. Any player worth his salt with the long-range beam weapons is going to want to take advantage of his distance advantage to keep himself out of harms' way whilst 'discouraging the enemy troops'. So of course you could give an AI a "keep away" command as higher priority for your long-range fleets. This would then tell them to keep moving away from the enemy so that they are at the edge of their range; thus ensuring the enemy can't hurt them whilst they hurt the enemy. But say, for example, the enemy then retreats away from your ship. Do you start chasing after or sitting still? They could be attempting to lure you into a trap. This is where the player should step in. Allow your ship to chase? Or issue it a one-time command to not move? Four or five turns could go by -- and only one intercessionary action by the player. With additional fleets this gets a little more complicated, but that's the general gist. We want an AI that is competent at following prioritized orders by the player, which leaves the player available to try and implement his ingenuity as only a human can (well, pre-singularity anyhow! :p) do. Having the proverbial cake and eating it too.
That should not be the only objective... while it is always a nice BONUS to destroy your enemy's fleets in battle and if you can do that it will allow you to achieve almost any goal. Your goals may be to
1. Capture a Planet
2. Destroy a Planet
3. Defend a Planet
4. Blockade a Planet
5. Break a Blockade
6. Destroy enemy forces
7. Stop enemy forces from going further
8. Spy on enemy forces
1, 2, 3, 5, 6, and 7 boil down to "crush your enemies." While your end-actions in the turn might result in these things, if you do not have the effective capacity to project force, you will never achieve these objectives tactically. 4 and 8 are mere preludes, tactically speaking. If there are only a limited number of ways by which one can project force, there's little to no guesswork. You are left with no tactic higher in complexity than the hybridized mass-assault/echelon. Which we humans invented going on ten thousand years ago.

Might I suggest that this total thread (Battle UI Scaling v. Simplification) be taken elsewhere? I wouldn't know where to place it.

User avatar
The Dave
Space Krill
Posts: 7
Joined: Tue Dec 23, 2008 9:23 pm
Location: Edmonton

Re: Design: Battle Math

#49 Post by The Dave »

how do ships take and keep track of damage, what determines how powerful a weapon is and how much damage it can do, what do shields and armour do for ships, etc.
[/quote]I'll start off with a nice provocative statement: I don't like the battle math that is being proposed in most of the thread. The idea of having ship systems taper off with damage is one I can agree with, but I think it's important to take a step back before I address alterations to the generalized system people are talking about. In short: it's too simple, and way too overdone. We don't want a simple mod of some other combat system out there, we want one that presents new problems and allows new tactics.

The player of the game deals with the outcomes of the math. If we're talking about math we can adopt a very complex system or a very simple one but in the end the results of all of our functions are going to be what the player is dealing with, nothing else. If every ship has 15 different systems that are being tracked for damage the game will be designed such that they will see a generalized version of this: atmosphere being vented into space perhaps, maybe a red gauge slowing filling up. For our conversation right now I don't think it matters.

I think a system based around HP, or some other numbers=life system is no good. It's too simple. In small battles it doesn't offer enough detail and in large battles lets face it: we're more interested in how many of our units are intact and still capable of fighting rather than how well they are actually doing on an individual basis. If a ship gets disabled and floats away or blown up that's cool - it adds to the intensity of the battle to have a group of 50 vessels at your command and to see 10 of them lagging behind, 5 floating dead in space, and 10 as clouds of debris. We, as players, don't care about the details at all when on this scale - all we care about is the result, but the mathematical system must be tracking somewhat interesting information even if we aren't interested in the details, only the results. When the battles are small the subtleties of the mathematical model we use will provide the entertainment, and in large battles it will come from keeping the game balanced, playable with large numbers of units, and some way of making one planetary attack or epic battle feel different from all of the other ones (although I think that will come more from designs, tech, and having interesting positionings of units, etc).

Orion II had something interesting with having 4 shield arcs, each regenerating and blocking damage on its own. I liked it, but it made little sense to have an electromagnetic shield unable to transfer energy throughout this giant energy sphere when the physical METAL that the ship was made out of was all generalized into one pool of HP, with hits to the front of the ship being just as likely to damage the engines as hits from behind (!?!?!).

I love the idea of ship systems weakening with time, but I strongly suggest we adopt a more sophisticated system than a simply percentage conversion. I suggest the following:
  • Ships have a general HP stat or structural integrity number - this refers to the actual physical ship's integrity.
  • Ships have shields that may or may not be separated into different arcs. They may or may not act as barriers (absorbing damage), dampeners (reducing damage at a flat rate), or deflectors (bending beams and projectiles away from critical areas or even causing a miss).
  • Option 1 - The ship has an armor stat that is derived from the material it is made out of. Every component placed in a hull, beit the engine or a weapon this material as armor, as well as an HP stat (perhaps multiplied by a constant - the engine would probably be safer than weapons, and internal slots should be more armored than external ones). If your ship is hit (and the shields do not protect it) *some* aspect of it is damaged. It could be a blow to the general HP stat or to one of its systems. If our ship design mode were done from a top-down blueprint view the object damaged could be related to the side of the ship that was hit by a weapon.
  • Option 2 - Armor is tracked in 4 separate quadrants - Bow/Stern/Port/Starboard. Each arc just has a general number denoting how strong it is. Once it hits zero damage starts to penetrate the armor and starts damaging the structural integrity/HP/whatever - and as the HP value starts to go down we fall back to our system where system efficiency = the % of HP, although I think we should instead have damage to the power system manifest itself that way - with high energy systems like shields and beams tapering off first and then missiles and other systems next.
In large scale combat you wouldn't care about that level of detail sure, but if the battles get as big as we're talking about then we really don't care about even a simple HP gauge on one ship. If someone has a more clever implementation of this idea or something else I think that would be great, but we can definitely do better than a generalized HP gauge. That system is simply too shallow and has been too much. It's not like the player has to perform our math calculations to play the game, so we can be robust and still create an intuitive and fun game.

Weapon power & accuracy: I think having some sort of accuracy system in place is very important, particularly with respect to allowing for critical hits (preferably ones that don't do simply more raw damage, but rather do some damage to the hull or general HP but also manifest their extra damage by doing extra damage to internal systems).

In terms of determining damage from weapons, I believe they should be given a raw power value (e.g. Laser Canon: Power: 10). The farther the beam travels, the weaker it is, the more or less accurately it hits its target the more or less damage it causes. I think upgrades should be able to be applied as well, such as a sustained beam (which should allow damage to accumulate constantly, but at a lower rate).

The big thing I believe is that we can have a simple yet elegant game and battle mode even with more complex math. Final Fantasy Tactics is a game that illustrates this point well, as it can be enjoyed very thoroughly with only a general understanding of the math (stronger swords do more damage than weaker swords, stronger spells are better etc) but if any of you have looked at the 130 page document outlining the underlying math functions and setup it's even more impressive. You can see the concepts that are intuitively understandable and just how robust the system behind it all is.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Design: Battle Math

#50 Post by Geoff the Medio »

The Dave wrote:[Complexity is good]
You've argued for having a lot of complexity in battle calculations... Unfortunately, this isn't consistent with our design method. Also, we're making a game, not a simulation. As such, anything we can do without a complex system, we will use a simpler system to do, and we'll generally err on the side of simplicity, with the possibility of adding more complexity later.

I don't think you've given a good case why we need to track lots of complexity under the hood. Many games that are entirely focused on RTS battles work fine without any unit damage tracking beyond fully functional until dead, and FreeOrion combat is just one part of a larger strategic game.

Your Option 1, involving damage to various ship subsystems when a ship is hit, looks quite similar to the sort of system I was thinking about before writing this thread, but both are just too complicated for the type of game we're making, and due to the amount of programmer time that they would require, especially before we've got a simple(r) system actually written and working.

Also, you and any other new posters should review the already-decided things discussed on the v0.4 Design Pad. In particular, ship facings have been specifically decided against. Tactics can arise from the relative positions of ships, not which way they're facing (or which of their directed shields are more damaged)

User avatar
The Dave
Space Krill
Posts: 7
Joined: Tue Dec 23, 2008 9:23 pm
Location: Edmonton

Re: Design: Battle Math

#51 Post by The Dave »

^
That's fine, and sorry for missing the facing issue, I did read the design doc although apparently not flawlessly.

I understand the need for simplicity but if you're programming every game mechanic to maximize parsimony that does run the risk of creating shallow gameplay. In RTS games that focus exclusively on this mode of combat they only track individual HP, it's true, and I know we're not trying to make a pure simulation but I don't see how the exact game mechanics of MoO II/MoO III are going to be avoided if our mathematical base is a simple HP component.

User avatar
IConrad
Space Kraken
Posts: 163
Joined: Mon Nov 10, 2008 5:55 pm

Re: Design: Battle Math

#52 Post by IConrad »

Huzzah! My 50th Post! Space Squidery Abounds!


That aside; I swear I have no idea who The Dave is. :)

I have seen where the research field and the planetary management fields have drop-downs for individual planets and controls. I imagine that we will also be able to transport colonists from one planet to another -- and we're also going to allow multiple races to be present on one world (which is all a higher degree of complexity than is being allowed into the combat area)

Okay -- here's a breakdown possible. For implementing 0.4.0, certainly keep things as simple as necessary to get the implementation out. I don't think anybody is disagreeing with that idea.

Personally I would /like/ to see the math I suggested used over the D=W*H (Damage=Weapon*Health) metric. I understand how it would increase the complexity somewhat, but I'll concede that it could be something that could be implemented 'round 0.4.2, maybe. As to how damage is measured -- i.e.; where does it go? Certainly implement a raw HP system to begin with. Once we get there, and see how it runs, maybe then we can see about implementing a system based on there being multiple HP tracks per ship, w/ damage assigned at random. Rather than making it any more complicated than necessary, how about the following?

There are 6 HP pools.
  1. Structure. This is by far the largest.
  2. Engines. This would be perhaps 10% base structure in size; the largest of the secondary HP pools
  3. Weapons. This pool increases in size by the tech level of each weapon installed.
  4. Sensors. Same thing; each sensor unit has a set HP pool based on tech level.
  5. Shields. Same deal. We only need to implement this one if shields are going to regenerate.
  6. Specials. This'd be the smallest, and would represent any odd things like colony pods or stealth equipment or whatever. Wouldn't it suck if your war-colony fleet was victorious only to discover your colony pods were all demolished? >;-)
To make calculations easier, each of these things operate on a fixed percentage level basis. They could be represented not by a bar, but by an icon that pops up under the main Structure bar if and only if that subsystem has received damage/remains damaged. It would show up green up until 67%, Yellow through 33%, Red down to 1%; and white at 0%.

If a ship's engines reach 0% before the structure goes, there could be a 50% chance the ship will either be dead in the water or else it blows up.

I think this would be a //much// easier metric to keep track of than what I previously suggested, yet it would be sufficiently detailed to allow for that sense of battle damage being more than just a track on a line... without increasing the complexity on how the player has to handle things any more, really, than what was being suggested previously (w/ HP affecting all systems equally). As long as the icons are readily seen, there's no need for special filters or the like. Micromanagement also is kept to no higher a degree than was previously being assigned. Modifying the UI to allow for group selection based on damage states would be good. (I.e.; select all ships w/ engines in the yellow and regroup them from their fleets to the reserve, to get your speed edge back). If you combine that, again, with an AI that you can tailor the behaviors of to suit your personal approach (with tiered priorities which are static /during/ battle but can be set up in a tab outside of battle encounters) then... I personally feel what you'd have would be a system that's pretty damned good.

At least, I think it would be leaps and bounds above what I've seen in any other 4x game I've yet encountered. The key of course is to keep decision-making turnaround time to no more than 10 seconds per combat turn, I'm sure.

I understand the impulse to minimize on combat -- I really do -- but like I said, please let's not forget that combat is, like it or not, going to be one of the most memorable aspects of FO. By contrast, I can //still// remember some of the combats I did in MoO II ten years ago. (And yeah, I only spent five minutes on those, too.)

User avatar
Krikkitone
Creative Contributor
Posts: 1559
Joined: Sat Sep 13, 2003 6:52 pm

Re: Design: Battle Math

#53 Post by Krikkitone »

If we are going to have subsystems I would Not give them individual hit points. ie Engines are at 10/15 hp [not talking about display talking about underlying math]

I would give each system 2-4 "states" ie, Non Functional, Not damaged... with possibly 1 or 2 levels in between.
ie
Destroyed (non Functional can only be improved outside of combat)
Damaged (non functional but can be repaired in Combat to the next level up)
Repaired (Functional, but somewhat lessened Cannot be repaired in combat)
Unharmed (damage not taken)

and each time a system is hit it would have a chance of falling one level lower. Chance depending on the "strength" of the system and of the weapon that hit it. Armor Would also be systems, that would have a good chance of being hit first (and would have a high strength.

However, for now the whole ship health makes sense, and I'd go with it. (However I would tie it into Rate of Fire rather than Damage done by the weapon, because with no Accuracy, Rate of Fire is going to be the key way to distinguish PD weapons from SR Weapons)

I Do think having Armor as a "Slotless" system that slows the ship down but adds hp is a benefit, The other possibility is having 4-6 levels of armor (I think 3 is a bit low, 5 should provide the necessary variety)

User avatar
IConrad
Space Kraken
Posts: 163
Joined: Mon Nov 10, 2008 5:55 pm

Re: Design: Battle Math

#54 Post by IConrad »

and each time a system is hit it would have a chance of falling one level lower. Chance depending on the "strength" of the system and of the weapon that hit it. Armor Would also be systems, that would have a good chance of being hit first (and would have a high strength.
I think just giving the systems their own HP and allowing damage to be spread at random is, frankly, an easier way of calculating things. Then you just leave percent remaining as the efficiency of the unit in question.

User avatar
Josh
Graphics
Posts: 452
Joined: Mon Dec 31, 2007 10:49 am
Location: California, USA

Re: Design: Battle Math

#55 Post by Josh »

Actually, right now, I'd just like a working battle system.

I did attempt to construct a rule set for damage calculation and health bars a while back, but personally, I think it was too... ambitious.

- Basically, every component on the ship represented a hit point. Or every component had one hit point, depending on how you look at it.

- Weapons that struck the ship had their damage divided by the ships armor rating and... (the complicated part)

- The number you had left over was the percent chance one of those hit points got blown up.

- durability of your ship depended on how you built it.

It was a pretty binary system as I remember it, but I seem to have forgotten where I put it.

User avatar
Krikkitone
Creative Contributor
Posts: 1559
Joined: Sat Sep 13, 2003 6:52 pm

Re: Design: Battle Math

#56 Post by Krikkitone »

Right now I think Geoff's Model with a slight modification is probably the best

Add on a seperate bar for Shields, so that they can recharge unlike Armor, and then decrease some stat of each system based on the hp (Armor+other Systems) remaining of the ship.

Have Shields be absolute (any "extra damage" after shields = 0 goes to hp)

Have ROF be an important factor in distinguishing SR from PD. SR weapons do more Damage/sec but they each do FAR more HP than a LR weapon, ie missile/fighter, can take. So while they get 1 shot=1 kill they fire Far too slow.

User avatar
Sui Generis
Space Floater
Posts: 38
Joined: Sat Dec 27, 2008 5:25 am
Location: United Kingdom

Re: Design: Battle Math

#57 Post by Sui Generis »

Greetings to all FreeOrion developers/contributors. This thread seems to have taken a lively turn and provoked some interest, as this post would seem to attest ;).
Krikkitone wrote:If we are going to have subsystems I would Not give them individual hit points. ie Engines are at 10/15 hp [not talking about display talking about underlying math]

I would give each system 2-4 "states" ie, Non Functional, Not damaged... with possibly 1 or 2 levels in between.
ie
Destroyed (non Functional can only be improved outside of combat)
Damaged (non functional but can be repaired in Combat to the next level up)
Repaired (Functional, but somewhat lessened Cannot be repaired in combat)
Unharmed (damage not taken)

and each time a system is hit it would have a chance of falling one level lower. Chance depending on the "strength" of the system and of the weapon that hit it.

...

I Do think having Armor as a "Slotless" system that slows the ship down but adds hp is a benefit, The other possibility is having 4-6 levels of armor (I think 3 is a bit low, 5 should provide the necessary variety)
Whilst I agree with the concept of a ship's systems having these "states" you mention - that correspond to some degree with damage suffered by the ship and suitable negative gameplay effects (ie. loss or degradation of component function, as you suggest), I question your reasoning for advocating this system over the hit-points based system you oppose.

Would it not be possible to achieve the same increasingly damaged states in the hit-points system simply by defining a certain hit-point level which, once crossed, invokes the next lower damage state?

For example:
Engines system: 15hp
at exactly 15 hp out of 15 - system is Unharmed

at > 10 hp out of 15 (66%+) - system is Damaged but mostly still Functional and may possibly be restored to full (or near full) efficiency during battle too

at > 5 hp out of 15 (33%+) - system is (heavily) Damaged, barely functioning (and thus operating at greatly lowered efficiency) but it might still be repaired to the above level

and of course at 0 hp the system would be destroyed and be irreparably non-functional during the battle.

Obviously, you might want to adjust the number of hit-points you assign to systems - 15 is just an example - and you may want to raise the damage thresholds, say rise damaged status to 75% (12.5 hp), whatever.

The point is that this system can be used to determine system damage, but is less restrictive and more continuous (ie. it has greater granularity.). Thus you are more able to incorporate minor damage (from weaker weapon hits, perhaps) to the system, as you can take off just 1hp and keep the system pretty much functional, but it would still be 1hp closer to entering the damaged state.

Also - as I referenced in the example - you could link the performance of the system (or it's efficiency) to it's percentage remaing hit-points. An engine that moves your battleship 12 units when undamaged would move it just 9 units when at 75% damage (12.5 out of 15hp) for instance.
I realise that just having a linear formula of efficiency = Base performance*Remaining hit points may result in too great a loss of system efficiency from just minor damage. You could instead have the efficiency drop per hit point lost increase as the hit-point level falls below each successive damage threshold; the ship engines' performance would fall off gently at first, drop more quickly with each hit-point lost in the middle of it's 'health' and finally performance would plummet as it nears destruction.

So anyway how do I justify the added complexity? Won't it be unnecessary simulation data when I should be thinking of KISS? My main concern with the levels system is that it's a bit too absolute - whether or not a system drops to the next damage level seems a bit binary and all or nothing. This way I would consider better, as I think it does what you suggest but captures more shades of grey inbetween. Also I like the idea of systems taking damage slowly at first, and then catastrophically losing performance near the end. It allows a lot of ships with minor damage to their systems to retain a lot of their fighting ability, and not just be condemned to enter a slow death spiral as they cause less damage to the enemy, then suffer more damage and become less effective again.
Krikkitone wrote:Right now I think Geoff's Model with a slight modification is probably the best

Add on a seperate bar for Shields, so that they can recharge unlike Armor, and then decrease some stat of each system based on the hp (Armor+other Systems) remaining of the ship.

Have Shields be absolute (any "extra damage" after shields = 0 goes to hp)

Have ROF be an important factor in distinguishing SR from PD. SR weapons do more Damage/sec but they each do FAR more HP than a LR weapon, ie missile/fighter, can take. So while they get 1 shot=1 kill they fire Far too slow.
I agree with the idea of separating the shields and armor due to the shields recharging, as a ships 'health' is the result of two separate variables. Combining the two would mask which one is contributing by how much to the health of the ship. If Shields do not regenerate and serve precisely the same function as armor then there is no point including them as a separate game concept, distinct from armor. Given how popular shields are in other 4x games and pop sci-fi in general, it would be folly to exclude them!

User avatar
General_Zaber
Space Kraken
Posts: 130
Joined: Wed Jan 09, 2008 6:43 am
Location: Iserlohn Fortress

Re: Design: Battle Math

#58 Post by General_Zaber »

Well Comrades I have a candidate for a math sytem I've thrown together over the last few days, I've tried (and maybe failed) to keep it simple and include things discussed in the thread and this is what I've come up with:

Bear with me, there is a lot of detail and it took me a while to write it all.

Basic Principles:
  • All ships have two gauges: Shields and HP (or whatever we end up calling it)
  • A Ship's Shields value is dependant on whatever generators it has installed, a ship without a Shield Generator still has a weak Shield (About as strong as the second worst generator availble at the time. Shields are cumulative ie. two Shield Generators are better than one.
  • A Ship's HP is dependant on its internal components and its Hull. In detail: All ships have three default components; its Bridge, Engine and Structure. Every component has an HP value tracked only by the game, the player only sees the sum of every components HP shown as the entire ship's HP.
  • Adding Armor as a component causes a percentage increase in every component's HP value. The effect is cumulative.
  • Components are destroyed only when they run out of their individual HP, Damaged components still work at full capacity.
  • Overall Ship efficiency is based on the ship's total HP taken as a percentage from its half way point (ie. a ship with 50% HP would still work at 100%, a Ship with 25% HP would function at 50% and so on (This part may seem weird but it allows a player to witness their ship's performance by merely glancing at its HP)
Note:
When a ship's Bridge is destroted it may only be given Move orders and it automatically reverts to a Normal stance, All of its weapons are diverted to a PD role.
Also, if A ship's Armor or Structure Component is destroyed it does not suffer any adverse effects, all the ship's Components keep their HP bonus as it is a passive increase. (This is because these components do nothing more than increase the ship's HP)

UI summary:
  • All ships in battle have their Shields and HP displayed (Unless the player switches this off in otions), When a ship's summary is displayed either in battle or in the Fleets window the player can overview the damage to each of its components.
  • When a component is destroyed its miniature icon is displayed in a red border beside its Shields and HP
In Battle:
A ship goes through the following process to determine the result of an attack:
  • Accuracy Check: Whenever a Direct shot is fired a Random Number is generated from 0 to 100 to determine the accuracy of the shot. Every shot has a Miss Threshold (default 2) and a Critical Threshold (default 98), both however are very small and neither result occurs regularly. The miss threshold increases by one if the firer is moving, and by two if the target is moving. If the Random Number is below the Miss Threshold the shot misses, if it is above the Critical Threshold the shot causes double damage. (Missiles are only affected by criticals, they don't "miss")
  • Total Damage: At this point, modifiers are applied to the firing weapon's base damage value. Most of the time there won't be any modifiers, but if the ship is using a stance other than "none" then the damage will be multiplied by 1.5 or 0.75 wether the focus is on weapons or defense/movement respectively.
  • Apply Damage: Now the total damage is divided into ten equal clusters, Each cluster is resolved seperately one after the other. First to the shields which are only hit if they can withstand the entire cluster, otherwise they are pierced and the whole cluster is applied to a single random component (destroyed components are obviously never chosen). This whole clusters concept will never actually be seen by the player, it is merely a way of realistically dispersing damage that is why there is an arbitrary amount of these clusters. Also the idea of clusters ignoring shields when they are low enough is assuming that shields regenerate, if not then a cluster will only ignore the shields when they are at zero. Damage never spills over, leftover damage is lost.
  • After all the clusters are resolved their effects are totalled and then displayed on the in-battle GUI
Example
Scenario
Two Capital Ships, the Light Cruiser, FSS Baxter and the Battleship, Hamilton exchange Fire during a larger battle. The Baxter is already crippled from earlier engagements and the Hamilton is taking part in its first battle after rolling out of a nearby shipyard two turns ago. The Baxter's remaining laser battery strikes first while the Hamilton charges its primary armament.

Ships
FSS Baxter
GUI display
Shields: 39/50
HP: 43/100
Laser and Radar destroyed
Component Summary (Invisible to player, handled by Game)
Bridge: 3/20
Structure: 8/20
Engine: 12/20
Laser 10/10
Laser 0/10 (destroyed)
Active Radar 0/10 (destroyed)
Shield Generator 10/10

Hamilton
GUI display
Shields: 180/180
HP: 350/350
Component Summary
Bridge: 30/30
Structure: 60/60
Engine: 60/60
Hellfire Cannon: 40/40
Lead Armor: 10/10
Lead Armor: 10/10
Active Radar: 20/20
Missile Bay: 30/30
Missile Bay: 30/30
Irridium Fuel Tank: 15/15
Shield Generator 15/15
Shield Generator 15/15
Shield Generator 15/15

Code (Only known by the game and the programmers)
  • The Baxter's Laser rolls 53, no miss or critical.
  • Laser's Base damage is 40, Weapon Stance increases it 60 however the ship is only operating at 86% due to damage so the Total Damage is reduced to 51.6.
  • 51.6 / 10 = 5.16 rounded off to clusters of 5 damage each. They are applied to theHamilton one by one until all have been spent with the shields still at 110/160
  • Final damage to be displayed on screen is 50
Next the Hamilton fires its Spinal Mounted Hellfire Cannon
  • The Cannon rolls an 82, no miss or critical.
  • The Cannon's base damage is 100, no modifiers mean it stays there.
  • An easy calculation, the clusters are 10 each. The first three batter against the Baxter's Shields reducing them to nine, which isn't enough to absorb the next cluster which passes through, hitting the Baxter's remaining in laser, which only has 10 HP, the remaing clusterrs hit the ship in the Engine, Bridge, Shield Generator, Structure and Engine
  • At this point all the clusters have been resolved, but the Baxter has also lost all of its components so it is destroyed
In Game Report (Witnessed by players)
  • The heavily damaged FSS Baxter fires a fitful parting shot at the approaching Hamilton A red lance pierces the screen as the Laser is fired, immediately followed by a bright blue flash as the shot merely bounces off the Battleship's impressive Shields, a blue 50 flashes briefly over the Hamilton
  • Its owner likely cheering, the Hamilton Fires its Hellfire Cannon. A burning orange fireball streaks across the screen and blasts the Baxter A red skull appears over the lost Baxter signalling its end
The enemy is retreating! As always, there is no cuteness about them. Dammit

User avatar
Krikkitone
Creative Contributor
Posts: 1559
Joined: Sat Sep 13, 2003 6:52 pm

Re: Design: Battle Math

#59 Post by Krikkitone »

The reason I disagree with having Components each have their own HP is I do think it adds too much detail.

For the level of game that FO is I'd be fine with the Current HP/Max HP= Effectiveness [armor helps by adding more overall HP making the loss of 10 hp less severe]

I could see a Binary system to differentiate the damage a bit more.

Or even a system where it was a broken line rather than a straight one
ie a line that slopes low/doesn't change until 50% damage is reached and then goes down faster for a 0%,0% intercept seems fine.

However, where each item has its own individual hp seems to get too complicated, since you would need to know what systems were damaged to what degree.

This would be Great for Free Orion: Battlefield where the game did revolve around combat, but tracking all the HP individually seems excessive.


If we do go with that level of detail, a few things I'd change

If the Components are going to have seperate levels of damage (either hp or 'states') then Armor/Structure Components Should NOT affect other components, they are simply components that take the damage instead. (like non-recharging shields)

so if I have a Laser=100 hp, that 100 hp is the same no matter what else I on the ship... but if there is a good armor system, it has a greater chance of getting damaged than the Laser weapon does. Basically Armor "systems" are cannon fodder that absorb damage first so that it doesn't Get to the Weak/valuable weapon systems. (The chance of their absorbing the damage first is based partially on how many there are as well as possibly how "good" they are)


One specific minor criticism, I would never do "rounding off" with damage. We don't want low numbers to behave differently than large numbers in wierd jumpy ways.


I could see this being a usefull thing in terms of Ship repair. Components could be repaired up to a certain % of their max HP, or only if they were already Above a certain % of max hp (ie when it's 20% or below, its beyond battlefield repair... and you can only repair it up to 50%) those numbers changing with Techs/race picks/onboard systems, or even the overall state of the ship. You could also affect the Rate of Repair.

You could also change the "non functional" point to something other than zero %, to allow something that was crippled but repairable.

so each System could have three 'levels'
1. Non functional, Cannot be repaired in battle [shows up as 'destroyed']
2. Non functional, Can be repaired [shows up as 'damaged']
3. Functional, [Repair irrelevant]... it will be repaired if it can, but repair first focuses on non functional systems.

Say 50%= Functional cutoff and then Minimum/Maximum repair values are somewhat greater/less than that.

Then you might not need the overall ship efficiency, you just know certain components are offline.

Armor can then be a system just like shields except with no recharge (and shields have at leat 2 'parts': the shield generators=components in the ship, and the shield itself) The armor/structure is all just components that are more lkely to take damage.

I Do think I like the idea of 'stances' being generic multipliers since that way, they affect more than just 'power routing' they would also affect 'attention' the 'way' the ship is moving, etc.

User avatar
IConrad
Space Kraken
Posts: 163
Joined: Mon Nov 10, 2008 5:55 pm

Re: Design: Battle Math

#60 Post by IConrad »

This would be Great for Free Orion: Battlefield where the game did revolve around combat, but tracking all the HP individually seems excessive.
There is, it would seem, enough disagreement with that point that I would have to ask why it is important to you to dissolve it. After all -- we're looking at trying to obfuscate as much as the detail with this as possible in terms of simplified reporting. I mean, like it or not combat is going to be one of the major parts of the game in terms of what people are going to remember -- that's only human nature. Nobody remembers "the stuff in the middle" -- they remember the things that break from the rest. So we don't want to make it too boring. I could be wrong, though -- so maybe you have an idea that I and the others have missed. :)

That being said, I did see something that might help -- rather than reporting individual weapons systems, reporting categories. If somebody has 100 laser cannons, and twenty-five of them are inoperational, then their notices should come as a blanket weapons indicator for that. That would be perhaps somewhat less accurate, but this all needs to be stuff that can be reviewed at a cursory glance.
However, where each item has its own individual hp seems to get too complicated, since you would need to know what systems were damaged to what degree.
That, I feel, is what the reporting icons are meant to be for. We obviously need to limit the number of these icons and color-code them for ease of review.


As a side note -- what role, if any, are sensors and stealthiness going to play in the battle math beyond whether you simply see the enemy? I would /like/ to see something (maybe after initial implementation) that allows for increased sensor accuracy to reflect increased damage ability (because you can target more vital systems more accurately / better predict where the enemy is moving to / etc.)

Locked