Alpha testing of v3.4

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.

\Skodkim
 
I don't suppose anyone would be kind enough to upload a pre-built version of the latest alpha code? I'd like to try it out but I'm on an iMac without a Windows install at the moment until I finish putting together my new i7 4930k PC next week and the Civ SDK isn't available for Mac for me to build the mod myself.
 
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.

\Skodkim

Thal mentioned in a couple threads that there's something wrong with the vanilla BNW's culture/faith/tourism yields (not modular?) and he would have to rewrite the code in order to get it working as it was in GEM.
 
It looks like I'm having problems opening up the tech tree after loading a save file in game. It looks like you the load button may have to be disabled again.

Were the cost of policies raised to their default levels?

EDIT: August 31 Update.

Palace is pretty awesome; yields 2 national :c5happy:, 5 :c5culture:, 5 :c5gold:, 5 :c5science:, 2 :c5production: limited to three nationally

I can see a building called "National Happiness" in city view that probably should be invisible.
 
I used SQLiteSpy to examine the db files and saw that those values (BARBARIAN_MAX_XP_VALUE and MIN_CITY_RANGE) were at a default as well. It could be that the CEP_Options.sql file isn't executing at all since the only difference between the CEP and the CAT options files modify BARBARIAN_MAX_XP_VALUE, MIN_CITY_RANGE and BARBARIANBONUS parameters. And the BARBARIANBONUS value is also set using CEAI_FixTables.lua in CAT.

However, I can't see why the file wouldn't execute in the first place since the file is defined in the modinfo file and there doesn't appear to be any syntax errors...

Ah! Of course. I completely missed those files. That explains the WHAT, now to track down the WHY.
 
(Aug-31) Mongolia razed a city state to the ground in my game just now. I'm not sure if the city state was acquired from their UA or just from regular conquering but the city state is no longer with us.
 
Hmm. That poses an interesting, but off-topic, question.

I wonder if it is possible to implement refugees that flee to a neighbouring Civ and if the conquering Civ loses a city the refugees could be granted that city as reparations? Thus reinstating the CS back into the game.

But as I said, off-topic.:D
 
It looks like I'm having problems opening up the tech tree after loading a save file in game. It looks like you the load button may have to be disabled again.

Were the cost of policies raised to their default levels?

EDIT: August 31 Update.

Palace is pretty awesome; yields 2 national :c5happy:, 5 :c5culture:, 5 :c5gold:, 5 :c5science:, 2 :c5production: limited to three nationally

I can see a building called "National Happiness" in city view that probably should be invisible.

3 palaces? I thought we had a consensus that the 3 palace model from GEM was unnecessary, and that we were just going to give a +happiness bonus on one of the policies (maybe instead of the golden age?), to help with early expansion and the high per city unhappiness?
 
It seems like instant yield buildings have no effect (India's Vedi and Greece's Odeon). Log says:
Spoiler :
[1039341.981] Runtime Error: C:\Users\daniel\Documents\My Games\Sid Meier's Civilization 5\MODS\Communitas AI and Tools (v 3)\Tools/Cat_Events.lua:294: attempt to call global 'City_ChangeYieldStored' (a nil value)

I've tried to include YieldLibrary just to test, got the instant yield, but (in Gandhi's case) still was at +0 faith per turn.

Yeah I just started a game as India and the Vedi isn't giving the 0.5 faith per citizen, only the instant +25 bonus. Also, if you demolish the Vedi and build it again it keeps giving you the +25 bonus.

And is it just me or does it seem like the AI is founding Pantheons faster than usual? The game I just exited by turn 41 four Civ's had already founded a Pantheon. It was the same way the game before. Too many faith bonuses from goodie huts?
 
Thal mentioned in a couple threads that there's something wrong with the vanilla BNW's culture/faith/tourism yields (not modular?) and he would have to rewrite the code in order to get it working as it was in GEM.

That might be it then. I just missed the good old GEM policies so much I decided to do a makeover of a couple of trees myself.

Btw: A lot of modifiers given by policies show up ad TXT-strings in the city window when using the version from August 31.

\Skodkim
 
It looks like the way Firaxis has the Tradition finisher setup means the engine looks for the greatest <FoodKept> value in the Buildings database when determining which building to give for free.

Since the Indus Sanitation has it at 80 it chooses this. After lowering this value to 25 and trying again it chose the next greatest which is the Egyptian Basin Irrigation at 40.

We may have to rethink how the finisher works, or give it something else, if we want to keep these two UBs for India and Egypt.

Interestingly enough, I modified both UB to have FoodKept values of 39 and the Basin Irrigation appeared instead with the tradition finisher.


I also found a reference to CEP_Options.sql in the CAT_Start.sql file. The CEP equivalent file, CEP_Start.sql does not have the same reference. Could this be causing the problem? I would have thought that the sql syntax would be robust enough to handle an attempt to update a field that doesn't exist.

EDIT: Doesn't seem like it. I tried adding the field in and didn't get any results.
 
Maybe this has been mentioned already, but when you mouse over a building in Tech Tree view it shows the Tech info instead of the Building info (i.e. it shows "Writing" info instead of Library info).

I made an error, my bad...
 
Interestingly enough, I modified both UB to have FoodKept values of 39 and the Basin Irrigation appeared instead with the tradition finisher.


I also found a reference to CEP_Options.sql in the CAT_Start.sql file. The CEP equivalent file, CEP_Start.sql does not have the same reference. Could this be causing the problem? I would have thought that the sql syntax would be robust enough to handle an attempt to update a field that doesn't exist.

EDIT: Doesn't seem like it. I tried adding the field in and didn't get any results.

Yeah I reckon it would default to the first UB listed with the highest <FoodKept> value. In this case the Egyptian over the Indian. Either way it is a pain to have to now work around it.

The CAT_Start.sql sets up the default values for LoadeFile references, in this case 0. The files themselves, like CEP_Options.sql just have an UPDATE line to change the LoadeFile value to 1, that way you can quickly check which ones of the explicitly listed files are being loaded.

The problem there is if the files don't have exactly the same reference then the value won't show as UPDATED, even if they are.

It would be possible to code each file to create it's own reference as being loaded, but that defeats the purpose of seeing which ones don't load.

Still can't see why CEP_Options.sql isn't loading. Really starting to bug me.:mad:
Everything appears correct. Maybe a fresh set of eyes might see it. Anyone?
 
I took another look at the sql code and can't find anything wrong. :/

Below is the C++ code for how the game chooses the tradition finisher buildings. It looks like the game also weighs the production cost into it's calculations:

PHP:
int iWeight = iFood * 10000 / iCost;

Spoiler :
PHP:
//	--------------------------------------------------------------------------------
/// Find the non-wonder building that provides the highest culture at the least cost
BuildingTypes CvCity::ChooseFreeFoodBuilding() const
{
	BuildingTypes eRtnValue = NO_BUILDING;
	int iNumBuildingInfos = GC.getNumBuildingInfos();
	CvWeightedVector<int, SAFE_ESTIMATE_NUM_BUILDINGS, true> buildingChoices;

	for(int iI = 0; iI < iNumBuildingInfos; iI++)
	{
		const BuildingTypes eBuilding = static_cast<BuildingTypes>(iI);
		CvBuildingEntry* pkBuildingInfo = GC.getBuildingInfo(eBuilding);
		if(pkBuildingInfo)
		{
			const CvBuildingClassInfo& kBuildingClassInfo = pkBuildingInfo->GetBuildingClassInfo();
			if(!isWorldWonderClass(kBuildingClassInfo) && !isNationalWonderClass(kBuildingClassInfo))
			{
				int iFood = pkBuildingInfo->GetFoodKept();
				int iCost = pkBuildingInfo->GetProductionCost();
				if(iFood > 0 && iCost > 0)
				{
					int iWeight = iFood * 10000 / iCost;

					if(iWeight > 0)
					{
						buildingChoices.push_back(iI, iWeight);
					}
				}
			}
		}
	}

	if(buildingChoices.size() > 0)
	{
		buildingChoices.SortItems();
		eRtnValue = (BuildingTypes)buildingChoices.GetElement(0);
	}

	return eRtnValue;
}
 
Yeah I saw that. Unfortunately it still doesn't help us with what we have.

The <Cost> of a vanilla aqueduct is 180 and the <Cost> of both the UBs is 100.
After bumping both of them up to 200 it still gives the Indus Sanitation as the food building upon Tradition Finisher.

Unless the GetProductionCost() is not referring to the value set in <Cost>?

That section in the code that checks for National Wonders needs to have a check for Unique buildings as well.

I reckon it might be possible to write a Lua function to modify that to check for them.
 
Maybe this has been mentioned already, but when you mouse over a building in Tech Tree view it shows the Tech info instead of the Building info (i.e. it shows "Writing" info instead of Library info).

I've seen this too but isn't it just with the Writing tech?

I've seen an error message in the lua-log concerning the tech that allows embassies - maybe that's what messes it up?

\Skodkim
 
I've seen this too but isn't it just with the Writing tech?

No, this occurs with all the buildings in the tech tree since 3.4 alpha (units show fine). Maybe they're aware of it, I just wanted to mention it just in case.

Edit: What the heck!? I had this error yesterday, and today it isn't there! I don't get it..... I didn't update the mod or anything. Am I going crazy?
 
Back
Top Bottom