Warcraft: War Heroes - Official Thread
-
@Frostion Ok. The random start delegate actually doesn't use the AI pause duration just had a hard coded 250ms. I've changed that to 10ms so it runs much faster now.
30 mins for round 2 is really slow. I've made a bunch of performance changes to the AI and I'm now seeing round 2 take 4-5 mins so much better. I'm just doing some tests on other large maps to ensure performance is equal or better on them before I create a PR for the changes.
-
@redrum hey do these changes effect the WWIIClassic map AI at all?
-
@Captain-Crunch Technically they impact the AI on all maps but definitely more so on larger maps. Probably won't notice much of a performance difference on ww2 classic as its a pretty small map in comparison to many others but should be a little faster. Its mostly about making some of the AI calculations more 'regional' instead of 'global' so it only runs calcs where it has units to move/place. So that on large maps for example Japan isn't calculating a bunch of unnecessary things over in the European theater.
-
Sweet ! Always like seeing the AI get improved ! Although i did watch Terminator last night : )
-
@Frostion Here's the PR: https://github.com/triplea-game/triplea/pull/4764
Once that's merged then I'd ask you to download the latest pre-release and test it again to see if it made a significant improvement.
-
@redrum said in World of War Heroes – Official Thread:
@Frostion Ok. The random start delegate actually doesn't use the AI pause duration just had a hard coded 250ms. I've changed that to 10ms so it runs much faster now.
Are all the developers sure about this change? The main reason the random start delegate was made (by Veqryn) was to make Risk. Now, Risk has never been made, but if you think about a similar sized game (or you can take a look at "Conquest of the World"), 250ms allows you to have a quick glimpse ad who gets what, and you don't need to wait much. Without getting into any more complexity, maybe 100ms would be a reasonable compromise? At 10ms, I would rather suggest to just run it in the background and give the final solution istantly (thus 0ms); I suppose looking at a 10ms would give little else than a headache. Anyways, I don't really care about it myself.
-
@redrum That last update to the prerelease practically solved the problem! Right now it runs very smooth, just like a small map
Unfortunately I have to go to work for 3 days now, so no map working for some days 
I felt I had hit a wall in regards to play testing World of War Heroes, but now I really look forward to going back to mapworking
@Cernel "I suppose looking at a 10ms would give little else than a headache." The screen camera does not follow the territory picking around when AI is picking territories/placing units. In Star Trek I have never seen this either. Maybe because the human players are not involved in the picking?
I only see the picking on the minimap. But if the engine camera was to follow the picking and placements, maybe a user engine setting could be implemented to set the speed of placements? Or a feature that would automatically turn down the speed of picking territories if humans were also involved in the picking? -
@Frostion Glad to hear the performance improvements worked. Seems like you have a pretty solid start on the map. Let me know if there are any other features or improvements that are needed.
-
@redrum Thx. I think that the plans I have for WoWH at the moment are all doable with the current engine. But who knows, something might come up

-
@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?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login