Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Negative Support Attachment Does Not Work

    Map Making
    3
    6
    593
    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.
    • RogerCooper
      RogerCooper last edited by

      I am trying to prevent enemy units from firing if aircraft our present. I am using the following supportattachment

      <attachment name="supportAttachmentFighterEnemy" attachTo="fighter" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
        <option name="unitType" value="infantry:artillery:armour_ge"/>
        <option name="faction" value="enemy"/>
        <option name="side" value="offence"/>
        <option name="dice" value="strength"/>
        <option name="bonus" value="-3"/>
        <option name="number" value="99"/>
        <option name="bonusType" value="air"/>
        <option name="impArtTech" value="false"/>
      </attachment>
      

      Am I doing something wrong here? Or are negative bonuses not allowed?

      redrum C 2 Replies Last reply Reply Quote 0
      • redrum
        redrum Admin @RogerCooper last edited by

        @RogerCooper Should work. Can you post a battle screenshot showing it not working? That support attachment should make any enemy inf/art/armour have -3 attack if a fighter is present on defense.

        1 Reply Last reply Reply Quote 0
        • RogerCooper
          RogerCooper last edited by

          I realized that side should be "defence" but fixing the code doesn't solve it.

          Here are my attachments, which are intended to prevent non-air units from firing if air units are on the attack (combat is only 1 round)

          <attachment name="supportAttachmentFighterAllied" attachTo="fighter" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
            <option name="unitType" value="infantry:artillery:armour"/>
            <option name="faction" value="allied"/>
            <option name="side" value="offence"/>
            <option name="dice" value="strength"/>
            <option name="bonus" value="-3"/>
            <option name="number" value="99"/>
            <option name="bonusType" value="air"/>
            <option name="impArtTech" value="false"/>
          </attachment>
          <attachment name="supportAttachmentFighterEnemy" attachTo="fighter" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
            <option name="unitType" value="infantry:artillery:armour_ge"/>
            <option name="faction" value="enemy"/>
            <option name="side" value="defence"/>
            <option name="dice" value="strength"/>
            <option name="bonus" value="-3"/>
            <option name="number" value="99"/>
            <option name="bonusType" value="air"/>
            <option name="impArtTech" value="false"/>
          </attachment>
          <attachment name="supportAttachmentBomberAllied" attachTo="bomber" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
            <option name="unitType" value="infantry:artillery:armour"/>
            <option name="faction" value="allied"/>
            <option name="side" value="offence"/>
            <option name="dice" value="strength"/>
            <option name="bonus" value="-3"/>
            <option name="number" value="99"/>
            <option name="bonusType" value="air"/>
            <option name="impArtTech" value="false"/>
          </attachment>
          <attachment name="supportAttachmentBomberEnemy" attachTo="bomber" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
            <option name="unitType" value="infantry:artillery:armour_ge"/>
            <option name="faction" value="enemy"/>
            <option name="side" value="defence"/>
            <option name="dice" value="strength"/>
            <option name="bonus" value="-3"/>
            <option name="number" value="99"/>
            <option name="bonusType" value="air"/>
            <option name="impArtTech" value="false"/>
          </attachment>
          

          combat.png

          This is a version of the D-day scenario, so the German units defend at 2.

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

            @RogerCooper You need to specify the players. Don't forget Neutral, in case.

            Personally, I much dislike that if not specified it applies to none. I would change the behaviour as if not specified it applies to all, but this would bug off a few games (shouldn't be too hard to track them, but some may be overlooked, as that's usually used in complex maps when you give support with triggers during them). Of course, also with the ability to have it and leaving it empty (to define it applies to none).

            RogerCooper 1 Reply Last reply Reply Quote 1
            • C
              Cernel Moderators last edited by

              Also, moving to Mapmaking.

              We should really define better what is the difference between Maps & Mods and Mapmaking, because, as it is, we might as well merge the two. I would reserve Maps & Mods for the official threads only.

              1 Reply Last reply Reply Quote 0
              • RogerCooper
                RogerCooper @Cernel last edited by

                @Cernel Thanks for the help. This is working

                <attachment name="supportAttachmentFighterAllied" attachTo="fighter" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
                  <option name="unitType" value="infantry:artillery:armour"/>
                  <option name="faction" value="allied"/>
                  <option name="side" value="offence"/>
                  <option name="dice" value="strength"/>
                  <option name="bonus" value="-3"/>
                  <option name="number" value="99"/>
                  <option name="bonusType" value="air"/>
                  <option name="impArtTech" value="false"/>
                  <option name="players" value="British:Americans"/>
                </attachment>
                <attachment name="supportAttachmentFighterEnemy" attachTo="fighter" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
                  <option name="unitType" value="infantry:artillery:armour_ge"/>
                  <option name="faction" value="enemy"/>
                  <option name="side" value="offence"/>
                  <option name="dice" value="strength"/>
                  <option name="bonus" value="-3"/>
                  <option name="number" value="99"/>
                  <option name="bonusType" value="air"/>
                  <option name="impArtTech" value="false"/>
                  <option name="players" value="British:Americans"/>
                </attachment>
                <attachment name="supportAttachmentBomberAllied" attachTo="bomber" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
                  <option name="unitType" value="infantry:artillery:armour"/>
                  <option name="faction" value="allied"/>
                  <option name="side" value="offence"/>
                  <option name="dice" value="strength"/>
                  <option name="bonus" value="-3"/>
                  <option name="number" value="99"/>
                  <option name="bonusType" value="air"/>
                  <option name="impArtTech" value="false"/>
                  <option name="players" value="British:Americans"/>
                </attachment>
                <attachment name="supportAttachmentBomberEnemy" attachTo="bomber" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
                  <option name="unitType" value="infantry:artillery:armour_ge"/>
                  <option name="faction" value="enemy"/>
                  <option name="side" value="offence"/>
                  <option name="dice" value="strength"/>
                  <option name="bonus" value="-3"/>
                  <option name="number" value="99"/>
                  <option name="bonusType" value="air"/>
                  <option name="impArtTech" value="false"/>
                  <option name="players" value="British:Americans"/>
                </attachment>
                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums