World of War Heroes – Official Thread


  • Moderators

    @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).


  • Moderators

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


  • Moderators

    @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).


  • Admin

    @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?


  • Moderators

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


  • Moderators

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


  • Admin

    @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 😉


  • Admin

    @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).


  • Moderators

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


  • Moderators

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


  • Admin

    @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>
    

  • Moderators

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


  • Admin

    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 🙂


  • Admin

    @Frostion Good to hear. And writing conditions/triggers without being able to test is always a bit interesting 🙂

    Also, once you look to implement these across all players, I'd highly recommend using the new variable functionality as otherwise, you'll end up with a very long XML.


  • Moderators

    @Frostion Cool. Good look everyone with that 1 over 486 probability of getting 10 XP, by the way...🤞


  • Admin

    @Cernel the fishing and reward chances are as of now:
    1:3 of getting a catch - Standard catch is 1 Food
    Within this catch there is 1:3 chance of getting better / 5 Food
    Within this catch there is 1:3 chance of getting better / 25 Gold
    Within this catch there is 1:3 chance of getting better / 50 Gold
    Within this catch there is 1:3 chance of getting better / 100 Mana
    Within this catch there is 1:3 chance of getting better / 100 XP
    How do you like the odds? Whats the chances above in %? And does it correspond with the code?:

            <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_goes_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_goes_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_goes_fishing_-_Level_6:1:false:false:false:true"/>
                <option name="chance" value="1:3"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_goes_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_goes_fishing_-_Level_5:1:false:false:false:true"/>
                <option name="chance" value="1:3"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_goes_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_goes_fishing_-_Level_4:1:false:false:false:true"/>
                <option name="chance" value="1:3"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_goes_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_goes_fishing_-_Level_3:1:false:false:false:true"/>
                <option name="chance" value="1:3"/>
            </attachment>
            <attachment name="triggerAttachment_-_Arthur_goes_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_goes_fishing_-_Level_2:1:false:false:false:true"/>
                <option name="chance" value="1:3"/>
            </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="5"/>
                <option name="notification" value="HumansFishingFood5"/>
                <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="25"/>
                <option name="notification" value="HumansFishingGold25"/>
                <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="50"/>
                <option name="notification" value="HumansFishingGold50"/>
                <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="100"/>
                <option name="notification" value="HumansFishingMana100"/>
                <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="100"/>
                <option name="notification" value="HumansFishingXP100"/>
                <option name="players" value="Humans"/>
                <option name="when" value="after:HumansEndTurn"/>
            </attachment>
    
            <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>
            <attachment name="triggerAttachment_Set_Condition_True_HumansFish2" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentHumansFish2"/>
                <option name="conditionType" value="0"/>
                <option name="when" value="after:HumansEndTurn"/>
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish2"/>
                <option name="playerProperty" value="switch" count="true"/>
            </attachment>
            <attachment name="triggerAttachment_Set_Condition_True_HumansFish3" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentHumansFish3"/>
                <option name="conditionType" value="0"/>
                <option name="when" value="after:HumansEndTurn"/>
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish3"/>
                <option name="playerProperty" value="switch" count="true"/>
            </attachment>
            <attachment name="triggerAttachment_Set_Condition_True_HumansFish4" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentHumansFish4"/>
                <option name="conditionType" value="0"/>
                <option name="when" value="after:HumansEndTurn"/>
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish4"/>
                <option name="playerProperty" value="switch" count="true"/>
            </attachment>
            <attachment name="triggerAttachment_Set_Condition_True_HumansFish5" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentHumansFish5"/>
                <option name="conditionType" value="0"/>
                <option name="when" value="after:HumansEndTurn"/>
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/>
                <option name="playerProperty" value="switch" count="true"/>
            </attachment>
            <attachment name="triggerAttachment_Set_Condition_True_HumansFish6" attachTo="Humans" javaClass="TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentHumansFish6"/>
                <option name="conditionType" value="0"/>
                <option name="when" value="after:HumansEndTurn"/>
                <option name="players" value="Humans"/>
                <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish6"/>
                <option name="playerProperty" value="switch" count="true"/>
            </attachment>
    

    AA.png

    So this is how the first draft of the fortification’s “Wall Archers” AA and the “Siege-Tower” and “Battering Ram” countermeasures.

    The players will have the option to start bombarding fortifications from a distance (with flying ammunition) or directly engage the fortifications and inhabitants in an attempt to capture the fortification. So … bombard with bombard shots to destroy or alternatively invade the territory to capture. But then the Wall Archer defense comes in use.

    Bringing along a battering ram will cause:
    Guard-Tower Wall Archer effectives reduced by 100% (From 1 to 0 rolls)
    Fort Wall Archer effectives reduced by 50% (From 2 to 1 rolls)
    Garrison City Wall Archer effectives reduced by 33% (From 3 to 2 rolls)
    Castle Wall Archer effectives reduced by 25% (From 4 to 3 rolls)
    Capital-City Wall Archer effectives reduced by 20% (From 5 to 4 rolls)

    Bringing along a Siege Tower will:
    Reduce every and all fortification Wall Archers by 33 % (From 6 to 4 AA strength)

    or, this is the idea anyway 🙂


  • Moderators

    @Frostion Wow, 5 siege engines. That is going to be challenging to configure soundly, especially if they would be totally useless for anything else but siege warfare (as they should). By the way, historically the ballista, or rather the springald, was used for the defence of fortifications, not much for the offence of the same.

    Well, now the chance of getting 100 XP is 1 over 729.

    Those chances are pretty easy to calculate, just multiply them with each other until the wanted step, and also multiply it by the probability of not proceeding further (as that is losing the current one):

    1 food: (1/3)(1-1/3)=2/9=22.22%
    5 food: (1/3)
    (1/3)(1-1/3)=2/27=7.41%
    25 gold: (1/3)
    (1/3)(1/3)(1-1/3)=2/81=2.47%
    50 gold: (1/3)(1/3)(1/3)(1/3)(1-1/3)=2/243=0.82%
    100 mana: (1/3)(1/3)(1/3)(1/3)(1/3)(1-1/3)=2/729=0.27%
    100 XP: (1/3)
    (1/3)(1/3)(1/3)(1/3)(1/3)=1/729=0.14%


  • Admin

    @Cernel The Battering-Ram and Siege-Tower will be for suppressing Wall Archers. Without the use if them, right now a Capital would practically kill 3 attacker units every turn, but only 1,6 unit if suppressed by two siege engines.

    The three artillery units are long range artillery vs. buildings and units, but their ammo will ofcours also fire if attacked. The Trebuchet is mostly an offence weapon, catapult a balanced weapon and the ballista has defensive stats.

    Right now the units can also defend themselves in combat with 1 def/1 att, but right now I am considering removing this and adding footmen/pikemen support abilliy.


  • Admin

    @redrum Could you help take a look at something regarding the Hard AI and this map?

    Development slowly progresses 🙂 But there are A LOT of errors when playing with the pre-release engines which are required. But that is not what I would like you to check out.

    The AI does not seem to build factories. More specific to my map: The AI does not build the Guard-Tower (Alliance players) or the Watch-Tower (Horde players) factories that produce 1 unit. They are the only factories players can build that are not upgrades of other building. Even if the game has progressed far along, and the AI players have expanded a lot, having to walk a long distance with units, they don’t build factories.

    Could you investigate why by looking at my map and round 15 save game?
    I played with engine version 2.0.16920.
    I can send you the files via chat.


  • Admin

    @Frostion Just took a look at it. The reason the AI never buys Guard-Tower or Watch-Tower is that right now it only considers buying factories in territories with at least 3 production (sometimes 2 production if certain criteria are met like it can't spend PUs on anything else). Since every territory on this map has only 1 production it will currently never buy any factories.

    We'd have to think about how to expand the AI to handle the factories on this map without negatively impacting other maps if you want to stick with all territories being 1 production.

    FYI, looks like you are missing a few unit images:
    SEVERE: MISSING UNIT IMAGE (won't be displayed): Guard-Banner owned by Humans in Arthur Backpack
    SEVERE: No image for unit type: UnitType{name=Khorman}, player: PlayerId named:Nature
    SEVERE: No image for unit type: UnitType{name=Footmen}, player: PlayerId named:Nature


Log in to reply