player:GetPlayerBuildingClassYieldChange()

JFD

Kathigitarkh
Joined
Oct 19, 2010
Messages
9,132
Location
The Kingdom of New Zealand
I'd like to know what exactly player:GetPlayerBuildingClassYieldChanges(buildingClassID, yieldID) checks. I had thought it would check for any yield changes made by the Trait_BuildingClassYieldChanges table, similar to how GetPolicyBuildingClassYieldChanges registers changes made in the Policy_ equivalent, but testing suggests that this isn't the case - perhaps because it was never hooked up properly (the table is empty in vanilla), or perhaps because it does something completely different.

Any info would be great. Thanks.
 
It's been some time since I tested this specific method (although I'm pretty sure I did test it since I needed to create a workaround for my Civ's Harvest Wolf upgrade building) but I believe that this method only returns the yield changes applied to the specified buildingclass only from other buildings.

For example, building the Neuschwanstein should cause that method to return a value of 3 for Gold, and 2 for Culture when you check the Castle buildingclass. Happiness is a separate method, though.
 
Modding this game is essentially defined as "That's a pain."

Worse still is that Happiness is its own method, and I haven't found any method on the Modiki that would allow me to get Tourism. Granted, the Modiki wasn't updated for BNW, I don't think, so I probably need to dig elsewhere.

Anyway, with respect to the Trait, that normally doesn't change, so can't you just query that Trait table to get the value and cache it?
 
I was just hoping it could be used to display a custom yield on those buildings affected by that table without having to import and overwrite the tooltip lua file. With EUI, said custom yield shows up when added by the policy equivalent, but it's such a trivial matter that it's neither worth adding a copy of the tooltip lua from EUI, nor adding the effect via dummy policies. I query the database for everything else though.
 
Hmm, I don't use EUI, so I'm afraid I'm not quite sure what exactly that looks like.
I assume by custom yield, you're trying to add in a completely new yield not in the game? If so, I suppose that would explain what you mean.
 
Back
Top Bottom