mainIine / foe-helfer-extension

FoE Helfer - Extension for chromium based browsers and Firefox ;-)
https://foe-helper.com
GNU Affero General Public License v3.0
122 stars 184 forks source link

Production overview - wrong size displayed #1155

Closed qwerty2070 closed 2 years ago

qwerty2070 commented 4 years ago

Chrome Versjon 83.0.4103.61(64-bit) Win10 64 En6 Version 2.4.6.2

THe size of buildings in productions overview seems to have half tiles. Since when can a building take up half a square in the game? No buildings are showing the correct size except a few 1-tile things like gong of wisdom this also gives the efficency wrong output Skjermbilde foe

Gindi4711 commented 4 years ago

This is because the average size required for streets is included as well.

qwerty2070 commented 4 years ago

IMHO that very strange Does it then take into account and display the number of street tiles that actually are used to that building, or just the average needed? it is wrong anyway somehow anyway when i look at specific buildings. Airship (7x3) is connected to 3 roadtiles but only need 1 to function (applies to every building my age (colonial), Cape Canaveral (4x5) is only connected to one tile of road. How can this be correct?

AlfonZ42 commented 4 years ago

The calculations assume that the required road runs along the whole shorter side of a building, not just one tile. This is because there can be other buildings further down the road. But yes, it is usually better to have big buildings (such as mentioned Airship or GBs) at the end of the road.

For example, let's say you build two Airships opposite one road:

AAAAAAARAAAAAAA
AAAAAAARAAAAAAA
AAAAAAARAAAAAAA

The total tiles used is: 21*2+3=45. Notice it is exactly two times the calculated average of one Airship (22.5 tiles).

As mentioned, if your Airship is at the end of the road, the average get better. On the other side, a city probably has few crossroads, or less than ideal placement of buildings, that worsen the average. You could take a detail look at your city, count all the roads and individual buildings, and compare the result with calculated average.

Minotorious commented 4 years ago

Since as you said that is the intended way for "calculating" the size and you won't change it (which I completely disagree with as the efficiency of a building doesn't depend on how many roads are connected to it since roads are a necessary evil that take space in your city but that is your decision to make)

Then you should change the wording because the word "size" is completely misleading to what that number actually means, and I am sure you will eventually get it reported a lot as a bug when for a 3x2 building it gives 7.

I would recommend changing it to something like "necessary footprint" or "size incl. roads" or "size & roads" which would again cause confusion but at least would make more sense to what the number actually is because it is definitely not the size of the building.

Gindi4711 commented 4 years ago

1.) Roads are a very big factor when comparing efficiency. For a 3x3 building needing big roads this will cause an overhead of 33%. For a 6x6 building with small roads it is 8.3%. There are even 1x1 residential buildings needing 50% overhead. 2.) I agree that the wording for "size" is not good, but we need a word with similar lengths of it will not fit into the table. 3.) One option would be to not include roads in the size, but only the efficiency, but this is not perfect either.

qwerty2070 commented 4 years ago

It is alot better to exclude the roads in this, If this should be accurate at all, it should count buildings actually connected to road if they need it or not.

in the example you gave with airship. I have only one, but the size of the road added is 1.5? you say average of road on the shortest side of a building. why is that number divided by two then? the average of 1x3 (3 as in short side of airship) = 3, not 1.5. this does not matter if the building is on the end of a road or not. Why is every number of road included = size of shortest side of building divided by two? seems like that is concensus of all buildings. I justdont get why. "The calculations assume that the required road runs along the whole shorter side of a building, not just one tile." as alfonZ said doesnt make sense.

The argument for buildings that need two-lane road is not valid either. as they are connected to the road on one side of the road only, thus only need as many squares connected to road as any building of same size.

and a third issue about this. the size of the roads listed in the overview is also 1.5. that does not make any sense at all as road does not require road. and ir already take into account other buildings that does not require road.

"You could take a detail look at your city, count all the roads and individual buildings, and compare the result with calculated average." says AlfonZ What average? all buildings have their size added by different number (shortest side/2) my numbers: i have 146 roads in my city. some of them not connected to any building but htat does not matter. counting in the city map of this extension 16 GBs/red, 37 blue 5 grey (do not need road but some are anyway) 2 white 13 green (which 5 dont need road) 24 light blue for a total of 98 buildings including Town Hall 88 that requires road. and if all buildings are added to one line with shortest side to a road(those that need road) it will be 238 squares of road. i . all numbers from the foe-helper. if we put buildings on both sides of the road i need 119 squares of road. according to what is stated gives me 119 squares of road divided by 44 buildings on each side of the road. = 2,70 squares of road per building. And this should then tell me what excatly?

No, please reconsider changing this somehow. The best option is #3 from andrgin above. maybe not perfect, but alot better than any other option, and easier to understand for everybody i think

edit: added: i do not agree with andrgin aboveand it is wrong. a 3x3 building that require a two-lane road only needs to connect to one square of the building as well, and giving the result that it only connects to one square of the two-lane street as well (afaik). this example can be seen when the road turns 90°

Gindi4711 commented 4 years ago

It is alot better to exclude the roads in this, If this should be accurate at all, it should count buildings actually connected to road if they need it or not.

1.) Not counting roads at all will produce results that will be up to 30% wrong.

2.) It does not matter to how many road pieces your building is currently connected. The important question is "how many tiles do I save when deleting the building". So lets say I have a 6x6 tile production building at the left border of my city which is connected by 1 road tile. Right of that is another 6x6 building. If I delete the first building I can not only delete the 1 road tile that is touching the building. I can delete 5 more roads as well because the next building can now be connected with 1 tile instead of 6. If the next building is not 6x6 tiles I will simply shift my buildings around a bit until I find a good combination again.

in the example you gave with airship. I have only one, but the size of the road added is 1.5? you say average of road on the shortest side of a building. why is that number divided by two then? the average of 1x3 (3 as in short side of airship) = 3, not 1.5. this does not matter if the building is on the end of a road or not. Why is every number of road included = size of shortest side of building divided by two? seems like that is concensus of all buildings. I justdont get why. "The calculations assume that the required road runs along the whole shorter side of a building, not just one tile." as alfonZ said doesnt make sense.

3.) You can have buildings on 2 sides of a road. So here is an example: I have 2 sacred sky watches (3x2 each). I will need 1 road tile SSSRSSS SSS SSS

If I have 4 sacred sky watches. I will need 3 road tiles so 2 more SSSRSSS SSSRSSS SSSRSSS SSS SSS

If I have 6 sky watches. I will need 5 road tiles so 2 more SSSRSSS SSSRSSS SSSRSSS SSSRSSS SSSRSSS SSS SSS

The argument for buildings that need two-lane road is not valid either. as they are connected to the road on one side of the road only, thus only need as many squares connected to road as any building of same size.

I dont get your logic here at all. So lets say you have a 6x4 building needing a double road size requirements are: 6x4 + 4*2/2 = 28

For a 6x4 building needing a single road size requirements are: 6x4 + 4/2 = 26

and a third issue about this. the size of the roads listed in the overview is also 1.5. that does not make any sense at all as road does not require road. and ir already take into account other buildings that does not require road.

You add 2 3x3 buildings with single roads. For this you will need 3 additional roads as there are buidings on 2 sides of the road.

So for each 3x3 building the requirement is 3/2 = 1.5

"You could take a detail look at your city, count all the roads and individual buildings, and compare the result with calculated average." says AlfonZ What average? all buildings have their size added by different number (shortest side/2)

Here is an example of my city: Used space: 2723 1x1 roads: 252 2x2 roads: 30 = 120 tiles Total space used for roads: 372 Total space used for buildings: 2351 So it is about 1 road tile for 6,32 building tiles

This matches my calculation very well if I assume my small road buildings are about 3.5 tiles wide and my big road buildings are 6 tiles wide.

my numbers: i have 146 roads in my city. some of them not connected to any building but htat does not matter. counting in the city map of this extension 16 GBs/red, 37 blue 5 grey (do not need road but some are anyway) 2 white 13 green (which 5 dont need road) 24 light blue for a total of 98 buildings including Town Hall 88 that requires road.

and if all buildings are added to one line with shortest side to a road(those that need road) it will be 238 squares of road. i . all numbers from the foe-helper. if we put buildings on both sides of the road i need 119 squares of road. according to what is stated gives me 119 squares of road divided by 44 buildings on each side of the road. = 2,70 squares of road per building. And this should then tell me what excatly?

The average roads used per building is useless. We do not show this anywhere.

What we show is average size needed for each building and calculating efficiency based on it.

Here is an example: Lets say you have 20 sacred sky watches (3x2) and are thinking about replacing them with 4 terrace farms (6x5). Both options generate 20FP and both options have a building size of total 120.

But lets take a look how we need to build it:

Option1: SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS SSSRSSSSSSRSSS

Total space requirement: 140 (120 + 20 roads) Efficiency: 0.143 FP/tile

Option2: TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT TTTTTRTTTTT

Total space requirement: 132 (120 + 12 roads) Effiency: 0,1515 FP/tile

So terrace farms are better.

The same logic applies to residential buildings and production buildings as well.

No, please reconsider changing this somehow. The best option is #3 from andrgin above. maybe not perfect, but alot better than any other option, and easier to understand for everybody i think

Well the downside about showing size without roads is that we are displaying a value that is not used in the calculation at all.

edit: added: i do not agree with andrgin aboveand it is wrong. a 3x3 building that require a two-lane road only needs to connect to one square of the building as well, and giving the result that it only connects to one square of the two-lane street as well (afaik). this example can be seen when the road turns 90°

I dont get your logic here. Lets have an example:

I have 2 garages (4x4) needing a 2x2 road. 2 tiles used for roads: GGGGRRGGGG GGGG GGGG GGGG GGGG GGGG GGGG

I have 4 garages (4x4) needing 2x2 roads. 10 tiles used for roads, so 8 more. GGGGRRGGGG GGGGRRGGGG GGGGRRGGGG GGGGRRGGGG GGGGRRGGGG GGGG GGGG GGGG GGGG GGGG GGGG

So 4 tiles per garage according to 4*2/2

For a 4x4 building using small roads it would have been only 2 tiles more.

qwerty2070 commented 4 years ago

OK, now i do get the mathematics and logic in that, but i still think it is confusing. and of course the calculations of efficiency will be wrong if the roads are included, why not exclude them there as well? And i didnt think of a single piece of two-lane road as 2x2, i made a mistake and thinking 2x1. my bad