Poll: New key+click combinations for unit management

Should new key+click combinations be integrated into VP?

  • Yes

    Votes: 18 85.7%
  • No

    Votes: 3 14.3%

  • Total voters
    21

balparmak

Prince
Joined
Sep 20, 2015
Messages
547
I came up with the following schema, is this something you'd like to see integrated to VP? I'll try to demonstrate how these can be used in a video when I have the time. It's unlikely to cause any performance hits or mod incompatibilities (I don't know of a mod that edits WorldView.lua)
  • SHIFT+RCLICK can be used to create waypoints as in many games. In the background the game appends shift+rclick'ed move orders to the end of the current unit order list, so it's pretty seamless. Can be used to tiptoe around enemy tiles, barb zones etc, even patrolling. As usual, units wake up when in danger or when they can't complete an order. On the UI side, the path between the last waypoint and hex hovered over by mouse is highlighted in yellow, so the path is visible to the player.
  • CTRL + RCLICK gives a "move&action" order. "Action" changes by unit type, but it can be thought as the most common, non-contextual order given. In the current implementation combat units will move and go into the alert mode, workers will repair or improve resources, GPs plant their improvements, missionaries will spread, inquisitors remove heresy and archaeologists dig. Example use: Produce units in your military city, then send them to the border using CTRL+RCLICK. They'll go fortify/alert mode when they arrive, without nagging you for an order.
  • CTRL + SHIFT + RCLICK appends a move&action order to the current order list, can be used to chain an action order with waypoints. A common use: Move a missionary with shift+rclick to get around the enemy tiles, give the final order with ctrl+shift+rclick, the unit will execute all orders by itself without nagging you at every turn.
All in all these key+click combinations will decrease the baby-sitting required to manage units. The player can choose the exact path they want the unit to take, and end with spread influence/religion action, without waiting for the first order to be completed. Workers can be ordered to improve the resources in the order you want, at once. While the ctrl+rclick lua code is a bit on the longer side to account for different unit-build pairs, these changes are very lightweight. The intensive calculations are made in the DLL through the new lua calls, and these only fire when the player actively uses them, they would have no effect whatsoever if you simply don't use. All key combinations are handled by WorldView.lua.

I don't want to clutter the forum with more polls, but I'd strongly suggest integration WHoward's Destination to CP/VP, which highlights the unit path in the following turns. It's pretty much essential with the uses above. Much lighter than Unit Path Viewer, on the discord channel people favored alternating highlights, instead of the 6 colored palette used by WH. Colors can be changed, or this module can be removed, without affecting the key+clicks above.

Known issues:
Shift click'd units execute the order given at the end of the turn, like other automated units.

Code is here if anyone wants to review
 
Interesting. But not something I personally care for or would use. Perhaps best used as a standalone mod for those people that like it. But even if it only triggers when used I am more concerned about accidentally doing it then and that would be annoying, it's annoying as it is when you sit clicking A for a large amount of units and then all of a sudden there was a worker in there and it runs away on automation.
 
Question about the missionary use case.
Say you gave your missionary several waypoints.
It reaches one of them and still has some movement left.
Will it stop on that tile for that turn, or continue on to the next waypoint?

If it continues, it could wander into someone's territory and lose its religious power.
One might say that you as a human should account for that, and, for example, make the missionary take an indirect path, such that when it arrives to a tile adjacent to someone's border it's out of movement. However:
a) it might not always be possible to "waste" a movement point and still arrive on the same tile
b) missionary's movement might have changed since you gave the order. Perhaps a road completed somewhere along the way. Or maybe he's embarked and you researched a tech that increases maritime movement

Just one of many fun things to think about when undertaking something like this :)
 
Interesting. But not something I personally care for or would use. Perhaps best used as a standalone mod for those people that like it. But even if it only triggers when used I am more concerned about accidentally doing it then and that would be annoying, it's annoying as it is when you sit clicking A for a large amount of units and then all of a sudden there was a worker in there and it runs away on automation.

I think it's a bit rarer to accidently click shift or ctrl, but I can make this a toggleable game option.

Question about the missionary use case.
Say you gave your missionary several waypoints.
It reaches one of them and still has some movement left.
Will it stop on that tile for that turn, or continue on to the next waypoint?

If it continues, it could wander into someone's territory and lose its religious power.
One might say that you as a human should account for that, and, for example, make the missionary take an indirect path, such that when it arrives to a tile adjacent to someone's border it's out of movement. However:
a) it might not always be possible to "waste" a movement point and still arrive on the same tile
b) missionary's movement might have changed since you gave the order. Perhaps a road completed somewhere along the way. Or maybe he's embarked and you researched a tech that increases maritime movement

Just one of many fun things to think about when undertaking something like this :)

I'm not sure if I follow this. You can account for remaining moves when giving the order, as the path is visible. If a fully waypointed path isn't possible, you can always use the normal RCLICK, this is not a replacement for manual control. It could be possible to add checks/workarounds for cases like this and movement changing due to a newly completed routes, but it's best to keep this feature light as possible, I don't think those provide enough justification for additional code load.
 
Will they break on alerts as per normal or will they execute their path? Such as borders closing, enemy/barbs appearing etc? What it an end tile has become occupied or inaccessible? As noted above having missionaries walk into rival land will eventually kill them due to attrition (three turns or so?)
 
That's a great idea! No reason to not include it except if devs says it's not feasible. Any change that makes the game more comfortable without breaking the balance is welcomed in my book.
 
Will they break on alerts as per normal or will they execute their path? Such as borders closing, enemy/barbs appearing etc? What it an end tile has become occupied or inaccessible? As noted above having missionaries walk into rival land will eventually kill them due to attrition (three turns or so?)

Yep they will break movement in any event that normally stops unit movement. In that regards it is the same as giving a multi-turn right click order, the only difference is that you gain more control on the path with shift+click.
 
not sure if I follow this. You can account for remaining moves when giving the order, as the path is visible. If a fully waypointed path isn't possible, you can always use the normal RCLICK, this is not a replacement for manual control. It could be possible to add checks/workarounds for cases like this and movement changing due to a newly completed routes, but it's best to keep this feature light as possible, I don't think those provide enough justification for additional code load
Well this is the main use case I see for it, missionaries and maybe workers. What he's asking is that for missionaries you often want them to stop outside a border even if they have more movement points because if they end turn in a border they will lose power. So if you queue multiple move actions will it do them on different turns even if it has the movement to start the next one? This wouldn't really make sense for anything but missionaries though. So I wouldn't suggest adding it.
 
Top Bottom