CiVUP - CiV Unofficial Patch

@Thalassicus:
Your website's Update history says "Unofficial Patch updated to v. 24" twice, 3 days ago and a week ago. The latest one should be v. 25, no?

I noticed you didn't get my new EnemyUnitPanel.lua version in v. 25, I hope you will at some point, because I feel bad about introducing a new bug in there while fixing the one with melee units.
 
Any chance of getting the Diplo and CityWillard incorporated... If so, you'd be my one-stop-mod-shop :D
 
I teamed up with Attila primarily because his mods alter some of the same files this one did, which made it difficult to combine the two. The willards don't have any overlap with this mod, so I prefer to let Onni handle development of his mods separately.

On a side note, now that some info about the next patch is out... It's good to see Firaxis will be including a fix for the ancient ruins problem, since that's something I can't completely solve with the current tools.

Question: I've noticed helicopters annoyingly have a penalty attacking across rivers like Civ IV. Never understood the reason for this. Any opinions on whether this is more of a bug (like upgraded rocket artillery still requiring setup) or a balance concern?

I personally consider air units getting penalties for flying across a river a bug ("Look out sir there's water beneath us!")... but just want to get more thoughts on the subject.
 
Question: I've noticed helicopters annoyingly have a penalty attacking across rivers like Civ IV. Never understood the reason for this. Any opinions on whether this is more of a bug (like upgraded rocket artillery still requiring setup) or a balance concern?

I say, give them the Amphibious promotion. That way the river issue is solved and we can have coastal invasions (via Embarkation) without a penalty. I'm thinking the 'Apocalypse Now' chopper scence with 'Ride of the Valkyries' playing :D
 
Indeed, I put the <amphib> and <river> attributes on the "hovering unit" promotion, simply combining the two (less clutter). The question is which mod to put this change in: Balance - Combat (if developers intended current behavior), or could air units getting river penalties be considered an actual bug (unintended oversight)?
 
It makes sense in both of your mods, I guess. And I believe the devs had not enough time to do this right, so they left it halfway unfinished.

Can you make them defend when embarked like songhai units, BTW?
 
Another minor bug that I've now modded out for myself is that when units are attacking a city, their offensive promotion modifiers actually do apply, but the combat odds panel doesn't show them. The only bonus you'll generally see is the general's +25%. But if you compare the strengths of differently promoted units again the same city, you'll see it's adding in Drill/Shock, etc. I've attached a file, EnemyUnitPanel.lua, where I've fixed this by adding the code for it to UpdateCityCombatOdds(). Very straightforward fix or merge. You should consider adding this to the unofficial patch.

@Perkus
Could the lack of odds for displaying air and missile attacks be related to this (e.g. - Something not calculating or showing correctly in the EnemyUnitPanel.lua?)
 
@Thalassicus:
The whole helicopter implementation seems like one giant bug to me after beating on it for many hours over the last two days without much success. They *should* be air domain units that can enter any tile. For ideal realism they would also have a maximum flying range from land over water, and be embarkable from coasts as an option.

I'd consider the river penalty a bug, since nobody could reasonably argue that was intended. But letting them attack amphibiously from being embarked is much more of a design choice. Not sure if you're interested in trying to split it like that!

@Perkus
Could the lack of odds for displaying air and missile attacks be related to this (e.g. - Something not calculating or showing correctly in the EnemyUnitPanel.lua?)

From what I could tell, they just didn't bother coding combat odds for bombarding and ranged strikes at all. It's not so much a bug, it's a whole missing feature. Even the odds for attacks vs. a city are a completely separate function, with much logic duplication of course. It has occurred to me that battles odds for all these situations could probably be modded in. It might be a good chunk of work, but probably not too bad. I'll keep it in mind.
 
@Thalassicus:
The whole helicopter implementation seems like one giant bug to me after beating on it for many hours over the last two days without much success. They *should* be air domain units that can enter any tile. For ideal realism they would also have a maximum flying range from land over water, and be embarkable from coasts as an option.

I'd consider the river penalty a bug, since nobody could reasonably argue that was intended. But letting them attack amphibiously from being embarked is much more of a design choice. Not sure if you're interested in trying to split it like that!



From what I could tell, they just didn't bother coding combat odds for bombarding and ranged strikes at all. It's not so much a bug, it's a whole missing feature. Even the odds for attacks vs. a city are a completely separate function, with much logic duplication of course. It has occurred to me that battles odds for all these situations could probably be modded in. It might be a good chunk of work, but probably not too bad. I'll keep it in mind.

Thanks. I'd love to see air and missile bombardment odds.
 
Air units are clearly unfinished.

  • No combat odds panel for attacks.
  • No range circle when selected.
  • Cumbersome 2-click selection method.
  • Agonizingly slow bombing animation.
  • AI doesn't build them.
 
I thought there was a range circle, but it's way too faint to be seen when zoomed out. (Also, of course, a circle in civ5 is a hexagon. :) In civ4 a circle was an octagon)
 
Ok, I have a plethora of bugs to report as a result of my latest testing & modding adventures in modern air combat, most of which can be modded easily enough. For starters, some more Civilopedia errors:

1) Stealth Bombers *can* actually land on Carriers. This has been mentioned in other threads, and the database entries confirm that they're treated like the other aircraft. The civilopedia explicitly claims otherwise, both in the Carrier entry and the Stealth Bomber entry.

2) I think the Carrier entry should also point out that they can carry Atomic Bombs. It's mentioned in their entry, but I find this unexpected enough that the redundancy is needed. It's already painful and confusing enough trying to remember what can do what, especially when you can't trust the Help.

3) There is an obscure but again very confusing bug in the Pedia entry for "Ambush I". It shows it requiring 4 prerequisites, all of which are fighter/bomber type promotions. It is correct... for fighter & bombers. It is totally wrong for helicopters as well as ground units. Ground units require Drill 2 / Shock 2, I believe. Helicopters have access to ambush immediately! The problem is that internally the game has 3 different types of ambush promotions: regular ambush, air ambush, and heli ambush. They all have the exact same effect, and so they lazily have them use the same name and refer to the same 'pedia entry. However, each one has distinct prerequisites, and is used by different units. There is no quickie way to fix this. Ideally there should be 3 seperate pedia entries, probably with 3 distinct names. Then the help for the units would each refer to the correct entry. Now it just happens to pick whatever it finds first, I guess, which is the air ambush entry.
 
Bear with me, I have a couple more. I'm just splitting it up because these are of a very different nature, database entry errors:

1) Continuing with the ambush promotions, I've discovered that the helicopter ambush promotions, both I and II, while they are the proper heli versions of the 3 possible ambushes, do absolutely nothing vs. armor! They completely forgot to add the necessary table entries. Here's what's needed:

PHP:
	<!-- Heli Ambush promotions don't do anything! -->
	<UnitPromotions_UnitCombatMods>
		<Row>
			<PromotionType>PROMOTION_HELI_AMBUSH_1</PromotionType>
			<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
			<Modifier>25</Modifier>
		</Row>
		<Row>
			<PromotionType>PROMOTION_HELI_AMBUSH_2</PromotionType>
			<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
			<Modifier>25</Modifier>
		</Row>
	</UnitPromotions_UnitCombatMods>

2) They also added the ground versions of the ambush promotions to be available to helicopters, in addition to the helicopter versions. While I believe this is actually harmless, since the chopper can't get the prerequisites of Drill 2 / Shock 2, I'd still like it to be noted, just in case somebody is following my footsteps trying to unravel what the heck is going on there. And just in case in the future additional promotion changes somehow make these accessible. The code is simply:

PHP:
	<!-- Helicopters have their own version of Ambush, these ones are for ground units and require Drill 2/ Shock 2 as prerequisites!  Get rid of them. -->
	<UnitPromotions_UnitCombats>
		<Delete PromotionType="PROMOTION_AMBUSH_1" UnitCombatType="UNITCOMBAT_HELICOPTER" />
		<Delete PromotionType="PROMOTION_AMBUSH_2" UnitCombatType="UNITCOMBAT_HELICOPTER" />
	</UnitPromotions_UnitCombats>

I've diagnosed & tested these changes fairly thoroughly, so it should be pretty safe just to pop them into UP - General.xml.
 
IIRC it's also a lot easier to see in strategic mode because the tiles within the circle get a white tint to them. Or am I imagining things?
 
It helps a lot to have working code, thank you Perkus. Thorough testing of every change is most of the time involved in modding (just like any sort of programming). Plus I've been getting a headache this weekend figuring out how to create a modular system for registering and displaying new custom notifications in Lua. :crazyeye:

The reason for the split up Ambush promotions is due to a limitation of the source code: it only reads a maximum of four PromotionPrereqOr attributes. Splitting the promotion appears to be a hack the developer of this part of the game used to get around a problem elsewhere in the game. :lol:

It makes sense about the air range display and strategic mode... I'd never tried looking at it in that view. Perhaps it's a bug that hexes do not get tinted in the normal view? If all we see is the thin border, that would make sense why it's so hard to spot. I can see it clearly enough for rebasing, but I never could identify the range for attacks.
 
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.

Thal, I can confirm that SOME penalties are applied as follows:

Fighter is 50 :c5rangedstrength: / 1.75 (-75% penalty) = 28.57 :c5rangedstrength:

See this thread for details:
http://forums.civfanatics.com/showthread.php?t=398479 (post #14 in particular)

Based on this new information the WEAK_RANGED tool tip shown in your UP mod should be changed to -57.14% penalty (1/1.75) or note somehow that it is the :c5rangedstrength: / 1.75 ...

For units that have bonuses and penalties
MSAM (40 :c5strength: ) attacked by a Helicopter (50 :c5strength: )
-33% for Grassland
-50% Resource Penalty
+15% Flanking
+100% vs Helicopters

Displayed on Panel is 52.8 :c5strength: (40 * (1 - 0.33 - 0.5 + 0.15 + 1)) = 52.8 :c5strength:
 
Back
Top Bottom