Comment 12 for bug 571796

Revision history for this message
Nasenbaer (nasenbaer) wrote :

Actually I do not see a problem here. Of course the code can be enhanced at some placesm but the current way is quite intuitive in my eyes - btw. some comments above are not completely true, some even wrong.

Currently the statistics are based on the last 20 "working tries" where a "success" means +5% and a "fail" means +0%.

If production is skipped because the ware is not needed, no "working try" is written and thus the statistic is unchanged.

If production is skipped because a needed ware is missing a "fail" is written and thus the statistics get lower (or stay at 0% ;) )

The "+" and "-" indicator is based upon the last 10 "working tries", where every "success" is counted as +10% - if the sum is bigger than the complete statistic, a "+" is shown, if smaller, a "-" is shown.

I experienced some strange building statistics as well, but am not sure which buildings showed them, however if someone wants to take a deeper look into it, it would be good to check the production programs of all buildings. Generally the check should look like:
* skip if not needed
* sleep
* check ware

so skip should be before sleep so e.g. the smiths don't sleep only because no hamer is needed - the damn worker should produce shovels, so no reason to go to sleep ;).
Anyways, all check ware calls should be after the sleep call, else the work program will directly be restarted and the ceck ware call will again fail, which will directly pull the statistics of the building down to 0% - mabye that is the case for some of the buildings.

So to conclude: I vote for checking all buildings, but leaving the statistics calculation.