Jump to content

[1.12.x] Hanger Grid Regridded: Zero deviation - Full Release


Recommended Posts

Full Release now available

 

Originally written by @Ser, I've adopted it with his permission.  As usual, if he comes back and wants to take it back, I'll be happy to oblige.  Original thread is here:https://forum.kerbalspaceprogram.com/index.php?/topic/132775-181-hangar-grid-zero-deviation-v040181-2019-nov-18/

 

rj5Tz0X.jpg

Description

Citation: "You should make your drawings with a ruler and a pencil, not with your leg and a marker pen." -- A maths teacher

Have you ever been annoyed by ending up with misaligned engines or clubfooted landing gear after spending half-an-hour trying just to guess where to rotate to get them right? This mod adds a grid to SPH and VAB and "laser" guides for an active part to let you clearly see where the things are wrong and align them in one click.

 

Here's a video on why do you need it and how to use it

Installation

Extract contents of the released archive into your KSP/GameData folder.

Usage

While in SPH or VAB press the button to enable the grid. Once there's a root part you'll see the grid with origin bound to the part. If you try to add or edit another one you'll see the red "laser" guides representing all the three axes for it and all of its symmetry counterparts. Now you have all the planes and axes visualized and it's the matter of several clicks to align the things.

The guides have distinct colors for each direction. You can easily remember them in the following way:

  • Red for Rechts (Right)
  • Violet for Vorwarts (Forward)
  • Pink for Up (almost the same as the thrust vector)

Once you have rotated a part to approximately face the desired side, use the following hotkeys for autoalign the desired part's axis to be parallel to the closest grid line (regardless of direction):

  • Period ( [.] ) - toggles the grid on and off
  • L - aligns the part by a guide at the mouse pointer to the closest grid line
  • J - aligns the part's up (pink guide) to the closest grid line
  • N - aligns the part's forward (violet guide) to the closest grid line
  • M - aligns the part's right (red guide) to the closest grid line
  • G - select a part under mouse pointer as the grid's origin
  • K - toggles guides for symmetry (deKlutter). May be useful when working with many radially symmetrical parts creating a bunch of guides which makes them complex to use. This button let's you see the ones for the original part only.

When using the separate keys for alignment (J, N, M), if you are in the part's editing mode (rotation or offset) it is sufficient to just press a key. Otherwise you'll need to move the mouse pointer over the desired part and then press.

To change the keys, simply right-click on the toolbar button and a settings window will open up:

JzlGLIo.png

Click any of the buttons to change the assocated key.

You can also change the guide selection tolerance and the step;  when you change the step, the  <<  and  >>  will increment/decrement by 1, and the   and   keys will increment/decrement by 0.1

If the grid is displayed when you open the window, changes to the step will immediately be shown

Click Cancel to ignore all changes

Click Reset to reset all values to the default settings

Click Revert to revert values to the previously saved values

 

Availability

Available via CKAN

Changes by Linuxgurugamer

  • Added support for ToolbarController
  • Added Settings window
  • Added ability to change the step of the lines
  • Fixed problem that autoalignment of a part desynchronized it's rotation and position to the current rotation gizmo
  • Fixed symmetry mode being hard-coded to letter K

New Dependencies

Edited by linuxgurugamer
Link to comment
Share on other sites

@linuxgurugamer is this intentional?

Quote

New inflation warnings for HangarGrid: $vref absent, version file present: GameData/HangarGrid/HangarGrid.version

Also it appears you haven't added the dependencies to the netkan:

On 10/1/2021 at 5:24 AM, linuxgurugamer said:

New Dependencies

 

Link to comment
Share on other sites

@linuxgurugamer  Looks like the account was inevitable, I seem to have run into a problem that I am hitting a dead end on with this mod.  I have a feeling something from another mod is interfering but nothing is standing out.  When I enable the grid view I just get a white box on the ground directly below the rocket in the center.  I've attached a copy of the logs where I was using the button before I quit, list of mods and screenshots of the white box.

It's a bit of a mod list to warn ya, but so far has seemed stable minus a fuel flow spam from ScrapYard causing some lag when placing items in VAB.

https://drive.google.com/file/d/1VNPppnTUruDcu0Ij3redcsZCz6OVNXp3/view?usp=sharing

I've tried doing a reset in the Hanger Grid settings with no luck. 

Any ideas would be much appreciated.  I'm coming back from a bit of an extended hiatus from KSP and trying to get caught up on what's happened in the last few years in the mod scene so hopefully I didn't overlook something obvious.

Edited by Stuffed_Muffin
typo
Link to comment
Share on other sites

7 hours ago, Stuffed_Muffin said:

@linuxgurugamer  Looks like the account was inevitable, I seem to have run into a problem that I am hitting a dead end on with this mod.  I have a feeling something from another mod is interfering but nothing is standing out.  When I enable the grid view I just get a white box on the ground directly below the rocket in the center.  I've attached a copy of the logs where I was using the button before I quit, list of mods and screenshots of the white box.

It's a bit of a mod list to warn ya, but so far has seemed stable minus a fuel flow spam from ScrapYard causing some lag when placing items in VAB.

https://drive.google.com/file/d/1VNPppnTUruDcu0Ij3redcsZCz6OVNXp3/view?usp=sharing

I've tried doing a reset in the Hanger Grid settings with no luck. 

Any ideas would be much appreciated.  I'm coming back from a bit of an extended hiatus from KSP and trying to get caught up on what's happened in the last few years in the mod scene so hopefully I didn't overlook something obvious.

Well, given that you are having multiple issues, it might make sense to downsize to isolate what's causing the problem.

You are running many complex mods, all of which have something going on in the editor.

First, try using it by itself in the editor, make sure it's working on it's own.  Then start adding groups of mods, testing after each addition.  It's slow, but eventually you will find the conflict.

I don't see anything wrong with the mod itself

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Well, given that you are having multiple issues, it might make sense to downsize to isolate what's causing the problem.

You are running many complex mods, all of which have something going on in the editor.

First, try using it by itself in the editor, make sure it's working on it's own.  Then start adding groups of mods, testing after each addition.  It's slow, but eventually you will find the conflict.

I don't see anything wrong with the mod itself


Thanks for checking.  I need more sleep, I completely overlooked trying it isolated.  I work in IT doing tech support, I should know better... oh god, I'm turning into the.... the user.  Time for a flogging with the bundle of network cables.

So I got it isolated and was able to repeat the same behavior with a clean install with nothing but Hanger Grid.  But it takes an interesting turn, after hitting the button I didn't actually try placing anything initially, nothing happened on an already built vehicle so I just turned it off after trying what I said.  When I was testing with the clean install I ended up just grabbing something from the part list and boom, there they were.  I went back to the original mod mess I made and tried that there and lo and behold they showed up.  Though it does seem to repeat, once I turn it off it wont show up again until I pick something up again.  Just  to make sure I did a quick video of it.  Also here is the log from that play just in case.  Definitely a little bit of a different experience than the video on YouTube.

At this point I can deal with that, I don't want to be a pain, figured you might want to know at least.  I'm just glad to know that my Jenga Block mess of mods might be ok.  One last issue to figure out with ScrapYard and I'm good to start a proper game.  It's funny, you start with throwing a few in the cart and next thing you know it's a cartoonish pile hitting the ceiling.

Much appreciated

 

Link to comment
Share on other sites

39 minutes ago, linuxgurugamer said:

oh.  you have to have a part selected for the grid to display

Oh, well, um, I guess never mind, just making a fool of myself.  When I saw the YouTube video showing different behavior in the demo I thought something was up.  It was posted in 2016 so I'm guessing something changed in the updates over the years that impacted that.  Now I know, so all good, sorry about that.  That moment when you spend all day fixing other peoples problems and it ends up leaving your brain drained for your own, lol.  Eyes are probably crossing a bit after all the digging I've done picking out mods lately, plus a dash of sleep deprivation.  Thanks for your time!

As a bonus, during this it seems I managed to accidentally fix what was causing that FlowGraph log flood, at least I haven't been able to replicate the problem since, fingers crossed.  Now maybe the real madness can begin

Link to comment
Share on other sites

  • 4 weeks later...

Hey there, I was having similar issues as above with the grid not displaying. Fresh install and the hotkeys stopped working. I added some more mods to try and figure what was causing the vanishing grid from above, but the same hotkey issue persisted so I thought I'd mention it and add my log before I continue checking what is causing the grid problem. KSP.Log

General behavior for hotkeys: The period hotkey doesn't do anything. The only way to enable/disable the grid effects is clicking the app button. Not a huge problem by itself. Similar behavior for the K key - the grid will show once enabled and a part is selected and can only be disabled by clicking the app again.

G, J, N, M and L all seem to be working, I will test further while I look for the culprit vis-a-vis invisible gridlines.

Edit: So far I've only got G and N to work. Hovering over parts doesn't allow me to apply any changes, it only works once selected with the rotation tool. So currently, the only thing I can do with the mod is select a part to focus the grid on, and align their forward directions. Very odd, I had all the functionality of the mod before, sans visible grid lines on previous modded versions of KSP. Going to try reinstalling and stripping back everything but hangargrid and start again.

Edit two: Completely clean install save hangargrid. Redownloaded and reinstalled mod and all requisites. KSP.log. Same deal as before, got all hotkeys except Period to work. L does something, just... not what you'd expect. Doesn't want to align to what the grid is showing as the nearest point, I discovered that the grid display doesn't update with changes in step, disabling and re-enabling via button works displays the correct version. Mouse hover functions do not work at all, all hotkeys only apply when a part is selected via rotate or offset. Flickering when a part is selected with the place tool suggests it's trying to do something, but is over-ridden.

I still have no idea what was causing the 'main' grid to fail to display on my more modded versions, but I think I'll just use Precise Editor for aligning parts rather than trying to troubleshoot this. It's a very good mod when it works, but it seems to not want to play ball, with myself at least.

Edited by LudificorPayne
Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...