DLL - Unified Yields

Spoiler :
Code:
		<Belief_YieldChangePerForeignCity>
			<Row>
				<BeliefType>BELIEF_WORLD_CHURCH</BeliefType>
				<YieldType>YIELD_SCIENCE</YieldType>
				<Yield>500</Yield>
			</Row>
			<Row>
				<BeliefType>BELIEF_WORLD_CHURCH</BeliefType>
				<YieldType>YIELD_GOLD</YieldType>
				<Yield>500</Yield>
			</Row>
		</Belief_YieldChangePerForeignCity>

		<Belief_HolyCityYieldChanges>
			<Row>
				<BeliefType>BELIEF_WORLD_CHURCH</BeliefType>
				<YieldType>YIELD_SCIENCE</YieldType>
				<Yield>500</Yield>
			</Row>
		</Belief_HolyCityYieldChanges>

		<Belief_YieldChangePerXForeignFollowers>
			<Row>
				<BeliefType>BELIEF_WORLD_CHURCH</BeliefType>
				<YieldType>YIELD_SCIENCE</YieldType>
				<ForeignFollowers>1</ForeignFollowers>
			</Row>
		</Belief_YieldChangePerXForeignFollowers>

I added the Gold (or the Culture before) to make sure it is working.
I may possibly be doing something wrong, but Science isn't being added to the HolyCityYieldChanges, the rest is working - but as you pointed out, the 'PerForeignCity' is adding 1% of the value I put there.

So, updating:

~nil~


EDIT:

After some more testing, I found out the following:
- PerXForeignFollowers isn't working (it seemed like so because I had 5 Foreig followers, but I did not included my Holy City bonus and counted it wrong).
-- If possible, why not add a 'Yield' column here? So it isn't just 1 Yield per X Followers, you could get, like, 3 per Follower.
-- It is possible, though, that if this code also has the 1% effect the other two have the modification is just imperceptible, and I can't get a high enough number.
- Both PerForeignCity and HolyCityYieldChanges work with the 1% input stuff.

Here is the proof:
Spoiler :

6 Foreign Cities + 5 from the HolyCityYieldChanges (later I converted more ForeignCities and my own cities to make sure, so this time I am sure :p)


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 test²
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 test²
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
¹ Apparently not working
² 1% of input value.

Sorry the misfiring.
 
All three of those are bundled - and are the same for science, culture and gold - so I'm guessing that the % modifier is just too small to see (you'd need to be in the high thousands to get any noticeable effect.)
 
Down to the last four :)

Culture and Faith for Building_ResourceYieldModifiers and Building_YieldChangesPerPop

However, I'm going cross-eyed from constructing test cases and can't get either of these two tables to work at all!

Could someone (probably JFD) give me the XML/SQL for the Gold and Food test case for these two tables

TIA

W
 
Do you need these?

Code:
INSERT INTO Building_ResourceYieldModifiers(BuildingType, ResourceType, YieldType, Yield)
VALUES	('BUILDING_SHRINE', 'RESOURCE_GOLD', 'YIELD_CULTURE', 100),
        ('BUILDING_SHRINE', 'RESOURCE_GOLD', 'YIELD_FAITH', 100);

INSERT INTO Building_YieldChangesPerPop(BuildingType, YieldType, Yield)
VALUES	   ('BUILDING_SHRINE', 'YIELD_CULTURE', 50),
           ('BUILDING_SHRINE', 'YIELD_FAITH', 50);

I presume you meant Faith, not Food (cross-eyes will do that to you ;) )
 
I meant Food - I'm using Gold(Science) and Food(Prod) as the test cases (as Gold is per player and Food is per city) so I reckoned if I could actually see those two doing something I'd know I wasn't going mad when Culture and Faith refused to do anything!

But that SQL I can work from :)

many thanks

W
 
Just a teaser. We must be in Wales (or Oz) ... Tourism from Sheep?!?!?!

 

Attachments

  • SheepTourism.jpg
    SheepTourism.jpg
    101.7 KB · Views: 279
I meant Food - I'm using Gold(Science) and Food(Prod) as the test cases (as Gold is per player and Food is per city) so I reckoned if I could actually see those two doing something I'd know I wasn't going mad when Culture and Faith refused to do anything!

But that SQL I can work from :)

many thanks

W

Sorry, should've paid closer attention (my excuse is that it's late :) )

Just a teaser. We must be in Wales (or NZ) ... Tourism from Sheep?!?!?!


Fixed that for you.

Good progress, though.
 
Good progress, though.

Yep. But the bad news is they'll be another 78 test cases needed when I've got the last 4 building holes plugged
 
Culture and Faith for Building_ResourceYieldModifiers

However, I'm going cross-eyed from constructing test cases and can't get either of these two tables to work at all!

DOH! Modifier only kicks in if the resource is improved ... need ... more ... sleep!
 
Tourism as a yield is ready for testing. You'll need v56a of my DLL mod - it has the extra Yields table entry, and an updated YieldIconManager to display the tourism yield on plots. Don't expect tooltips to reflect what is happening.

If the DLL crashes, I'll need the CvMiniDump.dmp file.

There's LOTS of info in the UnifiedYields.log file recording what's happening internally, may help track down "weirdness"

I've done the "easy" types :D, just left the five biggies - Beliefs, Buildings, Improvements, Policies and Traits

Edit: Posts #2 and #3 updated to include Tourism
 
I don't know if this can be helpful but I tested DLL v.56: it worked.

I added 1 tourism yield to snow tiles,
it was correctly added in city view left screen when the snow tile was worked.
Displayed also on the tile (but only in city view).

I'm going to do other tests.
 
I don't know if this can be helpful but I tested DLL v.56: it worked.

Yes and No

Yes - it's helpful to know that something works, but

No - as "it worked" is a very sweeping statement and there are 78 combinations to test (of which I've done ten or so, including tourism yield on snow)

The more testers the merrier, but please read the entire thread to get the full details of what testing is required - it is very precise and targeted.
 
Sorry Whoward, you're right.
I was just reading the whole thread and I noticed that all the "impl" holes has been tested.

However, here's what I've tested till now more specifically:

YIELD_TOURISM in the following tables:

Terrain_Yields
Terrain_HillsYieldChanges
Terrain_RiverYieldChanges
Feature_YieldChanges
Feature_RiverYieldChanges
Feature_HillsYieldChanges
Process_ProductionYields
Route_Yields

I verified the amount of tourism was displayed correctly in:
cityview left screen,
the top panel,
plot in (only in) cityview

No problems found

I really admire the work you're doing, sadly, like _bane, I have no knowledge of C++, but I'd be really glad to help if I can.

Since all the "impl holes" have been tested, do you need more testing on specific tables or yields? Is there something else that I can do?

EDITED: I just noticed the tourism Impl column in post #2. I'm going to test those tables.
 
YIELD_TOURISM in the following tables:

Terrain_Yields
Terrain_HillsYieldChanges
Terrain_RiverYieldChanges
Feature_YieldChanges
Feature_RiverYieldChanges
Feature_HillsYieldChanges
Process_ProductionYields
Route_Yields

Make sure you check post #2 and #3 - ALL of those tables were done (by me) BEFORE I posted V56a

But yes, there's loads more to be done ... as you've discovered, all the "impl" entries in the five "biggie" types in post #2
 
I am testing the Beliefs and each time I look at the CityPanel the Tourism increases.
Just a mouseover on my city is enough to raise the Tourism level, both in the city as in the Top Panel.
Is that so exotic that people want to see me doing it repeatedly? :lol:


I'm testing, specifically: Belief_CityYieldChanges (probable culprit), Belief_YieldChangePerXForeignFollowers, Belief_HolyCityYieldChanges (why not?), Belief_YieldChangePerForeignCity (this one works for sure).
 
I am testing the Beliefs and each time I look at the CityPanel the Tourism increases.
Just a mouseover on my city is enough to raise the Tourism level, both in the city as in the Top Panel.
Is that so exotic that people want to see me doing it repeatedly? :lol:


I'm testing, specifically: Belief_CityYieldChanges (probable culprit), Belief_YieldChangePerXForeignFollowers, Belief_HolyCityYieldChanges (why not?), Belief_YieldChangePerForeignCity (this one works for sure).

Tourism issue sounds like the function is compounding the existing value, rather than setting a static value via an independent function. I hate that problem. Could be wrong, though.
G
 
Top Bottom