Jump to content

[1.2] [2016-10-28] Haystack Continued (v0.5.2.1)


Qberticus

Recommended Posts

Haystack Continued

Now you can find that lost ship you were looking for!

Now updated for KSP 1.2

Version 0.5.2.1

  • Updated to be compatible with new Contract Configurator changes.
  • Celestial bodies filter button state is now saved like the other filter buttons.
  • Vessel type icons for plane and relay have been added.

Main Features:

  • Allows you to quickly see all of your vessels
  • You can quickly search for vessels without scrolling through the entire map
  • You can view your vessels grouped by the celestial body that they are orbiting
  • Works in Flight Map View and in the Tracking Center.
  • New in 0.3.1.0: You can now display a list of docking ports for the nearby ships (i.e., loaded in physics range) and target them. The list only displays available docking ports (i.e., the docking port must not have a ship docked and must have a free attach node)
  • New in 0.3.1.0: The docking port list includes support for the Docking Port Alignment Indicator mod's named port feature. If it detects this mod it will use the name of the docking port that has been set in the display. If the mod is not detected it will default to using the name of the part.
  • New in 0.3.3.0: Support for blizzy toolbar
  • New in 0.4.0.0: A new button that allows you to set vessels to be hidden from the list. The hidden vessels are saved in the save game file and will be saved whenever the game is saved.
  • New in 0.5.0.0: Added support so Haystack displays in the Space Center.
  • New in 0.5.1.0: Extended vessel and celestial body information window.
  • New in 0.5.1.0: Nearby button that makes managing bases and space stations easier.
  • New in 0.5.1.0: Sort ordering, orders sorts.
  • New in 0.5.1.0: Rename vessel from the extended vessel information window. (Click on the R button next to the ship's name).

Some screenshots:

Javascript is disabled. View full album

Downloads:

GitHub and Spacedock

Known issues:

  • There might be an issue with the settings saving and the 64bit version as several people have reported problems. I've not been able to duplicate anything at this time. This may just be the general 64bit bugginess.

 

Change log:

 

Spoiler

 

Version 0.5.2.1

  • Updated to be compatible with new Contract Configurator changes.
  • Celestial bodies filter button state is now saved like the other filter buttons.
  • Vessel type icons for plane and relay have been added.

Version 0.5.2.0

  • Updated for KSP 1.2
  • A couple of UI updates due to changes in new KSP version
  • Tweaked docking port list font size due to new font rendering code
  • Known Issues:  missing filter button icons for new ship types: plane and relay

Version 0.5.1.0

  • Updated for KSP 1.1.3 Made the UI look a bit nicer.
  • Added extended vessel info window. It can be accessed by the arrow button on the right side of the window or by clicking the currently selected vessel as a toggle.
  • Extended vessel info window also works for Celestial Bodies (i.e., planets and moons). It will display important information about them. Of note are the science High, and Low altitude values. You don't have to look them up anymore.
  • Added sort order buttons for the vessel list. These let you change the sort order of the vessel list.
  • Added a nearby button. This only displays the vessels in the current SOI. Vessels in physics range are sorted by name; vessels outside of physics range are sorted by distance from the active vessel. This button only works while flying a vessel.
  • Added ability to rename a vessel. The button is accessed from the extended vessel info display.
  • Search results are ordered by the location of the search term in the result. Closer to the beginning of the result the higher on the list.
  • Added blizzy toolbar support back. Defaults to using blizzy toolbar if found, otherwise it will use the stock toolbar.
  • Moved the settings.cfg file to PluginData directory. Thanks to Enceos and RealKolago for the heads up.
  • Fixed tooltips so they are clamped to within the window and are not cut off.
  • Added KSP-AVC support. 

Version 0.5.0.0

  • Updated to KSP 1.1
  • Added window to the space center.
  • Added app launcher button and icon.
  • Disabled use of blizzy toolbar until that is updated.
  • Switched to allowing targeting of docking ports when a vessel is loaded instead of packed.
  • Once the targeted vessel is within 200m (i.e., unpacked) the port needs to be retargeted for automated docking support to work (e.g., mechjeb)
  • Updated support for Docking Port Alignment Indicator mod named docking port feature

Version 0.4.1.0

  • Fixed the missing spaceobject icon error message by adding the icon.
  • The haystack window will now save the visible state depending on the scene. This means that leaving the window open in the tracking station will not leave it open during flight.
  • You can now target the currently selected celestial body (i.e., planet or moon) when in the default view (i.e., not group by).

Version 0.4.0.0

  • There is a new button that allows you to set vessels to be hidden from the list. The hidden vessels are saved in the save game file and will be saved whenever the game is saved.
  • The window will now default to hidden when first loading the game. In the future this will be updated so the tracking center window and the in flight window will have separate state for the being shown / hidden.

Version 0.3.3.0

  • This release updates the comple against KSP 0.90
  • Added support for blizzy toolbar
  • Minor tweaks to some UI elements
  • Fixed a bug reported by Apollo13 where the names of vessels would wrap to a new line

Version 0.3.2.0

  • Compiled and checked against KSP 0.25
  • Changed save log output to debug mode only
  • Haystack window now respects the Hide GUI game event. It's now possible to take screenshots without the Haystack window appearing.

Version 0.3.1.1

  • Fixed a bug where the display would break as debris left physics range and was removed by the game. Thanks to @Ringkeeper for reporting it.
  • Resizing the window should be smoother in low FPS situations.

Version 0.3.1.0

  • You can now display a list of docking ports for the nearby ships (i.e., loaded in physics range) and target them. The list only displays available docking ports (i.e., the docking port must not have a ship docked and must have a free attach node)
  • The docking port list includes support for the Docking Port Alignment Indicator mod's named port feature. If it detects this mode it will use the name of the docking port that has been set in the display. If the mod is not detected it will default to using the name of the part.
  • The group by orbiting body button now has an icon.
  • Ship list now displays the distance that ship is from the active ship.
  • The Haystack Continued window will now show display in regular flight mode and in map mode

Version 0.3.0.0

  • Initial release

 

This is a continuation of the wonderful Haystack plugin.

 

Authors:

Current maintainer: Qberticus

With thanks to the previous authors: hermes-jr and enamelizer

Mini-AVC Notice:

This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin.

License:

Source code released under The MIT License (MIT)

Other materials licensed under the Creative Commons Attribution-ShareAlike 4.0 International License

88x31.png

Source:

https://github.com/qberticus/HaystackContinued

Edited by Qberticus
new version 0.5.2.1
Link to comment
Share on other sites

I'm looking at Haystack as a replacement for Targetron, which lost its developer. One function that Targetron provided is a list of the docking ports on the target vessel. New to KSP o.24 is the ability to name each docking port. Targetron lists the docking ports, but without their names; just the generic "Clamp-o-Tron" for each. The player then clicks on a port name in the list and that port becomes the target for docking.

Can you update Haystack to provide the docking port list with their real names? Can it also select a port to set it as the target port?

Link to comment
Share on other sites

Indeed, docking port listing/targeting is a must for this to replace Targetron, though the orbiting-body sorter really is tempting. Also being able to sort by range to target, including some sort of indicator that you can target a docking port at that range would be nice. Finally, there's the GUI of this plugin vs. Targetron, where I'd really like to see a bit better use of the box-space, such as perhaps putting the text input between the GB button and the target/switch buttons to use up that blank space and save some screen real-estate. It looks like, from the tab thingie on the top, that this plugin's GUI attaches to the bottom of the screen; Being able to attach it to other sized of the screen as well would be awesome.

Okay, so obviously I'm not too demanding... just a few thoughts, that's all.

It's not like those features not being present is a deal breaker for me using it or anything... well, okay, they sorta are, but really only the first one is really necessary...

Okay, fine, I'm being a bit jerky... It's all Jeb's fault. He's a horrible influence on me...

Link to comment
Share on other sites

I was planning on adding docking port targeting in the future. I'm not sure if I'll add in different sorting options at this time but adding in a current distance value to the vessel info text is certainly possible.

Other future features I'm thinking about include:

  • Marking ships as favorite and having a specific filter to display only those
  • Marking ships to ignore and not display
  • The ability to rename the ship from the list
  • A global character prefix that would remove a ship from the display if the first characters of its name match (think having a "-Old Base" the '-' would remove it from the list).

Edited by Qberticus
Link to comment
Share on other sites

  • Marking ships to ignore and not display

Of the items you listed, I would most appreciate this. But, how would a player be able to mark it again, so it can be seen on the list? Perhaps your fourth item on the list is the best solution.

As for renaming ships via the list, we can do that through the Tracking Station UI, which is easy enough. I suggest not wasting your valuable time/effort on that feature unless you're really, REALLY bored. LOL

Edited by Apollo13
Link to comment
Share on other sites

Sometimes I get endless loop when saving the game. The game hangs and I can only kill the process to exit. In the output log I get endless "Haystack: saving settings". This also damages any mod saves that come after, so it is save breaking bug. Sorry I can't get more precise. Hope it will be fixed soon, the search option is a killer.

Link to comment
Share on other sites

Sometimes I get endless loop when saving the game. The game hangs and I can only kill the process to exit. In the output log I get endless "Haystack: saving settings". This also damages any mod saves that come after, so it is save breaking bug. Sorry I can't get more precise. Hope it will be fixed soon, the search option is a killer.

The output log displays that because the mod saves the current settings every 30 seconds and that's just the resulting debug log output. I should probably 1) remove that log output, and 2) later improve the way the settings are saved but atm it works. As to the endless loop and hanging I don't know if it's the mod or not since I've not experienced that issue myself. This mod itself does nothing to the game save or any internal state as it relates to the save file. It does allow you to switch to a another vessel but it does so in the same way as the game itself.

I'm currently testing an update that displays the docking ports on nearby ships and allows you to set them as a target. It also includes support for the Docking Port Alignment Indicator's named port feature.

Link to comment
Share on other sites

I'm currently testing an update that displays the docking ports on nearby ships and allows you to set them as a target. It also includes support for the Docking Port Alignment Indicator's named port feature.

I'm looking forward to this update. Something else about Targetron. When the player selects a port from the target vessel list, MechJeb recognizes that the port has been selected. Mods, such as NavyFish's DPAI also allow you to select a port by name. However, MechJeb does NOT recognize that the target port was selected (in the Docking Autopilot).

And, when you say "nearby ships" how near is that? DPAI sees docking ports of ships about 250 meters out.

Link to comment
Share on other sites

When the player selects a port from the target vessel list, MechJeb recognizes that the port has been selected. Mods, such as NavyFish's DPAI also allow you to select a port by name. However, MechJeb does NOT recognize that the target port was selected (in the Docking Autopilot).

I'll look at this but there shouldn't be anything that affects MechJeb and if so there isn't much I could do about it. Setting the targeted docking port calls into KSP code and from there it's out of my hands. What I can tell from briefly looking at MechJeb's code is that it should detect any changes in target fine.

And, when you say "nearby ships" how near is that? DPAI sees docking ports of ships about 250 meters out.

Nearby is physics loaded. In order to get the docking port list you need to be able to get the part module list and that is only available when the ship is loaded. I couldn't see any limit in DPAI's code but I was primarily looking at it for the named docking port sections. If there is one that I didn't see I'd assume it's probably a design choice to limit the amount of button clicking required to select a port.

Link to comment
Share on other sites

The output log displays that because the mod saves the current settings every 30 seconds and that's just the resulting debug log output. I should probably 1) remove that log output, and 2) later improve the way the settings are saved but atm it works. As to the endless loop and hanging I don't know if it's the mod or not since I've not experienced that issue myself. This mod itself does nothing to the game save or any internal state as it relates to the save file. It does allow you to switch to a another vessel but it does so in the same way as the game itself.

I have got several thousand of those messages one after another. Even after I have ctrl-alt-delete and switched windows, no "device lost" messages were in the log.

I've looked into your code. I am not much familiar with Unity, but I'd guess that the problem is within

[COLOR=#333333][FONT=Consolas][B]this[/B][/FONT][/COLOR][COLOR=#333333][FONT=Consolas].[/FONT][/COLOR][COLOR=#333333][FONT=Consolas]InvokeRepeating[/FONT][/COLOR][COLOR=#333333][FONT=Consolas]([/FONT][/COLOR][COLOR=#DD1144][FONT=Consolas]"RepeatingTask"[/FONT][/COLOR][COLOR=#333333][FONT=Consolas],[/FONT][/COLOR][COLOR=#009999][FONT=Consolas]0[/FONT][/COLOR][COLOR=#333333][FONT=Consolas],[/FONT][/COLOR][COLOR=#009999][FONT=Consolas]30F[/FONT][/COLOR][COLOR=#333333][FONT=Consolas]);[/FONT][/COLOR]

Looks like under some circumstances Unity hangs inside Invoke. Try co-routines http://docs.unity3d.com/Manual/Coroutines.html instead.

Link to comment
Share on other sites

Version 0.3.1.0 is now released.

The download links are updated / being updated. As of this post GitHub is updated and Kerbstuff should be as well.

New Features:

  • You can now display a list of docking ports for the nearby ships (i.e., loaded in physics range) and target them. The list only displays available docking ports (i.e., the docking port must not have a ship docked and must have a free attach node)
  • The docking port list includes support for the Docking Port Alignment Indicator mod's named port feature. If it detects this mod it will use the name of the docking port that has been set in the display. If the mod is not detected it will default to using the name of the part.
  • The group by orbiting body button now has an icon.
  • Ship list now displays the distance that ship is from the active ship.
  • The Haystack Continued window will now show display in regular flight mode and in map mode

Screen shots:

Javascript is disabled. View full album
Edited by Qberticus
Link to comment
Share on other sites

I wish I could use it. However, I have no idea how to activate it. There's no option to display it in blizzy's toolbar. There's no default UI. While in flight screen, and close to the target ship, there was no UI. I looked at the settings.cfg file to determine what key I need to press. Nothing.

EDIT: TinfoilChief showed me the way.

Edited by Apollo13
Link to comment
Share on other sites

I wish I could use it. However, I have no idea how to activate it. There's no option to display it in blizzy's toolbar. There's no default UI. While in flight screen, and close to the target ship, there was no UI. I looked at the settings.cfg file to determine what key I need to press. Nothing.

I guess I'll stick with Targetron for awhile.

Haystack take a page from the vanilla navball, leaving only a small tab showing when it's not in use. Click that tab to bring it up.

Screenshots here: http://imgur.com/a/mxfFt

Link to comment
Share on other sites

@TinfoilChief: thank for that info. Just gave you a forum rep point as well.

@Qberticus: please incorporate into blizzy's toolbar and create a free-floating window. Like many folks, I play KSP in a full-sized window. The MS Windows7 Toolbar covers your tab even when the Toolbar is auto-hidden.

EDIT: Upon opening the tab/window, I discovered I could move the window anywhere along the bottom. That helps a bit.

Edited by Apollo13
Link to comment
Share on other sites

@Apollo13: I'll look into the toolbar support. I've not noticed an issue opening the window with the windows toolbar and I play KSP with a borderless window and an auto-hide taskbar. Do you have the same problem opening the closed navball? I'm interested since it might be an issue with the gui code.

@TinfoilChief: no problem. I decided to maintain it since I liked using it as well. It's also my way of giving a bit back to the community for all the other mods I use.

Link to comment
Share on other sites

@Apollo13: I'll look into the toolbar support. I've not noticed an issue opening the window with the windows toolbar and I play KSP with a borderless window and an auto-hide taskbar. Do you have the same problem opening the closed navball? I'm interested since it might be an issue with the gui code.

I always have the NavBall open in the flight screen. However, yes, that tab is partially covered as well. All-in-all, it's no big deal. Just an idea. Regardless, I like Haystack. Targetron is no longer on my screen. Also, I don't use a borderless window.

Link to comment
Share on other sites

Regardless it's a usability problem that I should figure out how to address if I can. I added an extra image to the imgur album to show how to open it since it is obviously not obvious and I should've realized that. The image is a temporary solution but at least it's better than nothing.

Link to comment
Share on other sites

Happy to see the return of HayStack, thanks Qberticus to bring it back.

I used the previous one up to KSP 0.23 - then had to switch to Targetron. But only HayStack allowed to target planetary bodies on the fly, something I was missing all this time.

Link to comment
Share on other sites

I love what you've done with the dockingports list. That's just plain pretty.

The buttons around the main dialog are a bit big and clunky though. Maybe you could do some of that guisnazzery you did to the dockingport list to those buttons, making them a little flatter and prettier? Same goes for the searchfield, it's a bit clunky.

Link to comment
Share on other sites

I love what you've done with the dockingports list. That's just plain pretty.

The buttons around the main dialog are a bit big and clunky though. Maybe you could do some of that guisnazzery you did to the dockingport list to those buttons, making them a little flatter and prettier? Same goes for the searchfield, it's a bit clunky.

got a nice error today.


Haystack: saving settings

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Vessel Munshine IV Debris was on-rails at 0.0 atm pressure and was destroyed.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component:InternalGetTransform ()

at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0

at HaystackContinued.HaystackContinued+VesselInfoView.drawDistance (.Vessel vessel) [0x00000] in <filename unknown>:0

at HaystackContinued.HaystackContinued+VesselInfoView.Draw (.Vessel vessel, Boolean selected) [0x00000] in <filename unknown>:0

at HaystackContinued.HaystackContinued+DefaultScrollerView.Draw (System.Collections.Generic.List`1 filteredVessels, System.Collections.Generic.List`1 filteredBodies) [0x00000] in <filename unknown>:0

at HaystackContinued.HaystackContinued.mainWindowConstructor (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)

(Filename: Line: 404)[/SPOILER]

The error continuous for some time , in the meantime the GUI is not displayed. After some time (10-15s) it comes back.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...