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

    Warcraft: War Heroes - Official Thread

    Scheduled Pinned Locked Moved Maps & Mods
    303 Posts 24 Posters 314.2k Views 19 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.
    • C Offline
      Cernel Moderators @redrum
      last edited by

      @redrum said in World of War Heroes – Official Thread:

      Well, I think @Cernel pointed out some of the issues. So here is an untested but should be closer to functioning triggers. For now, I just made all the percentages equal (1/7 for failure or each of the 6 treasures) as your percentages didn't quite add up πŸ™‚ There also would need to be a trigger to reset the condition switches after the players turn.

          <attachment name="conditionAttachmentHumansHaveTheFishingPole" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="directPresenceTerritories" value="Arthur Backpack" count="1"/>
              <option name="unitPresence" value="Fishing-Pole" count="1"/>
          </attachment>        
          <attachment name="conditionAttachmentHumansFish1" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="switch" value="true"/>
          </attachment>       
          <attachment name="conditionAttachmentHumansNotFish1" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansFish1"/>
              <option name="invert" value="true"/>
          </attachment>
          <attachment name="conditionAttachmentHumansFish2" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="switch" value="true"/>
          </attachment>       
          <attachment name="conditionAttachmentHumansNotFish2" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansFish2"/>
              <option name="invert" value="true"/>
          </attachment>       
          <attachment name="conditionAttachmentHumansFish3" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="switch" value="true"/>
          </attachment>        
          <attachment name="conditionAttachmentHumansNotFish3" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansFish3"/>
              <option name="invert" value="true"/>
          </attachment>        
          <attachment name="conditionAttachmentHumansFish4" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="switch" value="true"/>
          </attachment>       
          <attachment name="conditionAttachmentHumansNotFish4" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansFish4"/>
              <option name="invert" value="true"/>
          </attachment>        
          <attachment name="conditionAttachmentHumansFish5" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="switch" value="true"/>
          </attachment>        
          <attachment name="conditionAttachmentHumansNotFish5" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansFish5"/>
              <option name="invert" value="true"/>
          </attachment>
          <attachment name="conditionAttachmentHumansFish6" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="switch" value="true"/>
          </attachment>        
          <attachment name="conditionAttachmentHumansNotFish6" attachTo="Humans" javaClass="RulesAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansFish6"/>
              <option name="invert" value="true"/>
          </attachment>
      
          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="players" value="Humans"/>
              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish6"/>
              <option name="playerProperty" value="switch" count="false"/>
              <option name="chance" value="1:2"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="players" value="Humans"/>
              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/>
              <option name="playerProperty" value="switch" count="false"/>
              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6:1:false:false:false:true"/>
              <option name="chance" value="2:3"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="players" value="Humans"/>
              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish4"/>
              <option name="playerProperty" value="switch" count="false"/>
              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5:1:false:false:false:true"/>
              <option name="chance" value="3:4"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="players" value="Humans"/>
              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish3"/>
              <option name="playerProperty" value="switch" count="false"/>
              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4:1:false:false:false:true"/>
              <option name="chance" value="4:5"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2" attachTo="Humans" javaClass="TriggerAttachment" type="player">            
              <option name="players" value="Humans"/>
              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish2"/>
              <option name="playerProperty" value="switch" count="false"/>
              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3:1:false:false:false:true"/>
              <option name="chance" value="5:6"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/>
              <option name="when" value="before:HumansEndTurn"/>
              <option name="players" value="Humans"/>
              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
              <option name="playerProperty" value="switch" count="false"/>
              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2:1:false:false:false:true"/>
              <option name="chance" value="6:7"/>       
          </attachment>
      
          <attachment name="triggerAttachment_-_Arthur_catches_a_small_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansFish1"/>
              <option name="resource" value="Food"/>
              <option name="resourceCount" value="1"/>
              <option name="notification" value="HumansFishingFood1"/>
              <option name="players" value="Humans"/>
              <option name="when" value="after:HumansEndTurn"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_catches_a_large_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansFish2"/>
              <option name="resource" value="Food"/>
              <option name="resourceCount" value="2"/>
              <option name="notification" value="HumansFishingFood2"/>
              <option name="players" value="Humans"/>
              <option name="when" value="after:HumansEndTurn"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_finds_a_small_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansFish3"/>
              <option name="resource" value="Gold"/>
              <option name="resourceCount" value="5"/>
              <option name="notification" value="HumansFishingGold5"/>
              <option name="players" value="Humans"/>
              <option name="when" value="after:HumansEndTurn"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_finds_a_large_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansFish4"/>
              <option name="resource" value="Gold"/>
              <option name="resourceCount" value="10"/>
              <option name="notification" value="HumansFishingGold10"/>
              <option name="players" value="Humans"/>
              <option name="when" value="after:HumansEndTurn"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_finds_a_flask_of_mana_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansFish5"/>
              <option name="resource" value="Mana"/>
              <option name="resourceCount" value="10"/>
              <option name="notification" value="HumansFishingMana10"/>
              <option name="players" value="Humans"/>
              <option name="when" value="after:HumansEndTurn"/>
          </attachment>
          <attachment name="triggerAttachment_-_Arthur_finds_an_old_scripture_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5:conditionAttachmentHumansFish6"/>
              <option name="resource" value="XP"/>
              <option name="resourceCount" value="10"/>
              <option name="notification" value="HumansFishingXP10"/>
              <option name="players" value="Humans"/>
              <option name="when" value="after:HumansEndTurn"/>
          </attachment>
      

      I suppose the "chance" of "triggerAttachment_-_Arthur_has_caught_something_while_fishing_1" should be 1/2. This way, you would have 1/2 of not getting anything and 1/2 of getting only one of the 6 possibilities, at 1/12 each.

      The "conditions" for the last set of triggers would likely restitute unintended results.
      Now you would always get 1 Food when you fail all chances; you would get "fish2" if you would be getting "fish1", but not if you turn "fish2" false; you would get "fish3" if you would be getting "fish2", but not if you turn "fish3" false, etc., untill getting "fish6" in stead of "fish5", since "conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5:conditionAttachmentHumansFish6" would be verified by leaving "Fish6" true and turning all the other ones false, and could actually be simplified as just "conditionAttachmentHumansNotFish5:conditionAttachmentHumansFish6", since you can turn "conditionAttachmentHumansFish5" false only by turing all previous ones false too.
      I think, using the @redrum codes, assuming all else working as I guess, you can get rid of all the invert conditions (meaning deleting all the conditions starting as "conditionAttachmentHumansNotFish"), and have the last set of triggers' conditions as, in order:

      "conditionAttachmentHumansFish1:conditionAttachmentHumansFish2"
      <option name="conditionType" value="1"/>
      
      "conditionAttachmentHumansFish2:conditionAttachmentHumansFish3"
      <option name="conditionType" value="1"/>
      
      "conditionAttachmentHumansFish3:conditionAttachmentHumansFish4"
      <option name="conditionType" value="1"/>
      
      "conditionAttachmentHumansFish4:conditionAttachmentHumansFish5"
      <option name="conditionType" value="1"/>
      
      "conditionAttachmentHumansFish5:conditionAttachmentHumansFish6"
      <option name="conditionType" value="1"/>
      
      "conditionAttachmentHumansFish6"
      <option name="conditionType" value="0"/>
      

      And, still, I assume you would need something to reset all back to default (in this case, all switches true).

      As always, untested code is very unreliable code. And it may be I'm interpreting something wrong, on what is wanted.

      redrumR 1 Reply Last reply Reply Quote 0
      • redrumR Offline
        redrum Admin @Cernel
        last edited by

        @Cernel I believe you are thinking about it in a slightly different way. The way I did it is each of the items has a 1/7 chance and then if they all fail (1/7) then you get nothing. So it would look something like this if you want 1/2 fail and 1/12 for each item:

            <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish6"/>
                <option name="playerProperty" value="switch" count="false"/>
                <option name="chance" value="6:7"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/>
                <option name="playerProperty" value="switch" count="false"/>
                <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6:1:false:false:false:true"/>
                <option name="chance" value="7:8"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish4"/>
                <option name="playerProperty" value="switch" count="false"/>
                <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5:1:false:false:false:true"/>
                <option name="chance" value="8:9"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish3"/>
                <option name="playerProperty" value="switch" count="false"/>
                <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4:1:false:false:false:true"/>
                <option name="chance" value="9:10"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2" attachTo="Humans" javaClass="TriggerAttachment" type="player">            
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish2"/>
                <option name="playerProperty" value="switch" count="false"/>
                <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3:1:false:false:false:true"/>
                <option name="chance" value="10:11"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/>
                <option name="when" value="before:HumansEndTurn"/>
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
                <option name="playerProperty" value="switch" count="false"/>
                <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2:1:false:false:false:true"/>
                <option name="chance" value="11:12"/>       
            </attachment>
        

        TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

        C 2 Replies Last reply Reply Quote 0
        • C Offline
          Cernel Moderators @redrum
          last edited by

          @redrum said in World of War Heroes – Official Thread:

          @Cernel I believe you are thinking about it in a slightly different way.

          Anyways, a code like this is always going to be fishy, one way or the other.:face_without_mouth:

          The way I did it is each of the items has a 1/7 chance and then if they all fail (1/7) then you get nothing.

          This trigger you previously posted:

              <attachment name="triggerAttachment_-_Arthur_catches_a_small_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                  <option name="conditions" value="conditionAttachmentHumansFish1"/>
                  <option name="resource" value="Food"/>
                  <option name="resourceCount" value="1"/>
                  <option name="notification" value="HumansFishingFood1"/>
                  <option name="players" value="Humans"/>
                  <option name="when" value="after:HumansEndTurn"/>
              </attachment>
          

          Gives 1 Food if "conditionAttachmentHumansFish1" is true, that is its original state. So, if everything fails, you will be getting 1 Food. All the other triggers of this set are wrong, as well, in the sense that they give you what you should get at 1 numeral more of success, while nothing is given if all succeed (ending with success on "triggerAttachment_-_Arthur_has_caught_something_while_fishing_6"). By all means, getting nothing if all chance rolls succeed is a possible way to do it, but it is not what one would expect.

          So it would look something like this if you want 1/2 fail and 1/12 for each item:

              <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                  <option name="players" value="Humans"/>
                  <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish6"/>
                  <option name="playerProperty" value="switch" count="false"/>
                  <option name="chance" value="6:7"/>
              </attachment>
              <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                  <option name="players" value="Humans"/>
                  <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/>
                  <option name="playerProperty" value="switch" count="false"/>
                  <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6:1:false:false:false:true"/>
                  <option name="chance" value="7:8"/>
              </attachment>
              <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                  <option name="players" value="Humans"/>
                  <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish4"/>
                  <option name="playerProperty" value="switch" count="false"/>
                  <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5:1:false:false:false:true"/>
                  <option name="chance" value="8:9"/>
              </attachment>
              <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                  <option name="players" value="Humans"/>
                  <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish3"/>
                  <option name="playerProperty" value="switch" count="false"/>
                  <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4:1:false:false:false:true"/>
                  <option name="chance" value="9:10"/>
              </attachment>
              <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2" attachTo="Humans" javaClass="TriggerAttachment" type="player">            
                  <option name="players" value="Humans"/>
                  <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish2"/>
                  <option name="playerProperty" value="switch" count="false"/>
                  <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3:1:false:false:false:true"/>
                  <option name="chance" value="10:11"/>
              </attachment>
              <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                  <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/>
                  <option name="when" value="before:HumansEndTurn"/>
                  <option name="players" value="Humans"/>
                  <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
                  <option name="playerProperty" value="switch" count="false"/>
                  <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2:1:false:false:false:true"/>
                  <option name="chance" value="11:12"/>       
              </attachment>
          

          No, unless I'm misunderstanding something at a very general level. This way, assuming the next set of triggers is allright, you have only 1/12 probability of completely failing fishing, or at least of failing the first chance and having no chance testing anything else, that I understand it is supposed to be failing fishing, and I'm almost certain @Frostion wants the fishing getting something on a 50%.

          1 Reply Last reply Reply Quote 0
          • FrostionF Offline
            Frostion Admin
            last edited by

            I used the code posted by @redrum , but changed the names of the triggers a bit. There are still problems.

            Arthur gets 1 Food and gets the notification β€œHumansFishingFood1” every turn no matter the first roll and success or failure. So something must be triggering triggerAttachment_-_Arthur_catches_a_small_fish

            I have tried to change the chances to initial 50/50 if the hero catches anything.
            Standard catch should be a small fish / 1 Food
            On success 1/3 chance that this is changed (upgraded) to a large fish / 2 Food
            On success 1/3 chance that this is changed to be a small treasure / 5 gold
            Etc.

            The code now:

                <attachment name="conditionAttachmentHumansHaveTheFishingPole" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="directPresenceTerritories" value="Arthur Backpack" count="1"/>
                    <option name="unitPresence" value="Fishing-Pole" count="1"/>
                </attachment>
                <attachment name="conditionAttachmentHumansFish1" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="switch" value="true"/>
                </attachment>       
                <attachment name="conditionAttachmentHumansNotFish1" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansFish1"/>
                    <option name="invert" value="true"/>
                </attachment>
                <attachment name="conditionAttachmentHumansFish2" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="switch" value="true"/>
                </attachment>       
                <attachment name="conditionAttachmentHumansNotFish2" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansFish2"/>
                    <option name="invert" value="true"/>
                </attachment>       
                <attachment name="conditionAttachmentHumansFish3" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="switch" value="true"/>
                </attachment>        
                <attachment name="conditionAttachmentHumansNotFish3" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansFish3"/>
                    <option name="invert" value="true"/>
                </attachment>        
                <attachment name="conditionAttachmentHumansFish4" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="switch" value="true"/>
                </attachment>       
                <attachment name="conditionAttachmentHumansNotFish4" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansFish4"/>
                    <option name="invert" value="true"/>
                </attachment>        
                <attachment name="conditionAttachmentHumansFish5" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="switch" value="true"/>
                </attachment>        
                <attachment name="conditionAttachmentHumansNotFish5" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansFish5"/>
                    <option name="invert" value="true"/>
                </attachment>
                <attachment name="conditionAttachmentHumansFish6" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="switch" value="true"/>
                </attachment>        
                <attachment name="conditionAttachmentHumansNotFish6" attachTo="Humans" javaClass="RulesAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansFish6"/>
                    <option name="invert" value="true"/>
                </attachment>
            
                <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_6" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="players" value="Humans"/>
                    <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish6"/>
                    <option name="playerProperty" value="switch" count="false"/>
                    <option name="chance" value="1:3"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_5" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="players" value="Humans"/>
                    <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/>
                    <option name="playerProperty" value="switch" count="false"/>
                    <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_6:1:false:false:false:true"/>
                    <option name="chance" value="1:3"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_4" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="players" value="Humans"/>
                    <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish4"/>
                    <option name="playerProperty" value="switch" count="false"/>
                    <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_5:1:false:false:false:true"/>
                    <option name="chance" value="1:3"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_3" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="players" value="Humans"/>
                    <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish3"/>
                    <option name="playerProperty" value="switch" count="false"/>
                    <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_4:1:false:false:false:true"/>
                    <option name="chance" value="1:3"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_2" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="players" value="Humans"/>
                    <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish2"/>
                    <option name="playerProperty" value="switch" count="false"/>
                    <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_3:1:false:false:false:true"/>
                    <option name="chance" value="1:3"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/>
                    <option name="when" value="before:HumansEndTurn"/>
                    <option name="players" value="Humans"/>
                    <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
                    <option name="playerProperty" value="switch" count="false"/>
                    <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_2:1:false:false:false:true"/>
                    <option name="chance" value="1:2"/>
                </attachment>
            
                <attachment name="triggerAttachment_-_Arthur_catches_a_small_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansFish1"/>
                    <option name="resource" value="Food"/>
                    <option name="resourceCount" value="1"/>
                    <option name="notification" value="HumansFishingFood1"/>
                    <option name="players" value="Humans"/>
                    <option name="when" value="after:HumansEndTurn"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_catches_a_large_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansFish2"/>
                    <option name="resource" value="Food"/>
                    <option name="resourceCount" value="2"/>
                    <option name="notification" value="HumansFishingFood2"/>
                    <option name="players" value="Humans"/>
                    <option name="when" value="after:HumansEndTurn"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_finds_a_small_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansFish3"/>
                    <option name="resource" value="Gold"/>
                    <option name="resourceCount" value="5"/>
                    <option name="notification" value="HumansFishingGold5"/>
                    <option name="players" value="Humans"/>
                    <option name="when" value="after:HumansEndTurn"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_finds_a_large_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansFish4"/>
                    <option name="resource" value="Gold"/>
                    <option name="resourceCount" value="10"/>
                    <option name="notification" value="HumansFishingGold10"/>
                    <option name="players" value="Humans"/>
                    <option name="when" value="after:HumansEndTurn"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_finds_a_flask_of_mana_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansFish5"/>
                    <option name="resource" value="Mana"/>
                    <option name="resourceCount" value="10"/>
                    <option name="notification" value="HumansFishingMana10"/>
                    <option name="players" value="Humans"/>
                    <option name="when" value="after:HumansEndTurn"/>
                </attachment>
                <attachment name="triggerAttachment_-_Arthur_finds_an_old_scripture_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                    <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5:conditionAttachmentHumansFish6"/>
                    <option name="resource" value="XP"/>
                    <option name="resourceCount" value="10"/>
                    <option name="notification" value="HumansFishingXP10"/>
                    <option name="players" value="Humans"/>
                    <option name="when" value="after:HumansEndTurn"/>
                </attachment>
            

            Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

            C 2 Replies Last reply Reply Quote 0
            • C Offline
              Cernel Moderators @Frostion
              last edited by

              @Frostion said in World of War Heroes – Official Thread:

              I used the code posted by @redrum , but changed the names of the triggers a bit. There are still problems.

              Arthur gets 1 Food and gets the notification β€œHumansFishingFood1” every turn no matter the first roll and success or failure. So something must be triggering triggerAttachment_-_Arthur_catches_a_small_fish

              This is unexpected. With that code, from what I understand, you will get nothing by fishing only if all chance roll succeed, while failing the chance means that you successfully fish, getting the first of the six options, that is the β€œHumansFishingFood1” (not completely sure this is what @redrum intended).

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

                @redrum said in World of War Heroes – Official Thread:

                @Cernel I believe you are thinking about it in a slightly different way. The way I did it is each of the items has a 1/7 chance and then if they all fail (1/7) then you get nothing.

                Just to be sure, you meant that "if they all [all chance rolls] succeed (1/7) then you get nothing"? If so, yes that works too. I just think it would be more intuitive that, well, failing means failing.

                1 Reply Last reply Reply Quote 0
                • FrostionF Offline
                  Frostion Admin
                  last edited by Frostion

                  The above code I posted is triggering and works this way now:
                  If first 1:2 is success, then next level triggering does trigger …. This is great.
                  But if 1 level (50/50) is failure, the Small Fish/1 Food reward trigger still fires and is given to the Hero.
                  If level 1 is success and level 2 becomes a failure, the large Fish / 2 Food is still given to Hero (1 Food reward is not .. great! πŸ™‚ )

                  So it nearly works … But rewards are given even though they should not 😞

                  Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                  C redrumR 2 Replies Last reply Reply Quote 0
                  • C Offline
                    Cernel Moderators @Frostion
                    last edited by

                    @Frostion Yes, I told you. The way it is coded is that if you fail the initial chance (thus not getting any other chance rolls to test), that is successfully fishing and getting the small fish. To fail the fishing completely, you must be successful on all chances. This is a possible way to do it (I wouldn't do it this way).

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

                      @Frostion said in World of War Heroes – Official Thread:

                      I used the code posted by @redrum , but changed the names of the triggers a bit. There are still problems.

                      Arthur gets 1 Food and gets the notification β€œHumansFishingFood1” every turn no matter the first roll and success or failure. So something must be triggering triggerAttachment_-_Arthur_catches_a_small_fish

                      I have tried to change the chances to initial 50/50 if the hero catches anything.
                      Standard catch should be a small fish / 1 Food
                      On success 1/3 chance that this is changed (upgraded) to a large fish / 2 Food
                      On success 1/3 chance that this is changed to be a small treasure / 5 gold
                      Etc.

                      The code now:

                          <attachment name="conditionAttachmentHumansHaveTheFishingPole" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="directPresenceTerritories" value="Arthur Backpack" count="1"/>
                              <option name="unitPresence" value="Fishing-Pole" count="1"/>
                          </attachment>
                          <attachment name="conditionAttachmentHumansFish1" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="switch" value="true"/>
                          </attachment>       
                          <attachment name="conditionAttachmentHumansNotFish1" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansFish1"/>
                              <option name="invert" value="true"/>
                          </attachment>
                          <attachment name="conditionAttachmentHumansFish2" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="switch" value="true"/>
                          </attachment>       
                          <attachment name="conditionAttachmentHumansNotFish2" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansFish2"/>
                              <option name="invert" value="true"/>
                          </attachment>       
                          <attachment name="conditionAttachmentHumansFish3" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="switch" value="true"/>
                          </attachment>        
                          <attachment name="conditionAttachmentHumansNotFish3" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansFish3"/>
                              <option name="invert" value="true"/>
                          </attachment>        
                          <attachment name="conditionAttachmentHumansFish4" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="switch" value="true"/>
                          </attachment>       
                          <attachment name="conditionAttachmentHumansNotFish4" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansFish4"/>
                              <option name="invert" value="true"/>
                          </attachment>        
                          <attachment name="conditionAttachmentHumansFish5" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="switch" value="true"/>
                          </attachment>        
                          <attachment name="conditionAttachmentHumansNotFish5" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansFish5"/>
                              <option name="invert" value="true"/>
                          </attachment>
                          <attachment name="conditionAttachmentHumansFish6" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="switch" value="true"/>
                          </attachment>        
                          <attachment name="conditionAttachmentHumansNotFish6" attachTo="Humans" javaClass="RulesAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansFish6"/>
                              <option name="invert" value="true"/>
                          </attachment>
                      
                          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_6" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="players" value="Humans"/>
                              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish6"/>
                              <option name="playerProperty" value="switch" count="false"/>
                              <option name="chance" value="1:3"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_5" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="players" value="Humans"/>
                              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/>
                              <option name="playerProperty" value="switch" count="false"/>
                              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_6:1:false:false:false:true"/>
                              <option name="chance" value="1:3"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_4" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="players" value="Humans"/>
                              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish4"/>
                              <option name="playerProperty" value="switch" count="false"/>
                              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_5:1:false:false:false:true"/>
                              <option name="chance" value="1:3"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_3" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="players" value="Humans"/>
                              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish3"/>
                              <option name="playerProperty" value="switch" count="false"/>
                              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_4:1:false:false:false:true"/>
                              <option name="chance" value="1:3"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_2" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="players" value="Humans"/>
                              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish2"/>
                              <option name="playerProperty" value="switch" count="false"/>
                              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_3:1:false:false:false:true"/>
                              <option name="chance" value="1:3"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/>
                              <option name="when" value="before:HumansEndTurn"/>
                              <option name="players" value="Humans"/>
                              <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
                              <option name="playerProperty" value="switch" count="false"/>
                              <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_-_Level_2:1:false:false:false:true"/>
                              <option name="chance" value="1:2"/>
                          </attachment>
                      
                          <attachment name="triggerAttachment_-_Arthur_catches_a_small_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansFish1"/>
                              <option name="resource" value="Food"/>
                              <option name="resourceCount" value="1"/>
                              <option name="notification" value="HumansFishingFood1"/>
                              <option name="players" value="Humans"/>
                              <option name="when" value="after:HumansEndTurn"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_catches_a_large_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansFish2"/>
                              <option name="resource" value="Food"/>
                              <option name="resourceCount" value="2"/>
                              <option name="notification" value="HumansFishingFood2"/>
                              <option name="players" value="Humans"/>
                              <option name="when" value="after:HumansEndTurn"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_finds_a_small_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansFish3"/>
                              <option name="resource" value="Gold"/>
                              <option name="resourceCount" value="5"/>
                              <option name="notification" value="HumansFishingGold5"/>
                              <option name="players" value="Humans"/>
                              <option name="when" value="after:HumansEndTurn"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_finds_a_large_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansFish4"/>
                              <option name="resource" value="Gold"/>
                              <option name="resourceCount" value="10"/>
                              <option name="notification" value="HumansFishingGold10"/>
                              <option name="players" value="Humans"/>
                              <option name="when" value="after:HumansEndTurn"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_finds_a_flask_of_mana_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansFish5"/>
                              <option name="resource" value="Mana"/>
                              <option name="resourceCount" value="10"/>
                              <option name="notification" value="HumansFishingMana10"/>
                              <option name="players" value="Humans"/>
                              <option name="when" value="after:HumansEndTurn"/>
                          </attachment>
                          <attachment name="triggerAttachment_-_Arthur_finds_an_old_scripture_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                              <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5:conditionAttachmentHumansFish6"/>
                              <option name="resource" value="XP"/>
                              <option name="resourceCount" value="10"/>
                              <option name="notification" value="HumansFishingXP10"/>
                              <option name="players" value="Humans"/>
                              <option name="when" value="after:HumansEndTurn"/>
                          </attachment>
                      

                      What I said at my previous post plus what you just clarified would end in rewriting @redrum's this way. So, you can just paste this, see if it works for you:

                      <attachment name="conditionAttachmentHumansHaveTheFishingPole" attachTo="Humans" javaClass="RulesAttachment" type="player">
                          <option name="directPresenceTerritories" value="Arthur Backpack" count="1"/>
                          <option name="unitPresence" value="Fishing-Pole" count="1"/>
                      </attachment>        
                      <attachment name="conditionAttachmentHumansFish1" attachTo="Humans" javaClass="RulesAttachment" type="player">
                          <option name="switch" value="true"/>
                      </attachment>      
                      <attachment name="conditionAttachmentHumansFish2" attachTo="Humans" javaClass="RulesAttachment" type="player">
                          <option name="switch" value="true"/>
                      </attachment>       
                      <attachment name="conditionAttachmentHumansFish3" attachTo="Humans" javaClass="RulesAttachment" type="player">
                          <option name="switch" value="true"/>
                      </attachment>        
                      <attachment name="conditionAttachmentHumansFish4" attachTo="Humans" javaClass="RulesAttachment" type="player">
                          <option name="switch" value="true"/>
                      </attachment>       
                      <attachment name="conditionAttachmentHumansFish5" attachTo="Humans" javaClass="RulesAttachment" type="player">
                          <option name="switch" value="true"/>
                      </attachment>        
                      <attachment name="conditionAttachmentHumansFish6" attachTo="Humans" javaClass="RulesAttachment" type="player">
                          <option name="switch" value="true"/>
                      </attachment>        
                      
                      <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="players" value="Humans"/>
                          <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish6"/>
                          <option name="playerProperty" value="switch" count="false"/>
                          <option name="chance" value="1:3"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="players" value="Humans"/>
                          <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/>
                          <option name="playerProperty" value="switch" count="false"/>
                          <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_6:1:false:false:false:true"/>
                          <option name="chance" value="1:3"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="players" value="Humans"/>
                          <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish4"/>
                          <option name="playerProperty" value="switch" count="false"/>
                          <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5:1:false:false:false:true"/>
                          <option name="chance" value="1:3"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="players" value="Humans"/>
                          <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish3"/>
                          <option name="playerProperty" value="switch" count="false"/>
                          <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4:1:false:false:false:true"/>
                          <option name="chance" value="1:3"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2" attachTo="Humans" javaClass="TriggerAttachment" type="player">            
                          <option name="players" value="Humans"/>
                          <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish2"/>
                          <option name="playerProperty" value="switch" count="false"/>
                          <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3:1:false:false:false:true"/>
                          <option name="chance" value="1:3"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/>
                          <option name="when" value="before:HumansEndTurn"/>
                          <option name="players" value="Humans"/>
                          <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
                          <option name="playerProperty" value="switch" count="false"/>
                          <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2:1:false:false:false:true"/>
                          <option name="chance" value="1:2"/>       
                      </attachment>
                      
                      <attachment name="triggerAttachment_-_Arthur_catches_a_small_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="conditions" value="conditionAttachmentHumansFish1:conditionAttachmentHumansFish2"/>
                          <option name="conditionType" value="1"/>
                          <option name="resource" value="Food"/>
                          <option name="resourceCount" value="1"/>
                          <option name="notification" value="HumansFishingFood1"/>
                          <option name="players" value="Humans"/>
                          <option name="when" value="after:HumansEndTurn"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_catches_a_large_fish" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="conditions" value="conditionAttachmentHumansFish2:conditionAttachmentHumansFish3"/>
                          <option name="conditionType" value="1"/>
                          <option name="resource" value="Food"/>
                          <option name="resourceCount" value="2"/>
                          <option name="notification" value="HumansFishingFood2"/>
                          <option name="players" value="Humans"/>
                          <option name="when" value="after:HumansEndTurn"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_finds_a_small_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="conditions" value="conditionAttachmentHumansFish3:conditionAttachmentHumansFish4"/>
                          <option name="conditionType" value="1"/>
                          <option name="resource" value="Gold"/>
                          <option name="resourceCount" value="5"/>
                          <option name="notification" value="HumansFishingGold5"/>
                          <option name="players" value="Humans"/>
                          <option name="when" value="after:HumansEndTurn"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_finds_a_large_treasure_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="conditions" value="conditionAttachmentHumansFish4:conditionAttachmentHumansFish5"/>
                          <option name="conditionType" value="1"/>
                          <option name="resource" value="Gold"/>
                          <option name="resourceCount" value="10"/>
                          <option name="notification" value="HumansFishingGold10"/>
                          <option name="players" value="Humans"/>
                          <option name="when" value="after:HumansEndTurn"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_finds_a_flask_of_mana_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="conditions" value="conditionAttachmentHumansFish5:conditionAttachmentHumansFish6"/>
                          <option name="conditionType" value="1"/>
                          <option name="resource" value="Mana"/>
                          <option name="resourceCount" value="10"/>
                          <option name="notification" value="HumansFishingMana10"/>
                          <option name="players" value="Humans"/>
                          <option name="when" value="after:HumansEndTurn"/>
                      </attachment>
                      <attachment name="triggerAttachment_-_Arthur_finds_an_old_scripture_in_the_water" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                          <option name="conditions" value="conditionAttachmentHumansFish6"/>
                          <option name="conditionType" value="0"/>
                          <option name="resource" value="XP"/>
                          <option name="resourceCount" value="10"/>
                          <option name="notification" value="HumansFishingXP10"/>
                          <option name="players" value="Humans"/>
                          <option name="when" value="after:HumansEndTurn"/>
                      </attachment>
                      

                      I tested nothing, so you know...

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

                        @Cernel As said, this code is still missing resetting all switches back to true. So you can test this only on the first turn it works (meaning the first chance roll is successful).

                        1 Reply Last reply Reply Quote 0
                        • FrostionF Offline
                          Frostion Admin
                          last edited by

                          @Cernel Yay! It seems to work now πŸ˜„
                          What do you mean with the switches need to be reset back to true? What happens if this is not done? Everything seems to work … what is it that should not work?

                          Could you make the triggers? Or be precise about what they should look like?

                          Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

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

                            @Frostion I would have actually not done these triggers at all, as I think it would have been better for maintainment if you did them, but since @redrum was doing them, then I went on with it too.

                            The ones that reset should be pretty simple. Just have 6 plain triggers that change the 6 conditions to true. Then the "triggerAttachment_-_Arthur_catches_a_small_fish" should always also activate the first one. The next one in that set should always also activate the first and the second one, etc..

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

                              @Cernel Or you can have a set of 6 triggers that fire "after:HumansEndTurn" testing if a switch is false, changing it to true. This should be fine, as they would fire at the same time as the other set, that would see the value before being changed back, in case.

                              1 Reply Last reply Reply Quote 0
                              • FrostionF Offline
                                Frostion Admin
                                last edited by Frostion

                                @Cernel. I see now that the previous turn trigger successes seem to stick, so that the rewards are given every following turn also. I don’t understand what you are saying about how to make the triggers reset … showing an example trigger is equal to 1000 words πŸ˜‰

                                Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                                C 1 Reply Last reply Reply Quote 0
                                • redrumR Offline
                                  redrum Admin @Frostion
                                  last edited by redrum

                                  @Frostion So the original code I posted was if the first roll fails then they get reward 1, if second rolls fails then they get reward 2, etc. If all rolls succeed then they get nothing. This is kind of just the inverse of what you described though achieves the proper percentages if set right. I believe you could invert all of this if you want to get items on success rather than on failure. Each failure was 1/7 chance and then 1/7 chance of all 6 to succeed (get nothing).

                                  The second example shows a 1/12 chance of each failure (getting items) and 1/2 chance of all succeeding (get nothing).

                                  TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                                  C 1 Reply Last reply Reply Quote 2
                                  • C Offline
                                    Cernel Moderators @redrum
                                    last edited by

                                    @redrum Yeah I got it, but I think this way is more intuitive also for @Frostion.

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

                                      @Frostion Ok, since anyways at this point, this is the lightest option:

                                      <attachment name="triggerAttachment_Set_Condition_True_HumansFish1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                                          <option name="conditions" value="conditionAttachmentHumansFish1"/>
                                          <option name="conditionType" value="0"/>
                                          <option name="when" value="after:HumansEndTurn"/>
                                          <option name="players" value="Humans"/>
                                          <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
                                          <option name="playerProperty" value="switch" count="true"/>
                                      </attachment>
                                      

                                      Multiplied by 6, accordingly.

                                      You can have this actually firing any time from after "HumansEndTurn" comprised till the next before "HumansEndTurn" excluded.

                                      redrumR 1 Reply Last reply Reply Quote 2
                                      • redrumR Offline
                                        redrum Admin @Cernel
                                        last edited by

                                        @Cernel Yep. Either that or just make the condition always true so it just sets the switch to true regardless.

                                        <attachment name="triggerAttachment_Set_Condition_True_HumansFish1" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                                            <option name="conditions" value="alwaysTrueCondition"/>
                                            <option name="when" value="after:HumansEndTurn"/>
                                            <option name="players" value="Humans"/>
                                            <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/>
                                            <option name="playerProperty" value="switch" count="true"/>
                                        </attachment>
                                        

                                        TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

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

                                          @redrum If only the menu would have an option for hiding triggers from history, otherwise it creates clutter. I actually think triggers should default not be present in history, and at most having a menu option to see them; a properly made map should give the user only what he needs to read, with notification, or documented in Notes (like the fact that in WaW you get these units on this round). Like I have some games I've difficulties searching for the moves in the middle of the huge quantity of trigger history, and I practically cannot use the arrows bottom left to move through history to see the game.

                                          1 Reply Last reply Reply Quote 0
                                          • FrostionF Offline
                                            Frostion Admin
                                            last edited by

                                            Thanks @Redrum and @Cernel. The triggers seems to work and the heroes can now go fish as intended. Incredible that you guys can read and write code without actually sitting with the intire XML and testing out the map live! Now I must go back to developing the map πŸ™‚

                                            Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

                                            redrumR C 2 Replies Last reply Reply Quote 1

                                            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
                                            • 2
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 13
                                            • 14
                                            • 15
                                            • 16
                                            • 11 / 16
                                            • First post
                                              Last post
                                            Copyright Β© 2016-2018 TripleA-Devs | Powered by NodeBB Forums