CiVUP - CiV Unofficial Patch

  1. I've spotted a problem with the changes to EnemyUnitPanel I submitted (for showing terrain bonuses vs. city attacks). It seems that the siege units do not get the same benefits for having open/rough bonuses vs. terrain as other land units do. The promotions Barrage/Accuracy (?) don't work vs. cities like Drill/Shock, so currently it's showing bonuses you don't actually get. It probably also means it's wrong for all ranged units, since they use Barrage/Accuracy too. I haven't checked it for ranged yet.

    I haven't coded this fix yet. I will eventually, if you want to wait. It should just mean adding "and (UnitType ~= RANGED)" tests to the IsOpenGround and IsRoughGround checks in UpdateCityCombatOdds().

  2. On a different note, I believe the spoken quote used for Machinery actually belongs to the Printing Press, since it makes little sense there and mentions the press. But I'm not sure what the existing Press quote is for - are they just swapped?

  3. Not sure this is LUA mod-able or how, but game suggests nearby railroad improvements when you select a general and have Railroad tech, as if he was a worker. Maybe somebody knows. They fixed "Selecting a great general will no longer cause yield icons to appear." in the patch, this is in the same vein.
 
Clarification of the Mughal Fort tooltip will be in the next version... when working on the Civilizations balance mod today I noticed it has +20%:c5strength: compared to the Castle it replaces, which isn't too obvious unless you closely compare the two civlopedia entries. Also, nowhere in the tooltip or civlopedia entry does it state the actual gold bonus from Flight, which is +3:c5gold:.

I'm also working on clearing up ambiguity for unit promotions, most of which simply say there's a buff or penalty but don't specify what the penalty is.

This ties in with the odd decision to manually enter most tooltip and Civlopedia entries, instead of automatically reading the values from the XML files. I'm normally very understanding of most design decisions for this game... it's why I've been trying to keep all my balance mods close to vanilla... but the choice to manually create documentation was just plain bad. Blizzard took a much better route in its games, where you can read game data and insert that into tooltips. The B17 tooltip would look like:

Air Unit that rains death from above onto enemy Units and Cities. Only the Americans may build it. This Unit has a <UnitPromotions.PROMOTION_EVASION.InterceptionDefenseDamageModifier>% chance of evading interception, and does <UnitPromotions.PROMOTION_AIR_SIEGE_1.CityAttack>% additional damage to Cities compared to the Bomber, which it replaces.

Then simply have the tooltip parser replace table references with appropriate values. I don't know why it wasn't done this way. It results in bugs like Free Thought stating 2:c5science: instead of 1:c5science:, or Keshiks stating a 100% xp bonus when the value is actually 50%.


@Seek
I'll see if that's possible... I agree it's annoying they neglected to hide unmet civs from the score list.


@Perkus
1. No rush. The bonuses all take effect from a gameplay perspective, this is just a display issue.
2. The quotes are similar, but don't appear to be accidentally swapped... though Machinery would fit better for Printing Press, and that one better for Mass Media... still, doesn't appear to be a bug.
  • Machinery: The press is the best instrument for enlightening the mind of man, and improving him as a rational, moral and social being."[NEWLINE] - Thomas Jefferson
  • Printing Press: "It is a newspaper's duty to print the news and raise hell."[NEWLINE] - The Chicago Times
  • Mass Media: "The speed of communications is wondrous to behold. It is also true that speed can multiply the distribution of information that we know to be untrue."[NEWLINE] - Edward R. Murrow
3. That's probably not something we can solve with the current tools.
 
I have a suggestion...

Nowhere have I found details that list the strength and weakness of the following units: (Anti-Heli and Weak v Ranged are listed but provide no bonus list in the help)

Fighters/Zero/Jet Fighters
-75% Ranged Combat Strength
+50% vs Fighters (Zero Only)
+100% vs Helicopters

Bombers/Stealth Bombers/B17
-50% vs Naval

It would be nice, if this would show up on a description or in a tool tip in the build queue. It took me until now... 100 hours of playing to figure out why my fighters were doing so little damage to ground/sea units. Also, is there a way to have the air bombard odds show, like they do for land and naval. Thanks and keep up the great work :goodjob:

EDIT: Here is the code if you want to add it...

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/29/2010 9:45:41 AM -->
<GameData>
	<Language_en_US>
		<Update>
		<!-- Promotion is coded as -75%; help showed -50%  -->
			<Where TAG="TXT_KEY_PROMOTION_WEAK_RANGED_HELP"/>
			<Set Text="-75% strength when using Ranged Attacks"/>
		</Update>
		<Update>
			<Where TAG="TXT_KEY_PROMOTION_ANTI_HELICOPTER"/>
			<Set Text="Bonus vs Helicopters (100)"/>
		</Update>
		<Update>
			<Where TAG="TXT_KEY_PROMOTION_ANTI_FIGHTER"/>
			<Set Text="Bonus vs Fighters (50)"/>
		</Update>
		<Update>
			<Where TAG="TXT_KEY_PROMOTION_NAVAL_PENALTY"/>
			<Set Text="Penalty vs Naval (50)"/>
		</Update>
	</Language_en_US>
</GameData>
 
Thanks, that will help save me some time! :)

I never before realized jet fighters have 8:c5rangedstrength: against ships, and WW2-era fighters 6:c5rangedstrength:. (If I'm calculating right?) Though... AI never built ships before 1.0.0.62 so I haven't been in that situation yet. It seems like an excessive penalty, less damage than a crossbowman.
 
Thanks, that will help save me some time! :)

I never before realized jet fighters have 8:c5rangedstrength: against ships, and WW2-era fighters 6:c5rangedstrength:. (If I'm calculating right?) Though... AI never built ships before 1.0.0.62 so I haven't been in that situation yet. It seems like an excessive penalty, less damage than a crossbowman.

My numbers are:

Fighter/Zero - 50 :c5rangedstrength: x 0.25 = 12.5 :c5rangedstrength:
Jet Fighter - 70 :c5rangedstrength: x 0.25 = 17.5 :c5rangedstrength:

How did you calculate 8 :c5rangedstrength: and 6 :c5rangedstrength:?

But I understand your point and agree, fighter bombarding is too low...

EDIT: For gameplay this encourages their use in an air superiority role, which may have been the designers intent. I just expected them to perform more like flying artillery, not flying catapults...
 
Remember that against ships they're getting a double hit of -75% (ranged) and -50% (naval) penalties. The wording on the -75% one is confusing... does it modify ranged damage directly, or apply as a normal penalty? If it modifies damage and then the 50% penalty is applied, damage would be 6:c5rangedstrength:. However, if it's just a normal penalty, in Civ IV I think penalties were applied as bonuses to the opponent... perhaps V does it the same way:

50 * (1 + sum of bonuses) / (1 + sum of penalties)

50 * 1 / ( 1 + 0.75 + 0.5) = 22

In this case -50% wouldn't be a 50% penalty, but actually a 33% penalty. Additive products are confusing as heck, I prefer straightforward multipliers... otherwise you end up in paradoxes. To keep a 0.5 penalty as 0.5, they could add an inverse to the defender (adding 100% to make the defender twice as strong) but that runs into issues again when you add multiple penalties (two 0.5's would result in 300% defender strength, not 400%). On top of it all, in Civ IV they had all those crazy combat odds calculation formulas after you get the relative strengths so it was impossible to figure relative value without dumping stuff in Excel.
 
Remember that against ships they're getting a double hit of -75% (ranged) and -50% (naval) penalties...

Only Bombers have the Naval Penalty. Fighters have a general -75% Penalty. But this raises another question, what numbers are used when the fighter is intercepting a bomber... This could all be solved if we could see the damage air units could do, like we can for naval and land units :D Also, why can't I see how much damage a city bombard will do...
 
Hm you're right, I could have sworn I saw it on fighters too in the xml file, but I was working on so many promotions at once I suppose they blurred together. There's still the question of, is a 50% penalty -0.5 or -0.67? In other words, additive (like Civ IV) or multiplicative (like most other games).

Bombing is horribly done right now. No circle indicating range, no combat odds, and the graphic of the bombing mission takes like 30-40 seconds to complete 1 attack. And AI's don't build planes. Before 1.0.0.62 there was that whole issue of aircraft stack numbers staying on old hexes, too. It's clearly unfinished.
 
Hm you're right, I could have sworn I saw it on fighters too in the xml file, but I was working on so many promotions at once I suppose they blurred together. There's still the question of, is a 50% penalty -0.5 or -0.67? In other words, additive (like Civ IV) or multiplicative (like most other games).

Bombarding is horribly done right now. No circle indicating the bomber's range, no combat odds, and the graphic of the bombing mission takes like 30-40 seconds to complete 1 attack.

Good question, I don't know the answer. The promotion could be given to a catapult in a mod and then someone could look at the panel that displays projected damage and see how it is applied. Like I mentioned before, too bad we can't see the projected damage for air units and city bombards :cry:
 
It's an important question too, since I hadn't taken it into account when doing some unit balance changes... my mind was automatically thinking 50% to attacker == 200% for defender, without considering the weird way it's been done in Civ. Shouldn't take too long to test, I'll see...
 
For your balancing mods, what formula are you using to calculate damage from melee or bombard. I generated an Excel with some test data and came up with this:

Melee Attacks
Code:
Attack	Defense	DmgInflictedByA	DmgInflictedByD	Ratio	1/Ratio
32	5.6	10	        0	        5.71	0.17
24	6.7	10	        1	        3.58	0.27
32	12.5	10	        2	        2.56	0.39
25	10.72	10	        2 	        2.33	0.42
32	14	10	        2	        2.28	0.43
10	5	10	        3 	        2.00	0.50
10	5.6	9	        3	        1.78	0.56
12.5	7.5	8	        4	        1.66	0.60
10	6.7	7	        4	        1.49	0.67
12.5	10.72	6	        5	        1.16	0.85
32	28.44	6	        5	        1.12	0.88
10	12.5	5	        6	        0.80	1.25
10	14	4	        7	        0.71	1.40
10	28.44	2	       10	        0.35	2.84

Ranged Attacks
Code:
Rattack	Defense	DmgInflictedByA	DmgInflictedByD	  Ratio
22	10.72	7	        0	          2.05
22	15	4	        0 	          1.46
22	12.5	5	        0	          1.76
22	28.44	3	        0	          0.77
22	6.7	10	        0	          3.28
22	14	5	        0	          1.57
22	7.5	8	        0	          2.93
27.5	9.02	8	        0	          3.04
15	10.72	4	        0	          1.39
15	15	3	        0	          1.00
15	28.44	2	        0	          0.52

The problem is I can't determine when and how frequently the extra damage is applied or subtracted. These are the "pure" numbers before any of the following modifiers are applied:

ATTACK_SAME_STRENGTH_POSSIBLE_EXTRA_DAMAGE
RANGE_ATTACK_SAME_STRENGTH_POSSIBLE_EXTRA_DAMAGE
 
So far I haven't had to deal much with actual combat matchups. I've just been adjusting strength ratings relative to other units' strength ratings, making Ironclad :c5rangedstrength: equal to Destroyers for example.

I really don't know much at all about CiV's combat formulas. The ones in IV were insanely complicated, calculating relative strengths with additive bonuses and then plugging that into formulas dependent on their current health to get % odds... then it mattered whether your unit did 33 damage or 34, since the first could kill an opponent in 4 dice rolls while the second takes 3.

So I guess the short answer is: I'm not using battle formulas yet. I'm just assuming cIV-style additive bonuses and calculating values based off a units' current strength rating, if that makes any sense. Browsing through the strategy forums to see if I can find anything on the subject.
 
Once we've got the c++ sdk, I'll help with combat odds stuff, unless people have worked out the way that rng is used in combat mechanics already.
 
@Thalassicus:
Attached is a new version of EnemyUnitPanel.lua which fixes the erroneous display of anti-terrain bonuses in the Combat Adviser for ranged units with Barrage and Accuracy promotions when attacking cities. It's just a one line difference from the previous one.
 

Attachments

  • EnemyUnitPanel.rar
    8.4 KB · Views: 126
@tokala
Thank you for pointing this out, I'll change it to "City must be built on a fresh water tile". It applies even moreso to watermills, which state they require a river but operate the same way as Floating Gardens. I'll admit it's sort of weird to have a big watermill smack in the middle of an oasis... :lol:

Actually, watermills do require a river, any other fresh water source will not work.
 
Top Bottom