This is how building works

United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

This is how building works

  • Quote

Post by Seamonk »

So lately I've been trying to figure out how building works. I tried doing google searches, and it seems like there isn't a consensus on how it works. Most people know it isn't linear, but that's about it. Well, after a deep dive into the game files, I've come to dispel the mystery around little pixels on a 15 year old game.

I'm going to start with basically a TLDR. If you were previously following best practices, then you're probably good.
  • 1. Each additional villager (settler, wagon, cbd, etc) that is added to a building beyond the first one only works at ~43% efficiency (ignoring walking)

    2. If you need to build multiple buildings, build them all at once (1 vill on each). Do not queue up a bunch of buildings and work on them sequentially! (E.G. putting down the foundations of 2 houses and having 2 villagers work together on one and moving the to the next one. This is bad. )

    3. For housing booms, build each house with one unit. The time you save by putting on additional villlagers will not offset the gain in VS from the building

    4. Start building with Settler wagons (or any other unit with a better build rate) before adding villagers. If you start with a villager and add a SW, it's like building with 1.6 villagers. If you start with a SW and add a villager, it's like you're building with 2.3 villagers.

    5. 1 Settler wagon builds at 2x the rate of a villager. This is equal to ~4.3 villagers building. If time means anything for what you are building (initial barracks), use a SW. If it can wait (extra housing), use a villager to avoid walk time. I would recommend building forward with one SW over villagers because of this (yes the walk time is bad, but it isn't as bad as 4.3 villagers walking)
The formula: BuildPoints / ( InitialBuildRate + ( AdditionaBuildRates *0.3 ) )
- BuildPoints - the total build points for the building (barracks is 30)
- InitialBuildRate - the build rate of the first unit to start building (villager is 1, CBD is 1.2, SW is 2)
- AdditionaBuildRates - the sum of build rates from all units after the first (villager is 1, CBD is 1.2, SW is 2)


Alright, so into the meat and potatoes. In the data files used by the game, every civilization has a building efficiency rate of 0.3. This somewhat implies that the developers were planning on having a civ ability being fast building or slow building. Regardless, this metric means that every unit beyond the first tasked to building a specific building will only build at 30% of their usual rate.
Now, you may be thinking to yourself, "yeah but you like save time, so it can't be that bad", and you'd be right. Ignoring walking (or getting stuck in trade posts), each additional unit gives ~43% efficiency. I'll link a table below with the breakdown of a barracks:

https://docs.google.com/spreadsheets/d/ ... sp=sharing
Unformatted Table
What does this mean?
Let's take an example of building a barracks. The barracks has 30 build points. It will take 1 standard villager 30 seconds to build this building. The next standard villager will add 30% of its build rate as well, which is 1.3. Thus, 30/1.3 = 23.077. The next villager added would take the total up to 1.6 and the new time is 18.75.

What's the cost?
Each time another villager is added, the time to complete the building decreases. In other words, it takes less time for all villagers. Since a barracks with 2 villagers takes ~23 seconds to build, you're spending ~46 villager seconds to build it. So you gained ~7 seconds and it cost you ~16 villager seconds. You can then use this to compare if it was worth it by converting villager seconds into resources. ~16 villager seconds is ~8 wood.

Is it worth 8 wood to get a barracks down ~7 seconds faster? That's the actual decision to be made. This rate (~7 seconds for ~16 villager seconds, or ~43%) is consistent for all added villagers. This is the rate that you should think when deciding on whether to add villagers or not.

You will also have to factor in walking time, which does increase with a larger number of villagers. The 2nd villager might not have to walk far to get to an open spot to start building, but the 6th villager probably will. Due to walking time, there is probably a floor where efficiency is lost. If you're only saving 1 second by adding the 8th villager, is it worth the walking time and 43% rate to try to get that 1 second?

What about Settler Wagons and CBD?
SW and CBD act like normal villagers, just with a different rate. SW have a build rate of 2 while CBD have a build rate of 1.2. While this seems good, it's actually better than you think. In order for villagers to reach the level of a SW (a build rate of two) they will have to have ~4.33 villager working on the building. For getting up houses quickly, SW cannot be beat.
Math Proof
What about mixing villagers and SW or CBD?
The formula punishes the rate of all units that start building after the first. So if you're building with a group of units with different build rates, make sure the unit with the highest build rate builds first. In most cases, that's going to be a SW building before a villager.

Okay okay okay, cool. Why does a house build slower if a Settler Wagon and Villager build it at the same time?
Similar to above, this has to do with who starts building first.
If the villager starts building first, then the barracks formula is updated to: 30 / (1 + (2*0.3)) = 18.75 (which is higher than the 15 seconds a SW on its own would take)
If the SW starts building first , then the barracks formula is updated to: 30 / (2 + (1*0.3)) = 13.04 (which is lower than the 15 seconds a SW on its own would take)

Why shouldn't I queue up 5 houses and build them all sequentially with 5 vills?
In this situation, the additional 4 vills are only working at 43% efficiency.
Sequential: each house: 5 x ( 10 / ( 1 + ( 4 * 0.3 ) ) = 22.72 seconds @ 5 villagers = 113.63 seconds
All at once: 10 / (1 + ( 0 * 0.3) = 10 seconds @ 5 villagers = 50 villager seconds
You will have your houses up faster (10 seconds vs 22.72 seconds) and it will cost fewer villager seconds (50 VS vs 113.63 VS)
This is again due to the 0.3 multiplier that hits all villagers after the first one. You want to maximize using 1 villager as much as you can.

What about banks?
Copy and pasting from my post further on
spoiler
So to summarize:
  • 1. All villagers after the first have ~43% efficiency rate not including walk time. Use this to determine if added builders is appropriate

    2. SW are beasts. If you're mixing builders, make sure SW are the first to start building

    3. If you have multiple buildings to build, don't have your villagers build together. Split them up and have 1 builder each, unless you really need a specific building up first.
Hope this helps!
No Flag deleted_user
Ninja
Posts: 14364
Joined: Mar 26, 2015

Re: This is how building works

Post by deleted_user »

Linking for relevancy: viewtopic.php?t=16732
User avatar
Canada dansil92
Retired Contributor
Posts: 2232
Joined: Nov 3, 2018
ESO: dansil92

Re: This is how building works

  • Quote

Post by dansil92 »

legit this guy
73a.png
Image
No Flag deleted_user
Ninja
Posts: 14364
Joined: Mar 26, 2015

Re: This is how building works

Post by deleted_user »

sometimes I see players make houses with 8 settler wagons -- is this advisable?
United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

Re: This is how building works

Post by Seamonk »

deleted_user wrote:sometimes I see players make houses with 8 settler wagons -- is this advisable?
Houses are 10 build points. 10 / ( 2 + ( 14 * 0.3) ) = 1.923 seconds. Or about 30.7692 villager seconds.

Since 1 SW would build the house in 5 seconds and cost 10 villager seconds.... Then yes. Assuming the house can provide 20.76923 VS over 3.077 seconds. And you can properly micro your SW to do it without walk time. That's going to have to be one hell of a torp.
United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

Re: This is how building works

Post by Seamonk »

deleted_user wrote:Linking for relevancy: viewtopic.php?t=16732
if we build the bank with 2 villagers, the average walking time of these two villagers has to be longer than 5.8 seconds so that the net villager second cost is also 30 in this case.
If the average walking time is less than 4 seconds, then more villagers means more efficient in terms of net villager second cost.
If the average walking time is more than 4.5 seconds, then more villagers does not always mean more efficient.
If you build a bank with 2 villagers it should take without walk time (from my formula): 30 / ( 1 + ( 1 * 0.3 ) ) = 23.07692

On the chart in the link, 2 villagers at 0 seconds is less than 20. Similar story for 3 vills (18.75 vs less than 14) and on.

From my analysis: In order for a building to be worth throwing an additional builder on, it has to beat the 43% rate hit.

So for a bank:
1 villager is 30 seconds. This is 30 villager seconds
2 villagers is 23.07692 seconds. This is 46.15385 villager seconds. The bank would need to provide 16.15385 villager seconds in 6.92307 seconds to break even.
Looks like banks gather gold at a rate of 2.75. If a dutch vill gathers at 0.69, then a bank is worth 3.9275 vills. That is worth 27.19060 villager seconds over 6.92307 seconds.
So from my formula, your break even on adding the second vill would be about 5.518 seconds of walking time average between the two vills. That seems to line up close ish to the chart he created.

And my analysis lines up that it is worth it to throw multiple villagers on for banks
User avatar
Canada dansil92
Retired Contributor
Posts: 2232
Joined: Nov 3, 2018
ESO: dansil92

Re: This is how building works

Post by dansil92 »

how does this efficiency factor into wonders? and also, what about villagers vs explorers on trading posts?
Image
United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

Re: This is how building works

Post by Seamonk »

dansil92 wrote:how does this efficiency factor into wonders? and also, what about villagers vs explorers on trading posts?
I'm not super familiar with how wonders work. They have a base build rate if no one is working them, so there would need to be testing done to verify assumptions.
It looks like the build points are 120, 145, 120, 120 for the ages respectfully. It should work similarly like other buildings, maybe with a type of hidden villager constantly building it? Does it take 2 minutes to age to age 2 without any villagers on the wonder?

Explorers have a build rate of 3 for trading posts. this is equal to ~7.67 villagers. Probably same guidelines as villagers - start building with Explorer if you want to combine them.

Explorers only have a build rate of 1 for town centers though. Useful to use a unit that doesn't generate VS, but not nearly as flashy as a trade post.
United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

Re: This is how building works

Post by Seamonk »

Actually, with this information we can better analyze the Dutch Logistician as well.
We'll compare to the quartermaster:
Cost: 100 food + 400 wood = 119.048 + 800 = 919.048 VS
Gain: Halberdier + Barracks + Wagon build = 637.639
Math
So you're paying 281.409 villager seconds or 140.705 wood for Veteran Halbs in age 2. I think, so long as you are going for early units, that is the decision that is being made.

Obviously an actual veteran upgrade is more expensive than that, but you are also now that much wood short of the next bank.
User avatar
Canada dansil92
Retired Contributor
Posts: 2232
Joined: Nov 3, 2018
ESO: dansil92

Re: This is how building works

Post by dansil92 »

Seamonk wrote:Actually, with this information we can better analyze the Dutch Logistician as well.
We'll compare to the quartermaster:
Cost: 100 food + 400 wood = 119.048 + 800 = 919.048 VS
Gain: Halberdier + Barracks + Wagon build = 637.639
Math
So you're paying 281.409 villager seconds or 140.705 wood for Veteran Halbs in age 2. I think, so long as you are going for early units, that is the decision that is being made.

Obviously an actual veteran upgrade is more expensive than that, but you are also now that much wood short of the next bank.
its worth noting here that a batch of pikes is 200w, so the logistician can save you some wood here too
Image
France Le Hussard sur le toit
Howdah
Posts: 1149
Joined: Oct 16, 2019
ESO: LeHussardsurletoit

Re: This is how building works

  • Quote

Post by Le Hussard sur le toit »

So first congratulation for your in depth work.

Now as part of my on-going crusade to spread scientific faith and pedantry on Internet forums, I'm going to rant for a while on error margins and significant figures.
To put it simply : the precision of your result CAN NOT be better than the precision of your initial data.
In this case your initial data are the theoretical building rates, given with a precision of one single digit (0,3 has one significant digit).
Although those theoretical gathering rates are hard coded, they don't have infinite precision (your computer typically handle only 32 bits floating numbers, or maybe 64 for numerical simulations programs where extreme precision is required. You could however assume that their precision is 32 (binary) digits.

Now when you introduce things like walking times, it becomes much more dubious.
5.518 seconds of walking time average between the two vills.
There is just no way walking time is known to that kind of precision. Precision of 0.1s looks far fetched in this case, so your 4 significant digit should be reduced at best to 2 (so 5.5s) or even one, if you consider as I do that that walking time are only measured with a precision of about 1s.
ESOC : came for the game, stayed for the drama.
France Le Hussard sur le toit
Howdah
Posts: 1149
Joined: Oct 16, 2019
ESO: LeHussardsurletoit

Re: This is how building works

Post by Le Hussard sur le toit »

Also mandatory "diarouga likes this" post.
ESOC : came for the game, stayed for the drama.
User avatar
France [Armag] diarouga
Ninja
NWC LAN Gold
Posts: 12710
Joined: Feb 26, 2015
ESO: diarouga
Location: France

Re: This is how building works

Post by [Armag] diarouga »

So what's the conclusion about banks ? How many vills should we put on it ?
No Flag helln00
Howdah
Posts: 1410
Joined: Jan 28, 2017
ESO: helln00

Re: This is how building works

Post by helln00 »

from what I can tell, 2 if the banks and other tasks of the vils are close together, 1 if they are more then 4 second walk distance.
User avatar
India Challenger_Marco
ESOC Media Team
Posts: 2689
Joined: Nov 23, 2015
ESO: challenger_marco

Re: This is how building works

Post by Challenger_Marco »

helln00 wrote:from what I can tell, 2 if the banks and other tasks of the vils are close together, 1 if they are more then 4 second walk distance.
Well we are talking about how many vills to contrust/build alone but not taking into the output factor ,faster the bank is built ,faster the shipment you get ,with 1 vill it's gonna hurt than these inefficient vills on bank lol.I normally put around 4 that sounds about right.
:nwc:
User avatar
United States of America _H2O
ESOC Business Team
Donator 06
Posts: 3409
Joined: Aug 20, 2016
ESO: _H2O

Re: This is how building works

Post by _H2O »

Good that you looked into this. This information is known. Not exactly the 43% part but approximately that much with extra vils added. There have also been experiments done to consider walking time. I remember a big post on this forum possibly from garja or someone else.

It is important to understand the typical walk time when you are putting down 8 vils on a wonder. Banks is another hot topic because you are trying to figure out which number of vils gives net resources. Other buildings dont really benefit from more vils and should almost always be built with one vil.
France Kaiserklein
Pro Player
Posts: 10282
Joined: Jun 6, 2015
Location: Paris
GameRanger ID: 5529322

Re: This is how building works

Post by Kaiserklein »

Nice post. We more or less knew all of this, but without this level of accuracy, and without understanding the maths behind it.
Seamonk wrote:4. Start building with Settler wagons (or any other unit with a better build rate) before adding villagers. If you start with a villager and add a SW, it's like building with 1.6 villagers. If you start with a SW and add a villager, it's like you're building with 2.3 villagers.
That's the one surprise for me. I thought having a vil + a SW would mean you're building slower than with only a SW, no matter what, so I just avoided doing it. Good to know you can fix that issue by having the SW start building first. Though it's horrible design from the devs haha.

Also good to know the rate between lost VS and saved building time is a constant. I thought it would be less efficient the more vils you have set building. So setting multiple vils to build stuff isn't as bad as I thought. Though it's obviously still bad whenever you can avoid it, especially because of the extra walking time you mentioned, vils bumping into each other, etc.

At the end of the day though, getting x building up in time is often more important than saving 8 (or even 20) wood.
Image
Image
Image
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
User avatar
Great Britain I_HaRRiiSoN_I
Retired Contributor
Posts: 1626
Joined: Jan 15, 2016
Location: United Kingdom

Re: This is how building works

Post by I_HaRRiiSoN_I »

i looked into vills and banks recently in my notebook but dont know where it is. due to the fact that the bank produces 4vills worth of coin as soon as it is built then assuming walking time is close to zero then building banks with 3-5 vills is preffered. Especially as the first and second bank provide the XP for the next shipment so that is also a benefit.

essentially never build a bank with 1 vill, there is no justification for that ever
France Kaiserklein
Pro Player
Posts: 10282
Joined: Jun 6, 2015
Location: Paris
GameRanger ID: 5529322

Re: This is how building works

Post by Kaiserklein »

About banks, I think there was a post made, and the conclusion was that roughly 4 vils on a bank is optimal. But it kinda depends, sometimes your 4th vil is too far and wouldn't be worth pulling to build the bank. Or sometimes a 4th vil would have to walk around the bank, and possibly trees or something, to find a spot to start building it. In these cases I go for 3 vils
Image
Image
Image
LoOk_tOm wrote:I have something in particular against Kaisar (GERMANY NOOB mercenary LAMME FOREVER) And the other people (noobs) like suck kaiser ... just this ..
User avatar
United States of America _H2O
ESOC Business Team
Donator 06
Posts: 3409
Joined: Aug 20, 2016
ESO: _H2O

Re: This is how building works

Post by _H2O »

It’s only less efficient to use more vils because of walking time. Walking time is a real factor though.
United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

Re: This is how building works

Post by Seamonk »

Okay so most people want info on banks. So let's dive into it.

I'm going to add a page to the google doc to help illustrate this as well.

https://docs.google.com/spreadsheets/d/ ... sp=sharing

Essentially, the core assumptions seem to be correct. Adding a villager to the bank (assuming no walking time) is always beneficial. The bank gather rate outweighs the 43% efficiency hit.

Adding villagers will garner additional VS from the bank with diminishing returns. This is because it is tied directly to the amount of time you are saving on building.
# of VillsBuild TimeIncremental Gain from Bank VSIncremental Net VSIncremental Net CoinTotal Net VSTotal Net CoinAverage walk time breakeven
1300
223.07727.59211.4387.89211.4387.8925.719
318.7517.2457.1494.93318.58712.8256.196
415.79011.8004.8913.37523.47816.25.870
513.6368.5813.5572.45527.03618.6555.407
6126.5222.7041.86529.73920.524.957
710.7145.1242.1241.46631.86321.9864.552
89.6774.1321.7131.18233.57623.1684.197
Note the incremental coin. That's the maximum amount of coin you can get from adding another villager. Make sure that the amount of thought/APM you put into this is worth getting a few coin.

Additionally, if you perfectly have all 4 villagers building perfectly with no down time, you netted 16.2 coin. Just so you know the realm of savings we're talking about.

Few of ways to look at this.
  • 1. You need to keep your TOTAL walk time across all villagers BELOW the Total Net VS column.
    • To calculate your full benefit, take the Total Net VS number and subtract your total walk time
    2. You need to keep your AVERAGE walk time across all villagers BELOW the Average walk time Breakeven column

    3. You can look incrementally. Look at the Incremental Net VS and determine if you can walk your next villager over in few seconds than what you gain.
    • E.G. Can your 4th villager be working on the bank in under 4.9 seconds? Can your 5th villager be working in under 3.5 seconds?
I would probably recommend looking at this incrementally. 3 vills has enough leeway to pretty much always be worth it. 4 vills is usually worth it if you can get that 4th one there in under 5 seconds.

Just remember that if you're cutting it close, then it probably isn't worth the APM. E.G. if it will take your 4th villager 4 seconds to start building... you netted 1 VS or .69 coin.
United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

Re: This is how building works

Post by Seamonk »

Le Hussard sur le toit wrote:So first congratulation for your in depth work.

Now as part of my on-going crusade to spread scientific faith and pedantry on Internet forums, I'm going to rant for a while on error margins and significant figures.
To put it simply : the precision of your result CAN NOT be better than the precision of your initial data.
In this case your initial data are the theoretical building rates, given with a precision of one single digit (0,3 has one significant digit).
Although those theoretical gathering rates are hard coded, they don't have infinite precision (your computer typically handle only 32 bits floating numbers, or maybe 64 for numerical simulations programs where extreme precision is required. You could however assume that their precision is 32 (binary) digits.

Now when you introduce things like walking times, it becomes much more dubious.
5.518 seconds of walking time average between the two vills.
There is just no way walking time is known to that kind of precision. Precision of 0.1s looks far fetched in this case, so your 4 significant digit should be reduced at best to 2 (so 5.5s) or even one, if you consider as I do that that walking time are only measured with a precision of about 1s.
I totally get where you're coming from. I'm just using excel and pasting out numbers before the final calculations.

A lot of this also isn't directly calculated by the computer, it's just ratios that determine the effect that we see. That average of 5.518 isn't actually calculated by the computer or stored. Its just a measure I put out incase someone is going to start doing their own formulas off of it.

I'm completely ignoring tick cycles and all that kind of stuff to live in this world of theory.
United States of America Seamonk
Musketeer
Posts: 72
Joined: Oct 12, 2020

Re: This is how building works

Post by Seamonk »

Kaiserklein wrote:Nice post. We more or less knew all of this, but without this level of accuracy, and without understanding the maths behind it.
Seamonk wrote:4. Start building with Settler wagons (or any other unit with a better build rate) before adding villagers. If you start with a villager and add a SW, it's like building with 1.6 villagers. If you start with a SW and add a villager, it's like you're building with 2.3 villagers.
That's the one surprise for me. I thought having a vil + a SW would mean you're building slower than with only a SW, no matter what, so I just avoided doing it. Good to know you can fix that issue by having the SW start building first. Though it's horrible design from the devs haha.
Since we have the issue identified, should that be added to the bug reports? I doubt it's a simple change though, and there are more important than specific build time irregularities.

Imagine 10 hours of dev time spend on rechecking the building formula every time a villager is added instead of those hours going towards stuck TP units.

Who is online

Users browsing this forum: No registered users and 4 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV