DLL - Unified Yields

Yes, made sense. I'll keep my eye on this thread and will jump in as soon as I see something I can help with (like the testing).

If you want to take out a big block in one go (35 of the remaining 106) these are all related so should be easy to test together
  • Feature_HillsYieldChanges
  • Feature_RiverYieldChanges
  • Improvement_FreshWaterYields
  • Improvement_RiverSideYields
  • Terrain_HillsYieldChanges
  • Terrain_RiverYieldChanges
You'll need DLL v54a from my drop-box acct (linked above)

EDIT: Too late, I've done them
 
Update: I've moved the completed primary types from post #2 into post #3

As of typing this, there are four primary types left - Buildings, Beliefs, Policies and Traits - of which Buildings still needs to be coded. For the other three types, there are 27 combinations left to test.

Anyone wanting to test the remaining entries in the other three tables will need V55a of my DLL - you can copy it over the dll in the V54 mod. As I'm into "scary spaghetti code" for some of these, there are lots of lines in CustomMods.log that should help tracking oddities.

Good Night!

W
 
Yields from Traits

Culture Faith Food Gold Production Science
Trait_ExtraYieldThresholds test test test test test test
Trait_ImprovementYieldChanges xml test test test xml xml
Trait_SpecialistYieldChanges test test test test test xml
Trait_UnimprovedFeatureYieldChanges xml test test test test test
Trait_YieldChanges test test test test test test
Trait_YieldChangesIncomingTradeRoute test test impl xml impl test
Trait_YieldChangesNaturalWonder test test test test test test
Trait_YieldChangesPerTradePartner xml test n/a xml n/a test
Trait_YieldChangesStrategicResources test test test test xml test
Trait_YieldModifiers impl impl test test test test

Yields from Policies

Culture Faith Food Gold Production Science
Policy_BuildingClassYieldChanges test xml test xml xml xml
Policy_BuildingClassYieldModifiers test test test xml test test
Policy_CapitalYieldChanges test test test xml test xml
Policy_CapitalYieldModifiers test test xml test test test
Policy_CapitalYieldPerPopChanges test test test xml test test
Policy_CityYieldChanges xml test xml xml xml xml
Policy_CoastalCityYieldChanges test test test test xml test
Policy_GreatWorkYieldChanges xml test test test test test
Policy_ImprovementYieldChanges test xml test xml xml xml
Policy_SpecialistExtraYields test test test test test xml
Policy_YieldModifiers test test test test test test
 
Yes. The YieldChangesIncomingTradeRoute for Food and Production did not work for me either.
The YieldModifiers worked all, as far as I remember. One second.

EDIT:
Nope. The YieldModifiers for Culture didn't worked. Haven't tested Faith.

EDIT2:
Culture Faith Food Gold Production Science
Belief_BuildingClassYieldChanges xml xml xml xml xml xml
Belief_CityYieldChanges test test test test xml test
Belief_HolyCityYieldChanges test test test test test impl
Belief_FeatureYieldChanges xml test test test test test
Belief_ImprovementYieldChanges xml xml xml test xml test
Belief_MaxYieldModifierPerFollower code code test test xml test
Belief_ResourceYieldChanges xml xml xml test test test
Belief_TerrainYieldChanges test xml test test test test
Belief_YieldChangeAnySpecialist test test test test xml test
Belief_YieldChangePerForeignCity test xml n/a test n/a impl
Belief_YieldChangePerXForeignFollowers xml test n/a test n/a impl
Belief_YieldChangeTradeRoute test test test test test xml
Belief_YieldChangeNaturalWonder test xml test test test test
Belief_YieldChangeWorldWonder test xml test test test test
Belief_YieldModifierNaturalWonder code code code code code code

Neither of these three 'impl' are working for me, even with 55a.
I used it with World Church, the culture keeps coming, Science does not.


EDIT3 (oh god):
Food and Production for YieldChangesIncomingTradeRoute do work, they are for internal trade routes only.
Couldn't make Science and Culture work, though.
 
Trait_YieldModifier for Faith worked. Is this a % bonus? I tried this:
Spoiler :
Code:
<GameData>
	<Traits>
		<Row>
			<Type>TRAIT_TESTRAIT</Type>
			<Description>TXT_KEY_TRAIT_TESTRAIT</Description>
			<ShortDescription>TXT_KEY_TRAIT_TESTRAIT_SHORT</ShortDescription>
		</Row>
	</Traits>

	<Trait_YieldModifiers>
		<Row>
			<TraitType>TRAIT_TESTRAIT</TraitType>
			<YieldType>YIELD_FAITH</YieldType>
			<Yield>90</Yield>
		</Row>
	</Trait_YieldModifiers>
</GameData>

Which resulted in this:
Spoiler :


EDIT:
Culture did worked as well. I believe the first time I tried with something small and did not see the difference, believing it was a flat bonus, not %.
 

Attachments

  • faith.png
    faith.png
    93.1 KB · Views: 321
Damn. I just finished testing the Traits. :(

Never a waste of time to double-check something (even inadvertently!)
 
why is (or seems like) production is capped while food isn't [for an internal trade route]?

It's not - at least not intentionally.
 
Trait_YieldModifier for Faith worked. Is this a % bonus?

Standard Firaxis naming - XyzChange is an addition, XyzModifier is a % change
 
Many thanks JFD and bane_ for doing that.

On a different topic ... Tourism

Does anyone know of any columns or secondary tables that affect tourism that don't have tourism in the name, eg something with Influence instead.

The problem is, if I search the code base for "influence" I get many thousands of hits from City State friendship and ideology conflict
 
[Improvement_YieldPerEra] is not only hard-coded to landmarks, it just needs an archaeological record for the plot - so only landmarks in the standard game.

BUT, I've already added the Lua API to add archaeological records to plots
Code:
pPlot:AddArchaeologicalRecord(iArtifactClass, iEra, iPlayer1, iPlayer2)
so mods should be able to use this as they want to produce some funky effects.

For example, change the base science of an Academy to 4 (say), set Improvement_YieldPerEra for it to +1 science, and when it's built set the era as appropriate - now your academies get more renowned (generate more science) the longer they've been founded - "We're not an upstart poly, we're a serious institution that was founded in 1545!"
 
I see that <Building_YieldChangesPerPop> has a blank in the 'faith' slot. Do you have plans to implement it?

There are 12 blanks in the Buildings table ... only so many hours in the day (see my "Good Night" post above) ;)
 
Neither of these three [belief] 'impl' are working for me, even with 55a.
I used it with World Church, the culture keeps coming, Science does not.

I may have done something silly, can you try values in the hundreds (eg, +200, +400, etc) - I'm taking bets they'll appear as +2, +4 etc
 
It would just be science for those three, as they are handled differently
 
Top Bottom