Warcraft: War Heroes - Official Thread
-
@Frostion 10 ms is also beyond what a human eye can properly perceive, as it means 100 frames per second (for example, theatres go at 24 frames per second, and YouTube goes mostly at 30 or 60 frames per second). Moreover, if you have any display with less than 100 frames per second, the process will even fail to be fully displayed.
So, I'm not really against running it superfast, but, in this case, as I said, I would suggest to make it actually instant, rather than 10 ms (running all the steps in the background and changing the board view at once when all its done).
-
@Cernel Even though it states 10 ms, it is much slower in reality. Maybe because it is 10 ms + the time used for calculation.
-
@Frostion It appears that it was actually doing 10ms + AI pause duration + calc/display time. I'm going to just remove the 10ms and AI pause duration. It goes a bit faster then though still not instant given the size of the map. I think it would probably be close to instant on a smaller map. I don't think this should cause any issues and I tested it on some local games.
-
@Frostion Looks incredible. Fans of this franchise will surely have to play one handed for quite a while.
-
@redrum Nice. Unfortunately my ISP and router is down at the moment, so I have not been able to download the newest pre-releases for some days now. I am practically off line with my PC and only online with my phone. But that does ofcours not hinder me in continuing the map making progress
@Hepps Thank you. Right now I am making a new place.txt for this WoWH map and manually picking every single land placement spot on the 400+ territory map. You probably know the feeling and have experienced your self how tiring it can be, duing monotone map work and struggling to stay awake, since ones mind seems to shut down slowly. I really hate this step of map making, but I think that the end result is worth the effort. Especially when this map's tiles has road, mountains, small lakes and likewise drawn on the map, it makes sense to not have buildings standing in the middle of roads or in a lake. Also it makes sense to see the harbour building units be located at sea, not inland. The players of a map might not notice if a map uses auto-placements or manually picked spots, but I am sure it contributes subconsciously to the game experience.
-
@Frostion said in World of War Heroes – Official Thread:
@Hepps Thank you. Right now I am making a new place.txt for this WoWH map and manually picking every single land placement spot on the 400+ territory map.
You probably know the feeling and have experienced your self how tiring it can be, duing monotone map work and struggling to stay awake, since ones mind seems to shut down slowly. I really hate this step of map making, but I think that the end result is worth the effort. Especially when this map's tiles has road, mountains, small lakes and likewise drawn on the map, it makes sense to not have buildings standing in the middle of roads or in a lake. Also it makes sense to see the harbour building units be located at sea, not inland.
The players of a map might not notice if a map uses auto-placements or manually picked spots, but I am sure it contributes subconsciously to the game experience.I think players will (as you say at least subconsciously) notice how clean and logical the map looks... whether they fully comprehend or appreciate what it takes to achieve such a thing on a map of such a grandiose scale... well only a map maker truly knows and admires such work for what it takes to achieve it.
I'll be interested to see how you achieve the harbour building to be at sea... since the units within a given territory can change positions based on what is in them. But then again... if they are the only 0 PU unit... then they should always be the first placement.
-
@Hepps Well given that the ordering is better defined now after I made some changes a while back, you should be able to ensure the locations of at least certain types of units like infrastructure.
Reference: https://forums.triplea-game.org/topic/681/group-and-sort-units-onto-placements-logically
-
Work is progressing with World of War Heroes. But there are a few hurdles I can’t seem to crack. They might be beyond my capabilities in regards to XML and triggers. I thought someone might be able and willing to help?
Let me tell about one of the most complicated. It is ironically a very small part of the game, a very insignificant item that the heroes of the map can posses and use.
The heroes of the map can of course, as in all good RPGs, pick up a fishing pole and go fishing. This happens automatically at the end of a player turn if the hero has acquired the map’s one and only fishing pole item. Depending on the luck of the hero, he/she rolls dice and either gets nothing, a fish or perhaps some more valuable stuff.
Technically the map has a capturable “Fishing-Pole-Item” unit that can be captured by a player. When a player captures it, it is removed from map territory and a “Fishing-Pole” unit is placed in the hero backpack territory. When the hero has this fishing pole in the backpack, a trigger should start rolling dice, at the end of that player's turn, to determine if and what the hero gets.
Anyone able to help by looking at the game files and XML? I think 90% of the fishing code is good, but I can’t get it to 100%
-
@Frostion Can you just paste here the relevant triggers and conditions only?
-
OK. Here are the triggers/conditions only. They are made for the human Hero "Arthur" only atm.
This is the system I am trying to make:Basically 50% Failure / 50% Success (1:2) chance of Hero catching a small fish / 1 Food at the end of turn.
If success -->
14.29% (1:7) chance of Hero catching a large fish / 2 Food instead.
If success -->
16.66% (1:6) chance of Hero finding a small treasure / 5 Gold instead.
If success -->
20% (1:5) chance of hero finding a large treasure / 10 Gold instead.
If success -->
25% (1:4) chance of hero finding a mana flask / 10 Mana instead.
If success -->
33.33% (1:3) chance of hero finding an old scripture / 10 XP instead.The % change is not that important as it can always be changed to something else. The challenge is to make the triggers, conditions and getting them to work. The triggers and conditions I have made semi-works, but it would be OK for someone to come up with a better, less complex or more logical system of triggers.
<attachment name="conditionAttachmentHumansHaveTheFishingPole" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish1" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish1"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish2" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish2" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish2"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish3" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish3" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish3"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish4" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish4" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish4"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish5" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish5" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish5"/> <option name="invert" value="false"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="players" value="Humans"/> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/> <option name="playerProperty" value="switch" count="false"/> <option name="when" value="after:HumansEndTurn"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="when" value="after:HumansEndTurn"/> <option name="chance" value="1:3"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="when" value="after:HumansEndTurn"/> <option name="chance" value="1:4"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="when" value="after:HumansEndTurn"/> <option name="chance" value="1:5"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="players" value="Humans"/> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/> <option name="playerProperty" value="switch" count="true"/> <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2:1:false:false:false:true"/> <option name="when" value="after:HumansEndTurn"/> <option name="chance" value="1:6"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_gone_fishing" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/> <option name="players" value="Humans"/> <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1:1:false:false:false:true"/> <option name="when" value="before:HumansEndTurn"/> <option name="chance" value="1:2"/> </attachment> <attachment name="triggerAttachment_-_Arthur_catches_a_small_fish" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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>
-
@Frostion Well the first thing that jumps out at me is shouldn't all those inverts be true instead of false?
-
@Frostion said in World of War Heroes – Official Thread:
OK. Here are the triggers/conditions only. They are made for the human Hero "Arthur" only atm.
This is the system I am trying to make:Basically 50% Failure / 50% Success (1:2) chance of Hero catching a small fish / 1 Food at the end of turn.
If success -->
14.29% (1:7) chance of Hero catching a large fish / 2 Food instead.
If success -->
16.66% (1:6) chance of Hero finding a small treasure / 5 Gold instead.
If success -->
20% (1:5) chance of hero finding a large treasure / 10 Gold instead.
If success -->
25% (1:4) chance of hero finding a mana flask / 10 Mana instead.
If success -->
33.33% (1:3) chance of hero finding an old scripture / 10 XP instead.The % change is not that important as it can always be changed to something else. The challenge is to make the triggers, conditions and getting them to work. The triggers and conditions I have made semi-works, but it would be OK for someone to come up with a better, less complex or more logical system of triggers.
<attachment name="conditionAttachmentHumansHaveTheFishingPole" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish1" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish1"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish2" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish2" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish2"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish3" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish3" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish3"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish4" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish4" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish4"/> <option name="invert" value="false"/> </attachment> <attachment name="conditionAttachmentHumansFish5" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="false"/> </attachment> <attachment name="conditionAttachmentHumansNotFish5" attachTo="Humans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish5"/> <option name="invert" value="false"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_5" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="players" value="Humans"/> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish5"/> <option name="playerProperty" value="switch" count="false"/> <option name="when" value="after:HumansEndTurn"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_4" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="when" value="after:HumansEndTurn"/> <option name="chance" value="1:3"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_3" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="when" value="after:HumansEndTurn"/> <option name="chance" value="1:4"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2" attachTo="Humans" javaClass="games.strategy.triplea.attachments.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="when" value="after:HumansEndTurn"/> <option name="chance" value="1:5"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="players" value="Humans"/> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentHumansFish1"/> <option name="playerProperty" value="switch" count="true"/> <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_2:1:false:false:false:true"/> <option name="when" value="after:HumansEndTurn"/> <option name="chance" value="1:6"/> </attachment> <attachment name="triggerAttachment_-_Arthur_has_gone_fishing" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansHaveTheFishingPole"/> <option name="players" value="Humans"/> <option name="activateTrigger" value="triggerAttachment_-_Arthur_has_caught_something_while_fishing_1:1:false:false:false:true"/> <option name="when" value="before:HumansEndTurn"/> <option name="chance" value="1:2"/> </attachment> <attachment name="triggerAttachment_-_Arthur_catches_a_small_fish" attachTo="Humans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansFish4:conditionAttachmentHumansNotFish5"/> <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="games.strategy.triplea.attachments.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="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentHumansNotFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5"/> <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>
There is something "fishy" here...
It would surely help to know exactly what is not working (from what I'm seeing, it should be not working at all, beside turning a switch true, meaning you would never get anything, in practice), but, by just looking at it, there are a number of things I cannot quite collocate (please, bear in mind that judging complex coding without testing has a large probability of mistakes, at least on my part):
- All the various "conditionAttachmentHumansNotFish" are just duplicating the conditions they are calling (a "false" boolean is like no boolean).
- You are missing the "chance" option on the "triggerAttachment_-Arthur_has_caught_something_while_fishing_5", while the "activateTrigger" of the "triggerAttachment-_Arthur_has_caught_something_while_fishing_4" is supposed to test it (I guess absence means 100% chance).
- There's no point specifying "when" for triggers having no conditions (as they will never fire on their own).
- The "triggerAttachment_-Arthur_has_gone_fishing" does nothing but activate another single trigger; this is redundant and confusing: you can delete the "triggerAttachment-Arthur_has_gone_fishing" and have the "triggerAttachment-_Arthur_has_caught_something_while_fishing_1" directly testing the "conditionAttachmentHumansHaveTheFishingPole", with a "1:12" chance of firing.
- All the "triggerAttachment_-Arthur_has_caught_something_while_fishing_2" onwards set the switch as "false", but all those switches are already "false"; so, the only trigger that is doing anything, of that whole set, is the "triggerAttachment-_Arthur_has_caught_something_while_fishing_1".
- The "conditions" for the last set of triggers are all the same, in practice (since, as said, all "conditionAttachmentHumansNotFish" merely call the same numbered "conditionAttachmentHumansFish"), so either they will all fire or none will fire. As they are, they would fire only if all "conditionAttachmentHumansFish" are true, that can happen only once the first set of triggers get them all true. Since only "conditionAttachmentHumansFish1" has a chance of becoming true, this set will never fire. Even if all the rest would be fixed in the way I assume it should, the conditions of the latest set should be changed this way, in text order:
conditionAttachmentHumansFish1:conditionAttachmentHumansNotFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5
conditionAttachmentHumansFish2:conditionAttachmentHumansNotFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5
conditionAttachmentHumansFish3:conditionAttachmentHumansNotFish4:conditionAttachmentHumansNotFish5
conditionAttachmentHumansFish4:conditionAttachmentHumansNotFish5
conditionAttachmentHumansFish5
. - I guess this should happen the same way at each turn, so you need a set of triggers reverting all that these triggers may change in the coding (meaning turning any switches back to "false").
- Probably better reworking the "chance" values in a way that each single probability can be communicated with simple numbers, assuming you want to fully document this in notes (to let the players know what is the probability for each one of those things they may get, and the probability of getting anything (currently, this last one is 1/12)). Of course, currently they are not matching what you have described.
p.s.: I would call the "backpack" as "inventory" or "special items" or maybe "artefacts".
p.p.s.: If I were you, I would open a feature change request for disabling all chance rolls notifications as default (a properly made map likely should cover it all with better looking notifications). This is actually something I wanted to advocate since a while. -
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>
-
@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.
-
@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>
-
@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.
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%.
-
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>
-
@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).
-
@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.
-
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