RevolutionDCM for BTS

@Avain and Afforess
Absolutely agree that would be the wisest idea :goodjob:. That's how this mod used to evolve, step by step every couple of weeks and then pass it on. It's the best approach because it keeps the developers "in the zone". But real life has got me by the balls at the moment and I am a slave to it therefore. It is amazing how the wheel turns around here. These days you good people are giving much more to RevDCM than RevDCM is giving to you!

All I can say is that I will not be getting into Civ5 for some time after the initial release (nothing against odd numbered civ releases but for some reason I have only gotten into the even numbered releases!) and so my heart is committed still to this mod and although I will try to bring it up to scratch well before Civ5's release, in any case even after it is released I will finalize this mod to it's fullest extent possible. By that time hopefully the Civ5 hype will have died down (of which I just do not have any interest), and civ5 will have emerged into a good and true new version of civ that is a solid foundation for Jdog to begin evolving it in any way he sees fit.
Cheers

Are you a secret politican from where the kangaroos hop? :D I love your dramatic flairs in your posts :D.
 
@Avain and Afforess
AThese days you good people are giving much more to RevDCM than RevDCM is giving to you!

Are you kidding? RevDCM was THE mod that kept me interested in Civ4, and eventually led me to start modding. If I hadn't, I would never have become interested in programming, or be going to college for a CS degree! ;)

You can safely say RevDCM completely altered the course of my life. :lol:
 
Are you kidding? RevDCM was THE mod that kept me interested in Civ4, and eventually led me to start modding. If I hadn't, I would never have become interested in programming, or be going to college for a CS degree! ;)

You can safely say RevDCM completely altered the course of my life. :lol:
You mean Civ has helped you do school instead of getting in the way?:p
 
What happened the the religion options area on the RevDCM screen? One of my favorite parts of this mod was the limited religion option to allow more religion spread. I always use to found like 3-4 of the religions because I'm technologically advance after the initial start allowing me to grab Christianity, Islam, Confucianism, and sometimes Taoism but the option prevented it when allowed a much more balanced world. Was it bugged up and you ditched it and is it planned to be re-added?
 
Limited Religions is a gameoption when you set up maps now. ;)

That would figure... I did a play now because I didn't have the time to set up a custom game like I normally do. Well next game I won't have to worldbuild the religions around :lol:
 
@Afforess
Amazing stuff this cause and effect. I got into computer science not because it was going to be a job opportunity (it hasn't been), but because it is a beautiful thing to do. Computers are amazing truely. The way the code get's so entangled and has so many unanticipated effects from what you would think would be simple logic is breathtaking.

So this is the way good computer science should be. Jdog5000 knows that! His spirit but not his talent has rubbed off on me big time considering that he not only has degrees in computer science, but physics as well.......

I do not want to pour cold water on Civ5 at all. I do not want to destroy anyone's joy. For me, it is impossible to imagine Civ without Jdog's influence. That he was not hired for Civ5 remains a mystery to me that will possibly remain that way for ever. Perhaps there is more to the story than meets the eye, maybe not. Whatever, until Jdog get's excited about Civ5 I do not consider Civ5 to have been born.

Personally once RevDCM wraps up and Jdog wants to get involved in Civ5, I will help him to do that in any way I can. Although my talent is orders and orders of magnitude lower than his, I will be glad to do his dishes or mow his lawns, if that is what it takes to get the great man down onto his desk and writing again.

Cheers
 
So this is the way good computer science should be. Jdog5000 knows that! His spirit but not his talent has rubbed off on me big time considering that he not only has degrees in computer science, but physics as well.......

I wouldn't say that his talent hasn't rubbed off. After all, you did write all the AI for DCM's combat mechanics, and a lot of the AI for the Super Spies espionage. That's no mean feat.

I do not want to pour cold water on Civ5 at all. I do not want to destroy anyone's joy. For me, it is impossible to imagine Civ without Jdog's influence. That he was not hired for Civ5 remains a mystery to me that will possibly remain that way for ever. Perhaps there is more to the story than meets the eye, maybe not. Whatever, until Jdog get's excited about Civ5 I do not consider Civ5 to have been born.

Lol. I just hope that the modding tools that Shafer gives us aren't all hype. Plus, I think Civ5's focus on combat mechanics means that I won't have to spend as much time modding combat (something I don't really enjoy... bit too complex, and it's not the point of Civ), and will be able to focus on cooler things, like Civics and the Economy. I just wish Shafer would let some of the bigger modders like Jdog get a behind the scenes look at Civ5 modding before the game comes out, like they did with BTS and FFH.
 
So I just finished my American play now game and was going to play a game as Germany. I go to custom game, search all the options, and look no limited religions :mad:
Where the heck is the option?! I swear this game hates me...
 
glider1, just to let you know that I'm currently merging the newest RevDCM revision with the newest BetterAI revision, going file-by-file and also checking the previous merge.
Once I finish I'll upload here the results for you.

Cheers

edit: ok, it turned out that I already did the bulk of the work, the rest was trivial. I'll attach here the changed files, but once I get home, I'll compile some notes I've taken and upload that, too.

edit2: Notes:
Spoiler :

Noted differences between latest RevDCM revision and BetterAI revision code

RevDCM revision 522
versus
BetterAI revision 586

--------------
-CvCityAI.cpp-
--------------
RevDCM, line 2168:
Code:
	if (AI_chooseBuilding(iEconomyFlags, 10, 25 + iWarTroubleThreshold, (bLandWar ? 50 : -1)))

BBAI, line 1893:
Code:
		if (AI_chooseBuilding(iEconomyFlags, 10, 25 + iWarTroubleThreshold, (bLandWar ? 40 : -1)))
-----------------------------------------------------------------------------------------------------

RevDCM, line 2369:
Code:
						if (AI_chooseUnit(UNITAI_ATTACK_SEA, bFinancialTrouble ? 20 : 50))
BBAI, line 2094:
Code:
						if (AI_chooseUnit(UNITAI_ATTACK_SEA, (iUnitCostPercentage < iMaxUnitSpending) ? 50 : 20))
-----------------------------------------------------------------------------------------------------

RevDCM, line 2379:
Code:
					if ((iUnitCostPercentage < iMaxUnitSpending + 5) || (2*iUnitsToTransport > 3*iTransportCapacity))
BBAI, line 2104:
Code:
					if ((iUnitCostPercentage < iMaxUnitSpending) || (iUnitsToTransport > 2*iTransportCapacity))

---------------------
-CvDLLWidgetData.cpp-
---------------------
RevDCM, line 4446 (missing code)

BBAI, line 4133 - 4178:
Code:
			// Show which civs this player is at war with
			CvWStringBuffer szWarWithString;
			CvWStringBuffer szWorstEnemyString;
			bool bFirst = true;
			bool bFirst2 = true;
			for (int iTeam = 0; iTeam < MAX_CIV_TEAMS; ++iTeam)
			{
				CvTeamAI& kTeam = GET_TEAM((TeamTypes) iTeam);
				if (kTeam.isAlive() && !kTeam.isMinorCiv() && iTeam != eActiveTeam && iTeam != GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getTeam())
				{
					if (kActiveTeam.isHasMet(kTeam.getID()))
					{
						if (::atWar((TeamTypes) iTeam, GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getTeam()))
						{
							setListHelp(szWarWithString, L"", kTeam.getName().GetCString(), L", ", bFirst);
							bFirst = false;
						}

						if (kTeam.AI_getWorstEnemy() == GET_PLAYER((PlayerTypes)widgetDataStruct.m_iData1).getTeam())
						{
							setListHelp(szWorstEnemyString, L"", kTeam.getName().GetCString(), L", ", bFirst2);
							bFirst2 = false;
						}
					}
				}
			}

			if( !szWorstEnemyString.isEmpty() )
			{
				CvWString szTempBuffer;

				szTempBuffer.assign(gDLL->getText(L"TXT_KEY_WORST_ENEMY_OF", szWorstEnemyString));

				szBuffer.append(NEWLINE);
				szBuffer.append(szTempBuffer);
			}
			if( !szWarWithString.isEmpty() )
			{
				CvWString szTempBuffer;

				szTempBuffer.assign(gDLL->getText(L"TXT_KEY_AT_WAR_WITH", szWarWithString));

				szBuffer.append(NEWLINE);
				szBuffer.append(szTempBuffer);
			}

-------------------
-CvGameTextMgr.cpp-
-------------------
RevDCM, line 1541 (missing code)

BBAI, line 1367 - 1374:
Code:
						// activity
						ActivityTypes eActivityType = (ActivityTypes) pHeadGroup->getActivityType();
						if (eActivityType != NO_ACTIVITY)
						{
							getActivityTypeString(szTempString, eActivityType);
							szString.append(CvWString::format(SETCOLR L"\n%s" ENDCOLR, TEXT_COLOR("COLOR_HIGHLIGHT_TEXT"), szTempString.GetCString()));
						}
-----------------------------------------------------------------------------------------------------
RevDCM, line 1754 (missing code)

BBAI, line 1588 - 1617:
Code:
							if( gDLL->shiftKey() )
							{
								CvCity* pLoopCity;
								int iLoop = 0;
								int iBestTargetValue = (pTargetCity != NULL ? GET_PLAYER(pHeadGroup->getOwner()).AI_targetCityValue(pTargetCity,false,true) : 0);
								int iTargetValue = 0;
								szString.append(CvWString::format(L"\n\nTarget City values:\n"));
								for( int iPlayer = 0; iPlayer < MAX_PLAYERS; iPlayer++ )
								{
									if( GET_TEAM(pHeadGroup->getTeam()).AI_getWarPlan(GET_PLAYER((PlayerTypes)iPlayer).getTeam()) != NO_WARPLAN )
									{
										if( pPlot->area()->getCitiesPerPlayer((PlayerTypes)iPlayer) > 0 )
										{
											for (pLoopCity = GET_PLAYER((PlayerTypes)iPlayer).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER((PlayerTypes)iPlayer).nextCity(&iLoop))
											{
												if( pLoopCity->area() == pPlot->area() )
												{
													iTargetValue = GET_PLAYER(pHeadGroup->getOwner()).AI_targetCityValue(pLoopCity,false,true);

													if( (GC.getMapINLINE().calculatePathDistance(pPlot, pLoopCity->plot()) < 20))
													{
														szString.append(CvWString::format(L"\n%s : %d + rand %d", pLoopCity->getName().c_str(), iTargetValue, (pLoopCity->getPopulation() / 2)));
													}
												}
											}
										}
									}
								}
							}

----------------
-CvPlayerAI.cpp-
----------------
RevDCM, line 2130 and several below:
Code:
			else if (AI_isDoVictoryStrategy(AI_VICTORY_CULTURE3) || getCommercePercent(COMMERCE_CULTURE) > 80 )

			else if (AI_isDoVictoryStrategy(AI_VICTORY_CULTURE2) || getCommercePercent(COMMERCE_CULTURE) > 60)
			
			else if (AI_isDoVictoryStrategy(AI_VICTORY_CULTURE1) || getCommercePercent(COMMERCE_CULTURE) > 40)
						
			if (AI_isDoVictoryStrategy(AI_VICTORY_CULTURE3) || getCommercePercent(COMMERCE_CULTURE) > 80 )
									
			else if (AI_isDoVictoryStrategy(AI_VICTORY_CULTURE2) || getCommercePercent(COMMERCE_CULTURE) > 60 )

BBAI, line 2156 and several below:
Code:
			else if (AI_isDoVictoryStrategy(AI_VICTORY_CULTURE3) || getCommercePercent(COMMERCE_CULTURE) >= 90 )
			
			...
-----------------------------------------------------------------------------------------------------

RevDCM, line 17628 (missing code)

BBAI, line 16537:
Code:
		if(GET_TEAM(getTeam()).isAVassal())
		{
			iValue += 20;
		}


CvTeamAI.cpp

This one should be ok because of operator precedence:
RevDCM, line 4656:
Code:
if ( (bAreaValid && iEnemyPowerPercent < 140) || (!bShareValid && iEnemyPowerPercent < 110) || (GET_TEAM((TeamTypes)iI).AI_getLowestVictoryCountdown() >= 0) )
BetterAI, line 4446:
Code:
if ( (bAreaValid && (iEnemyPowerPercent < 140)) || (!bShareValid && (iEnemyPowerPercent < 110)) || (GET_TEAM((TeamTypes)iI).AI_getLowestVictoryCountdown() >= 0) )

---------------------------------------------------------------------------------------
CvUnitAI.cpp

Please check, this might be too mod specific (it was for my taste, so I commented it out;)):
RevDCM, line 5062-5077:
Code:
// Legends of Revolution - Push GG to join Legendary units
...
BetterAI, line 4829 (missing code)

---------------------------------------------------------------------------------------
Please check, this might be too mod specific (it was for my taste, so I commented it out;)):
RevDCM, line 13150-13176:
Code:
// Legends of Revolution - Push GG to join Legendary Units
...
BetterAI, line 4829 (missing code)

---------------------------------------------------------------------------------------

CvXMLLoadUtilitySet.cpp

from BetterAI:
I assume these are not used or cannot do any error recovery...?
Code:
	if (!ReadGlobalDefines("xml\\BBAI_Game_Options_GlobalDefines.xml", cache))
	if (!ReadGlobalDefines("xml\\BBAI_AI_Variables_GlobalDefines.xml", cache))
	if (!ReadGlobalDefines("xml\\TechDiffusion_GlobalDefines.xml", cache))
	if (!ReadGlobalDefines("xml\\LeadFromBehind_GlobalDefines.xml", cache))
 

Attachments

...and of course the inevitable merge of the latter with BULL rev. 200 (only contains the changed files compared to previous post)
 

Attachments

I do not want to pour cold water on Civ5 at all. I do not want to destroy anyone's joy. For me, it is impossible to imagine Civ without Jdog's influence. That he was not hired for Civ5 remains a mystery to me that will possibly remain that way for ever. Perhaps there is more to the story than meets the eye, maybe not. Whatever, until Jdog get's excited about Civ5 I do not consider Civ5 to have been born.

You're making me blush! :blush:

Civ5 could be really awesome ... there are a bunch of changes I really like the sound of: city states could add a lot of dynamics to the early game, culture buying social policies, one tile at a time expansion, puppet states from captured cities and razed cities not disappearing immediately are small but thoughtful changes.

The one unit per tile change is really seriously huge ... Civ4 stack attacks are not really fun and require very little in terms of tactics and planning once assembled. If the AI has truly been taught to fight battles in the fields with formations of units, then the game will be a huge success. That requires a complete reorganization of the way attack units are organized and coded in the AI, as stacks were the only way multiple units coordinated in Civ4. Firaxis must know this, so I am hopeful ... if they put the AI programming effort in to get this to work reasonably at all, then that will have significant beneficial side effects for the rest of the AI as well. (No, I haven't had any involvement ...)

I don't expect it to be great right out of the gate (I get the sense it's a little rushed ... and remember how much of a mess Civ4 was when first released?), but after a big patch or two to balance all the new stuff it could really be a giant leap forward in my opinion.
 
I was going though the code, merging stuff in for a personal mod, and i found something odd in CvDLLWidgetData.cpp. I was wondering if it was intentional or accidental.

Code:
/************************************************************************************************/
/* Afforess	                  Start		 12/31/09                                                */
/*                                                                                              */
/*                                                                                              */
/************************************************************************************************/
/*			else if (GC.getActionInfo(widgetDataStruct.m_iData1).getMissionType() == MISSION_INQUISITION)
			{
				if (pMissionCity != NULL)
				{
					pSelectedUnitNode = gDLL->getInterfaceIFace()->headSelectionListNode();

					while (pSelectedUnitNode != NULL)
					{
						pSelectedUnit = ::getUnit(pSelectedUnitNode->m_data);

						if (pSelectedUnit->canPerformInquisition(pMissionPlot))
						{
							const wchar* pcKey = (pMissionCity->getNameKey());
							szBuffer.append(NEWLINE);
							szBuffer.append(gDLL->getText("TXT_KEY_ACTION_FINISH_FOOD", pcKey));
						}
						break;
						pSelectedUnitNode = gDLL->getInterfaceIFace()->nextSelectionListNode(pSelectedUnitNode);
					}
				}
			}
/************************************************************************************************/
/* Afforess	                     END                                                            */
/************************************************************************************************/
The line in question is the first else if statement, it looks like it was commented out by mistake, which commented out the rest of the code block.
Its at line 2594 if im reading winmerge correctly.
 
hey good people of revdcm,

i have a question,
in cvplayer.cpp,

in the section of "cantrain" part, where there are the new xml tags like statereligion, maxera start and so on,

why did this change took place :CvUnitInfo& kUnit = GC.getUnitInfo(eUnit);
every part that was GC.getUnitInfo(eUnit) was changed to kUnit ,

can someone explain why? what does it do?

thanks.
 
hey good people of revdcm,

i have a question,
in cvplayer.cpp,

in the section of "cantrain" part, where there are the new xml tags like statereligion, maxera start and so on,

why did this change took place :CvUnitInfo& kUnit = GC.getUnitInfo(eUnit);
every part that was GC.getUnitInfo(eUnit) was changed to kUnit ,

can someone explain why? what does it do?

thanks.

I think it is believed to be a performance improvement.
I did not check the cost of GC.getUnitInfo(eUnit), but if there is any, then having it stored in a variable and then referencing this variable only instead of GC.getUnitInfo(eUnit) is always an improvement.
 
Back
Top Bottom