C2C SVN Changelog

I agree. I've never reached the Industrial Era, simply due to the monstrous turn times, so I'm wouldn't miss sea tunnels.
 
Not sure how much of a coding headache it would be, but could you have tunnels where the unit never exists inside the tunnel and it acts as a defacto teleporter. That is spend x movement points to press interface button to be taken from the land hex on side of the tunnel to the land hex on the other side of the tunnel? Make said tunnel plunderable from either land hex? etc...
 
Please do not remove the SeaTunnels... Since I was playing A New Dawn (prior my adventure with c2c) I loved the feature.
 
Please move this discussion elsewhere. It has gone far enough here.

I agree, it is very annoying to look at this thread, expecting SVN changes - just to read chatter. :(
 
8565
- correct audio quotes for CropRotation, Mercantilism and StockExchanging techs

8566
- removed bugged help entries for Monte Verde, Meadowcroft, Bluefish Caves, McCallum, Charlie Lake, Kilgii Way, Cactus Hill, Great Bonfire wonders

8567
- added clockpunk audio quote
 
Its correct question in right time. Actualy I started working on polish translation with (little help from Rwn) and now im in the middle merging translations from civ.org.pl and translating Great People screens to Polish. Still its a lot of work and its take a while when will be done. I presumu will be ready in July to beta testing.

Excuse me, but which page exactly I need to lure translators? I want to Acquire some for you but I don't want to make disorder...
 
Excuse me, but which page exactly I need to lure translators? I want to Acquire some for you but I don't want to make disorder...
Type "translate" in the search this forum option. You get 3 pages of results.

Some are general topics (ignore them) others more specific: Spanish, Italian, Translators etc.

Choose one of those or start your own thread. :)
 
8568
- fixed Constitution audio quote

8569
- removed MP_Constitution data from XML files
 
8570
-Moved Healing rates modmod to core.
-Gave Carib-Blowgunner poison tips instead of poison arrow promotion.
-Updated loading screen.

8571
-Forgot a small part of healing rates modmod in my last commit.
 
8572
- bringing back correct audio quotes for CropRotation and FelineDomestication by Arakhor
 
8573

  • Hopefully fixed all the issues with the Building Commerce and Yield calculations regarding Changes and Modifiers
  • Reverted rev5534 because it made queued buildings count as actual buildings
  • Another attempt to fix AI and governor's attempting to build the same building multiple times in one turn when processing multiple production


I hope that i fixed all the issues with the Building Commerce and Yield calculations without causing new issues so if anybody notices anything strange please report it. Those issues are very old and i can't really tell how much the actual effect of all those issues was because they happen too random. But i don't think updating to this version is a good idea if you want to play games started with an older version because they will be even more affected by those errors.

Example1
Code:
void CvCity::updateYieldModifierByBuilding(BuildingTypes eBuilding, YieldTypes eYield, int iChange)
{
	BuildingClassTypes eBuildingClass = (BuildingClassTypes)GC.getBuildingInfo(eBuilding).getBuildingClassType();
	for (std::vector<BuildingYieldModifier>::iterator it = m_aBuildingYieldModifier.begin(); it != m_aBuildingYieldModifier.end(); ++it)
	{
		if ((*it).eBuildingClass == eBuildingClass && (*it).eYield == eYield)
		{
			int iOldChange = (*it).iChange;
			if (iOldChange != iChange)
			{
				//	Clear cached yield modifier
				m_cachedBuildingYieldModifers[eYield] = -1;

				if (iChange == 0)
				{
					m_aBuildingYieldModifier.erase(it);
				}
				else
				{
					(*it).iChange = iChange;
				}

				if (NO_BUILDING != eBuilding)
				{
					if (getNumActiveBuilding(eBuilding) > 0)
					{
						//Team Project (5)
						if (!isReligiouslyDisabledBuilding(eBuilding))
						{
							[B][COLOR="Red"]changeBaseYieldRate[/COLOR][/B](eYield, (iChange - iOldChange) * getNumActiveBuilding(eBuilding));
						}
					}
				}
			}

			return;
		}
	}

This error in CvCity::updateYieldModifierByBuilding saved Yield modifier changes to the Yield rate instead of the Yield modifier.


Example2
Code:
void CvTeam::changeBuildingCommerceChange(BuildingTypes eIndex1, CommerceTypes eIndex2, int iChange)
{
	FAssertMsg(eIndex1 >= 0, "eIndex1 is expected to be non-negative (invalid Index)");
	FAssertMsg(eIndex1 < GC.getNumBuildingInfos(), "eIndex1 is expected to be within maximum bounds (invalid Index)");
	FAssertMsg(eIndex2 >= 0, "eIndex2 is expected to be non-negative (invalid Index)");
	FAssertMsg(eIndex2 < NUM_COMMERCE_TYPES, "eIndex2 is expected to be within maximum bounds (invalid Index)");

	if (iChange != 0)
	{
		int iOldValue = m_ppiBuildingCommerceChange[eIndex1][eIndex2];
		int iExistingValue;
		m_ppiBuildingCommerceChange[eIndex1][eIndex2] += iChange;	
		
		for (int iI = 0; iI < MAX_PLAYERS; iI++)
		{
			if (GET_PLAYER((PlayerTypes)iI).isAlive())
			{
				if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())
				{
					CvCity* pLoopCity;
					int iLoop;

					for (pLoopCity = GET_PLAYER((PlayerTypes)iI).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER((PlayerTypes)iI).nextCity(&iLoop))
					{
						iExistingValue = pLoopCity->getBuildingCommerceChange((BuildingClassTypes)GC.getBuildingInfo(eIndex1).getBuildingClassType(), eIndex2);
						// set the new
						pLoopCity->updateCommerceRateByBuilding(eIndex1, eIndex2, (iExistingValue - iOldValue + getBuildingCommerceChange(eIndex1, eIndex2)));
					}
				}
			}
		}
		updateCommerce();
	}
}

This was a common error changes where saved to cities without checking if the city has the building. It should be
Code:
void CvTeam::changeBuildingCommerceChange(BuildingTypes eIndex1, CommerceTypes eIndex2, int iChange)
{
	FAssertMsg(eIndex1 >= 0, "eIndex1 is expected to be non-negative (invalid Index)");
	FAssertMsg(eIndex1 < GC.getNumBuildingInfos(), "eIndex1 is expected to be within maximum bounds (invalid Index)");
	FAssertMsg(eIndex2 >= 0, "eIndex2 is expected to be non-negative (invalid Index)");
	FAssertMsg(eIndex2 < NUM_COMMERCE_TYPES, "eIndex2 is expected to be within maximum bounds (invalid Index)");

	if (iChange != 0)
	{
		int iOldValue = m_ppiBuildingCommerceChange[eIndex1][eIndex2];
		m_ppiBuildingCommerceChange[eIndex1][eIndex2] += iChange;	
		
		for (int iI = 0; iI < MAX_PLAYERS; iI++)
		{
			if (GET_PLAYER((PlayerTypes)iI).isAlive())
			{
				if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())
				{
					CvCity* pLoopCity;
					int iLoop;

					for (pLoopCity = GET_PLAYER((PlayerTypes)iI).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER((PlayerTypes)iI).nextCity(&iLoop))
					{
[B][COLOR="Red"]						if (pLoopCity->getNumActiveBuilding(eIndex1) > 0)
						{
							if (!pLoopCity->isReligiouslyDisabledBuilding(eIndex1))[/COLOR][/B]
							{
								int iExistingValue = pLoopCity->getBuildingCommerceChange((BuildingClassTypes)GC.getBuildingInfo(eIndex1).getBuildingClassType(), eIndex2);
								// set the new
								pLoopCity->updateCommerceRateByBuilding(eIndex1, eIndex2, (iExistingValue - iOldValue + getBuildingCommerceChange(eIndex1, eIndex2)));
							}
						}
					}
				}
			}
		}
		updateCommerce();
	}
}



Edit - another push (5534):
  • Fixed AI and governor's attempting to build the same building multiple times in one turn when processing multiple production

This change did what it was made to do but it had a bad side effect it made queued buildings count as actual buildings and that lead to a few strange issues.
 
Guys, I'm on the latest SVN version and AI seems crazy-spawning battering rams.
 

Attachments

  • spam.jpg
    spam.jpg
    353.2 KB · Views: 247
Top Bottom