Navigation

    TripleA Logo

    TripleA Forum

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

    Technology Rolls, enabling other technology rolls

    Map Making
    3
    4
    192
    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.
    • S
      Swampy last edited by

      Is anyone aware of code that will enable a successful tech roll to enable other tech rolls? So for example.. as successful tech roll for "science" would then enable a tech roll for "Heavy Tanks".. Trying to build a complicated tech tree that requires a focused investment to get the really cool items. Any thoughts on this would be appreciated.

      B Hepps 2 Replies Last reply Reply Quote 0
      • B
        beelee @Swampy last edited by beelee

        @Swampy hmm...I would think you could. Idk as I haven't done it. Maybe try something like:

        <attachment name="conditionAttachmentDummyCondition" attachTo="French" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
        <option name="directOwnershipTerritories" value="United Kingdom"/>
        <option name="invert" value="true"/>
        </attachment>

        <attachment name="triggerAttachment_GermansRollForHeavyTanks" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
        <option name="conditions" value="conditionAttachmentDummyCondition"/>
        <option name="tech" value="HeavyTanks"/>
        <option name="uses" value="1"/>
        </attachment>

        <attachment name="conditionAttachmentScience" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
        <option name="techs" value="Science" count="1"/>
        </attachment>

        <attachment name="triggerAttachment_ScienceSuccessfullyResearched" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
        <option name="conditions" value="conditionAttachmentScience"/>
        <option name="chance" value="1:6"/>
        <option name="when" value="after:germansNonCombatMove"/>
        <option name="uses" value="1"/>
        <option name="activateTrigger" value="triggerAttachment_GermansRollForHeavyTanks:1:true:true:false:false"/>
        </attachment>

        You'll need a separate condition and trigger for each Player. The Dummy Condition is just something that is always true. The French and United Kingdom are allies so France can never control UK's capital.

        Then you have "triggerAttachment_GermansRollForHeavyTanks" that uses Dummy that is activated by "triggerAttachment_ScienceSuccessfullyResearched". I think these need to be before "conditionAttachmentScience" or at least Dummy does.

        Now "conditionAttachmentScience" says that when the Germans have the tech Science it will acivate "triggerAttachment_ScienceSuccessfullyResearched" which will then roll at a 1 in 6 chance of activating Heavy Tanks.

        Idk if you need "uses" or what it defaults to, but just set it to "99" or something. You'll want to make sure your "when" is set correctly for all the differnt Player triggers and attached correctly.

        At any rate, hope that's not too confusing. Might be worth a shot. : )

        Then again, there might be a real easy way to do it too 🙂

        I think you'll need a Notification in your "notification.properties" too.

        Germany_Has_Researched_Heavy_Tanks!=<body>Germany Now Has Heavy Tanks</body>

        And in the xml:

        attachment name="conditionAttachmentHeavyTanks" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
        <option name="techs" value="HeavyTanks" count="1"/>
        </attachment>

        <attachment name="triggerAttachment_GermanyHasHeavyTanks" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">

          <option name="conditions" value="conditionAttachmentHeavyTanks"/>
          <option name="when" value="after:germansPolitics"/>
          <option name="notification" value="Germany_Has_Researched_Heavy_Tanks!"/>
        </attachment>
        S 1 Reply Last reply Reply Quote 1
        • Hepps
          Hepps Moderators @Swampy last edited by Hepps

          @Swampy Look at Total World War: December 1941 That is exactly how all the techs work.

          85c5bd1d-528b-48d9-91e6-05c86bcd9469-image.png

          1 Reply Last reply Reply Quote 0
          • S
            Swampy @beelee last edited by

            @beelee This looks very helpful! Let me fool around with this and see if I can get it to work.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums