Realism Invictus

I just ran into a situation that's very frustrating: I got attacked by a civilization that is placing its troops on the territory of a nominally neutral third-party country with which I don't have open borders. In real life, letting a country's territory be used to stage an invasion is seen as an hostile act, but in-game there is no proper way to deal with it except declaring war on the third-party, which is usually much less involved in the war plan than it would have to be in real life.
I am guilty of exploiting that "feature" by using neutral cities as my bombers base. Helped me a lot in late game to kick back AIs who aim for space and cultural victories.
 
The city maintenance costs are not the same in Realism Invictus and basic CivIV and have a very different goal as a game mechanic.

To simplify it a bit, the basic idea of the number of cities maintenance formula is like this. City A costs 1. When you build city B, both city A and B cost 2. When you build city C, all three cities will cost 3. When you build city 50, all 50 cities cost 50. You can see the quadratic nature of these costs mean that at some point, you won't be able to pay the costs and the jumps in cost for each additional city become ever larger meaning that even the most ideal city spot will become unprofitable for expansion.

(This is a simplification as the cost is also dependent on city size.)

In normal Civilization IV, these costs were capped at a maximum (dependent on difficulty level), say a max of 7 per city. That meant that costs grew quadratic for a little while, but then became linear with the number of cities. This stopped the early land grab to become a race, but at some point in the game, your cities could pay for these maintenance costs ever more easily and you could expand again. But that was after the early land grab phase and you'd have to fight through established borders or find some undiscovered remote island.
As we discussed earlier, for me a key point is something you're downplaying with "at some point". Sure, at some theoretical point the jumps in cost for each additional city become uprofitable. Is that "some point" low enough to discourage expansion altogether? I don't think so. There's enough economic growth as you progress through eras that you can expand at a decent pace and attain a high enough number of cities. And if we're talking about endgame here, a conquest victory, then you're no longer capturing the cities to improve your economic situation - you're capturing them to win and from gameplay perspective, they aren't necessarily supposed to make economic sense for you at this point.
 
Hungarian Bowman (4), doesn't look stronger than a Hungarian Archer (3)
I am also in favor of reducing the cost of servicing cities, just a little bit
 
Last edited:
North and south Chinese chariots(4) look like in the late Middle Ages.
There is no such thing as "late Middle Ages chariot". The chariot closely resembles Shang-era chariot, and you can't get much earlier than that (~1500 BC).

1726845238194.jpeg
 
A dumb AI, for example, an enemy country has 4 cities and 20 units, when I go to capture his city, he has 5 units in the city, and he rarely sends his reserves to war with me, which makes his capture too easy. Many coastal cities are building several dozen mini boats, although this is pointless and hinders their economy.
 
All of this will only affect anything if salt is currently not being placed enough to reflect its XML settings. Desert is one of the "emptier" terrains, and finding a desert spot to place some salt is usually not hard.
Not quite. It also means that the expected distance between the capital and the nearest salt source will typically be lower. With deserts restricted in latitude, and with scripts like Totestra being restricted to an even more limited geographical location (if there is a big continent and a smaller one, the smaller one will have little to no desert), even if salt spawning was multiplied tenfold it would still remain impossible to access reasonably for most civs. That's the gameplay reason against the current terrain restrictions - especially if access to salt is made more strategically important.

While salt lakes found in some deserts are a source of salt, they were very far from being the dominant one, since they were much more difficult to access and sources existed in many other places. Historical examples of salt sources found in hilly terrain and on grassland terrain abounds. That's the historical accuracy reason.

I'll just give a few examples:
- So-called Himalaya salt that comes from mountains now named the "Salt Range" - https://en.wikipedia.org/wiki/Salt_Range It's also not desert, although I don't know if grassland or plain is the more accurate representation.
- One of the salt mines that was exploited the longest in history (with brine exploitation since the neolithic), located in Wieliczka in Poland, is located in an area that would definitely be considered "grassland" or "grassland hills".
- The ancient and major salt mine near Salzburg in Austria, which literally gave the city its name, is unambiguously located in grassland hilly terrain.
- The Varangéville salt mine in France, still exploited commercially to this day, is also unambiguously located in "grassland" terrain (also hilly I think).

Most major saltworks that exported their production widely have existed and continue to exist in areas where the XML restriction make their spawning impossible.

I am actually not quite sure how abundant salt as a resource should be. I definitely don't want it to be a case of "everyone gets one". I feel it has its own interesting niche as a commerce-boosting (rather than food-boosting as all others) limited resource. I can see a case for marshes though (and not just coastal - inland marshes with salt in them can basically stand in for salt lakes).
It should not be so abundant that it never takes any effort to access. Sometimes you might need to alter where you are going to found your next city, or need to make war to contest it from a neighbour. Sometimes, you might need to trade it (with the current amounts, it's very rare for a civ to have a surplus so it's basically impossible to get through trade). But if you decide to prioritize it (at the expense of other things), I believe it should always be possible to supply your cities with salt.

You didn't say anything about it so I guess my pickling tech idea didn't convince you. :lol: Although I think there is a good case for it!

I'll see what I can do. Interestingly, when playing with separatism on, the player can get more data on their own war weariness than they would otherwise already, as it can basically be directly checked in the separatism screen via the war weariness separatism modifier.
I'll admit that I didn't even know war weariness had its own separatism modifier, mainly because it's all about icons in the city screen so while I understood the obvious ones (culture, disease, unhappiness, military presence), there were elements I didn't quite understand;

Do you feel it merits investigation?
I suppose it's low-priority. I'll see if similar things happen again in the future.

Heh, it is immune to gunpowder. Would make very little sense otherwise. Should be better sign-posted though, now that you mention it.
The civilopedia entry explicitly says it provides 25% defense "except against gunpowder units", which is why I mentioned it.

I agree that by default it should probably stretch itself to the whole width of the selected resolution, but I probably won't be touching it, at least not as a high priority, given that it's fixable as a DIY.
Agreed.

Then again, depending on the context, war trophies might constitute a very sizeable "technology transfer bonus" basically throughout the whole history - even recapturing your own city, you probably captured a lot enemy equipment and their temporary headquarters for the region.
That's somewhat true for military technologies, but when it comes to getting some artistic technology, it feels strange.

Perhaps check if the captured city has the "provisory government" building? At least reduces the size of the tech boost in that situation.

I'd like to draw everyone's attention again that "Avoid growth" buttons (and yes, in vanilla Civ 4 too) are not (just) AI settings to micromanage food (though they will redistribute away from food once the cap is reached). It is literally a button that prevents a city from growing even when there's surplus food available. It's not just an AI setting, it's a game feature.
I learned something new. If it prevents growth even with surplus food available, it would save me some micromanagement.

Actually, if it was possible to tweak the UI to make that section of the city screen bigger, that'd be great. These buttons are too small. :lol:

Eh, I'm not quite sure about it. To rack up a sizeable negative bonus, you have to basically completely screw someone over (like raze a dozen of their cities), which can reasonably be a cause for them to hate you forever.
In my South China game, in 1000AD, with Celts, 5 penalty for "you declared war on our friends", 9 penalty for "you didn't help us in times of war". That alone makes good relations impossible, although I was never directly at war with them. They really spammed the war help requests throughout the game even when they already hated me and it would have been impossible for me to get anything out of them diplomatically no matter how large the bribe or how overpaying I would be for ressources.

I liberated one of their cities because I could get it in a peace deal and it was cut off from my main territory, but they still hate me anyway.

Wasn't that how it all worked back in Civ 1-3 days? Costs from buildings rather than cities? IIRC it strongly encouraged wide gameplay, where actually developing your cities might have led to you being worse off.
Back in Civ3 it affected nearly every single building, and at the same time many of those buildings weren't really required to get a city pumping out military or being useful in some other way, so yeah sometimes developping a city was harmful. Developing distant cities was both very slow (because the hammer production was ruined) and often financially damaging. Since in Civ4 distant cities don't get their production/commerce massively slashed, however, there is more room for them to grow useful.

Something else that encouraged wide gameplay was that for the early waves of settling "empty" territories, the RoI was very high, and the earlier a new city was built, the earlier it could start to grow, produce money, etc. A city created later is a city delayed in everything, so growing "taller" on the very early cities meant being "shorter" on the further ones.

Barbarians are a good tool to make fast early expansion more difficult in theory, but in practice the incentives to bust fog-spawning means that staying more focused in your core area make you more vulnerable to major barbarian raids than expanding...

If you want to have a 4X strategy game spanning the whole of history, you should not expect to be able to even remotely recreate the Roman Empire when playing optimally, sad as it is
You make some solid points. I mostly pull up the example not to say I should be able to recreate a Rome-like empire (especially at high difficulties - there is always the possibility to play in a low difficulty for a power-trip fantasy), and more to highlight the deficient nature of the number-of-cities gold penalty.

What do you think of the idea of making cultural conversion slower that I proposed? I think this sort of mechanics would inherently make building large empires less attractive, without erecting a barrier such as the num-of-cities maintenance that create situations with those characteristics:
- All core cities have all possible relevant buildings
- All relevant tiles have been improved by workers already
- The civilization has a big standing army that has the military might to go seize land, or some newly explored unclaimed land available
- The best play is to sit doing nothing waiting for the next techs - not because the war might be risky or costly, but because winning it leads to a clearly worse position. Except perhaps if some tech can be obtained by conquest, I suppose, but releasing the city back possibly being the correct play.

I think another element that makes warmongering so attractive is access to raw resources. The Happiness and Health caps are a considerable constraint for most of the game, so expanding to get access to more resources increasing these caps is very attractive. A small civilization is simply condemned to be lacking a lot of health-giving and happiness-giving resources, especially since neighbours often don't have much surpluses to trade and half the time they get angry and won't trade anything no matter the price. So to some degree, in order to grow tall, you need to grow wider - to get the resources you need.

I think if there was more possibilities to trade for resources instead of going to war for them (I'm even imagining some contraband options that cost more but could bypass diplomatic refusal...), it would give more tools for smaller civilizations.
 
It should not be so abundant that it never takes any effort to access. Sometimes you might need to alter where you are going to found your next city, or need to make war to contest it from a neighbour. Sometimes, you might need to trade it (with the current amounts, it's very rare for a civ to have a surplus so it's basically impossible to get through trade). But if you decide to prioritize it (at the expense of other things), I believe it should always be possible to supply your cities with salt.
We already have many Converter-buildings as I call them in the game - but if Walter would extend the use of converterbuildings, then most types of resources are needed "in larger numbers".

Fx. we already have the Powder_Mill, then Saltpeter is used to produce Gunpowder. Now if this Gunpowder is "used" in an arsenal (fx. stored to provide gunpowder/blackpowder to landtroops/siegeunits/navalunits etc.) then all locations with Saltpeter are vital since you can only make one Powder_Mill and therefore also only one Arsenal per Saltpeter resource. Since this Arsenal also gives 1 free exp.point to the <UnitCombatType> UNITCOMBAT_GUN, it's important to have Arsenals in each of cities, where you train those units. Therefore you need all the arsenals you can get (or at least need).

We could also take the use of Iron and Coal. Those resources is needed to make Steel. And Stell is needed to make the bonus Artillery in an Artillery_Yard. Now to make the siege_unit Artillery, you also need both the building Artillery_Yard and the resource Artillery. See???? You need each and every Iron and Coal resource you can grap. Else the places, where you can produce your siege_unit Artillery is very limited.

As for Salt. Say Salt is needed with fx. Cow and Pig to make one of the Canned_Food resources. So if you do not have Salt (and Cows and Pigs), then you cannot make any of those types of Canned_Food_Factories.

Don't be afraid, that is will be too complex for the AI to understand and use. It is not. I know that for sure as I'm using above concept anywhere I can in my Spinn-Off.


Of course above would be even better if the AI was able to trade away (or buy) two "units" or more of a bonus, if it had surplus of (or missed) a certain bonus, but I don't think any will try/is able to make this possible. Anyway - I'm sure both the AI and the Human will be ready to go to war if any bonus really-really is vital and much needed.
 
HI. May I know how to make minor civilizations in the world huge scenario play like other civilizations? that grow, interact. thx
 
A dumb AI, for example, an enemy country has 4 cities and 20 units, when I go to capture his city, he has 5 units in the city, and he rarely sends his reserves to war with me, which makes his capture too easy. Many coastal cities are building several dozen mini boats, although this is pointless and hinders their economy.
What difficulty level are you playing?
 
- The polish Lisowczyk has an issue in its "take damage in defense" (lack of) animation
- Limited buildings such as "Constitutional Monarchy" not being destroyed upon conquest is problematic.
- I got an incorrect string replacement: %s_city ; in the translation for the spies damaging a city notification
- The gold reward for sacred shrines now depend on a religion's influence. It should perhaps also be slightly scaled depending on map size?
- What is the number of turn until revolution based on? I have seen it in the standard BtS games too, but it's obscure why it's sometimes 1 turn and sometimes 2 turns or 3 turns.

What difficulty level are you playing?
It's not my original remark, but I see the same thing. Difficulty level should mostly affect how may units the AI can afford, not how smartly they are used.

Unfortunately, the AI stacking up a lot of units in cities in the back is somewhat necessary to prevent players from abusing it on a wide-scale. If you knew the AI has only one or two defenders in cities in the back, there would be ways to take those cities easily, and even if you can't hold them, that's enough to destroy the productive base of another civilization.

@Walter Hawkwood - This might be too difficult or even unfeasible considering how fundamental this mechanic is, but would it be in theory possible to have a 1-turn delay on city razing? That is, you need to hold the city for one turn from potential counter-attacks before the raze order is applied. The standard building destruction from city capture would still apply.
 
Last edited:
A dumb AI, for example, an enemy country has 4 cities and 20 units, when I go to capture his city, he has 5 units in the city, and he rarely sends his reserves to war with me, which makes his capture too easy. Many coastal cities are building several dozen mini boats, although this is pointless and hinders their economy.
I went back to playing 3.4, the only version, at least for me that has a more more competitive A.I. and where the vassals are really a resource, since 3.6 I find the game too simple, don't ask me why, but If you don't believe me, try it yourself. I tried 3.61 again just two days ago at emperor level after one hundred rounds, I practically won, redid the same map with 3.4 same level of difficulty just surviving was an achievement.
 
I went back to playing 3.4, the only version, at least for me that has a more more competitive A.I. and where the vassals are really a resource, since 3.6 I find the game too simple, don't ask me why, but If you don't believe me, try it yourself. I tried 3.61 again just two days ago at emperor level after one hundred rounds, I practically won, redid the same map with 3.4 just surviving was an achievement.

I will actually ask you why. That is a rather strange soapbox you keep getting on. I started playing RI with 3.5, but am legitimately curious what you would identify proximately as being superior about 3.4's AI.
 
I will actually ask you why. That is a rather strange soapbox you keep getting on. I started playing RI with 3.5, but am legitimately curious what you would identify proximately as being superior about 3.4's AI.
The vassals evolve better, they can be first in terms of technology, which no longer happened to me with 3.6, where the vassals basically become zombies, the cities are much better defended, it also needs a stack of 1000 troops in the middle of the game sometimes to defend your territory, while in 3.6 with 50 troops with a good level of experience you practically do the whole game. this to tell you a few
 
The vassals evolve better, they can be first in terms of technology, which no longer happened to me with 3.6, where the vassals basically become zombies, the cities are much better defended, it also needs a stack of 1000 troops in the middle of the game sometimes to defend your territory, while in 3.6 with 50 troops with a good level of experience you practically do the whole game. this to tell you a few

Well, I mean more specifically to ask whether you can identify a specific change which results in this perceived difference?
 
Well, I mean more specifically to ask whether you can identify a specific change which results in this perceived difference?
specifically it would be very difficult to understand what made 3.6 so easy at least for me, compared to 3.4, I also enjoy modding, so it doesn't take much to even add 5 more buildings sometimes to make an A.I. easier to beat. Sometimes making an A.I. more balanced can also depend on luck,certainly greater complexity makes life more difficult for AI. I believe that before the patches were better tested because many more players played them, now the patches, but it applies to all mods, have little testing phase, because only few players play them and sometimes they are not experts. for me, who has been playing realism invictus since 3.3, I can say that the best patch, between balance and difficulty, remains 3.4. which for me is a masterpiece.

3.55 is also an excellent patch without using revolutions
 
Last edited:
it also needs a stack of 1000 troops in the middle of the game sometimes to defend your territory, while in 3.6 with 50 troops with a good level of experience you practically do the whole game. this to tell you a few
Needing a stack of 1000 troops sounds horrible. Micromanaging unit movement is one of the things that take too much time, and the role unit cost creating a soft limit on how many units are going to be fielded is very welcome in this regard.

The AI would benefit a lot from changes to make it smarter though.
 
believe that an a.i. can be more competitive without creating large stacks, it's a utopia in civ 4. Creating troops to defend oneself means having to know how to manage the economy better, it means having to necessarily weaken the enemy, sometimes it means having to attack it preventively, it means having to keep friends close.it means having to vassalize civilizations to have useful allies in war.

This is what you need in 3.4 to survive at high levels. without all this the game turns into farmville

the modifications to make an A.I. more intelligent have reached the maximum, I think that today no one can work on this aspect, the only thing to do is balance.

the A.I. can only beat you on the level of war, there is no other way, unless you give him huge advantages, but then the game would become horrible
 
Last edited:
I have never realized that before, but the maintenance values in the "City Detail" screen and in the "Domestic Advisor" list do not match, as the latter does not take into account the inflation factor. To fix that, I modified the CvCustomizableDomesticAdvisor.py file as follows:

Line 271
from
("MAINTENANCE", 30, "int", CyCity.getMaintenance, None, 0, None, None, "self.redGoldIcon"),
to
("MAINTENANCE", 30, "int", None, None, 0, self.calculateMaintenance, None, "self.redGoldIcon"),

Line 1315
from
return unicode(city.getMaintenance())
to
iMaintenance = city.getMaintenanceTimes100() * (100+gc.getPlayer(city.getOwner()).getInflationRate()) / 100 # K-Mod
return unicode(iMaintenance / 100)

The 2 values now match (except.for the decimal part).

1726882220840.png

1726882269224.png
 
Last edited:
I guess the main thing is make AI stop waging wars if ALL of its cities start revolting because of war weariness.
While testing other things on self-play I noticed that the main problem is not really a war weariness - it's the way how AI manages spending sliders because let's imagine a war is declared while having culture on 20% and espionage on 5%, then we're suddenly setting everything to 0% because we need money to maintain our fighting army, but at the same time due to this, chance for revolution in cities skyrockets to some crazy values like 90 or 100%. If they are not reverted fast enough by AI, the whole empire collapses even while not really being in danger. I didn't check how this is evaluated in details, but in some potential rework it would be probably the very first thing to address.
 
Back
Top Bottom