Can someone help me figure out how export generation is actually calculated? I thought I had a good grasp of how it works but after some in-game testing, I was surprised at the results. Up until now, all the resource collection was easy to figure out and in-game tests matched with predicted math models. I need some help to figure out what I am doing wrong...
The way I thought export works is you have a base rate that is activated if the villager is working (does not matter what resource they are tasked to). From the proto file the export rate for regular villagers is: <Rate type ='Trade'>0.030000</Rate>. I took this 0.03 value to mean export per second (same as 0.6 for mining means 0.6 coin per second).
This base value is this multiplied by the total villagers working granting an export per second value. If you have export rate configured to increase at the consulate by decreasing resource gathering rates, then this base value is multiplied by 35% granting 0.405 export per second (for 5% reduction) or 60% granting 0.480 export per second (for 10% reduction).
The first task was to create some predicted values. This is easy math if export generation is the same as resource generation.
For 25 villagers at a 0% Consulate Configuration, the export rate is:
[(25*0.03*(1+0%)] = 0.75 export per sec, 0.90 export per sec with Sumptuary
100 export can be gathered in[100 / 0.75] = 133.3 sec (111.1 sec with Sumptuary)
For 25 villagers at a 5% Consulate Configuration, the export rate is:
[(25*0.03*(1+35%)] = 1.01 export per sec, 1.16 export per sec with Sumptuary
100 export can be gathered in[100 / 0.75] = 98.8 sec (86.0 sec with Sumptuary)
For 25 villagers at a 10% Consulate Configuration, the export rate is:
[(25*0.03*(1+60%)] = 1.20 export per second, 1.35 export per second with Sumptuary
100 export can be gathered in[100 / 0.75] = 83.3 sec (74.1 sec with Sumptuary)
The method I used to test this was I created 25 villagers and tasked them onto a rice paddy (will not run out of resources creating idle villagers). Then I pressed pause, recorded the export value and time, collected exactly 100 additional export, pressed pause and recorded the time. I then used this time as the time it takes 25 villagers to collect 100 export. I then repeated this for each of the resource configurations at the consulate (0%, 5%, and 10%). I also repeated this test for Sumptuary Laws and Team Sumptuary Laws with no villagers gathering to learn if the base value granted by the HC shipment increases also with an export increase configuration. Increasing export generation at the consulate has no effect on the Sumptuary Law shipment (i.e. very little effect late game).
After I had my true values which were tested a few times to see if being in a different age made a difference (i.e. Colonial, Fortress, etc - it does not matter), I compared this to what I predicted mathematically and was significantly off. In all cases, the predicted values were slower than what was tested in game but not by a repeatable percentage. Here are the results:
25 villagers without Sumptuary HC Shipment
Consulate Configuration.....Time for 100 export (sec)
0%...................................115 (~13.8% faster than 133.3 predicted)
5%...................................88 (~10.9% faster than 98.8 predicted)
10%.................................76 (~8.8% faster than 83.3 predicted)
25 villagers with Sumptuary HC Shipment
Consulate Configuration.....Time for 100 export (sec)
0%...................................98 (~11.8% faster than 111.1 predicted)
5%...................................78 (~9.3% faster than 86.0 predicted)
10%.................................68 (~8.9% faster than 74.1 predicted)
I did all this again for 50, 75, & 99 villagers to see if the percentages were the same and they were very close in all cases (when testing without Sumptuary, testing with Sumptuary threw the percentages off as they should since increases to export generation at the consulate has no effect on Sumptuary shipments)..
So my question is, what am I doing wrong? I need someone good at looking at code to check it out and let me know if export generation bugged or if it is calculated differently. The values should not be that far off, 1 or 2 seconds is ok and I would contribute to round-off error, but this is a big difference.
Lead, Follow, or Get the Hell out of the way!................CYCLOHEXANE'S FREE GUIDES:
-TAD GUIDE: AOE3 TWC TAD Quick Reference -or view online: On-line
AOE3 TWC TAD UNIT COMPARISON SPREADSHEET: Unit Comparison Spreadsheet
See other guides, technological advancements, interviewing tips, and more at my website All Things Miscellaneous
The way I thought export works is you have a base rate that is activated if the villager is working (does not matter what resource they are tasked to). From the proto file the export rate for regular villagers is: <
This base value is this multiplied by the total villagers working granting an export per second value. If you have export rate configured to increase at the consulate by decreasing resource gathering rates, then this base value is multiplied by 35% granting 0.405 export per second (for 5% reduction) or 60% granting 0.480 export per second (for 10% reduction).
The first task was to create some predicted values. This is easy math if export generation is the same as resource generation.
100 export can be gathered in
100 export can be gathered in
100 export can be gathered in
The method I used to test this was I created 25 villagers and tasked them onto a rice paddy (will not run out of resources creating idle villagers). Then I pressed pause, recorded the export value and time, collected exactly 100 additional export, pressed pause and recorded the time. I then used this time as the time it takes 25 villagers to collect 100 export. I then repeated this for each of the resource configurations at the consulate (0%, 5%, and 10%). I also repeated this test for Sumptuary Laws and Team Sumptuary Laws with no villagers gathering to learn if the base value granted by the HC shipment increases also with an export increase configuration. Increasing export generation at the consulate has no effect on the Sumptuary Law shipment (i.e. very little effect late game).
After I had my true values which were tested a few times to see if being in a different age made a difference (i.e. Colonial, Fortress, etc - it does not matter), I compared this to what I predicted mathematically and was significantly off. In all cases, the predicted values were slower than what was tested in game but not by a repeatable percentage. Here are the results:
Consulate Configuration.....Time for 100 export (sec)
0%...................................115 (~13.8% faster than 133.3 predicted)
5%...................................88 (~10.9% faster than 98.8 predicted)
10%.................................76 (~8.8% faster than 83.3 predicted)
Consulate Configuration.....Time for 100 export (sec)
0%...................................98 (~11.8% faster than 111.1 predicted)
5%...................................78 (~9.3% faster than 86.0 predicted)
10%.................................68 (~8.9% faster than 74.1 predicted)
I did all this again for 50, 75, & 99 villagers to see if the percentages were the same and they were very close in all cases (when testing without Sumptuary, testing with Sumptuary threw the percentages off as they should since increases to export generation at the consulate has no effect on Sumptuary shipments)..
So my question is, what am I doing wrong? I need someone good at looking at code to check it out and let me know if export generation bugged or if it is calculated differently. The values should not be that far off, 1 or 2 seconds is ok and I would contribute to round-off error, but this is a big difference.
Lead, Follow, or Get the Hell out of the way!................CYCLOHEXANE'S FREE GUIDES:
-TAD GUIDE: AOE3 TWC TAD Quick Reference -or view online: On-line
AOE3 TWC TAD UNIT COMPARISON SPREADSHEET: Unit Comparison Spreadsheet
See other guides, technological advancements, interviewing tips, and more at my website All Things Miscellaneous
[This message has been edited by Cyclohexane (edited 11-28-2007 @ 01:43 AM).]