Cycle through all units of the same type, every where.

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
omero
Posts: 48
Joined: Fri Mar 31, 2023 10:43 am

Cycle through all units of the same type, every where.

Post by omero »

Thus, this is my biggest 'wish'...

Sometimes, you sent one Galleon on a far away destination... Where is it now?
You want to 'cycle' through all the Engineers? You select one, then cycle through all Engineers to find them, no matter what they're doing. Ever happened to set them on 'autosettle' and then they go hiding in cities doing their stuff? It becomes a pain hunting them down when you need just one to deal with pollution. Or maybe you set an Explorer, or a Trireme on 'autoexplore'... They could be anywhere now.
This also could help reviewing all the situations where military units are involved, since you know you have a 'fortified' Marine out there in a forest... Alone and neglected.

The 'Find Nearest' option is not much helpful on large maps :|
cazfi
Elite
Posts: 3164
Joined: Tue Jan 29, 2013 6:54 pm

Re: Cycle through all units of the same type, every where.

Post by cazfi »

Not exactly what you requested, but selecting "World" range on gtk-client unit selection dialog might sometimes help in such situations.
omero
Posts: 48
Joined: Fri Mar 31, 2023 10:43 am

Re: Cycle through all units of the same type, every where.

Post by omero »

cazfi wrote: Fri Apr 07, 2023 2:01 pm Not exactly what you requested, but selecting "World" range on gtk-client unit selection dialog might sometimes help in such situations.
Just wondering about ... Would it be possible to have a LUA script that will _hotlink/box/frame_ all units of one type in every spot of the map?
That would already help much tracking down 'lost' units when one just 'scrolls' around on the map view.

EDIT: Yes, the "World" range will select them all but that is sometimes undesirable (accidentally triggering a mass suicidal mission) :shock:
EDIT2: Just wondering if it is technically/theoretically possible, not asking someone to code the LUA script for me :-D
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Cycle through all units of the same type, every where.

Post by Ignatus »

omero wrote: Wed May 03, 2023 7:22 am Just wondering about ... Would it be possible to have a LUA script that will _hotlink/box/frame_ all units of one type in every spot of the map?
That would already help much tracking down 'lost' units when one just 'scrolls' around on the map view.

EDIT: Yes, the "World" range will select them all but that is sometimes undesirable (accidentally triggering a mass suicidal mission) :shock:
EDIT2: Just wondering if it is technically/theoretically possible, not asking someone to code the LUA script for me :-D
In the current client, it's not possible, but I have once developed a (2.6 compatible) client with some options for selecting and centering from Lua, see viewtopic.php?p=101904
omero
Posts: 48
Joined: Fri Mar 31, 2023 10:43 am

Re: Cycle through all units of the same type, every where.

Post by omero »

Ignatus wrote: Thu May 04, 2023 9:02 am In the current client, it's not possible, but I have once developed a (2.6 compatible) client with some options for selecting and centering from Lua, see viewtopic.php?p=101904
Not sure what "current client" is referring to... For me, it is v2.6.9 :)
And since v2.6 is what I am "bound" to, then Thank You for the suggested topic!
I have started reading and it will require some time to "digest" all that :D

After all, it only took me a decade+ to switch from v2.4->v2.6...
Time and Patience, the two most formidable warriors ;)
cazfi
Elite
Posts: 3164
Joined: Tue Jan 29, 2013 6:54 pm

Re: Cycle through all units of the same type, every where.

Post by cazfi »

omero wrote: Thu May 11, 2023 12:00 pm Not sure what "current client" is referring to... For me, it is v2.6.9 :)
And since v2.6 is what I am "bound" to, then Thank You for the suggested topic!
I have started reading and it will require some time to "digest" all that :D

After all, it only took me a decade+ to switch from v2.4->v2.6...
Year2038 support is in review to become part of freeciv-2.6 too: osdn #47710
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: Cycle through all units of the same type, every where.

Post by nef »

omero wrote: Wed May 03, 2023 7:22 am
Just wondering about ... Would it be possible to have a LUA script that will _hotlink/box/frame_ all units of one type in every spot of the map?
That would already help much tracking down 'lost' units when one just 'scrolls' around on the map view.
I will add this to my list of SP utilities: I am always looking out for ideas. I already have code (twice over) to do this for explicitly nominated units (or cities) but they do other things as well. There are limited options in featured text, so at the moment all I can think of is for you (as the user) to specify the unit type either by rule name or id.

I might add it does work: it will locate the unit no matter what it is doing. Moreover, you only need to do it once for units you currently have. The hotlink follows the unit. A question: would it be useful if the list printed in chat log (etc.) included user text so you can be selective hunting down particular units?
omero
Posts: 48
Joined: Fri Mar 31, 2023 10:43 am

Re: Cycle through all units of the same type, every where.

Post by omero »

nef wrote: Tue May 16, 2023 6:35 am
omero wrote: Wed May 03, 2023 7:22 am
Just wondering about ... Would it be possible to have a LUA script that will _hotlink/box/frame_ all units of one type in every spot of the map?
That would already help much tracking down 'lost' units when one just 'scrolls' around on the map view.
I will add this to my list of SP utilities: I am always looking out for ideas. I already have code (twice over) to do this for explicitly nominated units (or cities) but they do other things as well. There are limited options in featured text, so at the moment all I can think of is for you (as the user) to specify the unit type either by rule name or id.

I might add it does work: it will locate the unit no matter what it is doing. Moreover, you only need to do it once for units you currently have. The hotlink follows the unit. A question: would it be useful if the list printed in chat log (etc.) included user text so you can be selective hunting down particular units?
YES! (I could not resist pulling this off)
Me, (the user)... I would surely answer YES (of course). An ambiguous answer to an ambiguous question, because me (<random name goes here>) is not everyone else.

Let me elaborate on more serious ground (v2.6-wise):
Cities are an interesting option, but you see them on plain sight already (on the map).
You also see immediately when they're in turmoil (the angry fist)... But that's another topic.

The units however are not so trivial to track down (because they can be doing something _inside_ a city). What those units are doing is ... Irrelevant.

What is relevant is... Where are they NOW on the map once you have lost track of them? One can cycle through EVERY single city, and 'wake up' every single unit that such city has inside or supports (near, far from...) and it soon becomes a tedious exercise of patience and determination.

Highlight them with a 'frame'.
Let (<random name>) player _spot_ them easily on the map!

From (<random name>) single player point of view, having those 'lost units' listed somewhere (anywhere) would be _PERFECT_, but again... Uhm. ANYWHERE! Just somewhere... Even just the 'frame' would be already GREAT!

Cheers o/
Post Reply