Combat targeting - summary

For topics that do not fit in another sub-forum.

Moderators: Oberlus, Oberlus

Message
Author
Magnate
Dyson Forest
Posts: 231
Joined: Sat Nov 08, 2014 3:44 pm

Combat targeting - summary

#1 Post by Magnate » Sat Nov 02, 2019 12:18 pm

Hi all,

The current MP game has got to the point of big fleets and comsat spam (discussion here). This led to me reading up a bunch of threads, some a year or two old, on targeting and on combat more generally. As a keen player who is not very learned about the FO code or design principles, there were a lot of references to future features that I didn't fully understand (leaders, influence, empire-wide government policies, etc.), but I wanted to summarise what I think I have learned from all those threads so that (i) people can point out if I've got anything wrong and (ii) my views can be understood in that context. So here we go:

1. FO has always had in its future some sort of "tactical combat". One of the threads noted that this must not require more player interaction, and this is crucial: FO is a turn-based game, and the sort of between-turns tactical combat that occurs in MoO2/3 is a death sentence for long-turn multiplayer. So whether or not such a system is implemented for SP or real-time MP, an alternative non-interactive combat system will continue to be needed for asynchronous MP.

2. Current combat has almost totally random targeting. Everything visible is a target: all ships and planets whether armed or not, and all launched fighters ("boats"). Every weapon picks a target totally at random, with the exception of flak cannons which only target boats. (I'm not sure if interceptors fall into that category too. I have never used them.) One of the threads refers to a PR-2330 which was apparently merged into master and implements some targeting priority system, but it doesn't seem to have changed the random targeting yet in real play in current weeklies. Perhaps all its defaults replicate the random system. (Or perhaps the only difference beyond flak/interceptors is that ships prioritise targeting planets, which is why I waste so many shots on planets.)

3. The discussions seem to have reached a consensus that a system of structured/tiered randomness (stochastic?) is better than a system of absolute non-random prioritisation (deterministic). There seem to be two ideas for approaching this:

(a) Targeting priorities are set through some sort of policy/scripting. This then leads to discussion of how much control to give players, vs micromanagement risk. Whether policies are per-ship or per-fleet or per-system etc.

(b) Targeting priorities are set through ship parts. As Vezzra pointed out in one thread, this simply changes the micromanagement from the policy interface to ship design and fleet composition.

[(c) There was some discussion of weapons having or developing intrinsic targeting preferences but I didn't really understand this so cannot really comment.]

4. The discussion concluded that given the cost of late game ships and the consensus on not having deterministic targeting, the use of chaff/decoys to absorb shots that would otherwise hit expensive ships is basically inevitable, and the discussion is now about how to balance them (e.g. increase the production cost and/or upkeep cost and/or build time of the colony base hull, remove it, require a shipyard, reduce its target priority, etc.). Through one lens, boats are just another type of chaff - but they're armed, and they replenish for free next turn if you're in supply.

So, if all that is roughly correct, what problem(s) are we trying to solve:

1. Spinal Antimatter Cannons (SAC) should not target boats. They're for planets and big ships, and it's frustrating for them to target small ships or chaff.
2. Comsat/chaff spam should be a more difficult / less obvious choice of strategy.
3. Boats should not soak up so many shots. IMO this applies to planets too, though I own that this is my personal bugbear and not a feature of the threads I read.

For what it's worth, here are my views:

1. I don't think it's necessary to try to remove/ban comsats or chaff more generally. It's all about balance; players will not build chaff if it's too expensive, or takes too long, and if it's better to build real warships. Targeting is only part of this problem - the other part is that big ships take many turns to build while chaff take only two or three. Putting comsats to 4 turns and medium & robotic hulls to 3 would alleviate this a bit - the only two-turn hulls would be tiny ones like the small hull, small asteroid, compressed energy, spatial flux. Even better would be to allow high upkeep costs to increase build times, but I suspect that's quite hard to handle code-wise. Another possibility is to penalise use of chaff with a morale-like penalty associated with ship destruction (I guess this might be part of the Influence mechanic?). Also the discussion about limiting the number of build locations (through influence or infrastructure or whatever) is relevant here.

2. The introduction of boats really increases the need for less random targeting. One change that does not require the implementation of either policies or ship parts for targeting is to remove destroyed objects immediately, without waiting for the end of the combat round. So boats only soak up one shot, and chaff/planets are removed/incapacitated with the minimum number of shots. This would make combat quite a bit more predictable, though still random enough to feel like it does now. It would also make flak cannons/interceptors more valuable.

3. I would much prefer the use of scripts/policies for targeting to the use of ship parts. I love ship design, but it feels deeply immersion-breaking to need ship parts for this. I have two ideas for simple scripting implementation:

(a) Use the existing fleet-level clickable button, which currently has only two states - Hide and Attack All. Without too much work we could also cycle through Attack Carriers, Attack Warships, Attack Troops, Attack Planets. Those would provide that fleet with initial priorities (assuming the use of flak/interceptors so no need for Attack Boats; I never use pop killer bombs but perhaps Attack Bombers too). Targeting would default to random if no objects of the chosen type remain.

(b) Implement very simple Battle Orders like in the Dominions games (see pp54-55). These allow attack/hold/retreat with a simple choice of target types like (a) above. It would need an additional UI openable from the fleet screen, and immediately gets into a debate about whether it's going to be too much micro in the late game to be fun. But the Dominions games are incredibly fun, and despite the battle orders being unsophisticated, unconditional and simple, the battles are really really satisfying to watch. I'd strongly recommend considering this for the "tactical combat" approach in the longer term.

On the whole I think players do want to have some control over targeting, as watching your ships waste shots on already-dead boats and planets is deeply unsatisfying. But I'm quite happy with the idea of that control being gated behind research (or leaders, or whatever other mechanic you choose). So in (a) above you could have a chain of techs to unlock each of the Attack orders (suggest order Warships, Carriers, Planets, Troops). In (b) you could have techs to unlock additional choices of battle orders.

HTH

CC

Ophiuchus
Programmer
Posts: 1037
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Combat targeting - summary

#2 Post by Ophiuchus » Sat Nov 02, 2019 9:01 pm

Just a technical answer about current targeting system.

The ship parts, the fighters and the planets use combatTargets conditions which filters what kind of targets that weapon can hit. Inside that resulting set of targets the target is chosen randomly (i.e. having an equal chance of being hit). The set of targets is totally scriptable - the probability inside the target set is not.
You can look in the FOCS files, but I will do the summary here.

Planets can only shoot at ships. Boats can per default only shoot at ships and boats (but this actually gets overridden for every existing type of fighter). Ship weapons can shoot at ships, boats and dangerous planets. (Also there is some species based target filter code which is not really used yet)

Else the FOCS contents defines combatTargets. The flak only targets ships. Else there is a tiered system (OrderedAlternativesOf) used to implement fallback targets if e.g. there are no enemy fighters left. Interceptors target bombers, fall back to boats, fall back to ships. Fighters target ships and boats. Bombers target ships, fall back boats.

combatTargets is good for describing hard filters (this weapon can only target this kind of target) and fall backs.
One could add a layer of prioritisation on top of that without many problems. Note that there has been no serious discussion of combining different prioritisations but my target preferences branch.

It is also possible to do prioritisation using combatTargets and other FOCS conditions (sort all enemy ships and filter all but the top 5, or use randomness in the filtering) but that has side issues (e.g. 100 weapons of a kind probably should not shoot only the top 5).

For comsats i think we will double the base hull cost and maybe up the turns to four in order to see how useful those are.

I think if we prevent ships from targeting interceptors, fighters and bombers the overkill will not be a problem there anymore. If we had real "decoy" boats I guess the overkill would be accepted (the decoys get shot at as any real ship and at the end of the bout they are gone). The argument might switch to other kind of chaff though. I think planet overkill is not perceived as a problem as it is very predictable and local while comsats/chaff/boats can basically "happen" "anywhere".

With spinal antimatter we could target ships/planets with at least 50 structure/shields+defense, fall back to ships/planets with at least 10 structure/shields+defense, fall back to ships/dangerous planets
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Furthermore, I propse... we should default to four combat rounds instead of three ...for the good of playerkind.

Magnate
Dyson Forest
Posts: 231
Joined: Sat Nov 08, 2014 3:44 pm

Re: Combat targeting - summary

#3 Post by Magnate » Sat Nov 02, 2019 9:50 pm

Sorry for my ignorance but what is FOCS?


And I disagree violently on planet overkill - I am trying to take a system with six planets and I need way more than 2x my enemy's fleet ...!

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: Combat targeting - summary

#4 Post by alleryn » Sat Nov 02, 2019 10:13 pm

Magnate wrote:
Sat Nov 02, 2019 9:50 pm
Sorry for my ignorance but what is FOCS?
Free Orion Content Script. It's the scripting language used to write the files in the /default/scripting directory, which define most of the details for things like buildings, fields (e.g. ion storm), ship hulls, ship parts, specials (planet/system), species, and techs.
https://www.freeorion.org/index.php/FOC ... g_Tutorial

Ophiuchus
Programmer
Posts: 1037
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Combat targeting - summary

#5 Post by Ophiuchus » Sat Nov 02, 2019 10:42 pm

Magnate wrote:
Sat Nov 02, 2019 9:50 pm
And I disagree violently on planet overkill - I am trying to take a system with six planets and I need way more than 2x my enemy's fleet ...!
Uhm. Six planets have currently comparable overkill properties to one plaent, a carrier with two interceptor hangars and five small hull I think.

How many ships are in your fleets?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Furthermore, I propse... we should default to four combat rounds instead of three ...for the good of playerkind.

defaultuser
Vacuum Dragon
Posts: 636
Joined: Wed Aug 26, 2015 6:15 pm

Re: Combat targeting - summary

#6 Post by defaultuser » Sun Nov 03, 2019 3:26 am

Ophiuchus wrote:
Sat Nov 02, 2019 9:01 pm
For comsats i think we will double the base hull cost and maybe up the turns to four in order to see how useful those are.
This would have knock-on effect for other ships made with the Colony Base hull, like Outpost Base and Troop Drop.

Magnate
Dyson Forest
Posts: 231
Joined: Sat Nov 08, 2014 3:44 pm

Re: Combat targeting - summary

#7 Post by Magnate » Sun Nov 03, 2019 7:59 am

defaultuser wrote:
Sun Nov 03, 2019 3:26 am
Ophiuchus wrote:
Sat Nov 02, 2019 9:01 pm
For comsats i think we will double the base hull cost and maybe up the turns to four in order to see how useful those are.
This would have knock-on effect for other ships made with the Colony Base hull, like Outpost Base and Troop Drop.
Given the cost of colony/outpost bases, doubling from 3PP to 6PP is almost negligible. Troops drops will get noticeably more expensive, but I don't think that's a bad thing.

Magnate
Dyson Forest
Posts: 231
Joined: Sat Nov 08, 2014 3:44 pm

Re: Combat targeting - summary

#8 Post by Magnate » Sun Nov 03, 2019 8:30 am

Ophiuchus wrote:
Sat Nov 02, 2019 10:42 pm
Magnate wrote:
Sat Nov 02, 2019 9:50 pm
And I disagree violently on planet overkill - I am trying to take a system with six planets and I need way more than 2x my enemy's fleet ...!
Uhm. Six planets have currently comparable overkill properties to one plaent, a carrier with two interceptor hangars and five small hull I think.

How many ships are in your fleets?
I guess it's hard to tell what's just bad luck and what's a feature of the current targeting code. It feels to me like when I destroy small hulls I rarely waste extra shots on them, but when I am attacking planets I waste lots of shots.

But perhaps this is subjective and not actually correct. In my head it's kind of easier to accept wasting shots on ships, thinking of the combat as a chaotic, frantic event where everyone is firing when they can so it's understandable that two ships would shoot at the same enemy in that chaos. It's a lot less understandable that my fleet is so poorly co-ordinated that ship commanders would continue pumping shots into a planet after all its defences were taken out. YMMV of course - I realise my conceptualisation of combat is very different from Oberlus's wide open space model, which does indeed lead one to think more of deterministic targeting.

User avatar
Oberlus
Cosmic Dragon
Posts: 1660
Joined: Mon Apr 10, 2017 4:25 pm

Re: Combat targeting - summary

#9 Post by Oberlus » Sun Nov 03, 2019 9:41 am

Magnate wrote:
Sun Nov 03, 2019 7:59 am
defaultuser wrote:
Sun Nov 03, 2019 3:26 am
Ophiuchus wrote:
Sat Nov 02, 2019 9:01 pm
For comsats i think we will double the base hull cost and maybe up the turns to four in order to see how useful those are.
This would have knock-on effect for other ships made with the Colony Base hull, like Outpost Base and Troop Drop.
Given the cost of colony/outpost bases, doubling from 3PP to 6PP is almost negligible. Troops drops will get noticeably more expensive, but I don't think that's a bad thing.
Doubling the cost from 3 to 6, while troop pods costs 3, means increasing cost of troop drops from 6 to 9 (+50%). Not negligible at all, IMO. However, with the extra internal slots that is cancelled:
One base hull of cost 6 equipped with two troop pods of cost 3 equals in cost and number of troops to two troop drops with current costs, 6+2*3 = 2*(3+3).
That's why this solution is brilliant, we manage to increase the cannon fodder strategy without really affecting the other uses for the base hull.
But I think 2 internal slots are enough, With three, you can get cheaper troop drops (per troop) than with current mechanics.

User avatar
Oberlus
Cosmic Dragon
Posts: 1660
Joined: Mon Apr 10, 2017 4:25 pm

Re: Combat targeting - summary

#10 Post by Oberlus » Sun Nov 03, 2019 9:43 am

Magnate wrote:
Sun Nov 03, 2019 8:30 am
It feels to me like when I destroy small hulls I rarely waste extra shots on them, but when I am attacking planets I waste lots of shots.
Could you provide a combat log or something? Because I don't have that perception, and it does not seem that the code could be giving to planets any extra probability of getting targetted.

Ophiuchus
Programmer
Posts: 1037
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Combat targeting - summary

#11 Post by Ophiuchus » Sun Nov 03, 2019 10:36 am

Magnate wrote:
Sun Nov 03, 2019 8:30 am
I guess it's hard to tell what's just bad luck and what's a feature of the current targeting code.
No, if you know how the combat targeting works it is easy to tell apart.
Magnate wrote:
Sun Nov 03, 2019 8:30 am
It feels to me like when I destroy small hulls I rarely waste extra shots on them, but when I am attacking planets I waste lots of shots.
I guess when you attack planet you get a lot of alienation by wasting shots and for small hulls only a little. So how about shifting your conceptualisation: at the beginning of the bout, all the vessels and planets shoot at the same time. It is when the fog clears at the end of the bout when you know what got killed and what got overkilled ;)
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Furthermore, I propse... we should default to four combat rounds instead of three ...for the good of playerkind.

User avatar
alleryn
Space Dragon
Posts: 259
Joined: Sun Nov 19, 2017 6:32 pm

Re: Combat targeting - summary

#12 Post by alleryn » Sun Nov 03, 2019 4:40 pm

Oberlus wrote:
Sun Nov 03, 2019 9:41 am
Doubling the cost from 3 to 6, while troop pods costs 3, means increasing cost of troop drops from 6 to 9 (+50%). Not negligible at all, IMO. However, with the extra internal slots that is cancelled:
One base hull of cost 6 equipped with two troop pods of cost 3 equals in cost and number of troops to two troop drops with current costs, 6+2*3 = 2*(3+3).
That's why this solution is brilliant, we manage to increase the cannon fodder strategy without really affecting the other uses for the base hull.
But I think 2 internal slots are enough, With three, you can get cheaper troop drops (per troop) than with current mechanics.
Agreed for the most part. I calculate cost-efficiency the same way. Essentially highest troops/(ship cost), which boils down to lowest (hull cost)/slot.

I'd favor the 3 internal slots because troop drops are already only very slightly more efficient than small asteroid/symbiotic troop ships. (6.12PP for 1 troop pod vs 12.5 for 2 or 25.0 for 4). I'd like to have a little wiggle room in there for tweaking without the risk that troop drops become less efficient than other hulls in that regard.

Either is fine with me, though

User avatar
Oberlus
Cosmic Dragon
Posts: 1660
Joined: Mon Apr 10, 2017 4:25 pm

Re: Combat targeting - summary

#13 Post by Oberlus » Sun Nov 03, 2019 5:02 pm

Ah, yes, you are right, 3 internal slots is my preference now.

Magnate
Dyson Forest
Posts: 231
Joined: Sat Nov 08, 2014 3:44 pm

Re: Combat targeting - summary

#14 Post by Magnate » Sun Nov 03, 2019 5:31 pm

Oberlus wrote:
Sun Nov 03, 2019 9:41 am
Magnate wrote:
Sun Nov 03, 2019 7:59 am
defaultuser wrote:
Sun Nov 03, 2019 3:26 am

This would have knock-on effect for other ships made with the Colony Base hull, like Outpost Base and Troop Drop.
Given the cost of colony/outpost bases, doubling from 3PP to 6PP is almost negligible. Troops drops will get noticeably more expensive, but I don't think that's a bad thing.
Doubling the cost from 3 to 6, while troop pods costs 3, means increasing cost of troop drops from 6 to 9 (+50%). Not negligible at all, IMO.
Yes, I think you mis-read my post: the cost increase is negligible for colony/outpost bases, but *not* for troop drops.

User avatar
Oberlus
Cosmic Dragon
Posts: 1660
Joined: Mon Apr 10, 2017 4:25 pm

Re: Combat targeting - summary

#15 Post by Oberlus » Sun Nov 03, 2019 5:35 pm

Magnate wrote:
Sun Nov 03, 2019 5:31 pm
you mis-read my post
Indeed, sorry :)

Post Reply