Single Player bugs and crashes - After the 24th of February 2014

It looks like we can't fix that one without the source code for the exe.
It looks like an art problem somewhere so perhaps at some point we'll end up figuring out what it is. Very hard (as in 'impossible') to say what it's really about from a code analysis perspective since we don't have access to the exe, yes.

The Canon_Forge is missing the flavor tag:

<Flavor>
<FlavorType>FLAVOR_MILITARY</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>

as it allows the building (training) of military units.

I think the value 10 is the correct number. I got it from the Garrison, but you need to check that.

It is in the file:

Modules\hydro\craft\craft_Civ4buildinginfos.xml
I doubt that's the reason it wouldn't be showing up... the flavor settings are AI settings and yes, it should probably be given that. Would certainly help the AI build the building with a bit more priority and would aid in generating more siege weaponry.

What tag allows the training of the military unit? That's the tag that should be included in the filter that isn't currently doing so.
 
SO said:
Forgot to mention that in the previous dll or the one before, that turn times have gone goofy again. It was perfect at 30 seconds even in the Modern Era that i was in, with around 500 cities on map, but then after those changes it was over 1 minute each turn which is unacceptable.(No offense) because its hard going from a great 30 sec to over 1 minute just because of a change????? (And i am NOT picking on you. ok.
Been pondering on this subject and I think I've got a pretty good idea of where the slowdown may be taking place (haven't done the profiling yet to be sure but it's a pretty strong suspicion.) Playing yesterday I did also notice it was running significantly slower than it had been and yes, I can understand the frustration with that.

I THINK I can work out something to get it to go a bit faster. From what I figure it's mostly the 'counterweight' calculations for the value of the improvement that's already on a plot that's generated to get worker AI's to see the importance of leaving the plot alone when there's already a better improvement there than what they can put there. This calculation isn't exactly the lightest calculations though not so bad but when you have all workers evaluating quite a few of these every round it can quickly add up for the turn times I'm thinking.

So I need to figure out how to 'cache' this calculation in such a way that it resets the cache at appropriate times when new improvements opening up may change the outlook.

aka: it's my next freeze-valid project that I'll hopefully have something completed on by the end of the week. I may go ahead and do some profiling thereafter. The Assault AI time should be much improved by now. And I also want to double check that if the 'No Zone of Control' option is on it doesn't even try to check for ZoC to keep processing at a major streamlining there.
 
I THINK I can work out something to get it to go a bit faster. From what I figure it's mostly the 'counterweight' calculations for the value of the improvement that's already on a plot that's generated to get worker AI's to see the importance of leaving the plot alone when there's already a better improvement there than what they can put there. This calculation isn't exactly the lightest calculations though not so bad but when you have all workers evaluating quite a few of these every round it can quickly add up for the turn times I'm thinking.
.

Yeah something is serious wrong, i started a NEW game and put it on Auto Control for 500 turns, and i came back 30-45 minutes later and it wasnt even at 400 turns yet?? And it barely made it to Sculptures in the Ancient Era, so something is really really messed up in the Ancient Era (mid way through is were it slows down) from my take????? I had to quit it, it was taking too long . . .
 
That strikes me as being quite fast... but then I've never Auto-played so I wouldn't know.

Anyhow, it's not going to be an overnight fix.

But I did get a fix in today for the crash someone was having corresponding to the Elisianthus BC-0056 save.
 
That strikes me as being quite fast... but then I've never Auto-played so I wouldn't know..

Thats fast:eek:, thats approx over 1 minute per turn in Ancient Era?????:sad: Should never be over 20 seconds in Ancient Era.
But you said you'd work on it, thats the best i can get then, thx. . . . I have "faith" in ya, well and your wife :p;)

Another question for ya, will going to the 35 dll break games??
 
Attached a repeatable Ctd.

I did start a new game with the 35civs dll.
To experince the CtD just move the Catamaran south-west (or simply press 1 :))

Edit: SVN 7757
 
Another question for ya, will going to the 35 dll break games??


Yes it will.

I have a partial solution - not perfect, but it does work if changing from 50 to 35 civ .dll.

I did post a version about a month ago when 35 civs was introduced.This is an updated version of that post.

Updated version of previous post

For those wanting to continue playing an existing game (started with the old 50 Civ .dll) but would prefer using the latest SVN (which now only supports a 35 Civ .dll). I think I have a partial solution to the save game compatibility problem.

Note: This will only work if you have less than 35 Civs in the game.

It is a bit time consuming when you try this, but if you want to continue a game in say the modern era plus - it may be worth the effort. Certainly quicker than starting a new game from scratch.


1. Before updating to the new version of C2C - 35 civ .dll, load your current save. You can then exit the game, the game engine will have created a worldbuilder file with all your current settings.

This file will be in:
C:\Documents and Settings\Owner\My Documents\My Games\Beyond the Sword\Saves\WorldBuilder

(This is in XP -You probably know the path for your version.)

2. Update C2C. From the forum or SVN.

3. Copy the worldbuider file to:

C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Caveman2Cosmos\PrivateMaps (Again XP)

4. Delete the cache and reload C2C.

5. When loaded, select Custom Scenario - and select the worldbuilder file you have just copied.

6. You are starting a new game, so select the same civ you were playing before and then press Launch.

Your previous selections should still be there.

The computer will now regenerate the map - this will take some time, longer the further you are into the game. Go and get a coffee.

When loaded you can continue playing the game. BUT there are a number of differances:

A. The turn number is reset to 0, not a problem if not playing with a turn limit (well you do have more time to win .:D).

B. No research is selected. But all those you researched are still there.

C. All city build queues only show the current build - previeously queued builds are lost.

D. Initially a lot of units (not all) will be active. You have to give them new orders (usually sentry!).

E. After the first turn some more units will become active, again not all. Not sure why this is maybe connected to the commands you previously gave them.

F. Open borders will be cancelled. Dont know why - may be a setting I missed. They are in the WB file - just not activated.


The game should now be playable as before.

I have tried it and the game plays OK - after the above initial starting problems.

EDIT

Not sure if this will work if other game save breakers are introduced. But I guess it should - though gameplay may be compromised a bit. :)
 
What tag allows the training of the military unit? That's the tag that should be included in the filter that isn't currently doing so.

Not knowing the base code - this has at the moment got me stumped. Looking at the XML for the building (i.e. Cannon_Forge) that allows the units to be trained does not referance those units.

Looking at a unit (i.e. Organ_gun) does not referance the Cannon_Forge that allows that unit to be trained.

There must be another link in the XML/cpp code somewhere that I can not yet find.

Probably why it is not in the filter code. :eek:
 
Not knowing the base code - this has at the moment got me stumped. Looking at the XML for the building (i.e. Cannon_Forge) that allows the units to be trained does not referance those units.

Looking at a unit (i.e. Organ_gun) does not referance the Cannon_Forge that allows that unit to be trained.

There must be another link in the XML/cpp code somewhere that I can not yet find.

Probably why it is not in the filter code. :eek:

What do you wanna bet it's on the units that require it... urgh. That will make things... interesting.
 
Not knowing the base code - this has at the moment got me stumped. Looking at the XML for the building (i.e. Cannon_Forge) that allows the units to be trained does not referance those units.

Looking at a unit (i.e. Organ_gun) does not referance the Cannon_Forge that allows that unit to be trained.

There must be another link in the XML/cpp code somewhere that I can not yet find.

Probably why it is not in the filter code. :eek:

The link between the unit and the building reuired to make it is the PrereqBuilding in the unit info XML, or the train condition I assume.

The unit type UNIT_ORGAN_GUN specifies this:
<PrereqBuilding>BUILDING_CANNON_FORGE</PrereqBuilding>

THe code for what is included in "military advantage" is in CvBuildingFilters.cpp. The relevant code for that specific filter is this:
Code:
bool BuildingFilterIsMilitary::isFilteredBuilding(CvPlayer *pPlayer, CvCity *pCity, BuildingTypes eBuilding) // not finished
{
	return ((GC.getBuildingInfo(eBuilding).getMilitaryProductionModifier() > 0) || 
		(GC.getBuildingInfo(eBuilding).getFreeExperience() > 0) ||
		(GC.getBuildingInfo(eBuilding).getFreePromotion() != NO_PROMOTION) || 
		(GC.getBuildingInfo(eBuilding).getFreePromotion_2() != NO_PROMOTION) ||
		(GC.getBuildingInfo(eBuilding).getFreePromotion_3() != NO_PROMOTION) || 
		(GC.getBuildingInfo(eBuilding).getNumUnitCombatRetrainTypes() > 0) ||
		(GC.getBuildingInfo(eBuilding).getNumUnitCombatProdModifiers() > 0) ||
		(GC.getBuildingInfo(eBuilding).getNumFreePromoTypes() > 0) ||
		(GC.getBuildingInfo(eBuilding).getNumUnitCombatRetrainTypes() > 0) ||
		(GC.getBuildingInfo(eBuilding).getNumUnitCombatOngoingTrainingDurations() > 0) ||
		(GC.getBuildingInfo(eBuilding).isAnyUnitCombatFreeExperience()) ||
		(GC.getBuildingInfo(eBuilding).isAnyDomainFreeExperience()));
}

I think that is the code from a couple of versions back, actually. It may be slightly different now. Anyhow, looking at that code in the current version should tell you exactly what characteristics of the buildings are being checked for that filter. In the above code the unlocking of a unit type is not considered, possibly because the building doesn't (as far as I know) store the info for that so you'd have to loop through all the units until you find one that requires the building, or until you've checked them all and don't find any (which is likely to take many times longer than all of the above checks added together are currently taking).
 
I have a partial solution - not perfect, but it does work if changing from 50 to 35 civ .dll.

I did post a version about a month ago when 35 civs was introduced.This is an updated version of that post.

Updated version of previous post

For those wanting to continue playing an existing game (started with the old 50 Civ .dll) but would prefer using the latest SVN (which now only supports a 35 Civ .dll). I think I have a partial solution to the save game compatibility problem.

Note: This will only work if you have less than 35 Civs in the game.

It is a bit time consuming when you try this, but if you want to continue a game in say the modern era plus - it may be worth the time. Certainly quicker than starting a new game from scratch.

1. Before updating to the new version of C2C - 35 civ .dll, load your current save. You may want to note down the number of turns completed. So you can change the number of turns in WB. (If you are playing a time restricted game.)

You can then exit the game. The game engine will have created a worldbuilder file with all your current settings.

This file will be in:
C:\Documents and Settings\Owner\My Documents\My Games\Beyond the Sword\Saves\WorldBuilder

(This is in XP -You probably know the path for your version.)

You can edit this file using notepad to reduce the number of turns if you want to.
(etc...)

Thanks that's very helpful - in fact it seems much easier than when you posted it before (ie. sounds doable now:lol:).

In fact your step 1 above seems too easy... Can you clarify it please? Is the part about going into WB a necessary part or optional? The WB scenario file won't be created unless you do something specific in WB... or will it? :crazyeye:
 
@TB

Just make sure it is assigned under military advisor or flavour and just check the advisor or flavour?
Why need to check every type of military XML tag
 
@TB

Just make sure it is assigned under military advisor or flavour and just check the advisor or flavour?
Why need to check every type of military XML tag

I was considering that in light of this issue yes.

AIAndy set this up initially and had it pretty well down... My concern would be if there are some buildings that would but shouldn't be showing up just on those considerations alone.
 
Well, if a building is showing up because it has military flavour or advisor, but it should not be, because it is not meant to be a military building? Then obviously something is wrong with the flavour or advisor in the first place.
 
Is it a bug that even after building Tengrii Horse Trainer I still need to build a Horse Trainer to train Horsemen? (It is State Religion)
 
Is it a bug that even after building Tengrii Horse Trainer I still need to build a Horse Trainer to train Horsemen? (It is State Religion)

Can you show a screenie of your capital pls and where in the building area that you are not able to build horseman?
 
Thanks that's very helpful - in fact it seems much easier than when you posted it before (ie. sounds doable now:lol:).

In fact your step 1 above seems too easy... Can you clarify it please? Is the part about going into WB a necessary part or optional? The WB scenario file won't be created unless you do something specific in WB... or will it? :crazyeye:

The WB file is created automatically when you load the save. When the save has loaded you can exit the game.

You do not have to do anything to the WB file, just copy it to Private Maps. :)
 
Back
Top Bottom