I don't know exactly, but I presume by looking at the deal history data which is persisted in the save.
On another topic, I uncovered a mechanic that was driving me crazy. When building a settler, food conversion to hammers isn't quite always 1:0.25. Sometimes it's 1:1 or something else and the behavior was all over the place. I couldn't figure it out until I looked at the code in the SDK.
The first 2 food converts 1:1 to 2 hammers.
The next 2 food converts 1:0.5, to 1 hammer.
Any food beyond 4 converts 1:0.25.
The result is truncated to integer.
So for example 11 surplus food becomes 2 + 1 + 1.75 = 4.75 hammers truncated to 4. Yeah, really intuitive.
On another topic, I uncovered a mechanic that was driving me crazy. When building a settler, food conversion to hammers isn't quite always 1:0.25. Sometimes it's 1:1 or something else and the behavior was all over the place. I couldn't figure it out until I looked at the code in the SDK.
The first 2 food converts 1:1 to 2 hammers.
The next 2 food converts 1:0.5, to 1 hammer.
Any food beyond 4 converts 1:0.25.
The result is truncated to integer.
So for example 11 surplus food becomes 2 + 1 + 1.75 = 4.75 hammers truncated to 4. Yeah, really intuitive.
