DLL - De-Hardcodify Beliefs: Yields Per Follower

JFD

Kathigitarkh
Joined
Oct 19, 2010
Messages
9,132
Location
The Kingdom of New Zealand
I did some testing and to my dismay - but by no means my surprise - the table Belief_YieldChangePerForeignCity will not work with anything but Faith. I had anticipated it to fail to work with local yields - Food and Production - but to fail with Science, Gold and Culture is ridiculous. Moreover, testing Belief_YieldChangePerXForeign yields (oops) a similar result, and doesn't work for Science - only what Firaxis needed in Faith and Culture (Gold is handled in a direct column in the beliefs table; who knows why they didn't just add an extra column to the YieldChange tables to account for different variations of the yield).

Even from this superficial perspective, the belief tables look a veritable mess, but if it is possible, I would request that these two tables be able to support Science, Gold, Culture and Faith equally.
 
I did some testing and to my dismay - but by no means my surprise - the table Belief_YieldChangePerForeignCity will not work with anything but Faith. I had anticipated it to fail to work with local yields - Food and Production - but to fail with Science, Gold and Culture is ridiculous. Moreover, testing Belief_YieldChangePerXForeign yields (oops) a similar result, and doesn't work for Science - only what Firaxis needed in Faith and Culture (Gold is handled in a direct column in the beliefs table; who knows why they didn't just add an extra column to the YieldChange tables to account for different variations of the yield).

Even from this superficial perspective, the belief tables look a veritable mess, but if it is possible, I would request that these two tables be able to support Science, Gold, Culture and Faith equally.

This is part of what was discussed back during the 'unified yield tables' portion of brainstorming the new dll. It is a mess, a verifiable one, but the internal yield code is even worse. I'll add this to our to-do list, but keep in mind it is like untangling spaghetti while wearing flippers on your hands.
G
 
This is part of what was discussed back during the 'unified yield tables' portion of brainstorming the new dll. It is a mess, a verifiable one, but the internal yield code is even worse. I'll add this to our to-do list, but keep in mind it is like untangling spaghetti while wearing flippers on your hands.
G

Yep, Thal spend an inordinate amount of time redoing yields in CEP:(
 
What is yield change per X foreign followers supposed to do, because one of these is bugged!

Code:
iTemp = pReligion->m_Beliefs.GetYieldChangePerXForeignFollowers(YIELD_FAITH);
if (iTemp > 0) {
  int iFollowers = GetReligions()->GetNumForeignFollowers(false /*bAtPeace*/);
  if (iFollowers > 0) {
    [B][COLOR="Red"]iFaithPerTurn += (iTemp / iFollowers);[/COLOR][/B]
  }
}

Code:
iTemp = pReligion->m_Beliefs.GetYieldChangePerXForeignFollowers(YIELD_CULTURE);
if (iTemp > 0) {
  int iFollowers = GetReligions()->GetNumForeignFollowers(false /*bAtPeace*/);
  if (iFollowers > 0) {
    [B][COLOR="red"]iCulturePerTurn += (iFollowers / iTemp);[/COLOR][/B]
  }
}

Edit: Given that Culture is used by a belief but Faith isn't, I'm going to go with the Faith one being bugged (it also looks wrong to me)
 
I did some testing and to my dismay - but by no means my surprise - the table Belief_YieldChangePerForeignCity will not work with anything but Faith. I had anticipated it to fail to work with local yields - Food and Production - but to fail with Science, Gold and Culture is ridiculous. Moreover, testing Belief_YieldChangePerXForeign yields (oops) a similar result, and doesn't work for Science - only what Firaxis needed in Faith and Culture (Gold is handled in a direct column in the beliefs table; who knows why they didn't just add an extra column to the YieldChange tables to account for different variations of the yield).

Even from this superficial perspective, the belief tables look a veritable mess, but if it is possible, I would request that these two tables be able to support Science, Gold, Culture and Faith equally.

I needed somewhere to start, and this is a good a place an anywhere - see post #2 here

Any help on filling in the Beliefs table (or any of the other 10) gratefully received!
 
Back
Top Bottom