By Kevsoft on Jun 12, 2021 at 5:09 PM
  1. Kevsoft

    Kevsoft XLiveless Dev
    Staff Member Administrator

    Joined:
    Oct 24, 2017
    Messages:
    360
    Likes Received:
    369
    Trophy Points:
    63
    pic1.png

    "Behind the BANG!" is a new irregular blog series that looks behind the scenes of the mechanics of the game engine. I don't know yet how often I will write such blogs, but I'll see how it goes down.

    Caravans are a great way to get gold quickly, especially when playing in co-op. However, many wonder how the yield is calculated. There have been many speculations, but today I want to reveal the secret.

    Caravan Gold Yield Formula
    =========================
    For those who do not know: AOEO is based on the same engine as AOE3 and AOM. Therefore it is also "purely coincidental" that the following calculations also apply to AOM. In other words, the logic in AOEO is nearly identical to that in AOM. Therefore, we can see what the AOM-wiki has to say about it:

    The Town Center 'gives' gold to the Caravan, which is added to the player's stockpile when the Caravan returns to the Market. The amount of gold generated by a single run of a Caravan is (approximately) directly proportional to the square of euclidean distance between the Market and the Town Center. Therefore, the total gold production of a straight line trade route is directly proportional to its length.

    Although it is possible for players to trade with their own Town Centers, trading with that of an ally will provide 50% more gold.

    In principle, the information is correct, but there are some factors that were not mentioned. The full formula is:

    pic2.png

    I was surprised that there are more factors at play than I thought. Therefore, let's go through all the variables.

    The most important variable here is "dist", which is the euclidean distance from the caravan unit to the marketplace. Heard correctly: from the caravan unit and not from the town center. This means that if the caravan unit theoretically hits the town center from another side, the yield can be higher. But of course this will not happen in practice. This distance value is multiplied by itself so that we have the square of this value. This means that the yield difference is much higher for long distances, or the possible yield increases quadratically with distance.

    The second most important factor here is the so-called "work rate". Basically just a number that is used as a factor for different units. Wherever there is "work", so to speak, be it converting/healing units, mining resources or trading with the town center. So also the caravan unit has a work rate, which can be changed by gear and advisors. By default, caravans in AOEO have a work rate of 0.8 (for Egypt it is 0.72). In AOM, the value is much lower.

    The town center factor is an unusual value, since it corresponds to the carry capacity of the town center. In my opinion, this value was misused to serve as a variable factor for trade, since it does not make sense that a building has a carry capacity. The town center has a factor (carry capacity) of 1.0 for gold and therefore this value can be ignored, but theoretically you could design a new building that has a higher carry capacity, which would lead to a higher income from the caravans.

    The last value is the bonus factor. When trading with an ally, this factor is x1.5. It makes no difference if this is a real player in co-op or an ally AI. At the same distance, a caravan would yield 100 gold at its own TC, while an ally would yield 150 gold. The bonus factor for trading with an enemy town center would even be x2, although this is a relic from back in AOM. I guess that it was planned to be able to trade with enemy town centers, but then it was not really implemented.

    Now the multiplied values are divided by the size of the map. This size corresponds to either the length or the width of the map, whichever is greater. For a size of 400x300, the value would be 400. This means for the full yield that caravans must travel for a longer distance if the map size is larger.

    Gold/Distance Chart
    ==================
    Let's consider an example: I want to get the maximum profit on a 400x400 map with the smallest possible distance (without gear and techs):

    Own TC: (dist2 * 0.8 * 1.0 * 1.0) / 400 = 150 gold → dist = 273.86 tiles (68% of the map size)
    Ally TC: (dist2 * 0.8 * 1.0 * 1.5) / 400 = 150 gold → dist = 223.60 tiles (56% of the map size)​

    If we plot a graph on this:
    pic3.png

    Of course, these are pessimistic values, since they do not include gears/techs/advisors. Roughly speaking, if you cover half the map length and have some techs and gears, that should get you to the full amount of 150 gold. The same formula can be applied to Docks, of course. The only difference is that the Merchant Transports can carry up to 300 gold (while taking 2 population slots, of course).

    Display Trade Preview
    ====================

    Market_Hotkey.png

    Finally, I would like to provide an update on the marketplace preview feature. More than two years ago I implemented a feature that displays the expected yield of caravans via the "Display Trade Preview" hotkey (default: Shift+Z). Unfortunately, the values were not always correct, because it didn't include the effects of gears/techs/advisors. This will change with the next patch.

    Here you can see how the values of the preview now correspond to those of the caravan:

    Preview_Correspondence_V2.png

    There are certainly still cases where there will be deviations of +/-2g, especially at longer distances, but I believe it is negligible.

    What do you think about the blog? Let us know in the comments below!

    All current and future content will stay 100% free and accessible to everyone.

    ========
    Thank you so much for reading, and we will see you all next time!

    Project Celeste Development Team

    ========
    The Romans are here! Watch the Overview Trailer.

    Project Celeste is completely free and always will be. However, we gladly accept donations for our overhead costs, which are larger than we have budgeted. If you want to support us, you can do so HERE.

    Read every Romans related blog HERE.

    Tell your friends! Join our Discord HERE.
    ========
     
  2. Loading...


Comments

Discussion in 'News' started by Kevsoft, Jun 12, 2021.

    1. Aryzel

      Aryzel Immortal

      Joined:
      Feb 14, 2018
      Messages:
      213
      Likes Received:
      250
      Trophy Points:
      43
    2. frogs.poison

      frogs.poison Immortal

      Joined:
      May 19, 2020
      Messages:
      335
      Likes Received:
      186
      Trophy Points:
      43
      Allright, good to see those numbers. So Caravans will provide more gold/second then Villagers on all maps solo, but generally aren't more efficient then Villagers for food/wood/stone while solo, outside of Road techs. Co-op, ofc, Caravans are far more efficient at gathering gold and generally more efficient a getting food/wood/stone due to the 1.5x ally TC bonus. And ofc, there are several maps where you have a tradeable ally TC - Join Forces, Lair of the Crocodile King, ect, thus on those maps Caravans are also the superior resource gatherers.

      So yea, good to see that, solo, caravans are much closer to Villagers then I previously thought, especially for my first round of testing (Initially tested on a Small Skirmish map solo which resulted in nearly 3.5 gold/second due to the small map size, this was before even the Champion Mode caravan changes. Initial calculations at the time even displayed Persia caravans capable of reaching 10 gold/second, combing Dumno, Tamineh, Zeno, and a co-op partner on said small skirmish maps)

      Given that Villagers have anywhere from 1.4 gold/second (A3 gold upgrade w/Divine) to 1.9 gold/second (A4 gold upgrade w/ Kleon+Divine), caravans are significantly closer to Villagers in Solo play on larger maps. And Egypt with Amunet translates to more traditional AoE play in which you only start making Caravans once you begin to run out of safe gold deposits.

      Hell, Egypt with both Amunet and Kleon are superior to Caravans even in co-op on most maps!

      So yea, this lets me have a good bit more hope for Indian Gatherer Elephant's place in PvE.

      Thanks for the work Aryzel!
       
    3. frogs.poison

      frogs.poison Immortal

      Joined:
      May 19, 2020
      Messages:
      335
      Likes Received:
      186
      Trophy Points:
      43
      Merchant Transports in Champion Mode are confirmed to have a Work Rate of 1.3. On a 300x300 map (I believe Normal PvP maps to be this size) Merchant Transports have a gold generation value of 2.41 gold/second without the A4 upgrade, and 3.44 gold/second with the A4 upgrade - Thus Water dominance is quite critical on any map with water routes, otherwise you get heavily out-eco'd
       
    4. nickycruze2

      nickycruze2 Villager

      Joined:
      Sep 2, 2022
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      1
      Nice post.. interesting read..
       
    5. nickycruze2

      nickycruze2 Villager

      Joined:
      Sep 2, 2022
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      1
    6. frogs.poison

      frogs.poison Immortal

      Joined:
      May 19, 2020
      Messages:
      335
      Likes Received:
      186
      Trophy Points:
      43
      So, if we look at Aryzel's spreadsheet, on an average size map (500x), Egpytian Caravans pull in 2.04 gold/second solo. Co-op, that's at 3.06 gold/second because of the 50% bonus.

      Egypt with Kleon pulls in 1.94 gold/second baseline. Amunet with pure resource scepter adds in an extra 40%, so thats 1.94*1.4 = 2.7 gold/second.

      So, solo play, Egyptian Vils with Kleon do pull in much more gold then Caravans. However, with co-op, they pull in less gold/second.

      Note that in very large maps, anything above 650x650 (I think there are only 3-4 such maps in the game), then yes - Amunet+Kleon will give more gold/second then Caravans with 0 advisor support in co-op. For every other civ, Caravans are the superior choice when available irregardless of advisor use.
       
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice