Solver's unofficial BtS 3.17 patch

Dan,

Admittedly, I've been lazy to run any sort of maths on it, but if iCollateralStrength = baseCombatStr() / 2, then the

Code:
iStrengthFactor = ((iCollateralStrength + iTheirStrength + 1) / 2);
iCollateralDamage = (GC.getDefineINT("COLLATERAL_COMBAT_DAMAGE") * (iCollateralStrength + iStrengthFactor)) / (iTheirStrength + iStrengthFactor);

part will appropriately give different iStrengthFactor, and therefore iCollateralDamage, values for different defending units.

Let's see, actually. With this approach, a worldbuilder-ed Barrage I Tank doing collateral to a Longbow takes 18 HP away. Against Infantry, it only takes 9 HP away. So a Barrage I tank would roughly compare to unpromoted Artillery, but Barrage on Artillery would remain more effective than on Tanks.

And I must admit I just like the simplicity of that approach ;)
 
I had a strange thing happen last night. Sorry, no screenshots (for obvious reasons, see the issue) or save. If it happens again, I will post a save although I'm not sure it will help necessarily.

My capital was under siege by a lot of barbs (don't ask). But instead of attacking my lone warrior (don't ask) they just...disappeared. 3-4 barbs or so just disappeared instead of attacking my capital. I don't know why and am concerned it may be a bug. I have 3.17 patched over top of Bhruic's 3.13 so I don't know if that may be the problem or not.
 
I see, so
Currently I'm going with iCollateralDamage = baseCombatStr() / 2.

was just a typo, and you always intended
Admittedly, I've been lazy to run any sort of maths on it, but if iCollateralStrength = baseCombatStr() / 2 ...

The way I try to understand the CollDmg maths this would certainly be in line with the established combat mechanics, but IMHO truly overpower Barrage on Tanks.
It would actually be a Cho-Ko-Nu-Tank :).

Examples
Tank (BarrageI,BarrageII,BarrageIII) vs Infantry:
3.13: 5/8/11 HPs
your solution: 9/12/16 HPs
my suggestion: 2/5/11 HPs

So my code would nerf BarrageI+II on Tanks in relation to 3.13 and thus make uber Tanks like CRIII BII less attractive/op but retain the CollDmg ability of "true" Barrage Tanks with BIII.

Still rounding is an issue and the above examples of Tank vs a Longbow would look like this:

3.13: 9/15/19 HPs
your solution: 18/22/30 HPs :eek:
my suggestion: 3/9/19 HPs
 
Whoops, so I made a typo there. Didn't notice, so much for replying late at night :) And I didn't consider extra Barrage promotions there.

I'll try your solution. Barrage is still staying away from Tanks, though, so keep in mind that this is mainly a modder thing. We'll see where that takes us.
 
I had a strange thing happen last night. Sorry, no screenshots (for obvious reasons, see the issue) or save. If it happens again, I will post a save although I'm not sure it will help necessarily.

My capital was under siege by a lot of barbs (don't ask). But instead of attacking my lone warrior (don't ask) they just...disappeared. 3-4 barbs or so just disappeared instead of attacking my capital. I don't know why and am concerned it may be a bug. I have 3.17 patched over top of Bhruic's 3.13 so I don't know if that may be the problem or not.

Shhhhh, I don't want anyone to fix a bug like that. I believe that should fall under the longtime Microsoft Windows mantra of "that's not a bug it's a Feature"
 
Update coming up, to version 0.17. Readme included as per request.

  • AI will try to retreat air assets from endangered cities
  • AI will no longer refuse to retreat damaged planes
  • AI will change civics during Golden Ages
  • Revised collateral damage formula for non-native collateral units, if modded in
  • Fixed bug in the map generator with water starts
  • AI may now try to use Warlords to create super-medic units
  • Fixed bug that prevented random events that target a unit from triggering
 
[*] Fixed bug that prevented random events that target a unit from triggering
Huzzah! That one drives me nuts. At least if that's what you mean by events that give a benefit that targets units. e.g., "All your naval units get Flanking."

Wodan
 
From what I see, "all naval units get Flanking" events shouldn't be affected. It was for events that affect a single specific unit.

Yeah, crosspost on that.
 
Hi Solver,

I wanted to bring this up again; I think it got lost in the shuffle on Page 3. Would like to hear your thoughts...


Solver,

I'd like to submit something to you for consideration for your unofficial patch. While not a bug per se, this is something that has bugged me (no pun intended) since the release of BtS.

In BtS, Firaxis added the feature to the civilopedia that when you click on a unit, you are shown the UU's that that unit is replaced by. For instance, if you click on Axeman, you will see Replaced by Vulture and Replaced by Phalanx with links to jump to those respective entries. It's a nice enhancement, but for some reason they didn't extend this over to the UB's as well. I am a newb coder, but I was able to edit CvGameTextMgr.cpp and extend this to UB's very easily.

If Firaxis didn't include this for the UU's, then I wouldn't even be bringing it up here. However, because they did do it for the UU's, it seems like an oversight that they didn't do it for the UB's. I can't think of a reason they would have made this distinction on purpose.

Anyways, if you need the fix, PM me, but I figured it out in about 5-10 minutes and it should be apparent to you quickly how to fix if you want to add it.

Cheers,
ripple01
 
That one isn't lost either, ripple. I haven't looked at it yet. I guess if you PM me the solution I'll get around to it sooner ;)
 
From what I see, "all naval units get Flanking" events shouldn't be affected. It was for events that affect a single specific unit.
Nuts. So those events are still broken?

Wodan

:ninja: edit: I shouldn't say ALL events suffer from a global bug in this regard... I haven't experiened them all of course. I do know that more than one are, however, from my own experience.
 
Nuts. So those events are still broken?

Wodan

:ninja: edit: I shouldn't say ALL events suffer from a global bug in this regard... I haven't experiened them all of course. I do know that more than one are, however, from my own experience.

I haven't noticed a problem with "all x units get y promotion" events failing to trigger. In fact, I just finished a game in (vanilla) 3.17 that involved all of my axemen getting a free 'shock' promotion.
 
Nuts. So those events are still broken?

Wodan

:ninja: edit: I shouldn't say ALL events suffer from a global bug in this regard... I haven't experiened them all of course. I do know that more than one are, however, from my own experience.

What is the nature of this bug?


I do know that the basic reward for the Classic Literature quest is measly. +2 science added to one of your libraries in return for building lots of libraries is simply useless. I know that libraries are going to be build anyway so the reward shouldn't be stellar. However +2 science isn't going to make me hurry to finish this quest. On a huge map, you need to build 13 libraries which means that by the time you finish them +2 science is really close to nothing.

The extra bonus when you also have the great library (another free scientist added to the great library) is nice, but still nothing spectacular. A few extra great person points and 3 extra science aren't going to make me hurry to finish this quest.
 
Two games ago I got the Harbormaster event. Built a bunch of harbors and caravels. Picked the benefit "All your naval units get Flanking". Not a single one did. None of the caravels, none of the privateers, none of the galleys.

I have run into this before, last month, and it was a different event. Don't remember what.

Wodan
 
Honestly, you have been posting on this site for less than two months. You have a lot of nerve constantly telling longtime members how to post. With every release/expansion pack for CIV, Solver. BH and others fix/tweak the game and it's patches.
And then we have a thread about it. The code savvy deiscuss possible fixes. those of us that are not so code savvy give our opinions on what we do and do not want/like. From all this input Solver, Bh. and other smart people make patches and MODS.
It's how we go about doing things on these forums. So kindly refrain from telling others what to do until you have something positive or constructive to contribute to the discussion.

Heyheyhey...hey!

Since when is this bright forum about antiquity??? If that were the case, I should send you all to shut off, which I will not :lol::lol::lol:

The guy has a point, and I agree with him: Solver has made it clear many times, yet some people are still asking for the Financial Advisor to tell them when to go to pee...

Come on!

(and please, never talk about antiquity again... in here, it is all about logic, reason and arguments).

Enjoy your day!
 
Two games ago I got the Harbormaster event. Built a bunch of harbors and caravels. Picked the benefit "All your naval units get Flanking". Not a single one did. None of the caravels, none of the privateers, none of the galleys.

I have run into this before, last month, and it was a different event. Don't remember what.

Wodan

Your units aren't supposed to receive Flanking from Harbormaster -- they're supposed to receive Navigation 1.

Assuming you meant Navigation 1, I have definitely completely this quest and received the Navigation 1 promotions as intended under 3.13. Did the event mis-fire under 3.17?
 
This collateralCombat() code changes far too much away from the Firaxian intent.

You removed the *collateralDamage() from the initial iCollateralStrength assignment.
Giving all units 100% iCollateralStrength, even the ones that only have 50 (ships, etc)

Then down below, where we used to have:
Code:
	int iModifier = 100;
	iModifier += getExtraCollateralDamage();
	iModifier -= pBestUnit->getCollateralDamageProtection();
	if (pCity != NULL)
	{
		iModifier += pCity->getAirModifier();
	}
	iCollateralDamage *= iModifier;
	iCollateralDamage /= 100;
we now have:
Code:
	int iModifier = collateralDamage();
	iModifier += getExtraCollateralDamage();
	iModifier *= (100 - pBestUnit->getCollateralDamageProtection()) / 100;
	if (pCity != NULL)
	{
		iModifier *= (100 + pCity->getAirModifier()) / 100;
	}
	iCollateralDamage *= iModifier;
	iCollateralDamage /= 100;
So previously, a unit w/ < 100 CollateralDamage, would have its STR used in damage calculations reduced. As it should be.
Now all units get 100% STR calculations for damage.

And if we take the instance of a unit that has a collateralDamage() of 50 and no promotions vs a unit that has CollateralDamageProtection 60 we get:
iModifier = 50;
iModifier += 0;
iModifier *= (100 - 60) / 100;
iCollateralDamage *= 0.20

And previously:
iModifier = 100;
iModifier -= 60;
iCollateralDamage *= 0.40

Also this change will weaken Barrage promotions, since it allows CollateralProtection to reduce increased Collateral damage as well.

A unit with Barrage III: +100, and 100 CollateralDamage()
iModifier = 200
iModifier *= (100 - 60) / 100;
iCollateralDamage *= 0.80

Instead of:
iModifier = 200
iModifier -= 60
iCollateralDamage *= 1.40

This is change far beyond the original basis of the code. Changes the intent of the original STR vs STR comparisons for initial damage calculations. And weakens Collateral damage, and Barrage promotions. And makes units that have < 100 CollateralDamage (ships, etc) do more damage.

I thought the intent of this patch was to fix bugs, and improve AI. Not change game mechanics.

The cleanest approach, just give units w/o native CollateralDamage 50% of their STR to iCollateralStrength. Remove the Barrage line from tanks. And leave the rest alone. If modders want to go beyond that - cool.
 
Back
Top Bottom