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

    option name="unitPresence" value="Unit" count="0"

    Scheduled Pinned Locked Moved Map Making
    5 Posts 4 Posters 745 Views 4 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.
    • ebbeE Offline
      ebbe
      last edited by ebbe

      hej triple A code wizards! trying to solve another issue here (and kindly request some advice:)

      I want to have 1 specific unit automatically being replaced (by purchase) when slain
      *( why? representing automatic successsion of Clan leaders by a family member and keeping AI always with a leader ingame/ with only 1 turn absence; * )

      I tried to work with different variations of
      <option name="unitPresence" value="Daimyo" count="0"/> but it doesn't work,
      not on its own, not if combined with a <option name="directPresenceTerritories" value="map" count="1"/> or a "alliedExclusionTerritories"

        <attachment foreach="$AllRegularClans$:$AllRegularClansLC$" name="conditionAttachment_No_Daimyo_@AllRegularClans@" attachTo="@AllRegularClans@" javaClass="RulesAttachment" type="player">
              <option name="directPresenceTerritories" value="map" count="1"/>
              <option name="unitPresence" value="Daimyo" count="0"/>
               <option name="unitPresence" value="Shiro_(Castle):Shiro_1Hit:Kyuden_(Palace):Kyuden_1Hit:Jousai_(Citadel):Jousai_1Hit" count="1"/>
              <option name="rounds" value="2-+"/>
      	</attachment>
      	<attachment foreach="$AllRegularClans$:$AllRegularClansLC$" name="triggerAttachment_Place_New_Daimyo_@AllRegularClans@" attachTo="@AllRegularClans@" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachment_No_Daimyo_@AllRegularClans@"/>
      	    	<option name="when" value="before:@AllRegularClansLC@Purchase"/>
      	    	<option name="purchase" value="Daimyo" count="1"/>
        </attachment>
      

      what occurs now is that the Daimyo is purchased every turn now, whether he is on the map, or not. grrrrrr

      anyone got a clue or example?

      Jason Green-LoweJ 1 Reply Last reply Reply Quote 1
      • Jason Green-LoweJ Offline
        Jason Green-Lowe @ebbe
        last edited by

        @ebbe Have you tried directExclusionTerritories? I think that would be the proper way to do it.

        AlliedExclusionTerritories would fail to trigger if any of your allies have a Daimyo on the map, and I imagine that's usually the case if each clan is supposed to have its own Daimyo most of the time.

        DirectPresenceTerritories is behaving as it was designed (although not how you want it to) by adding a Daimyo whenever there are 0 or more Daimyos on the map for your clan, i.e., always.

        1 Reply Last reply Reply Quote 1
        • wc_sumptonW Offline
          wc_sumpton
          last edited by

          @ebbe

          Try:

             <option name="unitPresence" value="Daimyo" count="1"/>
             <option name="invert" value="true"/>
          

          Thus if there is 1 or more "Daimyo"s the invert of the true statement will make if false, but if there is no Daimyo, the statement will be inverted to true!

          Cheers...

          RogerCooperR 1 Reply Last reply Reply Quote 1
          • RogerCooperR Offline
            RogerCooper @wc_sumpton
            last edited by

            You could also make the Daimyo a cheap unit, but sent maxBuiltPerPlayer to 1.

            ebbeE 1 Reply Last reply Reply Quote 0
            • ebbeE Offline
              ebbe @RogerCooper
              last edited by

              @rogercooper thanks for all feedback: this is the current trick I use.... but I like to free some space in the purchasing panel... 😉

              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 / 1
              • First post
                Last post
              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums