[SCENARIO] Earth All 34 Civs

damnrunner

Deity
Joined
Oct 19, 2005
Messages
2,004
I made a thing! For years I’ve thought it would fun to play a version of the Earth 18 Civs game but with all 34 Civs in BTS. Thanks to some home isolation, I finally made it happen.

Download here.

The game uses a merge of the Next War mod (think it makes for a more interesting late game) and Lt. Bob’s 40 civs mod.

The base map is the Earth 18 civs map. Most civs are in historic start locations. Exceptions are Portugal in Brazil, Dutch in Indonesia, Turks in Central Asia (kind of original if you go back far enough), and Babylon/Sumeria in Australia. I added various resources to make the new start locations more viable and balanced. I also tweaked Central Asia and a lot of Africa to make them more habitable. Some other tweaks to make the game more interesting was giving the Inca’s a route through the Andes, enabling Spain to fit 2 cities, enabling Egypt to build a coastal city, and having China start in central rather than northern China.

I gave each starting city a highly promoted city defense longbow to make early civ elimination pretty impossible. Raging barbarians are turned on to slow expansion. No Tech Brokering is turned on to slow tech trades. Aggressive AI is turned on to keep things interesting. Goody huts and random events are turned on to make things more unpredictable. I also turned on the select religion option to make things feel a bit more like the real world. Vassals States are turned off as I didn’t want giant blocs to emerge.


After 10 test games (through at least 1AD) I think it is fairly well balanced and there is decent variability in terms of who founds early religions, gets early wonders, and initial settlement patterns.
 
Since this is my 1st stab at sharing a scenario - I would also love to solicit some feedback. Following are various things on my mind:
  1. I picked the leaders I think are best suited to start locations and are best balanced against neighbors, but am very open to feedback.
  2. I think the early game resources are relatively well balanced, but am very open to feedback – especially on later game resources and luxuries.
  3. The AI seems to randomly disband its starting longbow at some point. Not terrible as by that point they tend to have good defense, but very weird. Any thoughts?
  4. In two of my test games Washington randomly spawned and instantly deleted a lion at around 500AD (once in Philippines and once in Ethiopia). No clue what is up with that, but it def messes with things. Any thoughts?
  5. The AI is terrible at settling in crowded environments. While Europe is super crowded the map has lots of space for 2nd and even 3rd or 4th cities on islands or in gaps between start locations. The AI rarely takes advantage of this though. For example, in only one of about 10 test games Greece settle on Crete for and in no test games have any settled in gaps between cities. Anyhow, any thoughts on how to change AI city settlement behavior?
  6. The UK also almost never settles a 2nd city in Scotland despite having tons of room to do so. The Celts and France settled Scotland 1st in 8 of 10 test games. The US is also terrible in its city settlement choices and lets itself get boxed in. I also had to move the Dutch start location from Java to Borneo because on Java the Dutch would never settle other islands. While I’ve been able to fix the Dutch issue, I’ve had no luck changing start conditions to get the US and UK to make better choices (I did make northeast Canada more habitable to make the US settlements more viable). Again suggestions welcome.
  7. I am not totally sure how to do this but a tweak I want to make is to make neighboring civs dislike each other (ie the UK and France dislike each other). Have civs like civs that border their neighbors (ie UK likes Rome / France likes Celts). And finally, make civs dislike civs that are further afield (ie UK/France both dislike Zulus/China/Aztec). The idea here is to limit everyone giving everyone open borders in the early game which results in everyone exploring everything early (and hence contacting lots of folks and getting big research bonuses). Anyhow, thoughts on how to do this well would be appreciated. My concern is that it would lead to the AI never opening borders or making any tech/resource trades which would also be problematic.
 
The AI seems to randomly disband its starting longbow at some point.
It could help to give the Longbow a higher level. Currently it's 1:
Level=1, Experience=0
The XP level is an important factor when a unit has to be disbanded. It's not clear to me though why disbanding happens in the first place. Could be brief strikes occurring during anarchy when the AI has to pay for gold-per-turn deals despite having no income. But that should be pretty rare ...
In two of my test games Washington randomly spawned and instantly deleted a lion at around 500AD (once in Philippines and once in Ethiopia). No clue what is up with that, but it def messes with things. Any thoughts?
Did you automate those test games? I'm used to using the AI Auto Play mod for that. When I do it through game.aiplay on the Python console, my civ gets deleted and I lose the game once aiplay stops. But I think the aiplay function can also spawn a Lion (normally near the South Pole) that somehow prevents the human player from losing.
The AI is terrible at settling in crowded environments. [...]. For example, in only one of about 10 test games Greece settle on Crete for and in no test games have any settled in gaps between cities.
There are clauses in the AI evaluation of city sites that pretty categorically rule out sites that overlap too much with the radii of existing cities. You could relax those conditions in the DLL (CvPlayerAI::AI_foundValue), but that might lead to more cities in Siberia as well.
Code:
if (iOwnedTiles > (NUM_CITY_PLOTS / 3))
   return 0;
NUM_CITY_PLOTS is 21 and iOwned counts only tiles owned by other teams.
Code:
iValue /= (std::max(0, (iBadTile - (NUM_CITY_PLOTS / 4))) + 3);
Bad tiles are tiles with very poor yields, - but tiles already workable by a friendly city also count as half a bad tile each. For a site with 8 bad tiles, the divisor is already 6, which boils down to a (utility) value half as high as the value of a site with at most 5 bad tiles (divisor 3).
Code:
if (iTakenTiles > (NUM_CITY_PLOTS / 3) && iResourceValue < 250)
   return 0;
"Taken" tiles are tiles in the radius of any existing city. iResourceValue counts bonus resource yields. One or two good resources should be enough to reach 250, but resources on taken tiles don't count.
The UK also almost never settles a 2nd city in Scotland despite having tons of room to do so.
In Debug mode (Ctrl+Z if cheat code is set in the CivilizationIV.ini), you can check AI found-city values by holding down Alt while hovering over a tile. England is aware that there is a strong city site in Scotland. Without using a debugger, it's difficult to say why London doesn't produce a Settler. It seems that other production orders, especially sea explorers, take greater priority.

AI relations/ Open Borders: Perhaps by setting MEMORY_EVENT_GOOD_TO_US BAD_TO_US at game start. ("Past events have proved your good/bad nature to us.") That memory decays by 1 every 50 turns on average. Would have to be done through the DLL, perhaps at the end of CvGame::setInitialItems.
 
f1rpo THANK YOU!

Really useful suggestions. I am going to try and tinker with some of these to see what I can improve.
 
I created a mod that uses some files from your mod to create a High Middle ages mod, I gave you credit as well so is it ok?

Sorry, I've not logged in in ages and didn't see your message. Thanks for the credit and 100% ok by me. All about sharing.
 
I am not totally sure how to do this but a tweak I want to make is to make neighboring civs dislike each other (ie the UK and France dislike each other). Have civs like civs that border their neighbors (ie UK likes Rome / France likes Celts). And finally, make civs dislike civs that are further afield (ie UK/France both dislike Zulus/China/Aztec). The idea here is to limit everyone giving everyone open borders in the early game which results in everyone exploring everything early (and hence contacting lots of folks and getting big research bonuses). Anyhow, thoughts on how to do this well would be appreciated. My concern is that it would lead to the AI never opening borders or making any tech/resource trades which would also be problematic.

So I've been tinkering with this some in World Builder. Its time consuming but pretty easy to change the +/- relations between various civs. However after some trial and error I'm still at a loss for good levels. From past game play, I was thinking -5 would keep folks from opening borders - but folks still will. Any thoughts?
 
So I've been tinkering with this some in World Builder. Its time consuming but pretty easy to change the +/- relations between various civs. However after some trial and error I'm still at a loss for good levels. From past game play, I was thinking -5 would keep folks from opening borders - but folks still will. Any thoughts?
You could go to leaderheadsinfos.xml in the Civilization xml file and change how much they dislike other civs if they are next to each other.
For example you can make them automatically have a -5 relation if they are next to each other.
Another thing you should copy paste the python Main Interface file from Earth 2010 so that if you are in contact with all 34 civs you can scroll down, I already did it and it works.
Also to make the game more interesting you could add all 17 religions from the Just another Religion mod, I did it and it's pretty interesting.
 
There are clauses in the AI evaluation of city sites that pretty categorically rule out sites that overlap too much with the radii of existing cities. You could relax those conditions in the DLL (CvPlayerAI::AI_foundValue), but that might lead to more cities in Siberia as well.

Been tinkering with this mod a bit more and am finally getting around to trying to figure this out. My understanding is that fiddling with this would change the settling behavior for all civs in the game. However if its possible to adjust these levels for specific leaders then this would be an easier fix as I could just do it for those in dense initial start environments.

Another though I've had is adding a BS "resource" that adds no actual value but could be used as a bonus to artificially increase the AI's perceived value of settlement locations. Thinking it could be a good way to "force" the AI to settle places like Sicily and Crete which they typically don't--without the risk of creating a bunch of crazy useless cities in Siberia.
 
My understanding is that fiddling with this would change the settling behavior for all civs in the game. However if its possible to adjust these levels for specific leaders then this would be an easier fix as I could just do it for those in dense initial start environments
Since the civs have fixed slots in your scenario, it should suffice to do something like
Code:
if (iOwnedTiles > (NUM_CITY_PLOTS / 3)) // (current condition)
   return 0;
-->
Code:
if (iOwnedTiles > NUM_CITY_PLOTS / (getID() == PLAYER_SPAIN ? 2 : 3)) // (new condition)
   return 0;
with PLAYER_SPAIN defined in CvEnums.h:
Code:
enum PlayerTypes // (old enum)
{
    NO_PLAYER = -1,
};
-->
Code:
enum PlayerTypes // (new enum)
{
    NO_PLAYER = -1,
    PLAYER_SPAIN = 4, // (or something)
};
(Assuming that you don't mind making changes in the DLL.)
[...] adding a BS "resource" that adds no actual value but could be used as a bonus to artificially increase the AI's perceived value of settlement locations.
AI_foundValue evaluates resources through CvPlayerAI::AI_bonusVal. That function should generally recognize when a resource is useless. Of course one could modify AI_bonusVal to simply assign a fixed value to the "decoy" resource type. However, AI_foundValue isn't the only part of the AI that cares about resources near cities. The selection of target cities when at war comes to mind, and the trade value of cities in peace negotiations. Can't think of more consequential side-effects, but there might be such.

The Rhye's and Fall mod uses "settler maps" to artificially increase the found-city value of certain tiles. I don't know how that's implemented exactly. A simplistic approach would be to hardcode the coordinates in AI_foundValue. That said, adding some amount to the iValue variable won't affect conditionals that simply return 0 value when cities are too close together.
 
Since the civs have fixed slots in your scenario, it should suffice to do something like....

Thanks for the info. This is def outside my comfort zone but always good to have an excuse to learn new things.
 
The game uses a merge of the Next War mod (think it makes for a more interesting late game) and Lt. Bob’s 40 civs mod.
I gathered from this that you've already compiled a GameCore DLL for the scenario. (Well, I wasn't sure.) I see now that Next War doesn't have its own DLL, so I guess your current DLL is simply the 40-civ DLL. In that case, the idea with the dummy resource could be worth another look – to avoid having to set up the development environment for the DLL (which I don't want to discourage you from though). Looking at AI_foundValue and AI_bonusVal, it seems that the AI doesn't check for available improvements that can connect a resource. So something like this – along with a dummy AI-only technology to hide the resource from humans – might work:
Spoiler :
Code:
<BonusInfo>
   <Type>BONUS_DUMMY</Type>
   <Description>TXT_KEY_NONE</Description>
   <Civilopedia>TXT_KEY_NONE</Civilopedia>
   <BonusClassType>BONUSCLASS_GENERAL</BonusClassType>
   <ArtDefineTag>ART_DEF_BONUS_MOVIES</ArtDefineTag>
   <TechReveal>TECH_THAT_AI_CIVS_HAVE_AND_HUMANS_DO_NOT</TechReveal>
   <TechCityTrade>NONE</TechCityTrade>
   <TechObsolete>NONE</TechObsolete>
   <YieldChanges/>
   <iAITradeModifier>0</iAITradeModifier>
   <iAIObjective>0</iAIObjective>
   <iHealth>0</iHealth>
   <iHappiness>4</iHappiness>

   <!-- The rest is just copy-pasted from the Movies resource -->
   <iPlacementOrder>-1</iPlacementOrder>
   <iConstAppearance>0</iConstAppearance>
   <iMinAreaSize>-1</iMinAreaSize>
   <iMinLatitude>0</iMinLatitude>
   <iMaxLatitude>90</iMaxLatitude>
   <Rands>
       <iRandApp1>0</iRandApp1>
       <iRandApp2>0</iRandApp2>
       <iRandApp3>0</iRandApp3>
       <iRandApp4>0</iRandApp4>
   </Rands>
   <iPlayer>0</iPlayer>
   <iTilesPer>0</iTilesPer>
   <iMinLandPercent>0</iMinLandPercent>
   <iUnique>0</iUnique>
   <iGroupRange>0</iGroupRange>
   <iGroupRand>0</iGroupRand>
   <bArea>0</bArea>
   <bHills>0</bHills>
   <bFlatlands>0</bFlatlands>
   <bNoRiverSide>0</bNoRiverSide>
   <bNormalize>0</bNormalize>
   <TerrainBooleans/>
   <FeatureBooleans/>
   <FeatureTerrainBooleans/>
</BonusInfo>
 
If you want the original civilization 4 bts dll decompiled I can send it here.
And if you want to let up to as many civs as you want you need to edit the CvDefines.h file.
The hard part will be to compile the dll back but I am still trying to figure that out:dunno:.
 

Attachments

  • CvGameCore.zip
    5.9 MB · Views: 119
Hello,
I cannot get my game to read the map -- even when using the CvGameCore.dll Louis provided. On the download pages for the 40 civs mod you reference, it is a rar, not a dll. Could you post the CvGameCore.dll you used for your maps? Thanks :)
 
Top Bottom