[cep 3.4.1] culture yields not added

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Hi

I've been playing around with changing some of the BNW policies to GEM inspired ones.

While doing this I've come to conclude that theres a problem with using culture yields with the Policy_BuildingClassYieldChanges table.

If I use YIELD_CULTURE nothing is added (it does show up in the yield display for e.g. monuments though). If I change the yield to YIELD_GOLD it works like a charm.

(Also posted in the Alpha testing thread of version 3.4 but just confirmed with 3.4.1)

\Skodkim
 
1) There are no changes made by the mod that affect the Policy_BuildingClassYieldChanges table.
The only thing that the Communitas Project does, is query that table as outlined in YieldLibrary.lua.

2) How exactly are you modifying that variable?
Perhaps if you provide an example of your edits the reason might be clear.

3) As this is more of a general question on Civ V, as opposed to the Communitas Project, have you asked in the General forum?
 
1) There are no changes made by the mod that affect the Policy_BuildingClassYieldChanges table.
The only thing that the Communitas Project does, is query that table as outlined in YieldLibrary.lua.

2) How exactly are you modifying that variable?
Perhaps if you provide an example of your edits the reason might be clear.

3) As this is more of a general question on Civ V, as opposed to the Communitas Project, have you asked in the General forum?

I know Theres no changes to the Policy_BuildingClassYieldChanges table. Should have been more precise in the description.

What I've been doing is to activate some of the changes to policies that were in GEM in a modmod (really missed the policies). One of them is Aristocracy giving +2 Culture to Wonders. This does not work when I try to add YIELD_CULTURE but it works fine with YIELD_GOLD. It also works with YIELD_FOOD and YIELD_PRODUCTION (other policies).

The code (sql) goes (with YIELD_GOLD inserted):

Spoiler :
INSERT INTO Policy_BuildingClassYieldChanges
(PolicyType, BuildingClassType, YieldType, YieldChange)
SELECT DISTINCT
'POLICY_ARISTOCRACY', BuildingClass, 'YIELD_GOLD', 2
FROM Buildings WHERE BuildingClass IN (
SELECT Type FROM BuildingClasses
WHERE (
MaxGlobalInstances = 1
OR MaxTeamInstances = 1
OR MaxPlayerInstances = 1
) AND NOT Type IN (
'BUILDINGCLASS_PALACE'
)
) AND NOT BuildingClass IN (
SELECT BuildingClass FROM Buildings WHERE IsVisible = 0
);


I can also make +1 happiness on wonders from the Traditions Finisher Work.

I've heard that Thal mentioned a vanilla bug with adding culture and that he planned to fix this but I haven't been able to find any mention of this yet.

Logs checked - nothing concerning this mentioned in them

\Skodkim
 
Ahh, sorry I might have misunderstood too.

Well first off there is absolutely nothing wrong with the SQL. I can modify the database in SQLiteSpy and it updates properly.

Secondly I can't see where the YIELDs are differentiated in the DLL code as outlined here:
Code:
	//BuildingYieldChanges
	{
		kUtility.Initialize2DArray(m_ppiBuildingClassYieldChanges, "BuildingClasses", "Yields");

		std::string strKey("Policy_BuildingClassYieldChanges");
		Database::Results* pResults = kUtility.GetResults(strKey);
		if(pResults == NULL)
		{
			pResults = kUtility.PrepareResults(strKey, "select BuildingClasses.ID as BuildingClassID, Yields.ID as YieldID, YieldChange from Policy_BuildingClassYieldChanges inner join BuildingClasses on BuildingClasses.Type = BuildingClassType inner join Yields on Yields.Type = YieldType where PolicyType = ?");
		}

		pResults->Bind(1, szPolicyType);

		while(pResults->Step())
		{
			const int BuildingClassID = pResults->GetInt(0);
			const int iYieldID = pResults->GetInt(1);
			const int iYieldChange = pResults->GetInt(2);

			m_ppiBuildingClassYieldChanges[BuildingClassID][iYieldID] = iYieldChange;
		}
	}

which means CULTURE, GOLD, or FAITH should work equally as well.
Unfortunately that is not a answer to your question. Sorry.
 
Thanks for the replies.

Lets see if Thal has anything to add here. Its not really a bug right now since GEM, as you say ExpiredReign, doesn't use the Policy_BuildingClassYieldChanges table.

Stackpointer: The thread you mention seems to be exclusively about Tourism yield, not culture.

\Skodkim
 
Just checked with 3.5 and the problem persists.

One curiosity though is that with Wonders built before selecting the policy does not show up as having extra culture when you move the mouse over their icon in the city view while Wonders built after the policy has been selected shows up as having extra culture.

No extra culture is added for any of them.

Funny thing is it still works with gold, food and production.

\Skodkim
 
The problems I described for tourism also apply to culture in many areas, because Firaxis designed yields poorly. It won't be possible to do things like that until I have time to work on reactivating the full yield library again.
 
Back
Top Bottom