DMagic

[1.4.x] DMagic's Basic Mods - Basic Orbit v8.2 & Basic DeltaV 3.1[7-27-2018]

Recommended Posts

Contents:

Basic DeltaV: Download Version 3.1

Basic Orbit: Download Version 8.2

 

This collection of mods provides additional information and extends the behavior of stock systems in a way that was designed to seamlessly fit in with stock KSP.

 

Basic DeltaV - v3.1

4EN6dDe.png

Download from Space Dock | Curse Forge

Download from GitHub

CKAN-Indexed-brightgreen.svg

Source is available on GitHub.

Basic Delta V adds a set of information readouts that are shown alongside the staging panels while in the VAB/SPH and in flight.

These panels show information on:

  • DeltaV for the current stage and entire vessel
  • Thrust-to-weight ratio (TWR) at the beginning and end of the stage's burn time
    • Corrected for the selected reference body
  • Specific Impulse (ISP)
    • Corrected for atmospheric flight when applied
  • Burn Time
  • Thrust 
  • Mass for the current stage and entire vessel
  • In the flight scene an additional option is available to only display the readout for the current stage
    • The total vessel dV will be displayed in this panel

 

Options are available in the stock difficulty settings panel for flight scene restrictions:

  • Toggle for flight scene readouts
  • Require crew onboard
  • Require specific crew type
    • Additional crew types can be specified in the BasicDeltaV/PluginData/Settings.cfg file under the CrewRestrictionType field, just add new skill types separated by a comma
    • Default is the RepairSkill, which is used by Engineers
  • Level based restrictions for readouts

 

A toolbar button is added to allow for several options:

  • Select reference body
  • Toggle atmospheric flight calculations where available
  • Toggle individual readout modules
  • Toggle the readout panels on/off
    • Right clicking on the Toolbar button will also toggle the readout panels on/off
  • Adjust the scale of the toolbar window
  • Adjust the scale of the staging panels
    • This adjusts the scale of both the stock panels and the Basic DeltaV readouts
    • This can either affect both the flight staging panel scale and the editor panel scale, or be adjusted separately
  • Adjust the readout panel background transparency

 

The UI style of the toolbar is meant to match that of the stock Engineer's Report and Contracts App.

  • Drag the title bar to resize the window
    • Drag the footer bar for the flight scene window
  • The window can be moved using the footer (header in the flight scene) or free space below the toolbar options, but will always reset to its default position when reopened

 

Kerbal Engineer Redux Note:

This mod uses the vessel simulator code from Kerbal Engineer Redux. You can expect the information to be the same as that provided by KER and for the same limitations to apply. Please do not post bug reports to KER when using Basic DeltaV unless they can be independently replicated in KER.

Basic DeltaV review by KottabosGames:

Spoiler

 

Change Log:

Spoiler

v3.2
- Update for KSP 1.4.5
- Some minor performance improvements
- Persistent setting for activation of panels is stored separately for the VAB/SPH and flight

v3.0

- Updated for KSP 1.4
- Fix for deltaV calculation when using Engine Plates

v2.2
- Allow for specifying label and readout text colors in the settings file
- Change default skill for crew requirement to AutoPilot (only affects new or clean installations)

v2.1
- Fix errors in stage readout displays
- Disable calculations while in map view

v2.0
- Updated for KSP 1.3.1 (KSP 1.3.0 not supported)
- Flight scene readouts added
- Several options for flight scene restrictions
      - All options available in stock difficulty settings panel
      - Toggle to disable
      - Require crew onboard
      - Require specific crew type
      - Level based restrictions for readouts

v1.1
- Fix a UI loading bug that may occur on some machines (Linux probably)
- Fix a typo

Released under the GPLv3 License.

 

Basic Orbit - v8.2

XqXw95R.png

Download from Space Dock | Curse Forge

Download from GitHub

CKAN-Indexed-brightgreen.svg

Source is available on GitHub.

This addon provides three simple information panels. One carries Orbit and position information, another carries Target information, and the third carries Maneuver node information. The information shown is generally available in stock KSP, mostly hidden behind the map view markers, or is something that stock KSP asks for at some point, stock satellite contract orbit parameters for example.

The toolbar button allows for various adjustments to be made to the panels:

  • Show or hide each panel
  • Activate drag mode for each panel
    • Panels can be moved anywhere on screen when drag mode is on
    • The panel background transparency will switch to 0% while dragging
    • Panels are clamped to the screen edges
  • Set panel background transparency
  • Set UI scale for readout panels and toolbar window separately
  • Show or hide each readout module, or force the module to always be shown
    • Some modules are only displayed when certain other conditions are met (must have a target for all target info readouts to be shown, for instance)

Each panel will show or hide its readout modules depending on the current vessel situation (unless they are set always be on), target status, or maneuver node status.

 

This addon is also meant to serve as the basis for a Unity UI tutorial. It is created entirely with the Unity 4.6 UI and doesn't use any OnGUI (also called IMGUI, or Unity legacy UI). It borrows heavily from Kerbal Engineer Redux (which only uses the new UI for its toolbar button) for its UI and Unity setup, some of the readout modules also use a similar system for gathering information. None of the code used is copied directly from Engineer, but some of it is similar and so this is also released under the GPLv3 license. Basic Orbit also uses a modified version of the code from Diazo's Landing Height mod, used to display the altitude above the terrain from the lowest point on your vessel; it is also released under the GPLv3.

 

Review by KottabosGames

Spoiler

 

Change Log:

Spoiler

v8.2
- Update for KSP 1.4.5
- Some minor performance improvements

v8.1
- Some UI related performance improvements
- Decrease in garbage allocation

v8.0
- Updated for KSP 1.4

v7.3
- Allow for specifying label and readout text colors in the settings file
- Fix bug preventing periapsis from being shown while in atmospheric flight

v7.2
- Fix UI bugs for KSP 1.3.1

v7.1
- Add a post-maneuver node relative inclination readout
      - Combined with standard post-maneuver inclination readout
      - Only displayed when maneuver node and target share the same orbital reference celestial body

- Fix an error in radar altitude calculations when on EVA
- Fix errors in phase angle and inclination calculations for orbits around different celestial bodies
- Change Terrain Altitude title to Terrain Height
- Some tweaks to the toolbar window UI

v7.0
- Add vessel name and equatorial crossing node readout modules to the orbit panel
- Borrow SirDiazo's Landing Height mod method for the radar altitude readout
     - Below ~2km the radar altitude will be calculated from the lowest point on your vessel

- Fix error in readout panel UI scaling
- Better handling for target vessels with long names
- Properly indicate when a docking port is targeted

- Change readout panel background to that used by the staging panels (only the grey portion)
- Change readout text color

v6.1
- Fix a UI loading bug that may occur on some machines (Linux probably)

v6.0
- Update for KSP 1.3.0

- New UI style
      - Matches the stock KSP toolbar apps
      - Separate UI scaling for readout panels and the toolbar window

- Several minor bug fixes and performance improvements
      - Information not always updated every frame
      - Fix for some potential errors in the maneuver node panel
     - Fix some window draw order problems

v5.0
- Updated for KSP 1.2.2; should work in any 1.2.x

- New readout modules for post maneuver node orbit parameters
- Prevent readout modules from flickering when on EVA or using a rover
        - This was particularly noticeable on low gravity bodies, with frequent landed to sub-orbital transitions
        - Only works with EVA Kerbals or vessels marked as the Rover type
- Fix some errors when showing the maneuver node readout panel with no target selected
- Fix some potential errors with NaN or infinity values

v4.0
- Fix persistence of "Always Show" toggles
- Fix improperly displayed rendezvous encounter information on the maneuver node panel when not in map view

v3.0
- Update for KSP 1.2.1

- New readout modules
       - Surface horizontal and vertical velocity components
       - Phase angle readout for target
                 - Readout for current orbit position
                 - Readout for maneuver node position
       - Show angle to prograde for maneuver node position

- Toolbar window can be dragged

- Fix inaccurate distance, terrain height, and radar altitude readouts
- Tweak readout display behavior for terrain height and radar altitude
- Fix relative velocity readout when target is landed
- Fix improperly displayed rendezvous encounter information when not in map view

v2.0
- Add maneuver node info panel
     - Contains info on the next maneuver node
     - Incorporates info from Better Burn Time if that is installed
     - Gives target rendezvous information if any are selected

- Target panel changes
     - Add target name readout module
     - Target rendezvous readout modules ignore maneuver node orbits
     - Target rendezvous readout modules calculated correctly when not in map view

- Only one Panel Settings window can be opened at the same time
- If the Toolbar window is below the mid-point on the screen the settings windows will spawn above it

Released under the GPLv3 License.

Edited by DMagic
Basic Orbit 8.2 and Basic DeltaV 3.1
  • Like 40

Share this post


Link to post
Share on other sites

Are / were these available for pre 1.3.0 releases.

If so, i must be still asleep as i have not found them.

really great mods and a 'must' for and setup.

Cheers.

Share this post


Link to post
Share on other sites

YEAH BASIC ORBIT IS BACK BABY! :D

Seriously though, how do people play without a proper radar altimeter and Ap readout?

Share this post


Link to post
Share on other sites

These look amazing, both aesthetically and in terms of presentation.

1 hour ago, DMagic said:

Kerbal Engineer Redux Note:

This mod uses the vessel simulator code from Kerbal Engineer Redux. You can expect the information to be the same as that provided by KER and for the same limitations to apply. Please do not post bug reports for KER when using Basic DeltaV unless they can be independently replicated in KER.

If I understand KER's implementation correctly, this will result in doing all of the simulator logic twice if both are installed, right? I'm toying with an idea that relies on the simulator as well, and so far I was planning to list KER as a dependency, but that would make me less compatible with Basic DeltaV, which I can definitely imagine some people will prefer. Do you see any possibility for factoring the simulator into a standalone mod that could be shared cleanly by multiple downstream consumer mods?

Share this post


Link to post
Share on other sites

@drtedastro As the version numbers suggest, Basic Orbit and Maneuver Node Evolved have been available for quite some time. All older versions are available from all of the download sites.

@HebaruSan The simulation code only runs when you tell it to run, so in Basic DeltaV's case that means when the readout panels are active and you are in the VAB/SPH. In KER's case that means when the VAB/SPH window is open, or when something that uses the vessel simulator is active in the flight readouts. It would only run twice if both mods were installed and both had their displays open, which would seem a little redundant. VOID also uses KER's vessel simulator, but it's also probably unlikely that people would use those together, either.

  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, DMagic said:

@HebaruSan The simulation code only runs when you tell it to run, so in Basic DeltaV's case that means when the readout panels are active and you are in the VAB/SPH. In KER's case that means when the VAB/SPH window is open, or when something that uses the vessel simulator is active in the flight readouts. It would only run twice if both mods were installed and both had their displays open, which would seem a little redundant. VOID also uses KER's vessel simulator, but it's also probably unlikely that people would use those together, either.

But if you have two simulator-consuming mods that you do want to run at the same time, say one that displays the info and another that acts on it, the situation changes. This would be the case for the concept I have in mind, and I'd like to allow the user to pick the display mod they prefer, without having to bundle the simulator itself into mine.

(Or maybe I'll just switch my dependency to Basic DeltaV, to encourage people to switch. :))

Share this post


Link to post
Share on other sites

Hmmm, the basic orbit button is not working in my game, it is highlighted as though active but clicking on it does nothing. Could be a Linux thing?

Share this post


Link to post
Share on other sites

@Waxing_Kibbous It's hard to say without log files. The only obvious problem might be some kind of installation error, though it could also be something Linux-related when it tries to load the asset bundle for the UI.

@HebaruSan A separate assembly for running the simulator code would be nice, but such things are a huge headache for the person responsible for it. For Basic DeltaV it isn't really an issue anyway since the simulator is only run in the editor where performance isn't as much of an problem.

Share this post


Link to post
Share on other sites

I installed Basic DeltaV, and I'm seeing essentially what @Waxing_Kibbous described. The toolbar button shows up in the VAB, but nothing happens when I click it.

I'm also on Linux, in case that does turn out to be relevant.

KSP.log has:

[LOG 23:51:14.439] [AddonLoader]: Instantiating addon 'BasicDeltaV' from assembly 'BasicDeltaV'
[LOG 23:51:14.442] [AddonLoader]: Instantiating addon 'BasicDeltaV_Loader' from assembly 'BasicDeltaV'
[EXC 23:51:14.451] NullReferenceException: Object reference not set to an instance of an object
        BasicDeltaV.BasicDeltaV_Loader.loadSprites ()
        BasicDeltaV.BasicDeltaV_Loader.Awake ()
        UnityEngine.GameObject:AddComponent(Type)
        AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
        AddonLoader:StartAddons(Startup)
        AddonLoader:OnLevelLoaded(Int32)
        AddonLoader:OnSceneLoaded(Scene, LoadSceneMode)
        UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)

Added a few Debug.Log statements in that function; the crash is on this line:

			appFrame = typeof(ContractsApp).GetField("appFramePrefab", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(prefab) as GenericAppFrame;

Good old Unity prefabs!!

Basic Orbit has the same function in BasicOrbitLoader.cs, and the description in Github says "New UI" and "12 hours ago". Looks promising as a cause there as well.

Edited by HebaruSan

Share this post


Link to post
Share on other sites

If I change the '.' operators in that block to '?.', it finishes loading, but pieces are missing:

dp7OhU4.png

Here's a spooky thought: Is ContractsApp loaded in sandbox mode?

Share this post


Link to post
Share on other sites

Basic DeltaV looks great.

I have to be patient until it's possible for me to switch to 1.3 ... :D

Share this post


Link to post
Share on other sites

What is the difference between terrain altitude and radar altitude?

Share this post


Link to post
Share on other sites

@Errol Terrain altitude is the height of the terrain above (or below) sea level. Radar altitude is the height of the vessel above the terrain.

Share this post


Link to post
Share on other sites

definitely a must have 'mod' for ksp. beautiful job !!

Share this post


Link to post
Share on other sites

these are very very great tools indeed! so extremely handy

so much so that I must ask - any chance of a backport to 1.2.x? - it's gonna be a WHILE until 1.3 is actually standard, and there are a vast number of players, myself included, who have not made the switch, and probably won't until a reasonably long time when all the mods we cannot go without have been brought up

I would reckon (as some modders have done) that there is enough of us making this choice as to warrant offering the backwards-compatible option... 

I understand that would be adding some extra work, but for many players this is keeping us from actually enjoying your wonderful work

 

just thought I'd ask, for the lot of us

 

Share this post


Link to post
Share on other sites

Basic Orbit is here, and Maneuver Node Evolved is here, for KSP 1.2. I don't want to deal with supporting any old versions of KSP for new mods, so I don't think I'll make a separate release for Basic DeltaV.

Share this post


Link to post
Share on other sites

no worries - just thought I'd ask anyways - great stuff!

Share this post


Link to post
Share on other sites

These are great.  A better alternative when introducing people to KSP than the complexity of KER.  

Share this post


Link to post
Share on other sites

Just realized the dv readout isn't in flight mode.  Maybe I should learn to read better.  This makes me sad.

Share this post


Link to post
Share on other sites

I seem to have run into some sort of bug in basic deltaV. Im trying to build an Apollo style rocket, and no matter what i do i seem to always have one of of my stages not displaying a deltaV panel. I have had it where wheel i remove the rest of the rocket the offending stage will then geta deltaV panel like it should, but then when i re-attach the rocket the window disappears again. I have been unable to figure out exact reproduction steps, but am starting to wonder if using subassemblies has anything to do with it. 

Anyone have any ideas?

EDIT: I've narrowed it down to the stock LES part. What ever stage comes before the stage the stock LES is in wont get a readout.

Edited by Errol

Share this post


Link to post
Share on other sites

@DMagic some feedback about Basic Orbit:

  1. Panel scale setting did not saves itself and switch back to 100% at scene change, but slider still indicates 110%
  2. Transparency of panels somehow differs with vertical position on the screen. Panels distinguishable more transparent on the top and more opaque at the bottom of the screen.
  3. Definitely need a current craft name string on a Orbit Panel. Like target's name but for current controlled vessel - very useful on a cluttered bases and after crashes :D
  4. More uniform, even strait plain background panel texture would be highly appreciated!
  5. Ability to move and swap around info strings on a panel would be very useful for better personal experience.

Basic DeltaV is absolutely gorgeous! :rep::rep::rep::rep::rep: Nothing more, nothing less. Now I dont even know, do I need a Kerbal Engineer in VAB any more!

Thx for you wonderful work! :)

  • Like 1

Share this post


Link to post
Share on other sites

@Errol Depending on where I put the LES I can get some seemingly weird results, like if I put it before a decoupler and engine for an upper stage it won't show a panel for the LES stage, but it just assumes that you'll fire the LES, then the decoupler, then the next engine, so all of the dV is shown for the final stage. I think it might be treating the LES like a sepratron, and assuming that it's never used like a normal booster. In any event, I don't see it erasing the panel for the stage below (if it does, that probably implies that the simulator thinks you'll fire both stage at the same time), and I see the same behavior in Engineer.

Generally I would expect people would put the LES in the last stage and assume it never gets used, then set it up with an action group or the abort key, rather than ever fire it through staging.

 

@ZobrAA Thanks for the feedback.

The panel scaling looks like it's reading the scale for the toolbar window whenever it starts, instead of its own scale. That is an easy fix.

I don't see any difference in panel transparency. Keep in mind that when dragging is active for a panel it will immediately revert to full opacity until you turn off the toolbar window or cancel dragging.

A vessel name readout is good, I've actually thought about just making a vessel info panel, but have never gotten around to it.

I think I agree about the panel background, sometimes that stock window texture can be annoying the way it transitions colors in the middle.

Changing readout order is another thing that's been on my list forever, but that I haven't gotten to. I want to do it with a drag-and-drop function in the toolbar window, but I've just never looked into it.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now