C2C SVN Changelog

Changed a few techs around: Almost all based on Vokarya's in-put, thx.

Classical Era
- Ancient Ballistics = Construction AND Oil Lamps AND Ship Building
- Ancient Medicine = Code of Laws AND Gardening
- Construction = Mathematics AND Monarchy
- Democracy = Alphabet AND Code of Laws AND Currency AND Mathematics
- Insurance = Code of Laws AND Currency
- Iron Working = Lead Working AND Monarchy
- Monarchy = Bronze Working AND Monotheism
- Spice Trade = Calendar AND Salt Processing
- Weather Lore = Cloud Patterns AND Philosophy


Medieval Era
- Acoustics = Education AND Music
- Agricultural Tools = Feudalism AND Floristry AND Machinery
- Armored Cavalry = Armor Crafting AND Elephant Riding AND Invention AND Stirrup
- Civil Service = Feudalism AND Mathematics
- Compass = Sailing AND Clockworks AND Education
- Crop Rotation = Calendar AND Feudalism AND Floristry
 
Changed a few techs around: Almost all based on Vokarya's in-put, thx.

Classical Era
- Ancient Ballistics = Construction AND Oil Lamps AND Ship Building
- Ancient Medicine = Code of Laws AND Gardening
- Construction = Mathematics AND Monarchy
- Democracy = Alphabet AND Code of Laws AND Currency AND Mathematics
- Insurance = Code of Laws AND Currency
- Iron Working = Lead Working AND Monarchy
- Monarchy = Bronze Working AND Monotheism
- Spice Trade = Calendar AND Salt Processing
- Weather Lore = Cloud Patterns AND Philosophy


Medieval Era
- Acoustics = Education AND Music
- Agricultural Tools = Feudalism AND Floristry AND Machinery
- Armored Cavalry = Armor Crafting AND Elephant Riding AND Invention AND Stirrup
- Civil Service = Feudalism AND Mathematics
- Compass = Sailing AND Clockworks AND Education
- Crop Rotation = Calendar AND Feudalism AND Floristry

Thanks. Just out of curiosity, Compass was Education OR Clockworks (+ Sailing). Is this a deliberate change?
 
I think I may have found the cause of the trained-dog explosion (at least in part), and possibly also a contributary factor towards over-production of military generally.

The smoking gun is this little beauty of a routine (which can be politely described as "a load of dingo's kidneys"):

Code:
bool CvCityAI::AI_chooseLeastRepresentedUnit(UnitTypeWeightArray &allowedTypes, int iOdds)
{
	int iValue;

	UnitTypeWeightArray::iterator it;
	
 	std::multimap<int, UnitAITypes, std::greater<int> > bestTypes;
 	std::multimap<int, UnitAITypes, std::greater<int> >::iterator best_it;
 	
 	
	for (it = allowedTypes.begin(); it != allowedTypes.end(); it++)
	{
		iValue = it->second;
		iValue *= 750 + GC.getGameINLINE().getSorenRandNum(250, "AI choose least represented unit");
		iValue /= 1 + GET_PLAYER(getOwnerINLINE()).AI_totalAreaUnitAIs(area(), it->first);
		bestTypes.insert(std::make_pair(iValue, it->first));
	}
 	
 	for (best_it = bestTypes.begin(); best_it != bestTypes.end(); best_it++)
 	{
		if (AI_chooseUnit(best_it->second, iOdds))
		{
			return true;
		}
 	}
	return false;
}
The input array 'allowedTypes' is a set of (UNITAI type, weight) tuples, which are the UINTAIs this function can choose from together with a base weight for each. The routine goes through these and produces an internal ordering which take account of how many of that UNITAI the player already has. It then goes through this second (sorted) array in weight order and attempts to build each in turn with a probability of 'iOdds'.


Two major things wrong with this code:
  1. The iOdds should be a global probability of it building anything (and the city build relies on that to build things after this call when the odds are not met), but it has multiple bites at the cherry (the size of the allowable array), so the actual odds are more like (iOdds * <num allowable types>) for small values of iOdds.
  2. If iOdds is small the chances of any specific build is also small which effectively means that independent of the weights used to sort the array (i.e. - how many of the unit type the player already has mostly) all types are almost equally likely to be built

A spectacularly failing call to this has iOdds at 10% less than half way down the city build priorities. This means that about half the time cities without really high priority builds will decide to build a more-or-less random unit type from the types concerned, instead of this only happening 10% of the time, abn then weighted heavilt towards the least populated type.

In the case of UNITAI_COUNTER the trained dogs are basically the only unit it has to choose from for a long time (until war dogs which then become the problem build), so it ends up buildins a LOT of them (and neglecting things like non-priority workers, lesser economic, buildings etc.).

I'll be pushing a fix to SVN later this afternoon. I don't think this is the WHOLE story behind the dog explosion, but I think it'll help quite a bit (and help with the over-militarisation also)
 
I'll be pushing a fix to SVN later this afternoon. I don't think this is the WHOLE story behind the dog explosion, but I think it'll help quite a bit (and help with the over-militarisation also)

It was a fascinating story so far! :goodjob:

I think you're a new sort of Archeaologist - called 'Codeologist' maybe.
Where others see ("%&"); you find the fu.cking mistake^^
 
The smoking gun is this little beauty of a routine (which can be politely described as "a load of dingo's kidneys"):
A spectacularly failing call to this has iOdds at 10% less than half way down the city build priorities. This means that about half the time cities without really high priority builds will decide to build a more-or-less random unit type from the types concerned, instead of this only happening 10% of the time, abn then weighted heavily towards the least populated type.

I'll be pushing a fix to SVN later this afternoon. I don't think this is the WHOLE story behind the dog explosion, but I think it'll help quite a bit (and help with the over-militarization also)

It was a fascinating story so far! :goodjob:

I think you're a new sort of Archeaologist - called 'Codeologist' maybe.
Where others see ("%&"); you find the fu..king mistake^^

Don't think we don't notice either.

Yes that a great find:goodjob:

Yes great explanation.

Yes "we" do notice, alot.;)
 
Thanks. Just out of curiosity, Compass was Education OR Clockworks (+ Sailing). Is this a deliberate change?

Yes. Just so you know our process. You post the stuff you want changed. I go review it and send the list posted above. Then SO goes and makes it happen. Once and awhile SO will report back problems but for the most part any problems that are found are reported back by you guys in which either SO goes and fixes or I report back to him to ask to fix.

In short double or even triple reviewing of new stuff has reduced errors.

Note that the techs that had 2 requirements and then you suggest it have only one were left alone, so it would avoid the tech tree errors. having redundancy doesn't seem to bother anything, but making those with a ton of tech requirements reduce to between 2 to 4 tech requirements is much better.

So thank you Vokarya. In the future as more techs get added we may need you to do a review of them again. I suspect that's how many of these got to have so many tech requirements. Also shuffling around techs too.

Koshling does WAYY to much work around here. don't think we don;t notice either.

If you do things right, people won't be sure you've done anything at all. -God (Futurama)
 
@Strategy Only

I took pictures of the Caveman2Cosmos Tech Tree in .jpg format so it is easier for you guys to brainstorm any new Tech Tree edits without having to keep opening up the game to see. I uploaded a .zip with all the pictures for your convenience .

[Pictures are of Revision 2268 April 11th 2012, approximately 1 hour ago],
[Used Microsoft Paint with Civilization iV in Windowed Mode, 1366x768 . jpg]
 
@Strategy Only

I took pictures of the Caveman2Cosmos Tech Tree in .jpg format so it is easier for you guys to brainstorm any new Tech Tree edits without having to keep opening up the game to see. I uploaded a .zip with all the pictures for your convenience .

[Pictures are of Revision 2268 April 11th 2012, approximately 1 hour ago],
[Used Microsoft Paint with Civilization iV in Windowed Mode, 1366x768 . jpg]

That is absolutely correct, LOOK at the top right corner of each, thats a ANDPreq, not a PreReq, meaning it has to have that tech before getting the NEW tech, i hope that explains it better??
 
That is absolutely correct, LOOK at the top right corner of each, thats a ANDPreq, not a PreReq, meaning it has to have that tech before getting the NEW tech, i hope that explains it better??

I actually now understand ANDPreq perfectly, (a different Tech that is not the prerequisite is also required) . I made these pics for myself to look at on the road, but I hope these pics of the Tech Tree help you out for future en devours :).

I I love the new tech changes to the Classical and Medieval area especially..

Democracy = Alphabet AND Code of Laws AND Currency AND Mathematics
Compass = Sailing AND Clockworks AND Education
 
More tech changes: Almost all based on Vokarya's in-put, thx.


Renaissance Era and tweaks

- Gunpowder = Education AND Invention
- Humanism = Music AND Political Philosophy AND Printing Press
- Mercantilism = Divine Right AND Drug Trade AND Navigation
- Navigation = Astrolabe AND Cartography
- Photography = Chemistry AND Physics AND Printing Press
- Printing Press = Invention AND Paper AND Education
- Realism = Liberalism AND Photography AND Romanticism
- Scientific Method = Chemistry AND Printing Press AND Physics


Industrial Era and tweaks

- Antibiotics = Medicine AND Steam Power
- Artillery = Explosives AND Semi-Automatic Weapons
- Automatic Weapons = Industrialism AND Trench Warfare)
- Flight = Balloon Warfare AND Combustion
- Mass Transit = Communism AND Motorized Transportation
- Motorized Transportation = Advanced Metallurgy AND Bicycles
- Steam Power = Physics AND Replaceable Parts AND Scientific Method
- Submarine Warfare = Advanced Metallurgy AND Automatic Weapons
- Thermodynamics = Weather Forecasting AND Steam Power
 
Yes. Just so you know our process. You post the stuff you want changed. I go review it and send the list posted above. Then SO goes and makes it happen. Once and awhile SO will report back problems but for the most part any problems that are found are reported back by you guys in which either SO goes and fixes or I report back to him to ask to fix.

In short double or even triple reviewing of new stuff has reduced errors.

Note that the techs that had 2 requirements and then you suggest it have only one were left alone, so it would avoid the tech tree errors. having redundancy doesn't seem to bother anything, but making those with a ton of tech requirements reduce to between 2 to 4 tech requirements is much better.

So thank you Vokarya. In the future as more techs get added we may need you to do a review of them again. I suspect that's how many of these got to have so many tech requirements. Also shuffling around techs too.



If you do things right, people won't be sure you've done anything at all. -God (Futurama)

OK. I understand now. My apologies. Maybe we can add some other technologies that would serve as additional prerequisites. I will keep updating my tree with your changes and see if anything else jumps out.
 
Revision 2271

Was playing a Custom Game and Robert Menzies (Australian Leader) shows up as a Pink Leaderhead in Sevopedia and Trade Screen.

Updated to Revison 2275 (- Luba Culture moved to Trade tech.
- Polish Culture moved to Heraldry tech.)

Robert Menzies (Australian Leader) still shows up as a Pink Leaderhead in Sevopedia and Trade Screen..
 
Revision 2271

Was playing a Custom Game and Robert Menzies (Australian Leader) shows up as a Pink Leaderhead in Sevopedia and Trade Screen.

Updated to Revison 2275 (- Luba Culture moved to Trade tech.
- Polish Culture moved to Heraldry tech.)

Robert Menzies (Australian Leader) still shows up as a Pink Leaderhead in Sevopedia and Trade Screen..

Post this in the Bugs/Crashes thread, not here. Thanks.
 
Just pushed:
  • Fixed crash when a unit gets -100% to city attack
  • Made changes to enemy pwer evaluation to alleviate the start-as-minors issues (hopefully)
 
Couple more changes:
  • Tweaked AI civic evaluation (see AI suggestions thread)
  • Fixed bug with recalculating modifiers when one of more cities are running processes (research etc.)
 
First Group:

Modern Era tweaks

- Climate Models = 3D Modeling AND Ecology AND Long-Range Forecasting
- Ecology = Agricultural Engineering AND (Nuclear Power OR Solar Power)
- Gene Manipulation = Genetics AND Globalization
- Genetics = Superconductors AND (Modern Health Care OR Paleontology)
- Naval Aviation = Amphibious Warfare AND Aviation AND Radar
- Recycling = Ecology AND Globalization
- Unmanned Air Vehicles = Communication Networks AND Modern Warfare
- Virtual Reality = 3D Modeling AND Extreme Sports

2nd Group:


Trans-Human Era Tweaks

- Automated Traffic = Knowledge Management AND Neural Networks
- Metamaterials = Nanotechnology AND Stealth
- Quantum Teleportation = Fiber Optics AND Superstring Theory
- Skyroads = Artificial Intelligence AND Automated Traffic AND Unmanned Air Vehicles
 
Back
Top Bottom