RevolutionDCM for BTS

Hey, I've been getting some weird bugs with 2.72. At first, whenever I talked to an AI the portrait would come up, but there would be no diplomacy text. I reinstalled, which fixed that problem, but now I can't access the civics screen. Reinstalling didn't fix anything. Anyone know what's going on?

-RdF

@Thomas SG

I can reproduce no bugs with diplomacy in neither RevDCM 2.72 nor RevDCM 2.8 from the SVN. Please ensure you have reinstalled RevDCM 2.72 using the installer so that the old version files have been removed (install twice in a row so that the the uninstaller is tripped); or if you are using the SVN 2.8 version, make sure you have deleted all old files when exporting to your mods folder.

RevDCM works fine if there is no older version. Right. But you can get into trouble with more than one copy of RevDCM (same or older) or a RevDCM based mod like CCV 4.09 (build upon 2.721).

You want to see it? No problem. Just download CCV 4.09. Start a game and contact a leader. After that just replace my DiplomacyUtil.py with the DiplomacyUtil.py from RevDCM 2.721. Start a new game and contact a leader and you will see no text.
 
The issue is it's not really a bug then. RevolutionDCM will go through certain changes to the file structure as new versions are released, and it has always been this way. If files are removed, as occured here due to a change in the file structure of the BUG mod, modders who use a RevolutionDCM core will need to account for that in the update. We will of course help with any issues when reported, and as stated this is a commonly reported issue.

On the other hand, RevolutionDCM is a modding core; it is specifically designed to be used a standardized base modding core for a wide range of mods. As such if you notice a bug that occurs due to some XML tag or other standardly "allowable" modding feature, let us know, and we'll try to fix it. You brought up an issue with the BUG mod and negative XP modifiers in TraitInfos in the BUG forums. While this is not a standard setup, it is perfectly reasonable for a modder that uses the RevDCM core to expect this to work, so we'd definatly fix that. If you notice something like that, please let us know, and if you've debugged the cause and solution yourself, please post the code for the fix; we will definitely incorporate any fixes or improvements like this into RevDCM for the use of other modders.
 
Okay.

So I offer a code improvement (although it looks silly) for change player:

PHP:

This code seems silly but solves the problems change player caused in the past.
 
Thanks Thomas. I'm not familiar with the CvPlayer::changeLeader function, and don't recognize most of the calls in that code. I generally don't like to merge in code I do not understand, so I'll let glider or jdog handle getting your fix into RevDCM's source. Thanks again for posting it, and making us aware of the issue.
 
Dear phungus420,

forget about the change player code. Although it solves problems my team and Jostitosti found a new problem caused by the new code. But while trying to fix my problems with it I saw that you have added the new code seen below. But this code is not added to addTraitBonuses( ). I think it is missing there!

PHP:
/************************************************************************************************/
/* REVDCM                                 02/16/10                                phungus420    */
/*                                                                                              */
/* RevTrait Effects                                                                             */
/************************************************************************************************/
			setNonStateReligionCommerce(GC.getTraitInfo((TraitTypes)iI).isNonStateReligionCommerce());

			if ( GC.getTraitInfo((TraitTypes)iI).isUpgradeAnywhere() == true )
			{
				setUpgradeAnywhere(GC.getTraitInfo((TraitTypes)iI).isUpgradeAnywhere());
			}
/************************************************************************************************/
/* REVDCM                                  END                                                  */
/************************************************************************************************/
 
As you probably know Dune Wars is based on RevDCM. I have noticed that the AI in Dune Wars never seems to use Ranged Bombardment, in particular at a range of 2 tiles. I tried RevDCM 2.721 and I noticed that when you enable DCM_RANGE_BOMBARD in GlobalDefinesAlt.xml the AI behaviour is pretty much the same.

To test, this I used the Artillery unit in RevDCM which has iDCMBombRange set to 2. If I give the enemy a small stack of Artillery and position some of my own units 2 tiles away and then declare war I would expect the AI to Ranged Bombard me. What generally happens is the stack of Artillery moves to a defensive position such as hills (this is fine), but then sits there doing nothing even though my units are in Ranged Bombard range.

I can see that RevDCM has added more sophisticated AI code for Ranged Bombardment over what was in 'vanilla' Dale's Combat Mod, but it doesn't seem to be working as expected. In the setup described above I would use Ranged Bombardment to damage the enemy's units, but the AI does nothing which is a waste.

I would really like to see the AI use Ranged Bombardment more effectively. I am happy finding my way around the SDK and making changes there, but so far I have not been able to tweak the RevDCM code in CvUnitAI.cpp with the desired effect.

Any ideas on what I could be missing or how I can debug the AI's failure to use Ranged Bombardment even in no-brainer situations?
 
As you probably know Dune Wars is based on RevDCM. I have noticed that the AI in Dune Wars never seems to use Ranged Bombardment, in particular at a range of 2 tiles. I tried RevDCM 2.721 and I noticed that when you enable DCM_RANGE_BOMBARD in GlobalDefinesAlt.xml the AI behaviour is pretty much the same.

To test, this I used the Artillery unit in RevDCM which has iDCMBombRange set to 2. If I give the enemy a small stack of Artillery and position some of my own units 2 tiles away and then declare war I would expect the AI to Ranged Bombard me. What generally happens is the stack of Artillery moves to a defensive position such as hills (this is fine), but then sits there doing nothing even though my units are in Ranged Bombard range.

Confirmed.

Also, minor issue with v2.721: it seems that Ranged Bombardment is off by default even though the option is ticked. Un-ticking and re-ticking it remedies the situation.
 
I saw this MP-fix.

PHP:
void CvPlayer::receiveGoody(CvPlot* pPlot, GoodyTypes eGoody, CvUnit* pUnit)
{
	CvPlot* pLoopPlot;
	CvPlot* pBestPlot = NULL;
	CvWString szBuffer;
	CvWString szTempBuffer;
	TechTypes eBestTech;
	UnitTypes eUnit;
	int iGold;
	int iOffset;
	int iRange;
	int iBarbCount;
	int iValue;
	int iBestValue;
	int iPass;
	int iDX, iDY;
	int iI;

	FAssertMsg(canReceiveGoody(pPlot, eGoody, pUnit), "Instance is expected to be able to recieve goody");

	szBuffer = GC.getGoodyInfo(eGoody).getDescription();

	iGold = GC.getGoodyInfo(eGoody).getGold() + GC.getGameINLINE().getSorenRandNum(GC.getGoodyInfo(eGoody).getGoldRand1(), "Goody Gold 1") + GC.getGameINLINE().getSorenRandNum(GC.getGoodyInfo(eGoody).getGoldRand2(), "Goody Gold 2");
	iGold  = (iGold * GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGrowthPercent()) / 100;

	if (iGold != 0)
	{
		changeGold(iGold);

		szBuffer += gDLL->getText("TXT_KEY_MISC_RECEIVED_GOLD", iGold);
	}

//********************************
//   LEMMY 101 MP FIX - start
//********************************

	if (!szBuffer.empty() && getID() == GC.getGame().getActivePlayer())
	{

// Not really a fix. Pitboss was crashing here though...
		//gDLL->getInterfaceIFace()->addMessage(getID(), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, GC.getGoodyInfo(eGoody).getSound(), MESSAGE_TYPE_MINOR_EVENT, ARTFILEMGR.getImprovementArtInfo("ART_DEF_IMPROVEMENT_GOODY_HUT")->getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_WHITE"), pPlot->getX_INLINE(), pPlot->getY_INLINE());

//********************************
//   LEMMY 101 MP FIX - end
//********************************
	}

...

To disable the message is really bad. :( So may I ask you for a test I can't do on my own, please? I think this change is not necessary. I think that the "missing" sound of GOODY_TECH is the problem! Please enable the code and give GOODY_TECH a sound. What is happening?
 
@ThomasSG
You are correct that this code is not necessary. It's probably left over code from on the fly testing that Lemmy was doing. MP is complicated when you try to debug believe me. I'll remove it and let's be thankful that at least Lemmy commented it and we can track it down easily.

@Avain and Deliverator
Looks like it's time to recheck the RB AI. It's been a long time since it was checked. There are quite a few possibilities why your test is not working. It really would need a good look into. I'll see if I can give it a go. Definitely it's on the to do list of the project.

EDIT: I'll check the RB AI once the new Better BTS AI 1.00 merge happens.

Cheers
 
Dear phungus420,

forget about the change player code. Although it solves problems my team and Jostitosti found a new problem caused by the new code. But while trying to fix my problems with it I saw that you have added the new code seen below. But this code is not added to addTraitBonuses( ). I think it is missing there!

PHP:
/************************************************************************************************/
/* REVDCM                                 02/16/10                                phungus420    */
/*                                                                                              */
/* RevTrait Effects                                                                             */
/************************************************************************************************/
			setNonStateReligionCommerce(GC.getTraitInfo((TraitTypes)iI).isNonStateReligionCommerce());

			if ( GC.getTraitInfo((TraitTypes)iI).isUpgradeAnywhere() == true )
			{
				setUpgradeAnywhere(GC.getTraitInfo((TraitTypes)iI).isUpgradeAnywhere());
			}
/************************************************************************************************/
/* REVDCM                                  END                                                  */
/************************************************************************************************/

UpgradeAnywhere and NonStateReligiousCommerce both work fine, both with the CivicInfos and TraitInfos tag. I do not understand what the problem is; I've extensively tested this code and it's functionality.
 
UpgradeAnywhere and NonStateReligiousCommerce both work fine, both with the CivicInfos and TraitInfos tag. I do not understand what the problem is; I've extensively tested this code and it's functionality.

The code is okay! But what is happening when you change your leaderhead by the change player function?
PHP:
void CvPlayer::changeLeader( LeaderHeadTypes eNewLeader )

You must add/replace all effects of the old leader with the effects of the new one. And so you must add this code also to addTraitBonuses( ) I say. And if you want to make it absolutly perfect (although it seems unnecessary to me) even remove them in clearTraitBonuses().
 
OK, thanks, I did not realize this; I figured when a leader changed the game loaded a whole new leader.
 
Does anyone other than me think it is a good idea to give your initial starting settler some sentry and movement bonuses, so that you could make a fairly good decision strategically as to where to plant your first city? I seem to recall Rhye's and Fall of Civilization for civ 3 having something like that, which I thought was great (maybe I'm thinking of a different mod, dunno).

I place the question here because this is the mod I usually play, and wondered if adding such a feature might improve the mod.
 
glider1, update on my error report of not initializing DCM properly:
it actually effects other options (such as advanced airbombard), and I suspect it is because on game start GlobalDefinesAlt.xml values are used to initialize.
 
@Avain
Thanks I have noted that effect and will test it. If there are problems with having to reselect options then the bug must have crept in at some point I dunno when. Essentially GlobalAltDefines is nothing but a slave for most options passing them to the DLL, and the BUG XML is the initializing master where upon what the user selects from the options tab from then on is what the user should be getting fullstop pronto. I'll check it again thanks.

@Doctor Ep
Appreciate the idea there Doc and am glad that you are playing RevDCM true. The issue is that RevDCM is committed to stay as true to vanilla civ4 as possible. It's up to the RevDCM mods to change the settler behaviour. Which of those mods change that, I do not know. Anyone>?

Cheers
 
What happens with BULL is that the gamecore inially uses the GlobalDefinesAlt values until BULL is considered "ready". BUG handles BULL, after BUG is done initializing itself, it then calls BULL, makes sure it is working right, and then set's it to ready, at which point the gamecore will use the values BULL pulls from the ini files in the UserSettings folder. Perhaps on the first load, when there are no ini files, BULL doesn't apply the config XML values, because these are set when BUG is initializing. What probably needs to happen is that the config xml and ini values should be reinitialized when BULL is started up; my assumption is it would be best to do this when the setIsBull() function returns true. Not sure how to code that, would probably be best to ask Emperor Fool.
 
hey guys,
just wanted to confirm that something is wrong with the ranged bombardment ,

although its checked - it wont work - i have checked and unchecked the options, and it worked.

but - uncheck the box - wont disable ranged bomb for units, even on game restart.

kel.
 
There's a major bug in v2.721. During revolutions if you choose "Defect and lead the rebels.." the game breaks on next turn with lots of python exceptions. Main cause seems to be Civ4lerts: "file Civ4lerts, line 859, in checkIfIsAnyOrHasMetAllTeams" -function. After you skip those exceptions and start leading the new civ and try to attack anyone, the game just freezes.
 
Hi Zapp
Yeah that bug is documented already Zapp and needs to be fixed in 2.8. There is an ugly interaction between BUG and changing teams in the python it seems. What I did not realise is that the game freezes. This did not happen in vanilla RevDCM that I could tell. Just a heap of ugly python/BUG warnings.

@Phungus
Thanks for the explanation of how BULL/BUG interact with GlobalAltDefines. My head is spinning. Things have changed since 2.6 and I do not yet fully understand it.

@Kel
Hi Kel, looks like the RevDCM options system is buggered somehow. Phungus seems to understand it better than me at the moment.

Cheers
 
Back
Top Bottom