New Version - February 7th (2/7)

Status
Not open for further replies.
Can't speak for anyone else, but I found VP to be an excellent Valentine's Day companion! :love:

I've noticed a lot of discussion about resource population and distribution, which is coincident with an unusual situation that has arisen in my current game. I'm playing Rome on a standard continents map and spawned on a fairly large continent with five civs and eight city-states. I managed to grab the Fountain of Youth with my first settler and couldn't wait to get my super-legions up and running... until I researched Bronze Working and discovered that recruitment, or rather supplying equipment, would be a difficult endeavor. I counted 8 Iron on the entire continent in four nodes of two each. One node is on a small peninsula at the southeast corner 20 tiles from my starting location, two nodes are clumped together next to Assyria's start at roughly the same distance, and the last is tucked away in Florence in the northwest corner which is again about 20 tiles away. By contrast, the number and location of luxury resources appears normal, and I counted 24 Horses evenly distributed in equal amounts of twos and fours. This is the amount and spread of strategic resources I am used to seeing and I have not encountered this dilemma before, much less while playing a civ with an early iron-dependent UU. I should also mention that there are six deer and ten cattle (!) yet only one each of sheep and bison, though I have noticed more variance with bonus resources in the past. Does this map condition jive with anyone else's experience? I considered submitting an issue on github but I'm not sure whether this belongs in the realm of "bugs" or is more like an extreme end of the bell curve of probability. Either way, with that 3:1 horse-to-iron ratio, I wish that I had played Mongolia instead! I do wonder if Genghis is on the other continent, surrounded by iron, desperately searching for horses. At least he's not around to bother me... Egypt is, though! :egypt:

My plan is to keep Ashurbanipal happy and well supplied with furs, and gold if necessary, so that I can get a DoF and secure his precious iron for myself. Unfortunately, his second and third cities were placed to the north and west respectively, leaving the eastern iron still unsettled and unimproved at turn 65. Additionally, as his western expansion is a forward settle of Gandhi's capital, I suspect that he will be too occupied with that operation to settle again in the near future. My other options are to quickly settle the remote peninsula (which will require clearing a barbarian encampment and will be distant and vulnerable for quite some time), to perform an extreme forward settle maneuver on Assyria (yes, he went Authority...), or to ally/conquer Florence. There is a war between Florence and their neighbor Riga that I could use to my advantage, but conquering Riga would only yield enough influence to stay "just friends" with Florence for a few turns. Also, that war began on turn 45, meaning that I'd had little time to build a homeland army, much less an expeditionary force that would take at least ten turns to march there, only for the war to end just as I finish clearing out their defenses and begin to attack the city itself. I realize that city-state quests, rewards, and ultimately resource distribution are inherently random, so that doesn't bother me too much. It's more that, considering the limited options I have available to take advantage of my UU, all of them appear to require a significant investment of time and/or assets, yet none of them will permit me to build more than a few legions in total. :sad:

Otherwise, the game is going well. I captured Babylon's second city after he forward settled me with reckless abandon. I was already planning for Nebby to be my first conquest, and he must have agreed that it was meant to be as he settled Akkad right where I wanted him to and left it completely undefended. Admittedly, it wasn't a foolish settle, only five tiles from his capital and in an optimal location for resources, which makes it even more baffling that he did absolutely nothing to retain it. In the several turns before I declared war, he briefly had a single warrior in the vicinity who was quickly recalled to the capital. I took the city in three turns (including a turn of moving into position) with two archers, two spearmen, and a pathfinder to soak city bombardment. Neb never so much as moved a unit into my visual range! Out of curiosity, I reloaded to a previous turn and attacked without waiting for my second spearman to be completed. Same story. I know I had the FoY promotion (+5 healing) but I never needed to heal any units and there were no improvements to pillage. Babylon went Tradition so they would have had the city ranged strength bonus if the capital could have just spared a warrior for the garrison, but as it stands, the Nebster must have considered Akkad a lost cause from the very start. Or else he knows >tfw no gril iron on v-day and he's just trying to help a brother out. :thumbsup:

Besides those irregularities, this patch is great so far. I've really noticed the AI exploring effectively and dealing with barbarians proactively, acquiring some CS friendships in the process. I don't know if the code for this AI behavior has been touched recently, but compared to previous versions where it often felt like the only people fighting barbarians besides me were city-states fending for their lives, that was refreshing. I used to run Chill Barbarians mostly for that reason alone, but it doesn't appear to be necessary anymore. I'll have to see whether that assertiveness extends to the CS uprising quests or if they still typically let cities flip to the barbarians as they often seem to do. Trade deal evaluation appears to be fair and reasonable. The nerf to rewards for meeting CS is a bit saddening as it always felt like a decent consolation prize for finding them instead of ancient ruins, sometimes even just as good as ruins if you earn enough influence for a super-early friendship as well, but I understand that it was difficult to balance. It even seems like the city governor AI is doing a better job, especially with assigning optimal tiles for settler production. In the past, even with production focus on, I found that it would still assign tiles based on food yields, even when a different tile would give more total hammers (accounting for food-to-hammer conversion and other yields as well). The governor didn't seem to understand that having positive food, or even having enough food to feed the citizenry, is pointless and inefficient when there are hammers available due to how the stagnation mechanic works with settler production (having negative food does not create starvation). I imagine that the AI suffered little if at all from this given their bonuses, but unless my recent experience is a fluke, it looks like I don't have to micro-manage that as much anymore! :king:
 
Last edited:
A quick apology and correction about what I was saying about how strategic resource placement works in the Communitas map script:

I spent a couple of hours last night going through the map script and realized, to my shame, that the variables I thought were keeping track of the quantity of resources spawned to certain tile types were actually percentage weights used to divide the "standard" resource quantities prescribed by the main game across the various types of tiles. That means that Communitas, in theory, should have the same amount of iron/horses/coal/etc. as any other map at a given size and resource setting. But in practice we can observe that it does not, and it looks like there are a few reasons for that.

Once Communitas generates all of the terrain tiles (a more complicated process than I was willing to give my full attention to understand) it starts iterating through the different strategic resources, placing them down in deposits (based on the deposit size for each resource, which is a variable that can be easily changed). The resources are placed in a certain order arranged in the code by both tile type (forested hill, flat desert, etc.) and resource type, with each resource given a weighting for each terrain type. For example (weights made up for example purposes), terrain of type 'desert_hill' can spawn iron (60%), aluminium (20%) or uranium (20%). The code also has density variables that ensure major deposits of resources cannot spawn within X tiles of another resource of the same type. The code iterates through, placing resource deposits until A) the allowed resource quantity as described by the map settings is reached or B) there is no more legal places to spawn new deposits. All is good so far, as the code then goes through and places minor deposits with different density rules to try and fill in holes in the distribution and make sure there is enough of each resource (based on the map settings).

Then things get interesting. The code then goes through and adds even more resources, focusing on the many 1-2 tiles islands that get generated as part of this map script. A custom weighed list is used to assign 1 of a number of possible resources (stone, coal, iron, etc.) to "small islands" to ensure that these otherwise useless landmasses have some reason to be settled. These bonus resources do not take into account the # of resources already spawned on the map, so even if the max allowed resource limit has been reached by the first 2 waves of resource placement this "bonus" pass can end up adding too many of a certain resource, depending on the RNG of the weighted list. Coal, Iron, and Stone are pretty evenly weighted on this list, for example, which might explain why there are so many coal and iron deposits that spawn on tiny islands in Communitas maps, and why there is so much total coal, iron, and other resources on the map overall.

So what can you do if you think Communitas spawns too many resources? Well, the easy solution is just to play with the "Scarce" resource map setting. On Communitas this lowers the total # of resource allowed by about 33% (Scarce applies 0.667x modifier to max allowed resources and Plentiful applies 1.5x ). Alternatively you can find the weighted list of "bonus" resources allowed on 1-2 tiles islands and change the weighting so that coal/iron/whatever have a lower chance to spawn compared to stone/deer/fish/bison/etc. Beyond that you would really have to get into the nitty-gritty of the weighted density maps the script uses to initially place its major and minor resource deposits, or maybe slip in a 0.9x or 0.8x modifier into the code when it firsts calls the max allowed resource quantities from the map settings.

Anyway, sorry for posting bogus info in my last reply. I feel pretty silly about misunderstanding how the code was operating. :blush:
 
Quick and small question gang:

Which is the difficulty where the AI gets no bonuses?
 
A quick apology and correction about what I was saying about how strategic resource placement works in the Communitas map script:

I spent a couple of hours last night going through the map script and realized, to my shame, that the variables I thought were keeping track of the quantity of resources spawned to certain tile types were actually percentage weights used to divide the "standard" resource quantities prescribed by the main game across the various types of tiles. That means that Communitas, in theory, should have the same amount of iron/horses/coal/etc. as any other map at a given size and resource setting. But in practice we can observe that it does not, and it looks like there are a few reasons for that.

Once Communitas generates all of the terrain tiles (a more complicated process than I was willing to give my full attention to understand) it starts iterating through the different strategic resources, placing them down in deposits (based on the deposit size for each resource, which is a variable that can be easily changed). The resources are placed in a certain order arranged in the code by both tile type (forested hill, flat desert, etc.) and resource type, with each resource given a weighting for each terrain type. For example (weights made up for example purposes), terrain of type 'desert_hill' can spawn iron (60%), aluminium (20%) or uranium (20%). The code also has density variables that ensure major deposits of resources cannot spawn within X tiles of another resource of the same type. The code iterates through, placing resource deposits until A) the allowed resource quantity as described by the map settings is reached or B) there is no more legal places to spawn new deposits. All is good so far, as the code then goes through and places minor deposits with different density rules to try and fill in holes in the distribution and make sure there is enough of each resource (based on the map settings).

Then things get interesting. The code then goes through and adds even more resources, focusing on the many 1-2 tiles islands that get generated as part of this map script. A custom weighed list is used to assign 1 of a number of possible resources (stone, coal, iron, etc.) to "small islands" to ensure that these otherwise useless landmasses have some reason to be settled. These bonus resources do not take into account the # of resources already spawned on the map, so even if the max allowed resource limit has been reached by the first 2 waves of resource placement this "bonus" pass can end up adding too many of a certain resource, depending on the RNG of the weighted list. Coal, Iron, and Stone are pretty evenly weighted on this list, for example, which might explain why there are so many coal and iron deposits that spawn on tiny islands in Communitas maps, and why there is so much total coal, iron, and other resources on the map overall.

So what can you do if you think Communitas spawns too many resources? Well, the easy solution is just to play with the "Scarce" resource map setting. On Communitas this lowers the total # of resource allowed by about 33% (Scarce applies 0.667x modifier to max allowed resources and Plentiful applies 1.5x ). Alternatively you can find the weighted list of "bonus" resources allowed on 1-2 tiles islands and change the weighting so that coal/iron/whatever have a lower chance to spawn compared to stone/deer/fish/bison/etc. Beyond that you would really have to get into the nitty-gritty of the weighted density maps the script uses to initially place its major and minor resource deposits, or maybe slip in a 0.9x or 0.8x modifier into the code when it firsts calls the max allowed resource quantities from the map settings.

Anyway, sorry for posting bogus info in my last reply. I feel pretty silly about misunderstanding how the code was operating. :blush:

Thank you for doing that investigation. I've always thought communitas was a decent script except that it made strategic resources not strategic. Don't know why it didn't occur to me to try scarce resources but I will certainly do so in my next game.
 
Hate to join the choir, but I just had Nebuchadnezzar DOF me and DOW me the next turn. Guess the DOW was ok as we were beginning to have serious territorial disputes but why DOF me the turn before..?

\Skodkim
 
Hate to join the choir, but I just had Nebuchadnezzar DOF me and DOW me the next turn. Guess the DOW was ok as we were beginning to have serious territorial disputes but why DOF me the turn before..?

\Skodkim

Isn't Nebu particularly high on the irrational/ crazy flavor for AI? I would think this behavior might actually be in line with his normal MO.
 
Every game I play, every civ has a DoF with every other known civ, including me, until the back-stabbing starts when the elbow room becomes limited. 1) these loving sessions seem silly and absurd, even though they really do not seem to affect long-term play much. 2) it is, however, annoying to be bombarded in the early game with all these "You like Shaka? Me, too!" pop ups....

Did not it use to be that you had to have an embassy before you could get a DoF? Maybe enforcing that would be a quick solution to this silliness.
 
Remember that logging is what I need. If you don’t have AI logging on you should.

G
I have AI logging enabled but no AI logs seem to be in the logs dir (logs attached).

config.ini:
Spoiler :

[Debugging]

; Set to 1 to enable the fire tuner to connect to the game.
EnableTuner = 1

; Validates the game database whenever it is changed.
ValidateGameDatabase = 0

; Set remark levels (ex. /R0 /R1:Video - means all off except video level 1) (default "/R1"
Remarks = /R1

; Set remark log filename; empty for no remark log
RemarkLog =

; Sets a breakpoint on a specified object allocation order number (debug only).
CrtBreakAllocNum = 0

; Set to 1 to send FRemark output to the tuner
SendRemarksToTuner = 0

; Set to 1 to enable mem tracking when using a mem tracker build
EnableMemTrackerSystem = 0

; Set to 1 to do various embedded memory tracker dumps
DoMemTrackerDumps = 0

; Set to 1 to disable hotloading of objects
DisableHotLoader = 1

; Set to 1 to enable asserts in debug mode
EnableAsserts = 1

; Set to 1 to have loose files override PAK files if the loose file is newer
LooseFilesOverridePAK = 0

; Set to 1 to quiet D3D warning and leak msgs
D3D Mute = 0

; Enables the use of the standard Lua debug library.
EnableLuaDebugLibrary = 0

[User Settings]

; Set to 1 to enable threaded submission to D3D11
Threaded Submission = 1

; This is capped at runtime to the number of physical processors
MaxSimultaneousThreads = 8

; Throttles the app when focus is lost
ThrottleOnLossOfFocus = 0

; Set to 1 to activate the debug panel
DebugPanel = 0

; How close you can get (11.0=default, 4.0=debug zoom)
Minimum Zoom Level = 11.000000

; Whether or not to use screen space terrain overlays
Use Screen Space Overlay = 1

; The currently selected steam language
SteamLanguage = english

; The currently selected language.
Language = en_US

; The currently selected spoken language.
AudioLanguage = en_US

; Set to 1 to disable Fall-back Language Support in the Localization System.
DisableFallbackLanguageSupport = 0

[CONFIG]

; Mimimum size of the temporary heap, in megabytes
Minimum Temp Heap Size = 32

; Maximum size of the temporary heap, in megabytes
Maximum Temp Heap Size = 68

; Enables the game core to run in a separate thread
EnableGameCoreThreading = 1

; Set the game core thread to use the Job Manager, or its own dedicated thread
GameCoreThreadingUsesJobManager = 0

; Random seed for game sync, or '0' for default
SyncRandSeed = 0

; Random seed for map generation, or '0' for default
MapRandSeed = 0

; QuickStart - SinglePlayer games only!
QuickStart = 0

; Bandwidth options are modem or broadband
Bandwidth = broadband

; Number of seconds to accept live game list updates from GameSpy (-1 for initial snapshot only, 0 for no live updates
GameUpdateTime = 10

[MiniMap]

; Mini-map width.
Width = 320

; Mini-map height.
Height = 190

; Thickness of camera rectangle, in pixels
CameraRectThickness = 10.000000

; If ratio of explored area to visible region size is less than this (on both axes), do not draw camera rect.
CameraRectThreshold = 1.000000

; Extra space, in pixels, to leave on edge of explored region
ExploredRegionGutter = 20.000000

; Alpha value for fog
FogAlpha = 1.000000

[DisableSystems]

; Set to 1 to disable Terrain system
Terrain = 0

; Set to 1 to disable LandmarkSystem system
LandmarkSystem = 0

; Set to 1 to disable Overlay system
Overlay = 0

; Set to 1 to disable OverlayDebug system
OverlayDebug = 1

; Set to 1 to disable Decal system
Decal = 0

; Set to 1 to disable City system
City = 0

; Set to 1 to disable Unit system
Unit = 0

; Set to 1 to disable Forest system
Forest = 0

; Set to 1 to disable River system
River = 0

; Set to 1 to disable LeaderHead system
LeaderHead = 0

; Set to 1 to disable Audio system
Audio = 0

; Set to 1 to disable Combat system
Combat = 0

; Set to 1 to disable Particle system
Particle = 0

; Set to 1 to disable Projectile system
Projectile = 0

; Set to 1 to disable FOW system
FOW = 0

; Set to 1 to disable FluidFOW system
FluidFOW = 0

; Set to 1 to disable YieldIcons system
YieldIcons = 0

; Set to 1 to disable DistanceFog system
DistanceFog = 0

; Set to 1 to disable StrategicView system
StrategicView = 0

; Set to 1 to disable Minimap system
Minimap = 0

; Set to 1 to disable ColorKeyEdit system
ColorKeyEdit = 1

; Set to 1 to disable Waves system
Waves = 0

; Set to 1 to disable Arrows system
Arrows = 0

; Set to 1 to disable MovementPath system
MovementPath = 0

[Debug]

; Use a background thread for asynchronous D3D submission.
ThreadedExecute = 0

; Controls the threading strategy: (0=default,1=no display lists,2=one DL per command set, 3=split mode, 4=aggregate mode)
ThreadingMode = 0

; Number of commands per diplay list to aim for in SPLIT and AGGREGATE thread modes
TargetJobSize = 100

; Maximum number of frames to allow D3D to queue up. 0 means default. DX11.1 only
MaxFrameLatency = 0

; Enable message logging
MessageLog = 0

; Rand event logging bitfield. bit 0 = on/off, bit 1 = log callstacks, bit 2 = log pregame calls, bit 3 = log asynchronous RNGs
RandLog = 1

; Enable AI logging
AILog = 1

; Enable AI performance logging
AIPerfLog = 1

; Enable Builder AI logging
BuilderAILog = 1

; Enable Tutorial logging
TutorialLog = 1

; Enable Tutorial debug window
TutorialDebug = 0

; Split AI Logging into separate files for each Player & City
PlayerAndCityAILogSplit = 1

; Saves the game after the human player presses 'next turn' but before the game logic advances
PostTurnAutosaves = 0

; Enables stack-trace collection on random number generators and FAutoVariables. Slightly slower and uses more memory
EnableOutOfSyncDebugging = 0

; Set App on Auto-Run
Autorun = 0

; Number of turns to autorun before exiting (0 for no limit)
AutorunTurnLimit = 0

; Enable the logging system
LoggingEnabled = 1

; upload assert logs and crash dumps to the server
UploadReports = 1

; Delete reports after uploading to the server
MoveReports = 1

; Show combat debugging overlays
CombatDebug = 0

[TextKey Settings]

; Enable triggered sounds from units (3dsmax Note tracks) (default 1)
Enable markered sounds = 1

[Audio]

; Disable sounds from gamecore (also can set via tuner) (default 0)
Disable Sid Sounds = 0

; Enable in-game music (default 1)
Enable music = 1

; Ignore any variation cap settings (default 0) (Sound guys, set this to 1)
Disable audio variation cap = 0

[GAME]

; Allows the player to give right click movement movement orders while the camera is scrolling
AllowRClickMovementWhileScrolling = 0

; Force quick combat animations
QuickCombat = 0

; Game Name
GameName = My Game

; Worldsize options are WORLDSIZE_DUEL/WORLDSIZE_TINY/WORLDSIZE_SMALL/WORLDSIZE_STANDARD/WORLDSIZE_LARGE/WORLDSIZE_HUGE
WorldSize = WORLDSIZE_SMALL

; Climate options are CLIMATE_ARID/CLIMATE_TEMPERATE/CLIMATE_TROPICAL
Climate = CLIMATE_TEMPERATE

; Sealevel options are SEALEVEL_LOW/SEALEVEL_MEDIUM/SEALEVEL_HIGH
SeaLevel = SEALEVEL_LOW

; Era options are ERA_ANCIENT/ERA_CLASSICAL/ERA_MEDIEVAL/ERA_RENAISSANCE/ERA_INDUSTRIAL/ERA_MODERN
Era = ERA_ANCIENT

; GameSpeed options are GAMESPEED_QUICK/GAMESPEED_STANDARD/GAMESPEED_EPIC/GAMESPEED_MARATHON
GameSpeed = GAMESPEED_EPIC

; Victory Conditions
VictoryConditions = 11111111

; Game Options
GameOptions = EMPTY

; Max number of turns (0 for no turn limit)
MaxTurns = 0

; Allow AI in multiplayer games
EnableMultiplayerAI = 1

; GameType options are singlePlayer/spLoad
GameType = singlePlayer

; Map Script file name
Map = Assets/Maps/Continents.lua

; In-game Alias
Alias = Joakim

; Email Address
Email = Joakim

; Save Path - relative to working (Civ5) folder
FileName =

; Handicap for quick play
QuickHandicap = HANDICAP_IMMORTAL

; Blocks players from entering the city screen
CityScreenBlocked = 0

[UserSettings]

; Last Civilization Played
LastCiv = 14

; Last Game Speed Played
LastSpeed = 1

; Last Map Type Played
LastMapScript = C:\Users\Joakim\Documents\My Games\Sid Meier's Civilization 5\Maps\A_JHW_Map_v04_05.Civ5Map

; Last Map Script Was Random
LastMapScriptRandom = 0

; Last Map Size Played
LastMapSize = 4

; Last Map Size Was Random
LastMapSizeRandom = 0

; Last Game Difficulty Played
LastDifficulty = 6

; Store advanced settings in Cache folder
PersistAdvancedSettings = 1


\Skodkim
 

Attachments

Gazebo or anyone else, can anyone give me a layman's guide to enabling diplomatic AI logs for Gazebo's research? As "idiot-proof" as possible, please :D I've started a game with the latest version and I've been seeing what others have reported, i.e. lots more of DoFs/denounce/DoW roller-coasters compared to recent versions, and I'd like to help with logging.
 
As Infixo pointed out to me when I was having this problem:
; Enable message logging
MessageLog = 0
MessageLog must equal 1 to get logs.

From what I understand, to get AI logs (not necessarily any other debug information), the following variables must be in place:
Code:
; Enable message logging
MessageLog = 1
; Enable AI logging
AILog = 1
; Enable AI performance logging
AIPerfLog = 1
; Enable Builder AI logging
BuilderAILog = 1
; Split AI Logging into separate files for each Player & City
PlayerAndCityAILogSplit = 1
; Enable the logging system
LoggingEnabled = 1

Is there any way these requirements can get added to the "Bug Reports" sticky? Should I just make a post in that thread with this information?
 
Thanks, Rekk!

Gazebo, Infixo, can either of you confirm this is all you need to have full required AI logs generated? Thanks!
 
Thanks. Do I need to clear any cache or anything before starting a new game after making these 5 changes in the config.ini file? And after a session of Civ V, where do I find the logs to upload them?
 
Thanks. Do I need to clear any cache or anything before starting a new game after making these 5 changes in the config.ini file? And after a session of Civ V, where do I find the logs to upload them?

No, they'll auto populate as you play. And they appear in the logs folder next to MODS and cache.

G
 
Status
Not open for further replies.
Back
Top Bottom