Author Topic: [MOD](v0.5.1) FleetControl - easy management of ship groups and more  (Read 29373 times)

w00zla

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    79
  • coder4life
    • View Profile
Good news everyone ;D

I created a mod that should make having multiple ships in the game just more fun!

DESCRIPTION:

This mod tries to make the management of a ship fleet in Avorion easier and to provide additional features like custom ship orders. 
In the first place, the mod provides an UI window which you can use to:
  • assign fleet ships to groups
  • give orders to complete ship-groups or single ships
  • configure the look and feel of the UI (group-names, colors etc.)
  • enable highly customizable HUD display (so you have the info about your ships right at the screen!)

SCREENSHOTS:
Spoiler: show
Fleet Orders:


Fleet Groups:


Configuration:


HUD Example:



FLEETCONTROL v0.5.1:

Commands:

/fleetcontrol
Enables/disables the Fleet Control UI (menu item & window).

Usage:
/fleetcontrol
/fleetcontrol enable
/fleetcontrol disable


/fleetcontrolconfig
Command to change advanced server-configurations used by Fleet Control UI.

Usage:
/fleetcontrolconfig updatedelay <NUMBER>
/fleetcontrolconfig enablehud <BOOLEAN>
/fleetcontrolconfig clear <TARGET>


Parameters:
<NUMBER> = any positive number or 0
<BOOLEAN> = true or false
<TARGET> = player or server


INSTALLATION:
Download ZIP for latest release from GitHub and extract it to <Avorion>\data\ directory.
No vanilla script files will be overwritten, so there should be no problem with other mods!

Server/Client:
The scripts are server- and client-side.
All files have to be available on the client for multiplayer games!


HOW TO:
Spoiler: show

First use in a galaxy:
(following instructions have to be done once per galaxy and player)

To enable the Fleet Control UI for yourself, you must enter following command into chat: 
/fleetcontrol

This will create a new menu icon which you can use to show the UI window: 


If you want to hide/disable the UI (or remove and uninstall the script), then use: 
/fleetcontrol disable


Advanced server configuration
These configs will help server admins and curious users to tweak performance values and en-/disable features of the UI.

updatedelay:
- defines the delay (in milliseconds) for the update of ship-states etc. in UIs and HUDs of players
- possible values: 0 - 99999999
- default: 750

enablehud:
- can be used to disable the display the Fleet Control HUD globally for a server
- possible values: true or false
- default: true



Integration of custom orders/other order mods:
The mod does not bring its own version of the default ship orders, instead it calls functions in the vanilla "craftorders.lua" script.   
If you or one of the mods you are using modified this script, this version will also be used by Fleet Control! In most cases there should be no issues with a modified "craftorders.lua", but be aware of potential problems here (please PM me in this case)!

Easy integration of additional custom commands added by other mods or yourself is planned for the near future!

Known Issues/Limitations:
  • Only ships in player's current sector are listed as selectable ships in several places:
    this is due to game engine limitations and cannot be changed at the moment
    (just visit every sector your ships are in, the UI remembers all your ships once seen)
  • Only states of ships in player's current sector are available:
    this is due to game engine limitations and cannot be changed at the moment
  • Destruction and sector-change of a ship which is not in player's current sector is not recognized
    this is planned to be improved in the near future (maybe even not possible at the moment)
  • Selecting order "Escort Me" results in order "Escort Ship":
    currently, its not possible to get the ships (escort) target via script, so the more general order is displayed

Planned Features/TODOs:
  • integration/configuration of other order mods like "Haul Goods" etc.
  • integration of additional custom orders:
    - order "Escort Chain/Polonaise"
    - order "Collect Loot"
  • improvements for multiplayer:
    - improved state-handling for out-of-sector ships
    - recognize if ships are controlled by other players
  • add sounds for actions like "give order" (with config)
  • notifications for orders and other events (with config)
  • keyboard-shortcuts for GUI and HUD display
  • more ship state infos in UI and HUD, like hull, shield, velocity etc.
  • better HUD alignments based on actual HUD size
  • warning on improper player jump-distances when escorted by ships (required API requested from koonschi, waiting...)
  • info on current target for states like "Escort" (required API requested from koonschi, waiting...)


Changelog:

0.5.1
  • fixed bugs and problems with script changes and some strange client behaviour (thx to Shrooblord for feedback)
  • added clear action to /fleetcontrolconfig command for removing all saved mod values (for troubleshooting purposes)

0.5
  • made the mod compatible with the latest versions of the game (0.18-beta & 0.17.1-stable)
  • added support for playing random sounds when giving orders (configurable)
  • added script namespaces, fixed and refactored much infrastructure code

0.4
  • initial public release


Feedback on bugs on suggestions for new features are of course welcome!
« Last Edit: August 07, 2018, 11:24:27 PM by w00zla »



w00zla

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    79
  • coder4life
    • View Profile
-reserved-



Fox

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    197
  • "You're a good friend, Arthur!"
    • View Profile
    • FoxDie Inc.
Do i get this right, i can assign multiple of my ships to groups, and then give those groups the known "Vanilla-AI" Orders, like Patrol or Escort, instead of clicking through each individual one?  :o

Woow, definetly gonna watch this! Any chance you know the CODEA Software from the X Series? The Fleet Management itself opened a whole new Level of interacting with the enviroment, automated collecting Stuff, assign Scouts for Recon and Patrols protecting the Fleet, define Fire-Orders for bigger Frigates and Destroyers...
Point is, the Game suddenly felt totally different from the "1 Ship with Fighterescort"-Philosophy you'd more or less automatically prefered before for simplicity... i'd expect the same happening here, ppl would go on their playthroughs very different from what they do now with a nice fleet management!!
- Luck is no matter of coincidence or probability, but of attitude and perspective ! -



w00zla

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    79
  • coder4life
    • View Profile
Do i get this right, i can assign multiple of my ships to groups, and then give those groups the known "Vanilla-AI" Orders, like Patrol or Escort, instead of clicking through each individual one?  :o

Woow, definetly gonna watch this! Any chance you know the CODEA Software from the X Series? The Fleet Management itself opened a whole new Level of interacting with the enviroment, automated collecting Stuff, assign Scouts for Recon and Patrols protecting the Fleet, define Fire-Orders for bigger Frigates and Destroyers...
Point is, the Game suddenly felt totally different from the "1 Ship with Fighterescort"-Philosophy you'd more or less automatically prefered before for simplicity... i'd expect the same happening here, ppl would go on their playthroughs very different from what they do now with a nice fleet management!!

yes, and you seem to imagine quite the same possible results as me with this ;) Next stage gonna be the addition of new dedicated orders like "only collect all dropped loot" and the like, so this gets more CODEA like (despite i dont know it since i've not played X for myself ;) )



Sarok

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    22
    • View Profile
THX !!!



Tampa_Gamer

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    7
    • View Profile
Thank you for this mod, I am sure the mechanics will eventually be incorporated into the game, but the in meantime please keep up the great work!



ZappBrannigan

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    2
    • View Profile
I cannot activate the mod since the last update. Do you need something for debugging or do you know about the issue? Thanks for the great work by the way.



XTails

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
Same here: excellent work (i hope ;) ), but with the 0.12 beta enabling the icon results in the message that "Fleetcontrol was enabled" but the icon doesn't show.



mccorkle

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    6
    • View Profile
I tracked the issue down and submitted an issue in github: https://github.com/w00zla/avorion-fleetcontrol/issues/2




w00zla

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    79
  • coder4life
    • View Profile
I tracked the issue down and submitted an issue in github: https://github.com/w00zla/avorion-fleetcontrol/issues/2

Thank you very much for this excellent report :D
I am quite busy at the moment due to a new job, but I will try to fix the problem on the weekend, seems not to be a big issue to resolve  ;)



mccorkle

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    6
    • View Profile
Thank you very much for this excellent report :D
I am quite busy at the moment due to a new job, but I will try to fix the problem on the weekend, seems not to be a big issue to resolve  ;)

Yeah, no worries!  Its the least I can do to get FleetControl back working.  Let me know when you are ready for more testing.



plablo

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    26
    • View Profile
- order "Collect Loot"

yeh boi

gonna be good this day



Vellius

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    2
    • View Profile
Getting this when running /fleetcontrol

Code: [Select]
could not execute function 'validateClientVersion' in '"data/scripts/player/flee
tcontrol/manager.lua"':
invalid type 'boolean' at stack position 1, expected 'Uuid'
stack traceback:
        [C]:-1: in function __lt
        data/scripts/player/fleetcontrol/manager.lua:142: in function addShipUIS
cript
        data/scripts/player/fleetcontrol/manager.lua:89: in function initShipUIH
andling
        data/scripts/player/fleetcontrol/manager.lua:68: in function ?
Setting state to invalid.

Line 142...
Code: [Select]
if shipidx and shipidx > 0 and lastCraft ~= shipidx then
Not a pro in Lua but "shipidx > 0" would try to do a integer operation against a UUID which can look like 6545646541-654165-651-6351

Removed that check in addShipUIScript and removeShipUIScript and everything is working fine now.
« Last Edit: August 05, 2017, 11:33:44 PM by Vellius »



Vellius

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    2
    • View Profile
Well.. fixed the mod and just found out that it does not recognize alliance ships... 



Daemon

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    23
    • View Profile
Does the icon show for you?
I do not get the error but there is no icon popping up when I enable this.