general: a industry can accept and produce multiple cargos. CB 14B/14C define which cargos and they define a sorting order for the GUI. In all other places the sorting order does not matter. All callbacks get a cargo type (according to cargo translation table) instead of "n-th cargo". industry properties: * property 10 and 11 remain unchanged. additional cargos can only be defined via callback. * property 12 and 13, 1C, 1D and 1E remain unchanged. additional cargos must use production callback. *property 1A: new special flag 18/0x40000 to enable more than 3/2 input/output cargos. this changes the behaviour of various callbacks, see below. industry tile properties: * property 0A, 0B and 0C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles. industry variables: * var 69[x]: waiting cargo for cargo x. x is an index into the cargo translation table * var 6A[x]: Amount of cargo produced this month for cargo x. x is an index into the cargo translation table * var 6B[x]: Amount of cargo transported this month for cargo x (like 98 and 9A). x is an index into the cargo translation table * var 6C[x]: Amount of cargo produced last month for cargo x (like 9E and A0). x is an index into the cargo translation table * var 6D[x]: Amount of cargo transported last month for cargo x (like A2 and A4). x is an index into the cargo translation table * var 6E[x]: Date when cargo x was accepted last in days since year 0 (similar to B4, but per cargo type). x is an index into the cargo translation table * var 8A and 8C remain unchanged. there is no matching variable for other cargos. * var 9C and 9D remain unchanged. there is no matching variable for other cargos. callback 2B and 2C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles. callback 37: * if special flag 40000 is clear: var 18 bits 0..7: 00..04 with old behaviour * if special flag 40000 is set: var 18 bits 0..7: 00: input cargo 01: output cargo var 18 bits 16..23: cargo type from cargo translation table callback 3D remains unchanged, it works just fine. callback 14B, 14C: * these callback are now called more often than before. * if the newgrf returns more types than allowed, this raises a newgrf error message. (ErrorUnknownCallbackResult) * if special flag 40000 is clear, this also enforced max 3 input and 2 output cargos. * these callbacks are now also called in "purchase list". * if the callback may return different cargo types at different types, then the "purchase list" variant must return a superset of all possible results. OpenTTD checks this and issues ErrorUnknownCallbackResult or similar. production callback version 02: 02 0A ( )* ( )* B ID for this definition B Version of the production callback format, 02 B Number of ( ) pairs to follow B Index into cargo translation table. Must be one of the types returned by CB 14B, or is ignored (no error) B Index of register, containing the amount of cargo to process. B Number of ( ) pairs to follow B Index into cargo translation table. Must be one of the types returned by CB 14C, or is ignored (no error) B Index of register, containing the amount of cargo to output. B Number of register. Repeat callback if the value of the register isn't zero, do not repeat otherwise