Modscenario: Playable Byzantines, 610AD.

That's not what I meant. The message consists of two variables, let their name be DECLARANT and DECLARED_ON for convenience. It's definitely possible to find the code that handles or produces these messages, and to check if DECLARANT == DECLARED_ON. In this case, no message would be produced.

Since all diplomacy messages that are intended for the game happen between two different civilizations, no actual information is lost for the player.
But with the bug, all messages are x on x types of messages, so we would end up without messages.
This is what I presented for Rhye from CvTeam and he confirmed that that part should be debugged.
Code:
void CvTeam::declareWar(TeamTypes eTeam, bool bNewDiplo, WarPlanTypes eWarPlan)
{
	PROFILE_FUNC();

	CLLNode<TradeData>* pNode;
	CvDiploParameters* pDiplo;
	CvDeal* pLoopDeal;
	CvWString szBuffer;
	bool bCancelDeal;
	int iLoop;
	int iI, iJ;

	FAssertMsg(eTeam != NO_TEAM, "eTeam is not assigned a valid value");
	FAssertMsg(eTeam != getID(), "eTeam is not expected to be equal with getID()");

Code:
			if (!isBarbarian() && !(GET_TEAM(eTeam).isBarbarian()) &&
				  !isMinorCiv() && !(GET_TEAM(eTeam).isMinorCiv()))
			{
				for (iI = 0; iI < MAX_PLAYERS; iI++)
				{
					if (GET_PLAYER((PlayerTypes)iI).isAlive())
					{
						if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())
						{
							//szBuffer = gDLL->getText("TXT_KEY_MISC_YOU_DECLARED_WAR_ON", GET_TEAM(eTeam).getName().GetCString()); //Rhye
							szBuffer = gDLL->getText("TXT_KEY_MISC_YOU_DECLARED_WAR_ON", GET_PLAYER((PlayerTypes)eTeam).getCivilizationShortDescription()); //Rhye
							gDLL->getInterfaceIFace()->addMessage(((PlayerTypes)iI), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_DECLAREWAR", MESSAGE_TYPE_MAJOR_EVENT, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_WARNING_TEXT"));
						}
						else if (GET_PLAYER((PlayerTypes)iI).getTeam() == eTeam)
						{
							//szBuffer = gDLL->getText("TXT_KEY_MISC_DECLARED_WAR_ON_YOU", getName().GetCString()); //Rhye
							szBuffer = gDLL->getText("TXT_KEY_MISC_DECLARED_WAR_ON_YOU", GET_PLAYER((PlayerTypes)getID()).getCivilizationShortDescription()); //Rhye
							gDLL->getInterfaceIFace()->addMessage(((PlayerTypes)iI), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_DECLAREWAR", MESSAGE_TYPE_MAJOR_EVENT, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_WARNING_TEXT"));
						}
						else if (GET_TEAM(GET_PLAYER((PlayerTypes)iI).getTeam()).isHasMet(getID()) && GET_TEAM(GET_PLAYER((PlayerTypes)iI).getTeam()).isHasMet(eTeam))
						{
							//szBuffer = gDLL->getText("TXT_KEY_MISC_SOMEONE_DECLARED_WAR", getName().GetCString(), GET_TEAM(eTeam).getName().GetCString()); //Rhye
							szBuffer = gDLL->getText("TXT_KEY_MISC_SOMEONE_DECLARED_WAR", GET_PLAYER((PlayerTypes)getID()).getCivilizationShortDescription(), GET_PLAYER((PlayerTypes)eTeam).getCivilizationShortDescription()); //Rhye
							gDLL->getInterfaceIFace()->addMessage(((PlayerTypes)iI), false, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_THEIRDECLAREWAR", MESSAGE_TYPE_MAJOR_EVENT, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_WARNING_TEXT"));

Baldyr or Lena or whatever:) I agree with you that that's the key, how could it possibly influence anything to activate the greeks and remove Byzantines? If Rhye couldn't locate the bug easily and said it needed debugging, that's what we need IMO.
 
Wait, so do I understand you correctly that the usual "X declared war on Y" messages are changed to "Z declares war on Z" by the bug?

From a quick look at that part of the code, it seems like it is either a problem with the "isMinorCiv()" bool or the MAX_PLAYERS limit. Did you change Byzantium from a minor to a proper civ?
 
Ouch, reading a language you really don't understand is hard!

But I'm guessing that its the third conditional statement (the second "else if") you're struggling with here.

It seems odd that teams would have names that can be fetched with:
Code:
GET_TEAM(eTeam).getName().GetCString()
But then again, what do I know? :rolleyes:
 
Yes and yes.

And it happens for all the civs, regardless of Byzantine involvement.
 
From a quick look at that part of the code, it seems like it is either a problem with the "isMinorCiv()" bool or the MAX_PLAYERS limit. Did you change Byzantium from a minor to a proper civ?
Yeah, this is exactly the stuff I've been talking about. I believe that the first version of the Celtia mod-mod turned Celtia into a major playable Civ, causing this exact bug. While the later Irish mod-mod replaced the Khmer with Eire, so there was no conflict. If I remember correctly.

The problem with the RFC setup is of course that all the major players are defined before the minor ones. And the Celts/Byzantine are smack in the middle of the minor Civs. You probably need to move them up so that they come after the Americans, but such a change might have far reaching consequences (= a lot of work). But Rhye has been pro-active enough to include the constant iNumMajorPlayers in the Consts module. So 95% of the Python code should recognize the addition of another major player if you simply increase this value by one.
 
So what I'm saying is still that you need to move things around in the WBS. :p Then those changes need to match Consts.
 
Maybe I have some spare time tomorrow to gain comprehension of the semantics of declareWar.
 
But in the WBS, the Byzantines are team=4, so that can't be it.
Yes it can, if you don't have all your teams in order. Have you double checked?
 
That would be great Leoreth, let me know if you need some files.

Baldyr, in the wbs, the teams are in the same order as Rhye made them, except the greeks have Justinian as leader and another colour.
 
Baldyr, in the wbs, the teams are in the same order as Rhye made them, except the greeks have Justinian as leader and another colour.
AFAIK all the teams in RFC match the players exactly. So this means that the Player with the Byzantium attribute is player 4 then?
 
AFAIK all the teams in RFC match the players exactly. So this means that the Player with the Byzantium attribute is player 4 then?
Yes, exactly, the Greece slot. Which means it should work exactly as Greece(but with a different leaderhead and colour). The actual byzantines(=team 30) were manually removed in wb.
As you said earlier, it's difficult to understand how these changes leads to faulty messages. Which is why we need a debug of the dll.
 
Aha, but I don't think you can remove a team like that. Is the slot for team 30 empty?
 
No, it's still in there. I meant I just removed the actual original units and cities in world builder.
 
Have you already tried to add an assertion to the above diplomacy code in the DLL? I mean something along the lines of:
Code:
FAssertMsg(getID() != eTeam, "Shouldn't interact with ourselves")

This could rule out that because of some odd circumstance, the game lets a player call that function on itself.
 
We would still have no war or peace declaration messages in the game at all then.
 
I loved it, but I reccomend that you let them spawn in.. 306 AD for say? Let them spawn in the 3000 BC scenario, make them playable in the AD scenario, only if you spawned in the BC scenario.

Historical (BC) UHV's:
1. Control at least 2 Holy cities before 550 AD
2. Control and/or make vassals of Spain(South) Carthage, Italy, Greece, Anatolia and North Africa before 1100 AD.
3. Never lose a city to Barbarians (Arabs, mongols, turks) untill' 1400 AD

Just a suggestion?
 
I can't load this MOD because of XML errors.
Is only i have to do is to unpack the .rar at Beyond the Sword\Mods?
Is any other files required?
 
Back
Top Bottom