yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.59k stars 1.58k forks source link

Feature request: replace "May create improvements on water resources" with "Can instantly construct a [improvementFilter] improvement" #12393

Open SpacedOutChicken opened 4 weeks ago

SpacedOutChicken commented 4 weeks ago

Before creating

Problem Description

I experimented with replacing the "May create improvements on water resources" unique with "Can instantly construct a [All] improvement <in [Water resource] tiles> <by consuming this unit>". The replacement isn't as good as the original, but it may be possible to modify the game such that we could both replace the older unique with the new unique and also open up some more possibilities for modders.

Related Issue Links

This was partially addressed in #6509 but I feel that we can do more to address it.

Desired Solution

On the player's side, the unique I listed has the problem of showing too many options, including ones that can't actually be selected (see screenshot below). If the menu could be changed to prioritize available options or hide unavailable ones, this would work for human players. On the AI side, the computer does not really know how to build and use units with the "Can instantly construct a [improvementFilter] improvement" unique. If the AI can be taught how to use this unique just as well as the old Work Boats unique, then this same capability could allow the AI to effectively use other kinds of units as well. Modders could create land work units that function like Work Boats (create one improvement and then die) and the AI would be able to keep up.

Alternative Approaches

Modifying the menu of choices to only show options available right now could be advantageous in other areas as well.

Additional Context

Screenshot (223)

SeventhM commented 3 weeks ago

Question for anyone working on the UI (pinging @SomeTroglodyte for this one): Would it make sense to move these to either it's own screen or to the existing improvement picker screen for better organization?

yairm210 commented 3 weeks ago

It would definitely be a good idea, this was also discussed elsewhere in another context - I'm thinking: If a unit has more than 2 such trigger actions, then do this This means in practice, "saving" the triggered unique in the UnitAction so we can later categorize them, and - when opening the improvement screen - recognizing that we have 2 different kinds of "create improvement" actions (one immediate and one long-term) with 2 different effects. The first is easy and helps us in other contexts (automating golden age triggers for great artists) The second sounds like a hassle - maybe just "any unit that has more than 2 triggers gets a new UnitTriggerTable to choose from"?