Navigation

    TripleA Logo

    TripleA Forum

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

    Measuring Allies & Enemies

    Map Making
    2
    3
    83
    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.
    • R
      RogerCooper last edited by

      I have written code that distributes players randomly into 2 alliances.

          <attachment name="relationshipTypeAttachment" attachTo="War" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
            <option name="archeType" value="war"/>
            <option name="isDefaultWarPosition" value="true"/>
          </attachment>
          <attachment name="relationshipTypeAttachment" attachTo="Allied" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
            <option name="archeType" value="allied"/>
            <option name="alliancesCanChainTogether" value="true"/>
          </attachment>
          <attachment name="relationshipTypeAttachment" attachTo="Neutrality" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
            <option name="archeType" value="neutral"/>
          </attachment>
          
      <attachment name="conditionAttachmentTurn1" attachTo="A" javaClass="games.strategy.triplea.attachments.RulesAttachment"  type="player"><option name="rounds"  value="1"/></attachment>
          
        <attachment foreach="$TriggerPlayer$" name="triggerAttachment@TriggerPlayer@ToA" attachTo="@TriggerPlayer@" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
            <option name="conditions" value="conditionAttachmentTurn1"/>
            <option name="relationshipChange" value="@TriggerPlayer@:A:Neutrality:Allied"/>
            <option name="uses" value="1"/>
            <option name="chance" value="1:2"/>
            <option name="when"  value="before:ABidPlace"/>
      	</attachment>
      
      <attachment foreach="$TriggerPlayer$" name="triggerAttachment@TriggerPlayer@ToB" attachTo="@TriggerPlayer@" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
            <option name="conditions" value="conditionAttachmentTurn1"/>
            <option name="relationshipChange" value="@TriggerPlayer@:B:Neutrality:Allied"/>
            <option name="uses" value="1"/>
            <option name="chance" value="1:1"/>
            <option name="when"  value="before:BBidPlace"/>
      	</attachment>
      
      

      I am running into trouble with the next step, providing some of sort of handicap to balance. Is there any general way to measure some piece of information about your allies or enemies, which I could then use to give PU's (or something else) to the weaker side?

      1 Reply Last reply Reply Quote 1
      • Frostion
        Frostion Admin last edited by

        Nice! If this works it opens up possibilities for mapmakers and their map ideas and concepts 🙂

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

          @Frostion I am actually close to getting something working.

          <attachment name="conditionAttachmentJapaneseEnemyUnitPresent" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
            <option name="enemyPresenceTerritories" value="all" count="each"/>
           </attachment>
           
           <attachment name="triggerAttachmentJapaneseEnemyUnitCount" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
            <option name="conditions" value="conditionAttachmentJapaneseEnemyUnitPresent"/>
            <option name="resource" value="PUs"/>
            <option name="resourceCount" value="1"/>
            <option name="when" value="after:BBidplace"/>
           </attachment>
          
          

          The trigger is not firing, but I am getting close to having a way of counting all enemy units and all friendly units. I can then use the difference for some rough handicapping.

          In many scenarios, there is no obvious historical (or hypothetical) conflict. This way I can just assign random sides and balance them, rather than having a free-for-all, which I find makes for uninteresting play.

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