Jump to content

[WIP][1.1.3] Flight Operations 0.1-alpha


Heed

Recommended Posts

Welcome to FlightOperations. This mod is still in heavy development, and right now is very much an alpha release. It's a WIP and is in it's alpha stages, so please be cautious. It does modify your save games, so please back up any you that you intend using. I haven't noticed any problems with saves, but you never know. Please also note that it's logging in Verbose mode so it will spam the hell out of your log file.

I'm releasing this to get feedback on areas where I'm on the right track, and where I'm not.

The main current features are:

Flight Naming

Flight Operations considers a Vessel (what you see and save in the VAB) to be a reusable launch vehicle. Naming of a particular flight is based off that Vessel Name. Normally, it just adds an auto incrementing number afterwards. For example, call your Vessel Mercury and the first Flight will be Mercury 1, and the second Mercury 2.

You can also specify where and how the numbers should appear by using the hash sign #. So, for example, STS-## will produce STS-01.

The number of hashes, and any trailing punctuation are not used to disambiguate the Vessels. So, STS-#, STS-##, and STS # and STS are all seen as the same Vessel name, and the numbering wouldn't reset. The only difference would be on the formatting. If you used those four examples once each, your would get flights STS-1, STS-02, STS 3 and STS 4.

Flight History

At the Space Centre there is now a Flight History window that shows you your completed flights. Those are flights you have recovered, destroyed, or terminated in the Tracking Station. The following pieces of information are displayed for each flight:

  • Flight Name - The name of the flight
  • LAUNCH - The Launch date
  • PILOT - Ummm, the Kerbal flying the rocket*
  • PAX - Crew Count/Passenger Count. Crew includes the pilot.
  • MASS - Ummm, the weight. Of the rocket. With fuel. At launch. Are you sure you're a rocket designer?
  • COST/REC - Cost vs recovery. The launch cost of the full rocket and the amount you recovered from it. StageRecovery support planned.
  • F/S/R - Funds Earned, Science Discovered, Reputation Gained. Just note that funds earned is different from Costs Recovered.
  • Orbit Ref - The name of the "best" celestial body you orbited around**
  • AP/PE INLC - The "best" orbit you achieved***
  • PER - The orbital period. Yeah, that's the time it takes to do one orbit... I really don't think you're a rocket designer at all, can I see your credentials?
  • MET - Mission Elapsed Time. That's the time from the launch to the point of recovery/destruction. Okay, that's it, I don't care what your access card says, SECURITY!!

* Working out which Kerbal is the pilot is interesting logic. My mechanism is simple: first find any Pilots and move them to the top. Then, move any BadAss kerbals to the top. Then, sort by experience. So yeah, Jeb always Pilots.

** Best celestial body is determined by ranking all the celestial bodies. We start with Kerbin, it's the worst. Then Min and Minmus, next worst. Then the Sun. Then stuff orbiting the Sun. Then stuff orbiting that. etc.

*** Basically, the one with the biggest orbital period.

Screenshots

 

Installation

  1. Get the latest zip file from https://github.com/shederman/HeedFlightOperations/releases
  2. Unzip, copy into GameData

Changelog

v0.1.0.0

  • Initial release

v0.1.1.0

  • Added Flight Recorder window
  • Improved orbit selection for History
  • Minor bug fixes

v0.1.2.0

  • Added: Roman numerals support with the $ sign to indicate placement
  • Fixed: Crashing and reverting adds to flight history

Known Issues

  • Flight Recorder sometimes shows duplicate orbits
  • Flight Recorder doesn't show intercept orbits

Roadmap

The detailed list is in the Readme and Github, but here's the highlights

  • Flight Recorder window
  • Multi-flight missions
  • Specifying the flight requirements prior to launch and evaluating missions success and failure based on that
  • Track telemetry and show flight events on mission graph
  • Add root cause to launch failure
  • Integrate with StageRecovery
  • Screenshots

Credits

 - Sarbian for some of his posts on debugging

- Flight Engineer Redux team for their code finally setting me on the right track with creating windows

- Many many others whose code I perused, and posts I read.

If anyone knows someone who would be willing to do the app launcher icon, it'd be much appreciated: I'm not a graphic person at all.

Edited by Heed
Link to comment
Share on other sites

10 hours ago, Heed said:

Working out which Kerbal is the pilot is interesting logic. ... So yeah, Jeb always Pilots.

Perhaps allowing the player to change this do a different crewmember would be a good idea.  Also, adding a field for "Commander" might be good, as this Kerbal may not be the pilot.

Link to comment
Share on other sites

1. I have started a launcher with a Satellite and switched back to the KSC but there was no entry in the Flight History. There is only an entry when I land the Launcher/Ship.

2. Where can I find the Settings? I have no Button.

 

But very nice Idea. I know that DennyTX had the same Idea a time ago. But he removed his Mod.

Link to comment
Share on other sites

@Cheesecake

  1. Yeah, Flight History currently only displays on completion of the flight (destruction, recovery, termination) - it is history after all :P. I am busy working on the "Flight Recorder" which shows what's going on with Active Flights. I will add a tab to the Space Centre window to switch between history and active.
  2. I took the button out because I actually had no settings to control at this point. I'll put in back in at some point.
Link to comment
Share on other sites

Here's an early build showing the Flight Recorder:

T1hoPgf.png?1

So, basically, how the whole thing works is that I monitor a whole bunch of game events and create a set of synthetic summary events from those, basically what you see in the screenshot above. I store the events in the save game file. Then, when you terminate, destroy, or recover the flight I create an even more summarised flight history entry and remove the detailed events.

As an example, if you created a ship that did a tour of Mun, Minmus, Duna and Ike, the Flight Recorder would have events for all those planets and moons, but Flight History on completion would only show the "best" orbit of Ike, which is the "best" celestial body. Flight history is not meant to be a detailed record of what each mission did, but a high level summary of what it accomplished.

I'm very concerned about storing too much data, as I store it in the save game file, so I'm trying to be quite strict about what I can and cannot store long term.

Edited by Heed
Link to comment
Share on other sites

54 minutes ago, Heed said:

I'm very concerned about storing too much data, as I store it in the save game file, so I'm trying to be quite strict about what I can and cannot store long term.

well, ages ago i've thought about this. Decission has been following - the better way for data storing - is to store all data in individual JSON file with career name. Much easy and more safe.

Edited by DennyTX
Link to comment
Share on other sites

Yeah, I thought about that. Probably a good idea. I'll put it on the roadmap to move stuff out. It'll make automated testing easier too. My only worry is keeping it in sync with the save files, persistent, and quicksave. At least for now, storing inside the config file, that's handled for me.

Just a note to all, I've uploaded a slight update, which includes improvements to the logic for selecting the orbit to display, and includes the Flight Recorder in the Flight view. I don't have a toolbar for it yet, but H controls the visibility for now.

Edited by Heed
Link to comment
Share on other sites

@Deimos Rast @evileye.x As a matter of interest, how would you see KCT impacting the features already in place? They should work 100% with KCT as it sits now. I mean all it does is log your flights for future reference, it doesn't matter how the vessel was built. The KCT features I'm thinking of down the line will not affect the features currently in place at all (and will probably be in a different, allied mod). So you can start using it as is.

Link to comment
Share on other sites

Just now, Heed said:

As a matter of interest, how would you see KCT impacting the features already in place?

For me  it store  KST "simulations" as happened. Not sure is this bug or feature. But while I debug  new design  list is became messy fast. Maybe add button to delete record, but then it will be incomplete story. I delete them from savefile manualy but I always afraid to broke something

Another thing is KST can store landed at ksc craft as whole, refuel it and launch it again, maybe some one want to make it to be recorded as the same craft. Maybe it alredy doing it. I didn't payed attention to it,

Link to comment
Share on other sites

No problems on 1.1.2 for me,  it was rock solid for 4 hours of play.

One little thing though, I was launching an Asteroid catch mission  on a passing asteroid I needed lots of dV to catch up with it. I failed the launch ( minor collision with a major planet )  3 times, reverting back to launch each time. 

The fourth time I got Mission Astrid into a 500x500 polar orbit, however the name of the craft was Astrid 4,  the three crashes and reverts were also in the history as Astrid 1 - 3 ( you could possibly read the last launch game time and anything launched 5 minutes after that is still the same craft )

And can you implement Roman Numerals please? (CODE BELOW)

        public static string ConvertToRoman(int value)
        {
            if (value <= 0)
            {
                return string.Empty;
            }

            if (value > 3999)
            {
                throw new ArgumentOutOfRangeException("Can only convert numbers up to 3999");
            }

            var sb = new StringBuilder();

            var working = value;
            while (working > 0)
            {
                if (working >= 1000)
                {
                    sb.Append("M");
                    working = working - 1000;
                    continue;
                }

                if (working >= 900)
                {
                    sb.Append("CM");
                    working = working - 900;
                    continue;
                }

                if (working >= 500)
                {
                    sb.Append("D");
                    working = working - 500;
                    continue;
                }

                if (working >= 400)
                {
                    sb.Append("CD");
                    working = working - 400;
                    continue;
                }

                if (working >= 100)
                {
                    sb.Append("C");
                    working = working - 100;
                    continue;
                }

                if (working >= 90)
                {
                    sb.Append("XC");
                    working = working - 90;
                    continue;
                }

                if (working >= 50)
                {
                    sb.Append("L");
                    working = working - 50;
                    continue;
                }

                if (working >= 40)
                {
                    sb.Append("XL");
                    working = working - 40;
                    continue;
                }

                if (working >= 10)
                {
                    sb.Append("X");
                    working = working - 10;
                    continue;
                }

                if (working >= 9)
                {
                    sb.Append("IX");
                    working = working - 9;
                    continue;
                }

                if (working >= 5)
                {
                    sb.Append("V");
                    working = working - 5;
                    continue;
                }

                if (working >= 4)
                {
                    sb.Append("IV");
                    working = working - 4;
                    continue;
                }

                if (working >= 1)
                {
                    sb.Append("I");
                    working = working - 1;
                    continue;
                }
            }

            return sb.ToString();
        }

 

Edited by genericeventhandler
Forgot the cheat for reverted launches.
Link to comment
Share on other sites

Okay, I think I know why the duplicates happened. I think I'm moving into history as soon as a crash happens and not waiting for the revert. Will try replicate.

Roman Numerals was definitely on the list, thanks for the code. I'll probably do it with a $ sign, so e.g. "Astrid $" would become "Astrid I". Would that work?

Link to comment
Share on other sites

I do that, but some people will want roman numerals, and some will want numbers. I use # to signify number formatting, e.g. "STS-###" becomes "STS-001" and "STS-002", so I was thinking using "STS-$" for "STS-I" and "STS-II" for example. I could put the "default" into settings, but people would still want a way to say "this ship is different and should get the other option".

Link to comment
Share on other sites

1 hour ago, Heed said:

@genericeventhandler That crash and revert bug should be fixed now. Also added roman numerals support using the "$" character, e.g. "Mercury $" becomes "Mercury I", "Mercury II" etc. You can place the $ anywhere in the vessel name. Get version 0.1.2.0 for these fixes.

Cool :) Didn't understand what you meant :)

 

Link to comment
Share on other sites

Hi all, since this was my first mod ever, I'm going back to the drawing board on some stuff. I'll release the "updated" version in a new GitHub project for now, until it's reached feature parity with the current release. The "updated" version will focus on telemetry to start, and THEN progress to flight history, which is really the proper way to do it. I also want to have a better view of "in progress" flights. Shouldn't take long to get back to parity though.

And because I love giving myself too much to do, I've also been working on an associated mod to help organise your craft files as well, but that will be an optional mod for Flight Operations, they'll just do some things better together (naming for example). Will add the link once it's ready for testing too.

Link to comment
Share on other sites

  • 3 weeks later...

Yeah, sorry guys. RL intruded a touch.

I've got the telemetry capture going, and am busy adding the flight events to the feed as well. Once that's done I'll move back to showing flight history, including in progress flights. Sorry for the delay!

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...