Here is my first question:
What determines the cargo output of an industry or group of houses?
I have been looking through the source code and wiki, but I can't seem to find it. Either that or I am glazing over it. I have already looked through this but it doesn't seem to have the answer. Or I am glazing over it like I said. That did partially answer my second problem though.
On to my second problem:
The function 'GetTransportedGoodsIncome' references the "price factor" of the cargo:
Code: Select all
/* "The result should be a signed multiplier that gets multiplied
* by the amount of cargo moved and the price factor, then gets
* divided by 8192." */
return result * num_pieces * cs->current_payment / 8192;
Thanks!
Edit: The reason I wanted answers to these questions was for AI development, but I looked into the NoAI API more and found AITile::GetCargoAcceptance, and AITile::GetCargoProduction. They will do what I need, but it would still be nice to know where the numbers are coming from in the first place if someone knows.