Technology Rolls, enabling other technology rolls

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

  • @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 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 name="conditionAttachmentScience" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
    <option name="techs" value="Science" count="1"/>

    <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"/>

    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 "" 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 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!"/>

  • Moderators

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


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

Log in to reply