Do you mean that combat engine does not know what weapon is being fired? I guess I don't understand you (otherwise, how can it deal the damage that correspond to each weapon?).
I do need to make and effort and diggest the backend code for combat engine... can you point me to the relevant files?
Sorry, my fault, I used "hit" instead of "shot" to avoid "DPS" being confused with damage per second, but... this isn't a RTS so no real ambiguity here. DPS, damage per shot. Let's not get into damage per hit considering shields, indeed.damage-per-hit is even more far off
Yes. But I would leave that for version 2.0 of this combat enfine rework (see later).Much easier: different battle scanner parts for certain structure ranges (so player decides in ship design)
If the target acquisition is simultaneous (in the sense that all weapons choose target without knowledge of what are targetting the rest of the weapons, and before any shot damage is applied), I think that's fine, and the best way to do it, in fact, so that there is more randomness in the combat.The model is that each shot is completely random ("simultaneous acquisition"). Implementation is sequential though. The only state that I can see is using value(structure) so that maybe the results would differ in a bout when structure changes.
I don't like that, at first glance. Looks like a complicated way to remove randomness of the targetting system, while keeping the randomness in first place. Either we make the combat system not random (which would be a very bad idea in my opinion, gameplay fun-wise) or we keep it reasonably random.Thats how it works. For experimentation we could add an "Overkill Compensator" battle scanner which prevents the ship from shooting at a ship which already got so much damage that it will be dead at the end of the bout.Oberlus wrote: ↑Thu Jun 27, 2019 3:03 pmIf it is the former, some bouts could get rather odd and inconsistent results, when the there are only a few (or just one) preferred target and the rest of enemies are does not cualify, so ALL your shots on that bout gets concentrated on the few preferred targets, and the rest of enemies are effectivelly immune for that bout.
For the latter, I'm convinced it would be better to adjust the targetting rules between preferred and unpreferred target groups to be stochastic (partially random). Let me explain this better using an example of how I think this should work:
For each faction:
At the start of a given bout the engine assign each of the valid targets to each of the basic target type groups (these can be wrong in this example, but you'll get the idea):
- Armed ships.
- Unarmed ships.
- Bombers.
- Rest of fighters (or fighters and interceptors separated, what makes more sense)
- Planets.
- For flaks: bombers as preferred group, rest of fighters as unpreferred group (or preferred=bombers+fighters and unpreferred=interceptors; or preferred=bombers+fighters+interceptors, unpreferred=none)
- For direct damage weapons: preferred=armed+planets+unarmed, unpreferred=bombers+fighters+ìnterceptors.
- For bombers: preferred=armed+unarmed (or just armed, also with or without +planets), unpreferred=bombers+fighters+interceptors.
- For interceptors: preferred=bombers+fighters, unpreferred=interceptors (or preferred=bombers+fighters+interceptors and unpreferred=armed+unarmed or none).
- For fighters: preferred=anything (or...).
- Probability of selecting a target from the preferred group: PP = C*NP/(C*NP+NU)
- Probability of selecting a target from the unpreferred group: PU = NU/(C*NP+NU) = 1-PP
- C is a constant (say 2) that could be adjusted via computer targetting parts (basic part, C=3, advanced part C=4, or something like that)
- NP is the number of targets in the preferred group
- NU is the number of targets in the unpreferred group.
Example: fleet A 10 robohulls with 2 MDs, 1 flak and shields VS fleet B 10 robohulls with 2 MDs and bombers (1 hangar, 1 launcher).
Fleet A bout 1:
- Each of the 20 MDs targets one random armed ship (nothing else to shoot at).
- Flaks have no targets.
- Each of the 20 MDs targets one random armed ship (nothing else to shoot at).
- 20 bombers are launched.
Fleet A bout 2:
- Each of the 16 MDs targets either one random armed ship with probability=0.4444 [PP=(2*8)/(2*8+20)] or one random bomber with p=0.5556. (*)
- Each flak targets one random bomber (nothing else to shoot assuming armed ships are not valid targets).
- Same than fleet A.
- Each bomber targets one random armed ship (nothing else to shoot at).
With C=3 would be PP=0.5454 and PU=0.4545.
This system prevents those situations in which a single preferred target soaks down all the damage output of the enemy fleet.
I really think that situation must be avoided because it can be exploited, and will require more player attention (micromanagement) without being easy to do (not KISS). Example below.
Agree. My point was: better avoid a new toggle for the player to change before each combat, let the decision making be restricted to ship design and fleet composition, so create one part for each combat policy. But that is an opinion, not a conviction.
The problem is: if I was using self-gravs and robos, and the self-gravs were much more dangerous (better and more weapons) while the robos were mostly chaff, so you built a lot of snipers to counter that, and then I add to my 100 ship fleet a single titanic hull against your 100 ship fleet (50 snipers), then for the first bout half of your fleet would be concentrating its damage on a single target, so that on second bout I would have 99 ships (and 98% of initial structure points and damage output) while you would have lost many ships and a lot of structure points. Overkilling exploit, not fun at all (for you, in this example).That was the idea. Bring down the enemy death star. Or bring not so many Snipers to the battle. Maybe that is too situational and rather a policy thingy.
Only if internal slots are on sale. I mean, I don't see it.How about allowing multiple battle scanner parts per ship?
I agree. At least regarding computer parts and the such: I think armed ships should be able to prefer armed ships as target. But I also think the problem pointed out above should be solved (ideally for 0.4.9).For the moment I am thinking that for 0.4.9 maybe we should just adjust the default ShortRange targeting condition to target ships AND planets first, then fighters.