AND2 and SVN Bug Reports - A New Dawn 2 ONLY

45°38'N-13°47'E;13523794 said:
Afforess, could this problem be related to rev839? I've seen settlers getting trained but not being used and I've noted that you've changed something in the code about fouding cities, I suppose to solve that problem about Pioneers and Colonists.

No. My change simply passes more information to pythons events. There is no change in the AI.

It's far more likely the recent C2C changes caused this.
 
No. My change simply passes more information to pythons events. There is no change in the AI.

It's far more likely the recent C2C changes caused this.
Yep, I'm checking those changes now, although I didn't think they were altering any AI behaviour
 
Ok, I've pinpointed the problem; it's in the code imported from rev 7694 and some others earlier revisions.


Code:
	//Safely escape the Occasional an inf loop here.

	if (m_iLastUnitUpdated != m_iID)
	{
		m_iLastUnitUpdated = m_iID;
		m_iSameUnitUpdateCount = 0;
	}
	else if (m_iSameUnitUpdateCount > 0 && 
		((m_contractualState == CONTRACTUAL_STATE_AWAITING_ANSWER || m_contractualState == CONTRACTUAL_STATE_AWAITING_WORK) || 
		(m_contractualState == CONTRACTUAL_STATE_NONE && getGroup()->getMissionType(0) == -1)))
	{
		m_iSameUnitUpdateCount = 0;
		getGroup()->pushMission(MISSION_SKIP);
		return false;
	}
	else
	{
		m_iSameUnitUpdateCount++;
		if (m_iSameUnitUpdateCount > 99)
		{
			FAssertMsg(m_iSameUnitUpdateCount <= 99, "A Unit has hit an infinite loop in its AI and triggered a loop escape");
			m_iSameUnitUpdateCount = 0;
			getGroup()->pushMission(MISSION_SKIP);
			return false;
		}
	}

I've copied this part of the code from C2C but I don't know if it's causing the same issue in C2C (early development is slowed down a lot, cities are being founded much more slowly); this is because I'm not sure how contractual state is working in AND and in C2C. I'm not sure if this can be fixed, I mean if it's possible to avoid loops this way without killing settler expansion.
 
Why not just remove that code and revert to the old code? I haven't seen any reports of infinite loops in RAND, it's possible the problem is C2C specific and we don't need their code.
 
We have this problem in C2C also, i tried to work around it because i wasn't able to locate a possible change causing it. Wrong changes at that area could explain some issues with the ContractBroker.
 
I've removed it and I'll upload the old code in the next minutes. I had some infinite loops some weeks ago while autoplaying, next time I'll upload some logs. Anyway from what I understand of the code that looked a clever way to avoid infinite loops. Well, whatever, sometimes a fix is worse than the problem.
 
Sadly i don't remember why thunderbrd added this code and why i added the 'else if' but there must have been a issue.

That code breaks the ContractBroker i just did a test without it and it looks good. If we get a infinite loop problem again there must be another way to fix it.
 
I'm surprised the code even solves the problem. Pushing a mission skip does not consume a units turn, in my experience, it may still continue to look for a mission. Only a finishMoves() call to a unit will consume the remaining moves and force it to end its turn.
 
I'm not sure if this technically counts as a bug, but I've noticed that the AI has a tendency to send out a lot of artillery unprotected starting around the late Renaissance.
 
I'm not sure if this technically counts as a bug, but I've noticed that the AI has a tendency to send out a lot of artillery unprotected starting around the late Renaissance.

I've noticed that too, and it's happening earlier than the Renaissance; I have seen quite a few unprotected Catapults and Trebuchets, which I can quickly capture and then use as suicide units or disbanded for gold (if I can get them to my territory).
 
In the Industrial era, or late earlier, when Galleons are unlocked.

The A.I. will send lots of Galleons only, and only provide backup support of Frigates 1 turn behind, if at all.

It will also Obstantaly attack 1 city, to total exclusion of all others.

So once this city is found, place navy and army about it, and let the slaughter begin.
 
Another potential bug, when you build the Independence hall, it not only unlocks all the Legistlative Civics, but it allows you to change civics, with out any anarchy, and not the 50% reduction, that it say's.

Is it only me, or do others recieve the same, no anarchy for civic changes.??

Save is attached this time.
 
Oh yeah, while I'm at it,

Could you please scale the rewards/Demerits to game speed.

Here's one example.

Spoiler :


Now this really needs updating.

Spoiler :


It's really small Potatoes, even if it could be scaled to game speed+Empire size/Number of cities.

Really the possibilites are endless, as is the requests.

Thanks
 
Oh yeah, while I'm at it,

Could you please scale the rewards/Demerits to game speed.

It's really small Potatoes, even if it could be scaled to game speed+Empire size/Number of cities.

Really the possibilites are endless, as is the requests.

Thanks

Those 'bonuses' were always borderline-useless, even in BTS. Which was really unfortunate - especially when the game text made it seem like they were a big deal.
 
On the topic of Random Events... The 'Slow news week / compulsonary Voting' event has long since had broken dialogue, and it seems even in rev838 it's displaying odd behavior.

Option 1 - No change
Option 2 - ??? ("Will change Government Civic to ____"
Option 3 - ??? (Completely blank)

View attachment 384800


I've never clicked on Options two or three since I have no idea what they'd be putting me into, if anything :lol:
 
45°38'N-13°47'E;13525954 said:
That event depends on your current civics. Since we removed Fascism, the event is broken

This event's always confused me really, and seeing two of the choices have blank responses makes it even more confusing :lol:

Civic-dependent huh? Might be why I've always seen the event throw some odd looking results whenever I've gotten it!
 
I'm not sure if this technically counts as a bug, but I've noticed that the AI has a tendency to send out a lot of artillery unprotected starting around the late Renaissance.

I've noticed that too, and it's happening earlier than the Renaissance; I have seen quite a few unprotected Catapults and Trebuchets, which I can quickly capture and then use as suicide units or disbanded for gold (if I can get them to my territory).

I've noticed that too.The AI uses siege weapons like Catapults or Trebuchets even as defending units.
 
I've a save and screen shot of the A.I.'s

Saladin has just RE-DECLARED war on Perciles, whom I'm also at war with (Ho hum)

Saladin has 3 THREE troops stationed in a Greek city, Najrun, that's >95% Babylonian.

By my reconning, it should shift to Saladin, or revolt to Babylon.

Sakadin even has 2 workers in the city BFC. Maybe taken from Perciles??

Another ex Arabian city, Mecca, has Greek troops stationed, and is being assulted by Saladin, all's correct there. Perciles is defending with all his troops stationed there, and Saladin, is attacking with 2 or 3 not an overwhelming stack of offence.

Pic

Spoiler :


save attached.

*Edit* - Perciles has retaken the city, replacing the Arabian Garrison with 3 Greek rifles.
 
Back
Top Bottom