Single Player bugs and crashes - After the 13th of August 2013

You are wrong my friend. The axeman indeed can't get there in one turn, but if he would go with the road, in the next turn he would still have 1/2 of move, but if he will go like it is at the pic, in the next turn he will have 0.

That's why I said the choice is debatable - it's the same number of moves to the target, and it comes down to a preference for defense at the intervening point vs. movement left at the end of the second move. The AI prefers defense (and it likely should only do that in dangerous areas, NOT on home territory, so I agree this may not be the best choice). The actual 'best' really depends on how threatened the unit might be in the area being traversed vs. how useful an extra half movement point might be a turn down the road - there is no universally correct answer. However, the AI is set up to prefer defense universally, so it is operating correctly in terms of the intention of the code. Whether the AI SHOULD prefer defense (or more particularly WHEN it should) is another matter, and one that could probably be tweaked to produce a small improvement (even something as simple as preferring defense only in territory not owned by the unit's owner for instance, might give better overall results, though even then it might behave stupidly during an invasion).

Anyway, I have figured out the bug that causes the definitely incorrect third path. The UI (so strictly when a HUMAN is giving orders) calls the path generation with a pseudo-group that it makes up at the time and consists of the selected units (i.e. - it doesn't use the ACTUAL CvSelectionGroup). In particular it re-uses the object instance that represents this pseudo-group, which means that a cache test in which it checked for the same group it had cached information for (and used object-pointer-equality as the equality test), was using information for the wrong unit. This will be fixed in my SVN push a little later today.
 
Working fine for me with default (40X40) viewport. What viewport settings are you using? Do you have a minidump?

was running 80х80 viewport. will try to run it under 40x40, thanks
 
You aren't serious, aren't you? It is a good behavior for computer played units, but when a human player move a unit he rather do not suspect, the unit will try to be smarter then he is. If he would like to have more defense at the end of a turn, then he will just move the unit to a square with higher defense. Once I was in a situation when I needed this half of a move and I had to lead the unit plot by plot. I can't say it is a proper solution. Such solution is really good for an extra option, when you want to send a unit somewhere far and do not care, but not for the basic one.


OK, I have compiled. But I'm quite disappointed. Someone agrees to contribute some time to your project and you don't even tell her the tool chain for building which is on the forum. It is impolite. :(
 
You aren't serious, aren't you? It is a good behavior for computer played units, but when a human player move a unit he rather do not suspect, the unit will try to be smarter then he is. If he would like to have more defense at the end of a turn, then he will just move the unit to a square with higher defense. Once I was in a situation when I needed this half of a move and I had to lead the unit plot by plot. I can't say it is a proper solution. Such solution is really good for an extra option, when you want to send a unit somewhere far and do not care, but not for the basic one.


OK, I have compiled. But I'm quite disappointed. Someone agrees to contribute some time to your project and you don't even tell her the tool chain for building which is on the forum. It is impolite. :(

If you turn off the 'use AI pathing' option in the BUG options, then human unit pathing is somewhat simpler, and doesn't try to second-guess you so much (no sure off hand if THIS particular aspect is sensitive to that or not, but if it isn't it can b made so, which it probably should be).

Not sure what you mean about 'tool chain' - I only returned from vacation today, and have answered your questions and suggestions as directly as I can - I was not in a position to do so before today, due to not having access to my PC while on vacation.
 
I have a few problems, all with Immigrants.

1. I can't get the immigrant to join the city. The population is one so that is not the problem.

2. Also when the immigrant is selected when in a city the skip turn button doesn't work.

3. When the immigrant is in the city and you go to the city screen you get the two sidebars of the screen but you get the game in the background. (as seen in the pic below)

I play on Direct IP as a single player, not sure if this has anything to do with the problem.

I will add a save game, but it is too big and I will have to get TB to help me zip it later.

I am now able to look into this. Sorry it is taking so long.
 
Not sure what you mean about 'tool chain' - I only returned from vacation today, and have answered your questions and suggestions as directly as I can - I was not in a position to do so before today, due to not having access to my PC while on vacation.
sulking
 
So i keep getting CTDs after 4-5 turns, and 'Bad allocation' crash when the mod is doing assets recalculation after applying SVN updates, i have 8 gb of RAM so i dont think its from my config, got minidump and saves.
REV 6015
https://hostr.co/0dHEj5yZ2NUQ
 
So i keep getting CTDs after 4-5 turns, and 'Bad allocation' crash when the mod is doing assets recalculation after applying SVN updates, i have 8 gb of RAM so i dont think its from my config, got minidump and saves.
REV 6015
https://hostr.co/0dHEj5yZ2NUQ

RAM really has nothing to do with it after 4 anyways, factors are how many civs are located on the map and what era you are in, factors in mostly. If over 10 civs and after Industrial, you MUST use viewports, probably starting out at 60X60 in Ren Era, then next era 50X50, and then set it to 40X40 and you should be set for the rest of the game to be played. Try that.
 
RAM really has nothing to do with it after 4 anyways, factors are how many civs are located on the map and what era you are in, factors in mostly. If over 10 civs and after Industrial, you MUST use viewports, probably starting out at 60X60 in Ren Era, then next era 50X50, and then set it to 40X40 and you should be set for the rest of the game to be played. Try that.
with 26 Civs, no wonder my game is so unstable:rolleyes: need to make less for my next game.
im still in classical era on my actual game, Which viewports should i use? or is 60x60 the one i should start with?

EDIT: seems like 60x60 fixed my turn times and crash issue, thx SO :D
 
@Koshling: (Manual for guys who newer seen a girl: When a girl is sulking, you may try to :pat: .)

@Thunderbrd, what a fearful girl. Am I not? :)

Ow yes. Koshling. There is an non-standard code in the sources. It may compile, as old Visual compilers did not follow the standard, but it is still a wrong C++ code, so I would correct it.

CvPipeline.h
Code:
	class CvCvPipelineWorkItemComparer
	{
	public:
		CvCvPipelineWorkItemComparer()
		{
		}
		bool operator() (const CvPipelineWorkItem*& lhs, const CvPipelineWorkItem*& rhs) const
		{
			return lhs->GetPriority() < rhs->GetPriority();
		}
	};

	//	Queue of work remaining items to be processed
	std::priority_queue<CvPipelineWorkItem*,std::vector<CvPipelineWorkItem*>,CvCvPipelineWorkItemComparer> m_queue;
The comparer for such queue should have the operator like
Code:
bool operator() (CvPipelineWorkItem *const & lhs, CvPipelineWorkItem *const & ths) const
or just
Code:
bool operator() (CvPipelineWorkItem * lhs, CvPipelineWorkItem * ths) const

CvGameTextMgr.cpp:11947, 11981, 12044, 34687
Missing type declarations.
 
Ow yes. Koshling. There is an non-standard code in the sources. It may compile, as old Visual compilers did not follow the standard, but it is still a wrong C++ code, so I would correct it.

CvPipeline.h
Code:
	class CvCvPipelineWorkItemComparer
	{
	public:
		CvCvPipelineWorkItemComparer()
		{
		}
		bool operator() (const CvPipelineWorkItem*& lhs, const CvPipelineWorkItem*& rhs) const
		{
			return lhs->GetPriority() < rhs->GetPriority();
		}
	};

	//	Queue of work remaining items to be processed
	std::priority_queue<CvPipelineWorkItem*,std::vector<CvPipelineWorkItem*>,CvCvPipelineWorkItemComparer> m_queue;
The comparer for such queue should have the operator like
Code:
bool operator() (CvPipelineWorkItem *const & lhs, CvPipelineWorkItem *const & ths) const
or just
Code:
bool operator() (CvPipelineWorkItem * lhs, CvPipelineWorkItem * ths) const

CvGameTextMgr.cpp:11947, 11981, 12044, 34687
Missing type declarations.

Well spotted on the incorrect const positioning. I'll tidy that up. In regard to the declarations of loop variable inside for statements - the 2005 MS complier sucks in this area and doesn't scope things correctly. For that reason I have tried to pre-declare the loop variable outside of the loop, so that it's apparent what is in-scope later in the routine. However, the code is no consistent currently. I'll address the cases you pointed out.
 
Koshling, may still know about other bugs and how to reduce the size of plots and other things. :think:

But I demand patting. :)
 
Koshling, may still know about other bugs and how to reduce the size of plots and other things. :think:

But I demand patting. :)

lol.

You're right about AI pathing - I will adjust it so that the defense over speed preference does not happen if you untick 'use AI pathing' in the BUG options (it doesn't respect the setting properly currently).

Won't be a for a few days though, as I'm in the middle of testing a merge of the 'Super Forts' mod currently.
 
But I demand patting. :)

You may have noticed that Koshling did not respond to this - his wife probably wont let him pat other humans.:lol: (Note: children aren't human until they are at least 40 have left home for a sufficiently long enough time.)
 
You may have noticed that Koshling did not respond to this - his wife probably wont let him pat other humans.:lol: (Note: children aren't human until they are at least 40 have left home for a sufficiently long enough time.)
Oh my, household PRISM? Koshling, I didn't know. I'm so sorry. Please accept my condolences. May I do something for you? Maybe some chocolates?
chocobottles.jpg

(20 and you will forget all your problems.)


@Dancing Hoskuld, thanks. I've been getting depressed, because of all of this seriousness.

Still, can't start work without patting.
 
Oh my, household PRISM? Koshling, I didn't know. I'm so sorry. Please accept my condolences. May I do something for you? Maybe some chocolates?
chocobottles.jpg

(20 and you will forget all your problems.)


@Dancing Hoskuld, thanks. I've been getting depressed, because of all of this seriousness.

Still, can't start work without patting.

<pat />
 
Back
Top Bottom