tom2050's "Found Notes" on "Using Culture to Influence AI Improvement Build"

Ozymandias

In Terra Fantasia
Supporter
Joined
Nov 5, 2001
Messages
10,361
Location
The lone and level sands
Without further ado:

Spoiler tom2050 - :

I've been testing attaching cultural values to influence the sequence with which the AI builds city improvements.

By attaching 12 culture to a granary, you make it a higher priority than a settler at the start of the game. The AI doesn't grow fast enough to make a settler and spends a lot of time waiting for pop. A slightly lower culture value also works, but will not ensure.

By attacking the highest value to walls, the AI will be likely to build it first. Walls are cheap and tremendously benefit the AI. 20 shields is nothing for the demi and above AI whose smaller food box doesn't compensate for the huge settler discount. This punishes forgoing bombard. Attacking with just horsemen will be costly.

Barracks are another improvement the AI will only build the middle ages in stock game. Militaristic civs are a joke in AI hands. A value around 8 ensures the AI builds it early before it has produced most of its spearmen. Expect facing vet spears behind walls.

Other buildings like harbors, courthouses, aqueducts, coastal forts, civil defense can have culture added to make the AI build them in a timely fashion, something it doesn't do in stock game.

Test show that the AI expands a little slower in the early phase in city count due to being busy building these buildings. But benefits from larger cities that will spit out settlers faster. Research is also better because the larger cities work the roaded tiles the AI improves (AI workers work around old cities instead of connecting new ones). This should be even more pronounced once Flintlock gets it to stop irrigating green in despot. The stock game deity AI gets out 4-5 size 1-2 cities without improvements by 2600BC. The modded AI gets out around 3-4 size 3-5 cities with granaries, walls and barracks by 2600BC. With more granaries, it's in a better position to continue REXing, esp if there is lots of space.

BUT, the AI whips. All that culture makes it think it needs to get them out ASAP. Whipping has to be disabled in despot in order to obtain the results above. Otherwise it will end up with size 1 cities on entertainer. Also, the AI values to Pyramids sooooo much more and would build it as soon as it has Masonry. I solve that by putting a number of improvements required.

But all this added culture distorts the builder aspect of the game. How do I balance it out and limit the change?

Negative culture is the solution.

For example we have granaries being +12, walls being+13 and barracks being +8 we've added 33 culture to the game that will double down the road. Culture even for the warmonger is needed to expand the city border. And the cheapest you can do that without discount is 60 shields. I'd like to maintain that aspect of the game. I don't want granaries to expand borders.

So I have 33x2 extra culture to negate. So an improvement with -66 culture is needed. I couldn't get the AI to build it in a timely manner before it gets a border expansion from the buildings above. Nor could I get the AI to build a SW to generate them in time. No matter how much culture the SW has, the AI doesn't like the negative culture improvement it generates and ignores it. It may build it down the road, but it's too late.

I tried having the Palace generate these negative culture improvements. It didn't work because the palace is an improvement. Maybe Flintlock could change that? So I changed the palace to a SW. It worked. The negative culture improvements are there. The drawback is that now you can't change the capital as easily and lose a pre build. Setting up a new successor city via pop and culture and deleting the old capital is the only way. I tried adding a "Palace2" improvement with the same "center of empire" flag but that doesn't work. If you lose your Palace SW and new one will spawn regardless. It can even spawn in your Forbidden Palace city.

So how does one expand the border starting out -66 in the hole? The palace has +67 to ensure that the capital gets the usual expansion. Cultural victory points shall have to be adjusted accordingly. Once the palace's culture doubles the capital will be churning out 68 culture a turn. With other cities you need a +67 culture improvement. But that would defeat the purpose of prioritizing the buildings above. I solve it like this:

Monument gives +67 culture and 1 happy face at 40 shields, requires Poly and a Shrine (+2culture, 1 happy face, 40 shields, requires Ceremonial B.). That way the AI prioritizes the buildings above and builds a shrine like it would do with stock game temple. A border expansion costs 80 shields. Religious civs do it faster than anyone else as they get cheap shrines and monuments. Gotta give something back to science civs though.

So far there is a mystery I've encountered:

In my mod I have walls obsolete to be replaced with stronger similar improvements. 8 bombard def is useless past ancient age. So at Engineering they get replaced by "Citadel". Citadels have a culture of +3 and the AI builds it. But when I built a new city and rushed the citadel, my border expanded shortly and the city grew at +3 culture despite having the SW generated negative culture improvement present. Shrines at +2 get negated just fine. I've no explanation for that. More testing is needed.

Play around with the culture values on debug too find out what numbers helps the AI the most. If anyone is interested in testing I'd be very glad. It's time consuming after all.
∔∔∔
Further testing show that all the original stock game BLDG entries comply with negative culture. Some new BLDG entries do as well but for the most part, they simply ignore negative culture. The reason why I'm not sure. It could be hardcoded.

So in order to have a "Citadel" with a culture of +12 that conforms to negative culture, I use the BLDG_Library for it. As for the Library, BLDG_Library2 is used instead.
The new Library with the entry BLDG_Library2 ignores the SW generated negative culture building and thus has its original +3 culture and will expand your border upon building despite having that -66 culture SW generated improvement.

By having new BLDG entries for all improvements that you wish to ignore negative culture you could have old culture values and play with the standard cultural victory limits.
 
Top Bottom