Bug Reports and Discussion

I guess it is already being fixed but I just started a game with Advanced Tactics and no other options selected. I started the game as "Random Good Leader" and then immediately got the "You have been defeated" message after clicking continue. I've also noticed in some games there is one less AI player than there should be, and if I go into the worldbuilder and look at the players there is "Random [insert alignment] Leader". So it seems if one of the random alignment leaders gets chosen then they are usually immediately defeated at game start. I took some screenshots but they probably aren't needed since this is a known issue.
 
Red Key: The issue should be *very* rare. Can you reproduce it by choosing to play as "Random Good Leader"? Because for me it happens only after 20 or 30 tries. I started about 50 new games in normal Random/Random to test my current fix, but maybe I'm doing something wrong and it is simpler to reproduce it?
 
Red Key: The issue should be *very* rare. Can you reproduce it by choosing to play as "Random Good Leader"? Because for me it happens only after 20 or 30 tries. I started about 50 new games in normal Random/Random to test my current fix, but maybe I'm doing something wrong and it is simpler to reproduce it?

I wasn't trying it with your fix. It just happened for me in v2.42 (unless your fix was in 2.42). Sorry if that was unclear. Also it was just "normal Random/Random" as you were doing.
 
I found an AI bug related to super forts, causing a freeze:

In CvUnitAI::AI_fortTerritory(bool bCanal, bool bAirbase), the first for loop is infinite. It's most probably caused by the second for loop using the same index variable "iI", and setting it back to 0 in every iteration.

I'd always use "for( int i = 0; ... )" rather than "for( i = 0; ... )" and defining the loop variable at the beginning of the function, like firaxis does. Then the compiler whines about such a mistake.

EDIT: Just tested it, works fine with new loop var.
 
Thanks for catching that lfgr! That is what I get for copying and pasting loops from other parts of the code, and not properly testing. I'll upload a fix later today.
 
It was already mentioned that clicking the research bar while researching causes a python error (but I didn't found an issue in the tracker). I fixed that:

In CvMainInterface, change
Code:
screen.setText( "ResearchText", "Background", szText, CvUtil.FONT_CENTER_JUSTIFY, xCoord, yCoord, -0.4, FontTypes.GAME_FONT, WidgetTypes.WIDGET_RESEARCH, [B]-1[/B], -1 )
to
Code:
screen.setText( "ResearchText", "Background", szText, CvUtil.FONT_CENTER_JUSTIFY, xCoord, yCoord, -0.4, FontTypes.GAME_FONT, WidgetTypes.WIDGET_RESEARCH, [b]gc.getPlayer(ePlayer).getCurrentResearch()[/B], -1 )

Explanation (I learned something new, why shouldn't someone else :)): The first "-1" is the CvWidgetDataStruct.m_iData1 property, which is used in CvDLLWidgetData::doPediaTechJump(), called by CvDLLWidgetData::executeAltAction() (right click).

OK. I finally figured out that the python error was generated when RIGHT-clicking on the tech bar. However, making this change seems to disable the ability to left-click on the tech bar. I fiddled with it a bit and couldnt get both functionalities to work at the same time. Any ideas?
 
I think I got the problem:
The first -1 is there to actually reset the current research, which causes the main interface to show the buttons in the research bar.
So we definitely need to hack the DLL.
We can either change the code as above and catch the other case in CvDLLWidgetData::executeAction() to reset m_iData1 to -1, or leave the old code and catch the right click in CvDLLWidgetData::executeAltAction().
To keep side-effects minimal, I suggest the latter:

Old:
Code:
bool CvDLLWidgetData::executeAltAction( CvWidgetDataStruct &widgetDataStruct )
{
	CvWidgetDataStruct widgetData = widgetDataStruct;

	bool bHandled = true;
	switch (widgetDataStruct.m_eWidgetType)
	{
	case WIDGET_HELP_TECH_ENTRY:
	case WIDGET_HELP_TECH_PREPREQ:
	case WIDGET_RESEARCH:
	case WIDGET_TECH_TREE:
		doPediaTechJump(widgetDataStruct);
		break;

New:
Code:
bool CvDLLWidgetData::executeAltAction( CvWidgetDataStruct &widgetDataStruct )
{
	CvWidgetDataStruct widgetData = widgetDataStruct;

	bool bHandled = true;
	switch (widgetDataStruct.m_eWidgetType)
	{
	case WIDGET_HELP_TECH_ENTRY:
	case WIDGET_HELP_TECH_PREPREQ:
	case WIDGET_TECH_TREE:
		doPediaTechJump(widgetDataStruct);
		break;
	case WIDGET_RESEARCH:
		// To catch right-clicking on the current research text, which has widgetDataStruct.m_iData1 = -1, because it is supposed to reset research when left-clicked
		if( widgetDataStruct.m_iData1 == -1 )
			widgetDataStruct.m_iData1 = GET_PLAYER( GC.getGameINLINE().getActivePlayer() ).getCurrentResearch();
		doPediaTechJump(widgetDataStruct);
		break;
 
Given that the population of Infernal cities is not alive, IMO razing an Infernal city should not increase the AC. Since Infernal cities can reach ridiculous levels of population (the biggest one I saw was at 111) razing them immediately moves the AC to 100, which causes an instant armageddon.

I think that the AC increase for razing should not be applied when you raze cities from a player with "bIgnoreFood" set to 1.
 
Ok, this has to be a bug. I played this game with 3 AI civs. One was the "random neutral leader" guy, he got sacked early by the barbarians. But that is not the bug I am reporting. I decided that I had "won" and wanted to look at the world-builder to see why one of the AI wasn't doing well:

The Amurites had their own continent for most of the game, but because their land bridge was blocked by a mountain - they didn't bother to settle any other lands.

 

Attachments

  • AI OCC game.CivBeyondSwordSave
    170.7 KB · Views: 92
  • occ challenge.JPG
    occ challenge.JPG
    227 KB · Views: 210
I've run into this three times. After rage-quitting the first couple of times I did manage to save a file.

So I've started a Luchuirp game. You know how it is in the early game. You build farms, you grow quickly, each turn barely takes more than a couple of seconds, and one of your cities gets stuck at 5 population.

Well, not always that last one.

For many turns, my second city has been stuck at 5 population. It is producing 13 food while only consuming 10, and it has a full food bar. When I examine the city, the game assures me that growth is imminent, but my city never expands.

It is worth noting, however, that my capital city was not affected by this, and currently stands at six population. While I'm a little peeved right now, I can honestly say that I loved my first game as the Khazad. You guys are awesome!

Since people overlooked the "avoid growth button two times now, a tried to activate the "Stagnant (growth control)" message in the growth bar.
I managed it, and also found out that the city interface is not updated when switching avoid growth / avoid unhappiness on and off (so the growth bar text does't update either).

Tholal: I'm still not able to attach files to issues I'm not assigned to. I try to avoid attaching files at CFC to often, because I only have limited size available here. So I figured out a maybe better way to contribute: I will now upload the contributions in a repository, like Therken does with his extramodmod I do with my events enhanced modcomp. I will link the corresponding commits here.
Please tell me if you got any problems with this.

So here is the fix for the above (also accidentally containing a translation fix I've done some time ago, but I don't think that hurts :)).

EDIT: OK, wait a minute, still something not right there
EDIT2: Should be alright now.
 
Tholal: I'm still not able to attach files to issues I'm not assigned to. I try to avoid attaching files at CFC to often, because I only have limited size available here. So I figured out a maybe better way to contribute: I will now upload the contributions in a repository, like Therken does with his extramodmod I do with my events enhanced modcomp. I will link the corresponding commits here.
Please tell me if you got any problems with this.

If that's an option I would prefer to send my contributions in the same way. Creating a diff file with my changes, applying it to a MNAI repository, finding all the files that have changed and putting them in a zip file is quite tedious :)
 
Maybe Tholal could let you upload directly to the MNAI Sourceforge repository. It's great to have a few people developing this mod. :)
 
Maybe Tholal could let you upload directly to the MNAI Sourceforge repository. It's great to have a few people developing this mod. :)
I don't think that's required as long as it is not too much for Tholal to merge things in himself. It would probably cause more trouble and administration work than it's worth; for example we would have to coordinate who is assigned to an issue.
 
Top Bottom