isSuicideOnHit - Resolved -
-
POS2 says: If unit gets a hit in combat then it instantly dies, can be used for units like mines.
How is that different from a normal unit dying when hit?
-
@mahks "Gets a hit", not "Gets hit"...
But I agree that is not clear enough, for an official explanation. It would be good to reword it. -
I'm still confused, if infantry gets a hit they die.
How is that different from a isSuicideOnHit unit?
-
@mahks So, we probably need @redrum to confirm (and maybe reword it), but what I was saying is that what I understand is that "gets a hit" means "hits".
I suggest rewording this option this way (in PoS2 too):
isSuicideOnHit values: if the unit hits in combat, then it instantly dies. can be used for units like mines -
ohhhhhhh, you mean inflicts a hit! makes sense now
-
@mahks Correct. If the unit inflicts/gets a hit during battle on another unit then it is destroyed. Most common case is using it for "mines" which if they hit a unit then they also die.
-
@redrum While we are at hand, and I know I can know it easily enough by testing, can you tell me if that means hitting something or just hitting the dice?
For example, 1 infantry (1 hitpoint) attacks and 6 mines defend; 3 mines roll a hit, but only 1 is needed to kill the infantry. How many mines are lost? 1 or 3? -
@cernel Hitting the dice. So however many "isSuicideOnHit" units that roll a hit will die even if only 1 enemy unit. In your case 3 mines will die.
-
@redrum Ok. I guess it works this way to keep it simpler, also code wise, correct? Because, behaviourally, I'm thinking losing only the mine that actually hits something would be more logical (otherwise, I can use 1 infantry to trigger a great number of mines into wasting themselves, that it is what this option aimed at avoiding, with respect to the available suicide always, in the first place).
So, am I right in my guess it works this way to keep it easy, or because it is actually the preferred behaviour (losing all 3 mines instead of only the one killing the infantry)? -
@cernel Honestly hadn't thought about that scenario much and no map actually uses the property yet. It is simpler from a code perspective to remove all that rolled a hit vs actually hitting an enemy unit. You could probably argue gameplay/realism either way. Really depends what 'rolling a hit' even means
-
@redrum Ah ok.
I guess the matter is if I have 100 mines in a territory, with the normal suicide I can send 1 infantry to have them all blow up (and this is because the normal suicide was devised for being used mainly in attack (kamikaze fighters)).
But with this option, for example, if the mines hit at 3, then I can still send the infantry to blow up half of them.
I definitely believe the better behaviour would be to lose only the mines that actually determine casualties, but my opinion. -
A way to implement that in the engine without editing all the units vs hits checking would be to create a loop that calculates one isSuicideOnHit unit at a time and exits on zero remaining units. (existing code remains the same, just a loop introduced)
-
-
@cernel I pretty open to either way and probably whatever map implements it first can test it out and decide which functionality is better. I can see your point though.
@Mahks Having lots of separate rolls could become poor form a gameplay perspective as if I have 20 isSuicideOnHit units with lots of enemies then I don't want to sit around and roll 1 die at a time.
@General_Zod If you have a save game with a good example then I'd recommend opening a bug report or feature request
-
@general_zod I didn't say it was a flaw. That is just how the regular suicide works (for example, you have a bunch of kamikaze, and they all do their stuff if attacked, not matter what). Also, there is a property that allows suicide units to be suicide in attack only (for example, used by Domination NML to avoid the scenario you describe, for "gas"); not sure if it applies to the new suicide too?
-
@redrum said in isSuicideOnHit:
@Mahks Having lots of separate rolls could become poor form a gameplay perspective as if I have 20 isSuicideOnHit units with lots of enemies then I don't want to sit around and roll 1 die at a time.
No clue if feasible, but just roll them all and take the N best results, ignore the rest, where N is the number of possible targets.
-
Right you didn't say flaw, I characterize it as a flaw though. It's lousy behavior for defending isSuicide units.
I will test out the property you mention. Not sure what exact behavior it gives. Just no engage when defending, at all sounds like.
-
@general_zod When defending is non-suicide. So, no: it defends. In the case of Domination NML, it does nothing, on defence, because it is an infrastructure with no defence power, if I recall correctly.
-
@general_zod I agree it would be good if you would be prompted to select the number of units you want to suicide, defensively, for something like kamikaze. Anyways, this is a feature request.
-
@mahks said in isSuicideOnHit:
ohhhhhhh, you mean inflicts a hit! makes sense now
Anyways, I didn't necessarily mean that, and, as @redrum clarified, that is not how it works. The unit sacrifices itself upon hitting, no matter if the hit is actually "inflicted" on anything. Just saying that, for how it works now, I would not say "inflicts a hit", but just "hits", as I said.