LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
285 stars 158 forks source link

Land units treated differently on coastal polder tiles #11078

Closed ZetaLambdaNinja closed 3 months ago

ZetaLambdaNinja commented 3 months ago

1. Mod Version (X.Y.Z). Current Version: 4.11.0

4.11

2. DirectX Version

DX 10 & 11

3. List of Other Mods

pdan's 34UC, azum4roll's Unit Supply for VP, UI - Promotion Tree for VP

4. Describe the Issue

I think the general issue is that land units on coastal/lake polder tiles are being treated incorrectly. I've noticed a couple issues in the game I'm playing:

(1) Ranged land units on coastal/lake polder tiles with a range of two should be able to fire over flat land to a space two tiles away. However, such units seem to have the limitation that ranged naval units have: they cannot perform a ranged attack inland. This seems counterintuitive from a gameplay perspective (though I understand why it might happen from a programming perspective.)

(2) Land units on coastal/lake polder tiles cannot be upgraded. I tried it with a unit earlier in my game, and I was confused why the upgrade button was greyed out As soon as I moved the unit off of the polder onto a land tile, the upgrade option became available.


5. Save Game From 1 Turn Before (ALWAYS ATTACH THIS IF POSSIBLE)

BUG-ArcherSeaPolderRange.zip

6. Logs (ALWAYS ATTACH THESE IF POSSIBLE)

Logs.zip

7. CvMiniDump.dmp File (ATTACH IF REPORTING A GAME CRASH)

8. Steps to reproduce the Issue (Optional)

For issue (1), load the save and select the composite bowman adjacent to the city of Groeningen. Select "ranged attack" and notice the inland tiles that should fall in the range of that unit, but do not (i.e. the two hills to the northeast of the unit.)

For issue (2), I assume you could hack the game to add the Machinery technology for unlocking crossbowman. If not, it can be researched in like two turns, and you can try upgrading the same composite bowman.

9. Screenshots of the Issue (Optional)

azum4roll commented 3 months ago

See from level is unit agnostic, so it's not possible to raise Polders for land units while not affecting naval units.

(2) can be fixed by changing logic in CvUnit::CanUpgradeTo

azum4roll commented 3 months ago

Done fixing (2).

ilteroi commented 3 months ago

but the see-from level can maybe be changed by the improvement?

axatin commented 3 months ago

(1) shouldn't be changed. real-life polders are not above sea level

azum4roll commented 3 months ago

but the see-from level can maybe be changed by the improvement?

There's no way to make it just for land units.

RecursiveVision commented 3 months ago

I don't see why we can't make seeFromLevel not unit agnostic with heavy modifications to the DLL. From a cursory inspection of the code, it seems to be purely internal, not referenced by the game engine directly.

That said it looks like a lot of work and someone would have to do it.

RecursiveVision commented 3 months ago

I'm gonna say this is a balance change, though, and will need to be proposed at the VP Congress. The (2) issue is fixed.