Armies

@Thalassicus:
I'm looking over version 8, and spotted that Landsknecht/Sipahi/Cossacks should have their obsolete tech changed like Pikes/Lancers/Cavalry.
 
@Joneill
@Bibor
I like the idea and would do it if it were possible. I searched the xml and lua API for "health" "hp" and "hitpoint" and didn't find any results unfortunately. There's a "HealRateChange" property for buildings which I think increases the healing rate of the city, based on a comment by Afforess about future plans for his Active City Defenses mod. I could do a combination of lower cost, higher strength, and/or improved city healing. Maybe Castles and Military Bases each add +1 healing?

Hm, I think it's in Globaldefines.xml

row 886 (notepad++):

<Row Name="MAX_CITY_HIT_POINTS">
<Value>20</Value>

I tried changing the value to 50 and started a duel in modern era. My two Mech inf. attacks took away around 10 hitpoints from the 47:c5strength: city and the bar moved by like 20%.
 
Hm, I think it's in Globaldefines.xml

row 886 (notepad++):

<Row Name="MAX_CITY_HIT_POINTS">
<Value>20</Value>

I tried changing the value to 50 and started a duel in modern era. My two Mech inf. attacks took away around 10 hitpoints from the 47:c5strength: city and the bar moved by like 20%.

Trouble is, I don't think you can change this value for ONLY those cities that have walls, etc. with our current editing tools, which is the goal in question.
 
After testing I found that despite the fact the HealRateChange property exists for buildings, it appears to do nothing. This was disappointing. There appears to be no way to modify city health or health regeneration with the current xml tools, both of which would be ideal solutions to the city defense issue. Once we can do so, I'm going to have it set up so each defensive structure increases durability 50%:

Vanilla: 20hp 1 hp/turn
Walls: 30hp 1 hp/turn
Castle: 45hp 2 hp/turn
Base: 70hp 3 hp/turn

As a temporary measure, I've modified city health to 30hp and increased the :c5strength: bonus of defensive buildings.


@Perkus
I do ObsoleteTech by unit class, which alters both normal and unique units.

This is the confusing difference between changing most attributes of units (like obsolescence) vs their upgrades... there's no way to change upgrades by unit class so you have to do individual unit types. It would have made much more sense to include the upgrades in each unit type of the <Units> table instead of a separate <Unit_ClassUpgrades> table.


@Bibor, clearbeard
Right, what clearbeard said. City health is clearly stored separately (hp isn't just a global 10 everywhere), we just don't seem to have a way to modify it yet on a per-city level.
 
Warning: v.9 doubles the defensive values of Walls, Castles, and Military Bases. If you are also running the "Active Base Defense", this will now double the already increased defensive values, such that Castles are +24 and Bases are +45! And it's not as simple as disabling the ABD mod - it's marked as "Affects Saves", although I don't think it should be from what I can see. If you disable and reload a save that used it (apparently it now lets you do that - since when? .621? I'm sure it used to complain that it was missing mods), it seems that it will still load the disabled mod anyways.

Similarly if you are using another mod that strengthens city defenses.

@Thalassicus:
Because of this, you may want to consider changing the SQL to set specific values instead of just doubling. Less future proof, but more conflict-resistant.

Re: mass type updates - D'oh, sorry, I should have realized that.
 
Thank you for pointing that out. Yeah, to do individual buildings I'd have to set walls, castles, mughal forts, babylon special walls, etc individually, checking all their values from the xml with manual calculations, and it wouldn't affect other buildings added to the game. Probably an extra half hour of work. :crazyeye: I should have thought about compatibility though... getting sleepy! :lol:

If you're using Active City Defenses just delete the first 2 lines of BU - General.sql in the Balance - Units mod folder.

Code:
UPDATE Buildings
SET Defense = ROUND(Defense * 2,-1);

I'd done a similar thing in my copy of ACD a while back and had forgotten. Also, mods with Affects Saves enabled can be enabled/disabled by setting this line in the *.modinfo file:

<AffectsSavedGames>0</AffectsSavedGames>
 
I just tried hacking Active Base Defense "AffectsSaves" flag to 0 and reloading the save again with Units v9. The results are not what I expected. It loads, and Walls are now +10 (doubled 5), while Castle and Base are still 12 / 22.5 from ACD! Weird - it seems like the building table changes is stored in the save game itself, but loaded only after the balance - Units mod is executed. Or maybe the mod execution order is just unpredictable. Anyway, this isn't any sort of solution - deleting those 2 lines is much better. And I guess that flag is turned on for a good reason after all.
 
Oops. Yeah, that's a mistake from when I thought I could reduce the clutter of upgrades or something (was going to convert some xml to sql). There's no statement for it in the project actions so the unfinished file just is ignored, no harm done.
 
Some more comments: I think cavalry could use a reduction in cost, they're only really worth as an upgradeunit right now, building them seems kind of cost-ineffective compared to riflemen (+1 move and ability to move after attacking vs no counterunit, no resource required, defensive boni, lower cost). Horsemen and even knights seem to compare much more favorably to the infantry unit of their era.

Also, in your reasoning for the tank changes, you compared them to mech. infantry. Isn't that the actual problem, that Electronics is easier to reach in the current tech-tree then combustion? Maybe Electronics should have some additional tech requirements (right now you don't even need rifling (riflemen) or replaceable parts (infantry) to get to it, which seems kind of strange). Combustion as prereq would put both of the above units into the techpath to mech. infantry and seems to make sense, too (mech. infantry without knowledge of combustion?).

Another oddity of the tech tree is that neither flight nor combustion require the oil-revealing tech biology, but both techs enable units requiring this resource. As far as I can tell, all other units have their required resource revealed when beelined too (which just means that getting tanks takes even longer, further reducing their chance to shine on the battlefield).
 
I don't think the Defense boost is working. Building walls still adds +5 for me.

EDIT: It's not listed in the Actions.
 
@Joneill
You have some good points about Cavalry. I could change them to 100%:c5production: of Riflemen.

The huuuge problem with tech prereqs is the organization of the tech tree. It's easier to visualize CiV's method for the player than any earlier Civ, but you run into restrictive problems of how to balance the links. I'm not certain it's possible to prereq electronics to combustion without crossing links. I could flip the positions of the whole post-combustion line with post-flight, and the telegraph/radio branches with one another, but then there's the problem of the radio->radar link. That link basically blocks any flipping of the tech tree in that area.

As such, I don't think it's practical to prereq electronics to combustion, but I could add some prereqs in its local area. Maybe link replaceable parts -> radio -> electronics, but that would make the tech tree so tightly woven it would significantly reduce options.

This is why I went with direct unit balances instead of tech linkage... tech tree revisions are extremely convoluted if I want to maintain consistency with the existing system.


@jwallstone
Thanks for pointing it out. Little mistakes like that make me wish it was possible to do major and minor versions like Starcraft II's system. The custom game interface for SCII turned out horrible though, especially the whole "popularity" ratings and lack of effective map categorization, so I really like CiV's modding service more overall. Publishing SCII maps was confusing, convoluted, and insanely buggy. Best part about CiV is how it uses industry standards like xml, sql, lua and c++... SCII has the restrictive Galaxy script...

...but anyway, I'm getting off on a tangent. :lol:
 
Agreed on the modding issues. I did a lot of WC3 modding, but never got interested in SC2.

On the tech issue, someone suggested switching some techs with each other. Another issue is that you can get infantry without ever having seen rifleman. But it's a whole convoluted mess, and some things don't make sense historically. Probably best to just stick with balance, as you said.
 
Agreed on the modding issues. I did a lot of WC3 modding, but never got interested in SC2.

On the tech issue, someone suggested switching some techs with each other. Another issue is that you can get infantry without ever having seen rifleman. But it's a whole convoluted mess, and some things don't make sense historically. Probably best to just stick with balance, as you said.

Not sure if it's possible with our current tools, but I for one would like to see a general requirement that you must research ALL of a given era's techs before you advance to the next era. At least on a trial basis, as I'm sure there are loads of unintended consequences to THAT change! It would at least have the benefit of forcing you to know rifling before (mech) infantry, etc.
 
Does mechanized infantry need to be speed 4 like tanks? It seems to me that speed 3 would be more balanced & appropriate. These are infantry in APCs, one could argue they will generally need to exit the APCs before engaging and fight on-foot to be effective. So a mid-point value between on-foot infantry and fighting vehicles seems reasonable. And it maintains the speed advantage that cavalry-style units have over infantry in all previous eras.

@Thalassicus
City Defenses are now being tripled? What worries me is that this may make city-states almost impossible to take over, I'm pretty sure they get some sort of extra defensive bonus already. They were often already quite tough, at least early on. And deity help anyone who mindlessly runs this with Active City Defense and thinks tripling its values (Castle +36, Base +67) is the intended behaviour!
 
Something I find really odd, is the fact that ships (esp starting with the Frigatte) are much better at destroying land units than other war ships or even transport ships. Maybe lowering the damage to land units a lot and raising the damage to ships moderately would make sense.

and keep up the great work, btw :)
 
Hi Thalassicus

Thank you for this mod - I'd been looking for something that converted the ranged promotions to melee as well as making Lancers upgrade to AT and this mod covers those very nicely.

Just wanted to give you some feedback re: City Defenses. You've tripled the strength of City Defenses e.g. (Walls +15, Castles +22). I've just played two games on Immortal using v.11 of this Units Mod and I think this is a tad too strong.

Scroll to the bottom if you want to skip wall of text

CALCULATING THE CITY DEFENSE OF CITY STATES

The problem in particular is City States (and higher difficulties). Each City State is counted as a Capital and has a Palace, which adds +6 Defense.

City States prioritize defense buildings, even when not under threat. The Palace defense added to Walls (+15) makes city-state conquest in the Ancient, Classical and Medieval eras very difficult.

Base City Defense (Ancient Era) +3
City Size Modifier - Size 1-3 (+0), Size 4-7 (+1), Size 8 or more (+2)
Palace +6
Walls +15
Garrison Modifier (approx. Unit Strength / 5, rounded up)

Science City Defense Modifier (SCDM) - there's also another scaled city defense modifier based on the amount of beakers/techs researched. From a quick runthrough starting from the Ancient Era (Normal Speed) with your Gradual Research mod I saw City Defense increase by +1 after completing techs worth a total of ~250 beakers, another +1 at ~500 beakers, another +1 at ~1000 and a further +1 at ~1600. I have not been able to work out the formula but from rough observation, by the time I was able to field say 2 Spearman + 1 Archer, the SCDM is +2. For Classical Age armies (Catapult / Swordsman / Horseman) the SCDM is +4.

(Keep in mind that SCDM is based on the tech of the defending AI or CS, so on higher difficulty levels the further they are ahead of you in tech, the greater the SCDM).

On Prince difficulty (and no garrisons), this gives us around +27 for a Ancient Era CS defense, or +29 for Classical Era.

My gameplay experience

I play on Immortal (where the CPU has faster tech), and here you get +30 for Ancient, +34 for Classical. Again, discounting garrisons.

Best Ancient Melee unit is Spearman (Str 7). With these odds, its impossible to take out a city without siege. Which is great! - no more of this conquer the world with 1 Archer + 1 Spearman. Or 3-4 insta-healing Horsemen.

So I thought - fine! just research Mathematics and build a Catapult. I actually had to build 2 since the 50% more city hp plus higher city defense value meant that if I only had 1 Catapult I would need to retreat it due to counter-bombardment.

By this time, city defense is +34. Catapults take some time do their job - CS hp reduced to 1. And this is when I find out that even with 3 full hp Spearmen they will lose all 10 hp on assault :)

I had GG (+25%), Drill II (+40%) and they could not take CS left with 1 hp. From a mathematical standpoint, I understand that 11.5 v 34 are not very good odds :) But this really broke immersion from me since I had the city surrounded with 3 x 10 hp spearmen, the city was down to 1 hp but I could not take it.

I decided to make peace, trade for more Iron, and upgrade my original Warrior to Swordsman. And lol by the time I reach the CS he has entered Medieval Age and built a Castle (+22). Defense is now 56. Odds were now 18.15 v 56! :)

I eventually took the city with a Samurai :) But I found it funny (and immersion-breaking) that the CS had 1 hp for over 60 turns (Normal speed), completely surrounded (except the coast) and I could not take it :)

This problem is not as bad with the AI Civs since they do not prioritize walls as highly as the CS and early on you are usually not taking the enemy Capital.


GENERAL OBSERVATIONS

Anyway, some general observations from two games with v11 of this mod on Immortal:

1. On higher difficulties the CS / AI tech pretty fast. CS prioritise Walls even when not actively attacked / threatened so they often have Walls (from Masonry) before you've researched Mathematics, settled Iron and built your first Catapult. This makes taking an early CS for their resources more challenging and makes gold for influence or settling a new city for resource much better options.

2. Even with the appropriate era units e.g. Swordsman vs City Walls you need to rely on promotions (Shock/Drill/Siege) to break the CS.

This hurts the AI as they are not very good at keeping their units alive - they tend to DOW and throw a multitude of contemporary era units against the Walls and eventually make peace. I find that the AI generally only manage to capture CS during late Medieval / early Renaissance once they have plenty of Longswords.

3. Musketmen (Str 15) are weaker than Longswords/Knights (Str 18) and have difficulty taking Castled cities (even when reduced to 1 hp). Makes sense mathematically but a little immersion-breaking from a technological advance standpoint since the Musketmen are a Renaissance Age unit.

Even with reasonable forces e.g. 3 Musketmen, 2 Trebuchets if you have no promotions and/or GG they will not take a Castled city.

3. I understand the intention behind making the defences scale better as later city conquests happen too fast. Would it be possible to make the Walls, Castles and Military Bases scale according to the depth of the tech in the tree?

e.g. Walls are obtained from Masonry which is two techs in. At the same level we have Triremes, Spearmen and Chariot Archers. None of these units should be able to threaten a Walled City without Siege support.

Swordsmen / Horsemen / Catapults being 3 techs into the tree (and also requiring Strategic resources!) should have an easier (but not easy!) time.

Similarly Castles should be impregnable to anything before Longswords (same tech depth, Melee 18) but we should also at least be able to take 1 hp Castles with Musketmen.


TL;DR

Defense buildings are now disproportionally strong compared to when they are available in the tech tree. This can make cities impregnable to contemporary era units, even when supported by GG and Siege. The problem is particulary noticeable when attacking City States (which also have a Palace providing +6 defense) and on higher difficulties.

Suggest scaling the defense buildings by tech-tree depth instead of by entire era, allowing units available later in the same era to be more effective against defenses. This would also be a good way to model technological advances vis-a-vis offense and defense.

Suggest the following numbers:

(vanilla Civ5 - Palace +6, Walls +5, Castle +7.5, Military Base +12 - Total +30.5)
(v11 of Units Mod - Palace +6, Walls +15, Castle +22, Military Base +36 - Total +79)
(Suggested - Palace +6, Walls +10, Castle +20, Military Base +30 - Total +60)

Typical Size 6 CS defense, Immortal Difficulty, with Suggested Numbers:
Ancient - +25 (vs Spearman 7, same tech depth (2) as Walls)
Classical - +29 (vs Swordsman / Horseman 11 - tech depth of 3)
Medieval - +51 (vs Longsword / Knight 18, same tech depth (5) as Castle)
Renaissance - +53 (vs Musketman 15 - tech depth of 6)
Later Ages - no data as did not play beyond late Renaissance

This gives (roughly) a 3:1 City Defense to Unit Strength ratio at each age, without taking into account promotions and GG. With 2xpromotions/GG (+65%), the ratio is closer to 2:1, which I think is a good risk/reward ratio for building defense and still allows us to take CS as long as we have siege.

(Note that my sample size is not huge since this is only two games so it may not be completely representative. I ran through a quick Prince game with v.11 and your Gradual Research Mod and the numbers held with about a -3 through -7 difference. Perhaps others can provide more data but this is what I feel is a reasonable starting point).

Thanks for sitting through this wall of text!
 
Thanks for the feedback! I can test things in "laboratory" conditions of a premade map and preplaced units, but it doesn't give the real-world practical testing necessary to get it just right.

The goal is to strike the fine line of siege-melee-ranged-mounted usefulness so a balanced army is more powerful than just spamming 1 unit type.

Interesting point about city-states. I did not realize they got extra bonuses above and beyond major-civ AIs, whose type of city I was testing combat odds against. I'll add your suggested strength values for defenses.

Do you think it would help if the Siege promotion required the first rank of Drill/Shock instead of the second? I buffed this promotion for several reasons:

  • Makes the promotion viable in contrast to Drill/Shock 3 -> march/blitz line.
  • Ties in with the changes to city defense, encouraging specialization of units for siege or in-field roles.
  • Aids in balancing mounted units, since they cannot receive the Siege promotion.

It appears one problem might be it isn't available soon enough. The +40%:c5strength: is significant in tipping the odds in the attacker's favor. (This is why we REALLY need a way for buildings to add city hitpoints -- improve durability without significantly changing per-battle odds.)

Something else I considered is adding a second Siege promotion, where the first is 30% and second is 40%, though my concern is that might specialize units too much for a game that relies on fewer units than Civ IV.
 
The goal is to strike the fine line of siege-melee-ranged-mounted usefulness so a balanced army is more powerful than just spamming 1 unit type

To tackle this problem properly, we need to first observe two separate aspects of the units and buildings in question.

First, the benefit of defensive buildings changes over time and could be roughly divided into:
1) no siege units era
2) 2-hex siege units era
3) 3-hex siege units era
4) air bombardment era
5) modern bombardment era

In the first era the role of defensive buildings is both to increase bombard damage and reduce attack damage from melee units. Defense :c5strength: from population is small, thus city walls are extremely important.

In the second era a much larger variety of units and improvements (forts, roads) are available both to the defender and the attacker. Defensive buildings now shift away slightly from dealing damage to survival (keeping those 20 hitpoints for as long as they can) because powerful ranged units are kept invunerable within cities (supplementing the bombard damage of the cities).

In the third era cities can be bombarded from hexes outside their bombardment range, so the damage dealing component gets limited to attacking foot units actually performing the attack as well as providing cover for defender's own artillery. In this age the actual units defending the city are the most important component of city defense, because cities themselves can be bombarded to 1 HP without chance of retaliation, no matter what the actual city :c5strength: is.

In the fourth era, the city as a defensive position shifts again. It serves as a protected airfield and its own AA gun. Damage from aerial attacks can be mitigated by high :c5strength:, especially since cities "always retailate" to air attacks and you can't "sweep" cities to prevent this. Not only does an 60:c5strength: suffer minor damage from bombers, but bombers themselves get massive damage from even performing the attack. Cities in the fourth era serve as a "last stand" as well as a logistics center.

In the fifth era, as stealth bombers enter the scene, city defense :c5strength: becomes limited in effect, since stealth bombers have high chances of avoiding interception of any kind.

Conclusion: Defensive buildings are most important in the first, second and fourth age. Which is also historically correct.

***

Now lets look at already implemented unit roles. The ones that work anyway. Lets stick to "off the shelf" options, disregarding level 3+ promotions which come through combat experience.

Footmen (the warrior line, ending with mech. inf) has two possible upgrades the role of city attacker, both available starting at barracks+armory, being Cover I and II (up to 50% less damage from bombardment) and Amphibious (removing the 25% and 50% penalty for attacking across river or directly from sea). Since these two promotion lines are already in game and are efficient in what they do, I'm discouraged from suggesting to add further bonuses to this unit line.

Cavalry (the horseman line, ending with modern armor) has the built-in advantage of attacking the city from outside its bombardment range. In effect, if the city is taken that turn, this is a larger advantage than having Cover II. Since the role of horsemen and tanks should be different anyway, I also feel that adding city attack bonuses to this line would be a sidestep from their original role - that being the masters of non-city combat.
(A side note Thalassicus, your upgrade line from Cavalry to Tanks is completely broken when playing Songhai. Modern Armor upgraded from Mandekalu cavalry gets a mere 10% penalty when attacking cities. There's almost no reason for a Songhai player to ever build anything on the warrior line as long as they have access to horses, oil and aluminum).

***

Siege and anti-siege unit types

Archer units (Archer, Crossbowman, Chariot Archer, some UUs) are an interesting side-line of standard units. All of them eventually get upgraded into non-ranged units. The general idea behind archery units is to serve in the role of anti-siege or more broadly, anti-units. However in CIV5 and especially in this mod they can also serve as city attack units. This I find very disturbing since it almost completely eliminates the need for siege weaponry, thus obsoleting catapults, trebuchets, wooden ships and even cannons (cannons being performing poorer than Chu-ko-nu, Longbowmen, Camel Archers and Keshiks).

I strongly feel that reducing the city bombardment ability of archery units and boosting the city bombardment abilities of the artillery line should be the proper way of handling the issue of city capture.

Not only would this make it obvious that archery units are designed to defeat units, but it would finally give siege weapons a niche.

This would also be historically correct. Chu-ko-nu, crossbows and bows do little damage to structures, but do massive damage to personnel, while siege weapons do little damage to personnel but massive damage to structures. Buildings, in turn, do massive damage to personnel who happen to be in the vincinity. This was true until explosive shells were devised, some 2000 years after siege weapons were first designed.

***

My suggestion is that all archers are being given the -50% attack penalty of tanks, but with Siege I being available without requirements. An archer coming out of a barracks+armory would still be able to get get Siege II (+50% vs cities), thus eliminating the -50% penalty, but would be highly specialized.

In turn, artillery pieces (catapults, trebuchets, cannons, artillery, rocket artillery) should have Siege I, II and III enabled without requirements, with Siege II opening up Range and with Siege III opening up Logistics.

Thus, an Archer unit with maxed out promos will have a +25% extra damage versus cities, while a Catapult will have +85% damage (+10%+25%+25%+25%) versus cities.

This way, players would be inclinded to use archery units for their original purpose (anti-unit role) and leave the artillery units to do the city bombardment. In cases of dire need (or massive lack of iron) archery units can still serve as siege units but would be much less efficient.

As cannons enter the scene they start replacing both archery units and trebuchets, but again, different promotions on cannons will ensure they all have different roles. As things stand now, since getting terrain promotions to open up Siege I is mandatory, all my cannons perform exceptionally well against units (especially since I stick to Rough terrain bonuses for artillery). This shouldn't be the case.
 
How about just giving siege units a bonus to nearby melee attacks against cities? Don't know if it's possible to limit it to just against cities, but even a general bonus is not too unreasonable. Keeping your melee units around siege all the time for the bonus is tough, as you have to be careful to not open the siege unit to counterattack on open ground.
 
Top Bottom