Advanced Diplomacy 2

I'll try and debug this soon and see what error I get. On another note I got Active Senate from Total War to work.

It is a feature of certain civics and works like the Civ 3 version. Declarations of war are overidden unless there is a valid war pretext such as being attacked, spy captured, etc. Senate's also end wars earlier.
 
Hi stolenrays,

I diffed those files with the files from Advanced Diplomacy 2.3, and I didn't spot any differences besides the new variables, etc. you added for your upcoming version. Maybe I'm missing something.

I did notice that you are missing this line under Default Constructor of CvLeaderHeadInfos, but that didn't seem to fix the saved games crashing for me.

m_iPOWRefuseAttitudeThreshold(NO_ATTITUDE),

Have you tested your fix with Advanced Diplomacy 2.3 and had success loading saved games? If so, then maybe there's a deeper problem on my end.

Let me add that I'm very excited to see whats coming up in future releases. You've done a great job at keeping this mod alive and fleshing it out. :)
 
2.3 indeed has a save game bug. I think it might be in another file though (no infos). I'll test it out later. I work full time during the week.

There's no attitude adjustor for POW's. We all want our POW's back. :)
 
Hi stolenrays,

I diffed those files with the files from Advanced Diplomacy 2.3, and I didn't spot any differences besides the new variables, etc. you added for your upcoming version. Maybe I'm missing something.

I did notice that you are missing this line under Default Constructor of CvLeaderHeadInfos, but that didn't seem to fix the saved games crashing for me.

m_iPOWRefuseAttitudeThreshold(NO_ATTITUDE),

Have you tested your fix with Advanced Diplomacy 2.3 and had success loading saved games? If so, then maybe there's a deeper problem on my end.

Let me add that I'm very excited to see whats coming up in future releases. You've done a great job at keeping this mod alive and fleshing it out. :)

You are right about the POWattitude string being left out. I'm still debugging. I found the CTD occurs in CvPlayer when trying to read the saved game.
 
OK, the problem did not exist in v2.2. Luckily I still have that version to diff with. It may also be an xml problem perhaps, but I am not sure. Ripple, lets get to the bottom of this.
 

Attachments

  • Advanced Diplomacy v2.2.7z
    1.5 MB · Views: 133
I looked over all of the Read/Write's from all of the Cv files that Advanced Diplomacy modifies and didn't find any discrepancies. At this point I'm kinda stumped. That is almost always the cause of a save not loading; the Read/Write's not matching up. :(


I did notice that the Civ4LeaderHeadInfos.xml file has some extraneous characters in it. If you do a Find/Replace for > you will see them. I removed them and am still having the same problem, so I don't think they are causing it, but it is probably best to go ahead and remove them anycase.
 
OK, thanks Ripple. I checked 2.2 v 2.3 as well. Nothing special. However, I found that I moved some of the read/write statements around. It may be that you can't move some of them around., but must instead list them after all of the previous functions.

I will try adding back in everything one at a time to see what the problem really is.
 
OK, Ripple, I fixed it. It is those darn AI_counters. I took them out & it was ok. No CTD anywhere.

I don't understand what use they have, but I think that they trigger the attitude change for having the trade active with a team.

Code:
AI_getOpenBordersCounter

Maybe you can figure out how to put them back in there without a load game CTD.

I'm also wondering what this part of the code does as well. It is not in the new trades as well:

Code:
		GC.getMapINLINE().verifyUnitValidPlot();

		if ((getID() == GC.getGameINLINE().getActiveTeam()) || (eIndex == GC.getGameINLINE().getActiveTeam()))
		{
			gDLL->getInterfaceIFace()->setDirty(Score_DIRTY_BIT, true);
		}
 
Hey guys, are alliances reworked by this mod? i find the vanilla permanent alliance option a bit of a joke :D miss a proper alliance option, add it please if not done already :D
 
Hey stolenrays,

Just a small update. I started adding in the AIcounters and have determined that the (a?) problem lies somewhere in CvTeam. I added them back in CvTeamAI with no problems, but when I put them back in CvTeam I got the saved game crash.

I'll let you know what else I can come up with.
 
I've narrowed the saved game crash down to the following lines in CvTeam.h. When I comment these lines out, saved games load without issue, if I don't, I get the saved game crash.

Code:
virtual int AI_getLimitedBordersCounter(TeamTypes eIndex) const = 0;
	virtual void AI_setLimitedBordersCounter(TeamTypes eIndex, int iNewValue) = 0;
	virtual int AI_getEmbassyCounter(TeamTypes eIndex) const = 0;
	virtual void AI_setEmbassyCounter(TeamTypes eIndex, int iNewValue) = 0;
	virtual int AI_getFreeTradeAgreementCounter(TeamTypes eIndex) const = 0;
	virtual void AI_setFreeTradeAgreementCounter(TeamTypes eIndex, int iNewValue) = 0;
	virtual int AI_getNonAggressionCounter(TeamTypes eIndex) const = 0;
	virtual void AI_setNonAggressionCounter(TeamTypes eIndex, int iNewValue) = 0;
	virtual int AI_getPOWCounter(TeamTypes eIndex) const = 0;
	virtual void AI_setPOWCounter(TeamTypes eIndex, int iNewValue) = 0;
 
Top Bottom