Citizen Automation code is where?

MrAnon

Chieftain
Joined
Apr 25, 2006
Messages
38
Location
Virginia, USA, Sol 3, Milky Way...
I'd like to tweak the behavior of the city automation (old school 'governor'). Specifically, I want to change the code controlling what constitutes an acceptable amount of food produced when non-food emphasis is active.

Demonstratum: You are producing +3 food and have production emphasized. The 'governor' will not move citizens around to increase your hammers at the expense of food, so you move a citizen from a 2-food tile to a hammer tile, increasing your production but still maintaining a +1 food surplus. Slow growth, to be sure, but growth nonetheless. The automation AI, however, will not accept that and disable itself. If you re-enable it, your citizen is moved back to the food tile.

Logically, there must be a string somewhere that tells the governor what surplus of food is adequate. Rough empirical data says that the coded surplus level is +2 food but that's not proven yet.

In any case (sorry - rambling a bit this morning) - does anyone know where the relevant code is hiding? Of course, if you can tell me precisely what changes to make, that would be extra-groovy :mischief: . I'm a tech, not a code jockey so while I *can* do it, I'm not keen on poring over a bunch of lines I mostly-but-not-completely understand.

TIAFYH!
 
If I bask in your reflected glory, will I get a suntan? :cool:

Thanks much, TGA, I think you are correct. At least, my neophyte code-reading skills lead me to think you are. I found, 200 lines past "AIassignWorkingPlots" this line: if (!AI_foodAvailable(1)) in which the original integer was 2. I changed it to 1 and am testing now to see if that's the ticket.
Nothing else looks like it would be the right instruction anyway.

I never would have looked in that subdirectory on my own so I really appreciate the guidance! :thanx:
 
Back
Top Bottom