Single Player bugs and crashes v39 plus (SVN) - After the 20th of July 2019

As a single true value in an array the size of the number of building types (>6000), for each unit type (>1000). i.e. a single true value in 6 million false values. How many innocent and meaningful bytes of information did this monster carelessly force out of the cache? We may never know, but one thing we can be sure of is that its days are numbered.

If only one unit has the ForceBuildings tag used in the xml then ForceBuildings only needs 6000 values because those arrays are only initiated if they are needed.
 
If only one unit has the ForceBuildings tag used in the xml then ForceBuildings only needs 6000 values because those arrays are only initiated if they are needed.
There are at least 150 subdued and tamed animals.
Some other units can build buildings.
So lets say 200 units can build something.
200*6000 = 1 200 000
Still a lot.
 
If only one unit has the ForceBuildings tag used in the xml then ForceBuildings only needs 6000 values because those arrays are only initiated if they are needed.
So now the problem is 1000 times better than I thought, but still 6000 times worse than it should be!
I removed ForceBuildings tag entirely, in consultation with TB, and instead the academy requires at least literature and is part of the normal Buildings group instead. Buildings is now a vector instead of a bool array.
These combined cut my round time by a further 10-20%, and @Yudishtiras by 10s or so on my machine. I'm going to probably spend some time optimizing the units and buildings info classes for better memory usage where I can (no more sparse arrays to start with). Will that conflict significantly with the changes you are working on?
 
I'm going to probably spend some time optimizing the units and buildings info classes for better memory usage where I can (no more sparse arrays to start with). Will that conflict significantly with the changes you are working on?
@Anq is working on removal of all building/unit classes
 
I seem to get an animal from the Biodome every two turns now. Is this intended (from some tech maybe)? It seems too fast imo.
Giving animals is what the Biodome is about but every 2 turns is a bit fast.
There are at least 150 subdued and tamed animals.
Some other units can build buildings.
So lets say 200 units can build something.
200*6000 = 1 200 000
Still a lot.
Subdued Animals etc used the Buildings tag not the ForcedBuildings tag. The ForecBuilding allows the building to be built even if you don't have all the prerequisite techs, buildings, resources and place on the world necessary. There are very few ForceBuildings.
 
Subdued Animals etc used the Buildings tag not the ForcedBuildings tag. The ForecBuilding allows the building to be built even if you don't have all the prerequisite techs, buildings, resources and place on the world necessary. There are very few ForceBuildings.
Yeah the ForceBuilding is from firaxis for GPs and is useless as a holdover for C2C and is causing needless delay for its one use in the mod that shouldn't have still been using it anyhow. With space on the development plate and a pre-building phase of the game entirely, this tag is truly useless to us, particularly for what it does, which is just being a Buildings tag that ignores all prereqs. I think it was a good catch to say we should get rid of it now.
 
Giving animals is what the Biodome is about but every 2 turns is a bit fast.
Yeah it's always been every 5 turns in the past and there is even a comment in the xml to that effect.
 
Yeah it's always been every 5 turns in the past and there is even a comment in the xml to that effect.
I scaled it by gamespeed a long time ago in PPIO.
I think it's every turn on Ultrafast, every 2 turns on blitz, every 3 turns on normal, .... , every 9 turns on eternity.

Should I slow it down a bit?
e.g. every turn on Ultrafast, every 4 turns on blitz, every 6 turns on normal, .... , every 18 turns on eternity.
 
I scaled it by gamespeed a long time ago in PPIO.
I think it's every turn on Ultrafast, every 2 turns on blitz, every 3 turns on normal, .... , every 9 turns on eternity.

Should I slow it down a bit?
e.g. every turn on Ultrafast, every 4 turns on blitz, every 6 turns on normal, .... , every 18 turns on eternity.
Firstly I'm on Eons, not Blitz, so please look into why I'm getting them every two turns.

Personally I suggest 5-6 turns on Normal to Epic, then maybe 7/8/10/12? 3 on Normal is definitely too fast.
 
So now the problem is 1000 times better than I thought, but still 6000 times worse than it should be!
I removed ForceBuildings tag entirely, in consultation with TB, and instead the academy requires at least literature and is part of the normal Buildings group instead. Buildings is now a vector instead of a bool array.
These combined cut my round time by a further 10-20%, and @Yudishtiras by 10s or so on my machine. I'm going to probably spend some time optimizing the units and buildings info classes for better memory usage where I can (no more sparse arrays to start with). Will that conflict significantly with the changes you are working on?

Just removing the ForceBuildings tag and reprogramming the Buildings tag reduces the turn times by 10-20%? That seems to be very optimistic but i'am looking forward to see those changes in the svn.

EDIT:
Are these changes on GitHub already?
 
Last edited:
That would be something that could be analyzed for improvement I'm sure, but not removed entirely. Things before that were very broken in some areas and now it's a little less so. It's part of a series of things taking place, many of which are suboptimal to begin with. Still some issues taking place there. But what you're facing is not an isolated small issue - rather something taking place on a larger scale in the AI coding overall.

AI_establishStackSeeInvisibleCoverage is actually completely broken no wonder it causes slowdowns.
I try to get a fixed version of that function done maybe today.
 
AI_establishStackSeeInvisibleCoverage is actually completely broken no wonder it causes slowdowns.
I try to get a fixed version of that function done maybe today.
Does it also affect games that do not have the Stealth Option ON?
 
I get no Combat Chance Report with my Neandertalwarrior ,when hovering over Portugise City.
Civ4ScreenShot0011.JPG

Also , i can not Alt-Tab from the Game , as my Mouse-Pointer is trapped in the upper left corner of the screen and not moveable.
 

Attachments

Yes.
Remember , i gave the tip where the mod have to be installed in Steam?
F:\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Mods\Caveman2Cosmos

Remember our latest discussion , PIPO related?
Yes, i had deleted the folder.
This bug happens after latest update of SVN!
Happy Sunday!
 
Back
Top Bottom