Utility Script: New Fleet UI in the Ship Screen

« Back to Developers

2307 days, 16 hours, 13 minutes ago
Profile Image
dtolman
Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Tired of setting the movements for 50 ships in a fleet, by hand? So am I!

Inspired by my work in the Improved Ship List mod - I've gone into the ship view on the starmap screen and added a new Fleet tab which will be the home of what I hope will be an array of data and commands to make running large groups of ships easier.

Version 0.1 of this is now posted at http://userscripts.org/scripts/show/165201, which adds the first step in my vision - a single button which can set the movement of all the ships at that location to the currently selected ships waypoints and final destination.

No more clicking through 50 ships to update them to a single new destination anymore!

If anyone has anything in terms of fleet information, commands, or usability that you'd like to see - let me know and I'll look into adding it here.

2306 days, 11 hours, 3 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
version 0.2 is now up on userscripts.

Added a new button which sets the speed to all ships in that location to the same as the current ship. Unless they're being towed - in which case they are set to 0.

My thoughts on what I'd like to add in over next few weeks (in no particular order):
-Listing how many ships are at same location (and how many are towed)
-Warning if any ships in fleet do not have enough fuel to get to destination
-Opting ships out of the fleet if you have double checked them (may make this an option in settiings)
-Listing of lowest tech engine in fleet
-Listing of total cargo in fleet (fuel, minerals, supplies, etc)
2302 days, 16 hours, 20 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
version 0.3 is now up.

Added in a running total of the number of ships at that location, as well as a complete list of total cargo carried by ships in that location. It needs to be manually refreshed after cargo transfers - will work on that.

My thoughts on what I'd like to add in over next few weeks (in no particular order):
-Warning if any ships in fleet do not have enough fuel to get to destination
-Opting ships out of the fleet if you have double checked them
-Listing of lowest tech engine in fleet
-Next/Previous at that location/fleet buttons
-Checkbox to skip checked ships when doing next or previous ship (at fleet or my ships level)
-automatic refresh of fleet tab when cargo totals update.
2288 days, 16 hours, 27 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
version 0.4 is now up.

I've added back/next buttons under the fleet so you can scroll through the ships at that location only.
2270 days, 10 hours, 47 minutes ago
View halion's profile
halion
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply

Seriously useful script thanks!

Saving me much time already in 2 complex end games.

Only thing that jumps straight to mind is the check message for speed/destination ideally could check that all ships have enough fuel to make the journey.. is this simple to add in?

Otherwise it is of course possible to use the new back/forward buttons (love) to check for the warning.

Another element that would be great is to easily control the FC and missions to co-ordinate battle order for  each fleet. I know there is the enhanced ship list which is great but I cant see an easy way to group the ships in the list unless I rename all the ships(very doable) and then sort the name field.  is there a way to have a drop down to designate ships into fleet 1,2,3 etc or name the fleet so they are auto group? or can we name a fleet flag ship to anchor all other ships at the same location... just wondering.

thanks for the efforts with this and to make your scripts compatible with the new client.

2266 days, 18 hours, 34 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Thanks for the feedback! To address your thoughts:

-The fuel check is what I'm working on now - not sure what I'll have ready for the first pass - at worst I'll have a warning that one or more ships does not have enough fuel.
-Good thoughts on the grouping. Unfortunately I don't have a good infrastructure to save fleet data, as I can't save data on his server unless I hide it in a note or message (which you can't mess with). But I think we can use ship names to the same effect - so...
For now, here's my long, long, long range plan on grouping:
-have option so double checked ships are not calculated as part of the fleet
-enhance my ship list  and fleet mod to use a prefix on the ship name to group ships at the same location (nested grouping is tough on html tables-  we'll see if I have to scale back ambitions here). So [A] would all be considered part of one fleet while [2] would be another. To some degree that will work right now, there just won't be any special code to work along with it.
-(really ambitious, long term) break out each fleet as a new object you can jump between. I would add a new vertical strip only showing ships in your fleet, instead of all ships at the location.

I'm cool to the idea of designated flagships - from a programming standpoint, easier to make commands work on any ship in the fleet/location (as it does now).
2263 days, 19 hours, 4 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Version 0.5 is now released!

Major feature is that it will now check for out of fuel situations:
-When setting a new destination, it will report on how many ships will run out of fuel
-On the main fleet display there is a new button showing the current number of ships at that location that will run out of fuel

Clicking on the button will popup to the right of the ship view a list of all ships in that location that will run out of fuel.

--

I had to code this differently for the v2 and v3 client - if any problems are found, please let me know which one you are having problems on, and where the problem is occurring.

Next up:
-opting ships out of fleet view with double check
-cross pollinating these changes into the ship list mod.
2263 days, 19 hours, 4 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Version 0.5 is now released!

Major feature is that it will now check for out of fuel situations:
-When setting a new destination, it will report on how many ships will run out of fuel
-On the main fleet display there is a new button showing the current number of ships at that location that will run out of fuel

Clicking on the button will popup to the right of the ship view a list of all ships in that location that will run out of fuel.

--

I had to code this differently for the v2 and v3 client - if any problems are found, please let me know which one you are having problems on, and where the problem is occurring.

Next up:
-opting ships out of fleet view with double check
-cross pollinating these changes into the ship list mod.
2263 days, 17 hours, 32 minutes ago
Profile Image
f34r
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Very nice update! I do have another suggestion, one of my FAVORITE addon's has not been updated to the new version, and I think it would go well with your addon. The ability to check ships that are ready (and planets for that matter) are despartely missing from the new version. The existing addon looks fairly simple, but obviously needs rewritten for v3.. So what do you think?
2263 days, 16 hours, 30 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
tl;dr - 1) message for f34r. 2)New gameplan on what I'm doing with my fleet related mods. Real fleets!
========================================
f34r: While I appreciate the sentiment, spiper is still active on the site, so I'd recommend PMing him from the old site (http://planets.nu/user/spiper) and asking him nicely if he could update the plugin.

Looks to me like the mechanism he was piggybacking off of (explosions) was rewritten in v3, to the extant that something entirely different would have to be used. That could be a substantial effort then to fix it.

In the meantime, maybe change the object filter from "all" to "idle" (top left of the map view). Then when you hit back/next, it'll only hit non-checked ships. Or use the ship/planet/base view. You can filter on ready status.

===

Getting back to my Fleet UI, I've been musing on the future of how I'd like to manage ships, and I think I'm going to go full throttle with the changes Halion suggested - discrete fleet/ship groups that can be managed separately, and skip the incremental steps I was thinking of doing instead.

Here's my initial vision (+ primary feature, - secondary/nice-to-have feature):
+prefix fleet tags such as [a],[b],[fleetXYZ], etc
-button to add ship to fleet (add tag for you)
-button to remove ship from fleet (remove tag for you)
-button to create fleet (group all ships in location under a new tag automatically)
+New fleet view in the shiplist screen that only shows tagged groups of ships
+Give commands in shiplist fleet screen to fleets directly instead of ships
-collapsible groups - will show fleet names, and can expand each group to show ship members (and set their FC's)
+Button to display only ships that are in the prefixed fleet (similar to what I did with low-fuel ships)
-Change FC order in this display view (not sure if feasible)
+Back/Next button for ships in the fleet (already kind of implemented)
+Back/Next button for fleets (jumps to lowest ID ship in a fleet)

If there is anything you'd like to add or think should be in new fleet UI, no matter how ambitious or unlikely to work, please let me know while I'm still brainstorming what I'd like to do and prioritize feature development.
2263 days, 5 hours, 57 minutes ago
Profile Image
anaconda
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
I like it a lot!

One question, where I should see the fleet cargo manifest? I cant find combined fleet cargo anywhere, or did I misunderstood something?
2263 days, 1 hours, 54 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Bottom of the ship screen, where it shows the cargo? Thats the cargo for all ships at that location.
2262 days, 22 hours, 18 minutes ago
Profile Image
mule
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Just call me stupid I guess, but I would really like this feature and can't get it. But then I never have figured out how to use any scripts thus far. I typically use Firefox, I've got Greasemonkey installed and turned on, I went to the specified link and found this script and installed it. I restarted my browser and went into a game screen hoping to see a Fleet Button and no joy.

So I went into tools, User Scripts and added http://planets.nu/#/account under user settings. I checked under Script settings and see 5 different URLs - all NU links.

So, how about someone take pity on me and using this script as an example, tell me what I am doing wrong? I know it is probably something simple thaat all the script writers think everyone should know, but I just can't figure it out. A little help please?
2262 days, 20 hours, 41 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
It can be kinda complicated. I wrote an article on the planets magazine site on it if you want to take a look: http://www.planetsmagazine.com/?p=610
If you go to the bottom, you'll see what greasemonkey shows when the script is loaded - a check next to the script name.
----
In this case, my script adds a new section of info on the bottom of the ship view when you click on a ship in the map, called Fleet. No button, its added into the ship interface itself.
2262 days, 20 hours, 32 minutes ago
Profile Image
mule
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
YEA! It works. A big thank you to dtolman. :)
2262 days, 17 hours, 5 minutes ago
Profile Image
anaconda
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
@dtolman: Yeah, at the bottom of the ship screen on the new fleet tab... it only shows me the total fuel of the fleet. Doesnt say anything on what else the fleet is ferrying...
2262 days, 16 hours, 11 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Try collapsing some sections above it. I suspect the info on the bottom are getting cut off.
2262 days, 7 hours, 33 minutes ago
Profile Image
anaconda
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
right, that did it.

This is definitely one helluwa script as it is already, but the development ideas sound fantastic!

Add-ons to wanted list (didnt memorize those that I read few days ago, so apologies if this is repeating):

- fleet mission button e.g. cloak or mine sweep
- fleet friendly code option e.g. pop or trg
2261 days, 21 hours, 16 minutes ago
View halion's profile
halion
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply

Hey this is really great Dtolman!

Loving the fuel feature. I am mostly using this mod to the max on a very developed end game with large fleets fighting on one front some webs so the fuel warning is an extra benefit thanks!

I think your priority list looks good.

1. Some form of group/naming convention for easy fleet reference.
2. Ability to control and review battle order at fleet level

these are the two biggies for me and will save even more time than your addon already does!

Thanks for the hard work.

2260 days, 15 hours, 56 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Whew! Got 0.6 finished, big big update for the mod - lot of code behind the scenes to get this working.
New features:
----------------------------------------------------------------------------------------------------------------------------------------
-Now can use [] fleet tags at the beginning of the ship name to add a ship to a fleet. I scan for these tags at turn load (haven't tested with time machine), and when ship name is changed.
Example - you can rename a ship from MEDIUM DEEP SPACE FREIGHTER to [FLEETA]MEDIUM DEEP SPACE FREIGHTER to have that ship join FLEETA.
-Added Previous and Next Fleet buttons to jump between these fleets. When using this, it will always go to the lowest ID ship in the fleet. This only works for tagged ([]) ships.
--------------------------------------------------------------------------------------------------------------------
The next part may be a bit confusing. If you don't use [] tags on a ship, I've retained the old behavior. It will show the cargo totals, fuel/neutronium info, set destination, and set speed for ALL ships at that location, regardless of tags. It basically works just like the last version, ignoring any []s. All you'll notice without []s are two new buttons that don't do anything for you :)
------------------------------------------------------------------------------------------------------------------------
If you do have fleet tags on a ship, then the fleet display will ONLY display information for ships bearing that fleet name, regardless of location. So setting destination sets it for all ships with those [] tags, setting speed does the same, clicking the fuel warning button, or looking at cargo.
Previous and Next Ship will jump between members of a fleet, regardless of location, when viewing a []'ed fleet member.
--------------------------------------------------------------------------------------------------------------------------
If there is a location where you have a mix of []ed and untagged ships, you can have odd behavior. Be warned! For example, lets say you have ships named [a], [b], CCC, DDD at a location, with id's of 1,2,3,4 respectively. So two tagged in two fleets, and two untagged.

If you hit set destination for [a], only [a] is effected. Same with [b]. If you do this with CCC or DDD, then ALL FOUR ships are effected. If this is too annoying, I can work to change this (nothing set in stone here).

Even more confusing. Lets say you hit the previous ship button, starting at DDD. Click once, it will go to CCC. Nothing new there. Click again while CCC is selected, it goes to [b]. Click it again, and nothing happens. Why? Because [b] is the only ship in that fleet, and it reverts to []ed fleet behavior, instead of location group behavior.
-------------------------------------------------------------------------------------------------------------------------------------
Obviously still a work in progress, and though I tried to catch error conditions, mixed fleet/non fleet groups, as well as all the above on v2 and v3, its possible I missed things. Heck - I guarantee I missed things. If you see any bugs please let me know: the version (old/v2 or new/v3), if the ship was []ed or not, if there were other ships at the location that were []ed or not, and what specifically you were doing (steps to reproduce).
-------------------------------------------------------------------------------------------------------------------------------------
Next up: trying to add []/fleet tags to my shiplist mod.
2260 days, 4 hours, 6 minutes ago
Profile Image
anaconda
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Loving the new features already!

One question, am I allowed to name a fleet anyway I like? In this sense, which of the following examples would, should and could work in a game:

1. [HOMEFLEET A]
2. [SPACE NAZI PILLAGING PARTY]
3. [Concordia]
4. [FORWARD OPS #2]

?
2260 days, 3 hours, 22 minutes ago
Profile Image
gudmo
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Can you add the fuel calculation similar to what is done in this script
http://userscripts.org/scripts/show/138532
To your ship list script ?

Would be awesome
2260 days, 2 hours, 6 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Anaconda: Any and all of those should work. AFAIK, the only thing that is forbidden is trying to use the character ] in your fleet name. Because that would be silly.
-------------
Gudmo: Will be working to add all features in the fleet script to my ship list next. Oh - and creating a new fleet screen which will list all fleets by fleet name, and then any fleet can be expanded to show the members of the fleet.
2260 days, 2 hours, 5 minutes ago
Profile Image
gudmo
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Keep up the good work mate :)
2259 days, 23 hours, 53 minutes ago
View halion's profile
halion
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply

loving the new features for fleet selection.. helped already in my recent turn thanks!

Sooo now I am thinking what else we need.

the 'inadequate fuel' warning message was a great improvement.

Now we have fleets and you can see total fleet fuel (along with cargo)

is it possible to show :-

current fleet fuel
remaining fuel after existing orders issued.
or perhaps some kind or fleet range estimate based on current usage calculations..

you guessed it. with large fleets and logistic combinations I am now finding a lot of time working out my fleets ranges and when/where i need to arrange refuels with cobol's etc.

particularly  useful when on the offensive and fuel availability is less certain.

other things that come to mind:-

total number of torps in the fleet? might be difficult or take too much space.

total number of mines/web mines swept depending on which current fleet ships are set to minesweep.

2259 days, 22 hours, 14 minutes ago
Profile Image
legbreaker
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Hi,

I did not read all the comments. I just came across that post.
Dunno if my idea fits into this section:

What about a kind of "RGA-warning-system" for rebel ships. It already happened to me a couple of times, that I set RGA to one of my ships and then send it back to my HW without removing RGA by accident....ouch....
I got no idea right now how to implement that but maybe some of you brains got one.

Bests!
2259 days, 22 hours, 10 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Halion - very good ideas, and I'll try to incorporate what I can (range prediction being least likely to happen anytime soon).
---
Legbreaker - that sounds like a fit for my ship list display mod, which is designed to prevent me from making bone-headed mistakes. As I'm playing the fascists now, I plan on adding in a warning for ships that are trying to self-pillage/self-RGA. Look at this thread for future updates on that:
http://planets.nu/discussion/utility-script-improvements-to-ship-list-display
2259 days, 20 hours, 6 minutes ago
Profile Image
mule
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
I would also like the RGA warning. I RGAed my ally's HW. He was fairly noncommittal about it, but I can guess what he wanted to say. :(
2259 days, 20 hours, 6 minutes ago
Profile Image
mule
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
I would also like the RGA warning. I RGAed my ally's HW. He was fairly noncommittal about it, but I can guess what he wanted to say. :(
2258 days, 19 hours, 28 minutes ago
Profile Image
anaconda
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
It seems the fleet cargo manifest doesnt show specials, namingly torbs or fighters. At least fighters should be included...
2258 days, 19 hours, 12 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
Torps and fighters are tougher to track in the code, so I've put that as a secondary feature instead of a primary one for now (they are actually treated identically, and you have to determine if its a torp or fighter by the hull type, and then cross reference the ship  torpedo tube type for the torp type..

I'll circle back and take a look at that once I finish my latest round of development on the ship list screen. I'm thinking of adding the following next into the fleet cargo view:
-minesweeping capability
-minelaying capability (not sure how else to meaningfully total # of torps in a summary)
-total fighters
1881 days, 16 hours, 10 minutes ago
Profile Image
dtolman
RE: Utility Script: New Fleet UI in the Ship ScreenWrite Reply
The host for this mod is now greasyfork.org. You can download from:
https://greasyfork.org/scripts/2596-planets-nu-fleet-ui

Seems this thread is missing an old announcement - so for the record...
v0.7 of my Fleet UI add-on is now active at http://userscripts.org/scripts/show/165201! New features include fleet totals on:
-fighters
-torps
-total minelaying capability
-total minesweeping capability