TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    isSuicideOnHit - Resolved -

    Scheduled Pinned Locked Moved XML Options Browser
    26 Posts 5 Posters 10.0k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MahksM Offline
      Mahks
      last edited by Mahks

      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?

      C 1 Reply Last reply Reply Quote 0
      • C Offline
        Cernel Moderators @Mahks
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • MahksM Offline
          Mahks
          last edited by

          I'm still confused, if infantry gets a hit they die.

          How is that different from a isSuicideOnHit unit?

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            Cernel Moderators @Mahks
            last edited by

            @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

            1 Reply Last reply Reply Quote 0
            • MahksM Offline
              Mahks
              last edited by

              ohhhhhhh, you mean inflicts a hit! makes sense now 🙂

              redrumR C 2 Replies Last reply Reply Quote 0
              • redrumR Offline
                redrum Admin @Mahks
                last edited by

                @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.

                TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  Cernel Moderators @redrum
                  last edited by

                  @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?

                  redrumR 1 Reply Last reply Reply Quote 0
                  • redrumR Offline
                    redrum Admin @Cernel
                    last edited by

                    @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.

                    TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                    C 1 Reply Last reply Reply Quote 0
                    • C Offline
                      Cernel Moderators @redrum
                      last edited by

                      @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)?

                      redrumR 1 Reply Last reply Reply Quote 0
                      • redrumR Offline
                        redrum Admin @Cernel
                        last edited by

                        @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 🙂

                        TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                        C General_ZodG 2 Replies Last reply Reply Quote 0
                        • C Offline
                          Cernel Moderators @redrum
                          last edited by

                          @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.

                          redrumR 1 Reply Last reply Reply Quote 0
                          • MahksM Offline
                            Mahks
                            last edited by

                            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)

                            1 Reply Last reply Reply Quote 0
                            • General_ZodG Offline
                              General_Zod Moderators @redrum
                              last edited by General_Zod

                              @redrum

                              On related note, something should really be done about the isSuicide unit flaw that @cernel described above.

                              This sounds like a bug actually. If I have 1000 kamikaze in Tokyo, one enemy unit, whatever it is can wipe them all out, if they are defending.

                              C 1 Reply Last reply Reply Quote 0
                              • redrumR Offline
                                redrum Admin @Cernel
                                last edited by

                                @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 🙂

                                TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                                C 1 Reply Last reply Reply Quote 0
                                • C Offline
                                  Cernel Moderators @General_Zod
                                  last edited by

                                  @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?

                                  General_ZodG 1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    Cernel Moderators @redrum
                                    last edited by

                                    @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.

                                    1 Reply Last reply Reply Quote 0
                                    • General_ZodG Offline
                                      General_Zod Moderators @Cernel
                                      last edited by General_Zod

                                      @cernel

                                      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.

                                      C 2 Replies Last reply Reply Quote 0
                                      • C Offline
                                        Cernel Moderators @General_Zod
                                        last edited by

                                        @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.

                                        1 Reply Last reply Reply Quote 0
                                        • C Offline
                                          Cernel Moderators @General_Zod
                                          last edited by

                                          @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.

                                          FrostionF 1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            Cernel Moderators @Mahks
                                            last edited by

                                            @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.

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums