LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
289 stars 160 forks source link

5/19 - Governor Issues #7888

Closed Stalker012345 closed 3 years ago

Stalker012345 commented 3 years ago

1. Mod version (i.e Date - 4/14): 5/19

2. Mod list (if using Vox Populi only, leave blank):

3. Error description: I'll start my usual suite of governor examples. For our first ones, the usual settler logic. I was able to adjust this and shave 4 turns off a settler.

image

4. Steps to reproduce (optional):


Supporting information: Please note that you can attach .zip files by dragging-and-dropping them. If possible, zip up all supporting data and post that way.

  1. Log files (always attach your Logs folder, located at My Documents/My Games/Sid Meier's Civilization 5. For instructions, go to the repository's main page, under "To enable logging for bug reports"):

  2. Save game (always attach a save that was made a turn before the error; located at My Documents/My Games/Sid Meier's Civilization 5/ModdedSaves; you can change autosave frequency in the game's Options menu):

  3. CvMiniDump.dmp file (attach if experiencing a game crash. Located at Program Files/Steam/steamapps/common/Sid Meier's Civilization V):

  4. Screenshots (optional):

LoneGazebo commented 3 years ago

what specifically did you adjust?

Stalker012345 commented 3 years ago

moved every worker to either 3p or 1f 2p tiles.

ilteroi commented 3 years ago

well, that is weird. i thought food and hammers are equal when building a settler?

that is how the governor acts in any case ... i did not change that part.

RecursiveVision commented 3 years ago

@ilteroi I think it's 2f = 1p when building a Settler. It should say in the city total Production tooltip.

Also this mechanic is a VP thing not a vanilla thing IIRC, so if the logic doesn't account for that it probably should.

RecursiveVision commented 3 years ago

@ilteroi If you're going to make more fixes I'd suggest pulling from RSI first to avoid merge errors later :)

ilteroi commented 3 years ago

uh, why do we need all those special rules anyhow?

what is this supposed to achieve?

RecursiveVision commented 3 years ago

@ilteroi In this case I think it's balance - allowing low Production but high Food cities to still build Settlers.

Also because 50% of the Food is carried over, players who built farms rather than other improvements (which may be a good idea if you're wanting to build Settlers, since they cost a population) aren't punished as much.

Stalker012345 commented 3 years ago

@ilteroi I think it's 2f = 1p when building a Settler. It should say in the city total Production tooltip.

Yeah if the governor doesn't know that, no wonder its been so horrendous at setting itself up for settlers for such a long time!

ilteroi commented 3 years ago

well the next question is whether to enable such auto-optimization depending on the build queue for human players at all. historically the answer has been no.

ilteroi commented 3 years ago

where does this food to production conversion even happen? i can't find it

LoneGazebo commented 3 years ago

CvCity. Find the ‘isfoodproduction’ unit attribute and follow it into cvcity

ilteroi commented 3 years ago

that's what i did ...

LoneGazebo commented 3 years ago

Did you find it?

azum4roll commented 3 years ago

It's 50% growth converted to production. Note that the city can still starve if you don't have enough food.

Stalker012345 commented 3 years ago

It's 50% growth converted to production. Note that the city can still starve if you don't have enough food.

I've never seen a settler city starve....and I have literally put every worker on hammer only tiles. As soon as the settler finishes, yes massive starvation, but during the production not a bit.

LoneGazebo commented 3 years ago

It's 50% growth converted to production. Note that the city can still starve if you don't have enough food.

It cannot starve, the city is flagged at zero food use/need during settler production

azum4roll commented 3 years ago

It's 50% growth converted to production. Note that the city can still starve if you don't have enough food.

It cannot starve, the city is flagged at zero food use/need during settler production

Is that new? I could starve before when I set everything to production only.

LoneGazebo commented 3 years ago

Nope

ilteroi commented 3 years ago

nope, did not find it, that's why i asked. but it doesn't matter. AI will treat building a settler like production focus in the future. that is the best compromise i can see.

LoneGazebo commented 3 years ago

int CvCity::GetFoodProductionTimes100(int iExcessFoodTimes100) const

LoneGazebo commented 3 years ago

replacement for original function: int CvCity::GetFoodProduction(int iExcessFood) const

ilteroi commented 3 years ago

wow, that is surprisingly complex