Unciv
Unciv copied to clipboard
Unable to purchase tile within city range
Is there an existing issue for this?
- [X] I have searched the existing issues
Game Version
4.10.6
Describe the bug
In a game of Smoky Skies Redux with Dreams of Steam enabled, there's one tile within city range which should be available for purchase but which isn't.
Steps to Reproduce
The tile to the lower left of Harar, next to Mogadishu, with the worker sitting on it, is within range of Harar and not owned by anyone, but when I open the city screen, I can't buy it.
Screenshots
Link to save file
Operating System
Android
Additional Information
No response
I bet that's known and "normal". You can only buy tiles where this city owns neighbors, I'd expect those two neighbors belong to Toumbouctouououou.
I can't buy the tile through Tomboucto either, because it's out of that city's range.
out of that city's range
Yup, that's how our current code works. Want it changed? Look up proof how Civ5 did it. (Anecdote: I believe long ago we had a button to transfer ownership between cities, but that was too exploitable)
Oh, an aside: Tile buying and Cultural expansion and Citadels - we're currently not at all like Civ5 here in several respects, and I've got a closer-to-original branch out there for a long time. Thing is, it's easy to change the progressions to be independent, but if we otherwise keep the formulas, it'll be far too cheap, and my analysis says out formulae are too cheap. So - fix the formulas to match Civ5. And there it gets complicated, as I can show a lot of the components in their DLL source, but one factor is a mystery to me - they call it "Influence cost" iirc, and it's got some correlation with path finding. One role - hills are more expensive apparently in Civ5 than flat tiles.... If you've got an original runnable, I'd really love some cost-progression statistics. I'd buy just to get some numbers - but there's no offline boxed media anymore, steam actively refuses to work on my setup, and gog only has up to Civ 4 - which I also own boxed...
Buying tiles non-contiguously - bad, if an enemy takes the city you'll have floating tiles Moving tiles between cities - messes up all kinds of things Allowing cities to purchase outside 3 range when within 3 range of other city - possible, not sure I like it
floating tiles
I believe you can get those anyway, 'cuz I'm mostly certain cultural expansion does not have that limit. At least I've seen city-states with floating tiles.
And the do-able rule change (and I'm not saying I'm in favor) would be - "Allowing cities to purchase inside their 3-hex range when any neighbor is owned by your civ, not only this city"
To clarify: In CityExpansionManager.canBuyTile:
Index: core/src/com/unciv/logic/city/managers/CityExpansionManager.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt b/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt
--- a/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt (revision a9c367907d14ad8fcbe6160731b18bc40e9cdcfb)
+++ b/core/src/com/unciv/logic/city/managers/CityExpansionManager.kt (date 1704275904190)
@@ -61,7 +61,7 @@
tile.getOwner() != null -> false
city.isInResistance() -> false
tile !in city.tilesInRange -> false
- else -> tile.neighbors.any { it.getCity() == city }
+ else -> tile.neighbors.any { it.getOwner() == city.civ }
}
}
... yum or meh? I'm ambivalent.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.
This issue was closed because it has been stalled for 5 days with no activity.