A few ideas relating to units

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
User avatar
Caedo
Elite
Posts: 463
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

A few ideas relating to units

Postby Caedo » Sun Mar 08, 2015 11:14 am

So, in one of my recent games I decided to activate the 'killunhomed' option because I like all of my units to be supported by cities ─ for the sole reason that it's more orderly that way. Now, the problem here is that a unit without a home city can't have a home city assigned to it. Without killunhomed, this is logical, since no homecity essentially means free upkeep. But with killunhomed, this means that you'll have to watch all of your starting units, among others, wither away with no chance to survive. Thus, this is my first suggestion:
> Allow players to set homecities for their homeless units if 'killunhomed' is greater than 0

Next up, in the gtk2 client, unit information in the City dialog and the Unit Selection dialog is a bit sparse. As fritzeeh pointed out, there's no way to find out the current hit points of a unit in a city ─ or any unit that isn't on top of the stack outside a city (and even for that, you need to know that you can middle-click tiles to show information). Thus, I suggest that the same way as when hovering over the units in the city dialog, a tooltip should appear when hovering over a unit in the Unit Selection dialog, and in both cases, that tooltip should include A/D/M/FP and HP. Also, perhaps it should show the full values not only for Movement, but also for Atk and Def, that is, including all modifiers that will apply regardless of the enemy (e.g. veteran status or fortified, but not City Walls etc.).
Example (player has Magellan's Expedition and Nuclear Power):

Code: Select all

AEGIS Cruiser (veteran)
Food/Shield/Gold: 0/1/0
Atk/Def/Move/FP: 12/12/8/2
Movement left: 3
Hit points: 22/30

Sentry
from Townsville

in Oppidopolis

Of course, this would make the tooltip a lot bigger, but as it is now, it doesn't really seem useful to me. To recap my proposal:
> Unit tooltip in City dialog and Unit Selection dialog should show extensive information about a unit's stats.

Now, the next one might need a bit more work to implement than the previous ones:
When a unit comes into focus that had an order up until now, there should be a small notification in the unit information box on the left-hand side. Something such as "Finished Irrigation" or "Failed Goto". The message would disappear as soon as you give the unit an order. This would probably help players with lots of units running around all the time to know what exactly a unit is supposed to do next, especially in cases such as "Failed Goto".
> Show a message in the unit info box about what job that unit last had

Speaking of "Failed Goto", there could be a "Force Goto"-like command. This will act like a regular Goto command, until something blocks the path ─ be it a non-allied unit or a terrain problem that you didn't know about yet. When that happens, the unit will immediately look for a new path and walk that path instead. Only if there is no other path, it'll give up and abort the command.
Now, I know that this could lead to problems if there are two short ways and both of them are blocked by enemies, but since the unit can't see them both at once, it'll dance from one to the other, always finding the path to blocked, so it'll walk over to the other path and repeat the whole process ─ but in other cases, such as sending a ship to a faraway continent with unknown territory inbetween, it could be really useful.
> Add a new Goto command where the unit will look for a new path when the current one is blocked

In an earlier version of Freeciv, I recall having an Autoattack command for units in cities (not the server-side autoattack we have now). I found that command to be rather useful, as I'd just have a Stealth Bomber or a few sitting in my city with that exact order, and whenever enemies showed up inside their operational area, they'd immediately fly out and blast them into thin glue. I'd really like to see that added back in.
> Add the Autoattack unit command back in.

The last ones are probably harder to implement, and a lot more work, but I thought I'd post them anyways, just in case someone has the time and nerves to implement them:

Follow/Escort command
Later in the game, when you have dangerous enemies, you'll want to protect your unit-laden transports with other ships. Now, if you're sending your transports back and forth all the time, it can get tiresome to send your Cruisers back and forth with them all the time. Wouldn't it be so much easier to form some kind of Convoy or so? That's why I suggest a simple follow command: You choose a unit, and your selected unit will do whatever it can to get as close to that target unit as it can. Of course, if there's no way to get there, because an enemy unit moved in the way or the follwed unit moved onto a now-full transport, or if the followed unit dies, the orders would be aborted.
The Follow command could also be used as a Chase command by telling your unit to follow an enemy unit. When following a unit you don't have shared vision with and it gets out of vision, the follower will move to the last known location and check if it can find the unit before giving up.
> Follow/Chase command: Try to get to the tile where the target unit is
Additionally, there could be an (even more complicated and difficult-to-implement) Escort command, which combines the Follow command with the Autoattack command (mentioned above): The escorting unit will follow the target (allied) unit and attack enemies that pose a threat.
> Escort command: Follow a unit and attack nearby enemies

Ferrying command
This is something that might not be used as much once you get airports, but could nonetheless find its application:
The Ferrying command is a modified patrol command meant mainly for Transports. The first difference is in the movement pattern of the unit: It'll always end a turn at the endpoints (and potentially other waypoints) of its route. The second difference is what that's for: When giving a unit a Goto command, it'll also take allied ferries into account. If there is no other way, or if all other ways would be slower, the unit will wait at or next to one of the end- or waypoints of the ferry, and once that ferry arrives there, it'll hop on. As soon as the ferry arrives at the target location, the unit will jump off and continue its way. If the ferry suddenly stops ferrying or the alliance is canceled (before the unit boarded), the goto command will be canceled (or, a new path will be searched if it's a Force Goto command).
In order to keep things smoothly and not look like an a-hole to allies depending on your ferries, there should also be a "Stop ferrying" command, where new units won't include the ferry in their pathfinding, but it will still carry the ones already waiting over.
> Ferry command: Modified Patrol command for transports that other units can use to get from A to B

That's all for now. If I find anything else, I'll add it here. If something isn't clear, just say so, I'll try to clear it up.
~S.C. L.

meme
Posts: 10
Joined: Wed Jan 31, 2018 2:38 pm

Re: A few ideas relating to units

Postby meme » Fri Sep 21, 2018 7:53 am

Homeless units ;
Just make the city with most production the new homecity.

+give choice of which homecity for such or such unit (when city is lost or on next turn)
If cities has zero prod ; tax 4 gold per homeless units per turn. (expencive warrior)

Ignatus
Posts: 41
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: A few ideas relating to units

Postby Ignatus » Sat Sep 22, 2018 12:14 pm

Add a new Goto command where the unit will look for a new path when the current one is blocked

This is not so easy. If you try just gotoing your unit once and again to the same tile in a densely populated peaceful area, it will probably run back and forth in some region for the reason that the pathfinder does not remember unit positions; if there are two workers transforming on both sides of a lake which is longer than the unit sees, and two cities next to them making the ways on bare terrain equally long, you can meet Asinus Buridani. In fact, these conditions are common outside of your own, allied or empty regions; goto is just not useful or straight dangerous there. It would be better if we could have a "careful goto" command: if an enemy unit is spotted at around its turn or two pace from our unit's way, it should ask us wether to go further or to defend somehow. Other activities like mining also should have "do it but sentry" version to stop losing workers to barbarians. What I like better, is the idea that it would remember the previous activity/journey target in such cases.

nef
Posts: 46
Joined: Mon Jun 25, 2018 5:01 pm

Re: A few ideas relating to units

Postby nef » Mon Sep 24, 2018 3:02 pm

Ignatus wrote:
Add a new Goto command where the unit will look for a new path when the current one is blocked
....
What I like better, is the idea that it would remember the previous activity/journey target in such cases.

My own pet hate here is having to reinstruct exploring ships (notably triremes) when they are blocked. The destination is often not obvious from the context so I would like to see a simple "Retry goto" command.
Other activities like mining also should have "do it but sentry" version to stop losing workers to barbarians.

I might be reading too much into Sid M's mind here but this looked deliberate to me. Answer: add another unit to the stack. What annoys me even more is that cities have vision greater the unit vision (typically) so barbs can approach and be seen but you don't get focus in this case either. This seems to be a common 'gotcha' feature of many games (e.g. AoE is another). This can be solved in the ruleset by changing unit vision (something I did with spies).

Ignatus
Posts: 41
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: A few ideas relating to units

Postby Ignatus » Tue Sep 25, 2018 5:41 am

nef wrote:
Other activities like mining also should have "do it but sentry" version to stop losing workers to barbarians.

I might be reading too much into Sid M's mind here but this looked deliberate to me. Answer: add another unit to the stack. What annoys me even more is that cities have vision greater the unit vision (typically) so barbs can approach and be seen but you don't get focus in this case either. This seems to be a common 'gotcha' feature of many games (e.g. AoE is another). This can be solved in the ruleset by changing unit vision (something I did with spies).

In fact, these tasks can be scripted in the client. It's generally not well to give an advantage to players that can use legal but non-standard tools; better give them to everybody then curse the cheaters.

nef
Posts: 46
Joined: Mon Jun 25, 2018 5:01 pm

Re: A few ideas relating to units

Postby nef » Mon Oct 01, 2018 12:43 pm

Ignatus wrote:In fact, these tasks can be scripted in the client. It's generally not well to give an advantage to players that can use legal but non-standard tools; better give them to everybody then curse the cheaters.

Good point but not the issue for off the shelf distro single player. MP rulesets should (could) be written to prevent this exploit. The LUA script you suggest should be made standard in this case - this would give you your "do it but sentry".