UI: Marking/highlighting tile edges in custom lenses

StandardGaussian

Chieftain
Joined
Mar 8, 2017
Messages
15
It turns out... I'm dumb!

Movement on roads also depends on actually following the road, it requires you to move from a road tile onto a road tile. That makes things a lot more complicated than just coloring the tile. The trader route UI might be usable to draw roads in the lens, but I kind of suspect it's not entirely flexible and that's just a ton of noise.

============

Hi! I'm working on some new lens types on top of astog's More Lenses framework.

One of the lenses I've made is a Movement lens, to show the movement cost to enter a tile. This works because the cost of movement is always based on the tile you are entering, so you can just color that tile in the lens and all is well... except for crossing rivers, which exist on tile edges and make movement cost also involve the tile you came from, not just the tile you are entering. Considering that rivers are a huge part of Civ movement, a Movement lens that doesn't include them is basically useless.

It seems rather straightforward to use hex shading to color a whole plot. However, you can't seem to just color an edge of a plot, to mark a river. So far, I've tried using "pressure waves" to indicate river edges in my lens view. That leads to nonsense like this:


It functions, in the sense that it's accurate (haven't implemented bridge river crossings yet), but it's impossible to figure out WTH is going on! Most river crossings are also river crossings going the other way, so you end up painting a whole bunch of moving arrows pointing into each other all over tiles next to rivers. I don't want to paint arrows on a tile, I just want to paint the edge of the tile.

Any advice? Civ is almost entirely tile-based, so it makes sense for most UI tools to be tile-based, but rivers do exist and are a core part of the experience, so I find it hard to believe there are no UI/UX tools that can be used to highlight rivers to show some kind of relative relationship between 2 tiles in general.
 
Last edited:
A few more musings:

I've thought about how the Empire lens draws boundaries around your cities and using that, but the mechanism used there in the Lua API seems to always want to draw a full boundary around a set of plots, not just draw a boundary along certain edges, so rivers which don't terminate in other bodies of water can't accurately be drawn by using that method.

I realized while posting this thread that I could maybe co-opt the river adjacency badge used when placing Commercial Hubs, which would overall be much less noisy than the moving arrows, but it still has the problem that you need to mark both tiles on the river's edge. It'd probably be adequate, but I'm still hoping there's a way to just draw on tile edges directly.
 
Back
Top Bottom