Jump to content

[1.1.3] Gameframer KSP: Automatically document and show off your stuff [v0.6.3-beta]


noisybit

Recommended Posts

Some comments after running a few missions.

 

I'd like to be able adjust the pre and post event recordings for specific events. Maybe even vehicle specific 

I would like it to recognize that a custom recording took place at the same time as a auto event, and maybe merge the two to reduce duplicates.

Is there a way to auto record for engine burns over a certain amount of time or delta v? This might document events that are otherwise not triggered.

 

When I was trying to dock with the klaw, it recorded like 8 different touchdowns and liftoff in a small amount of time, maybe filter out these kind of events if they take place too close together or over a very short distance. 

 

Can I custom name custom events or add a description?  

 

The recorder lost my landing, so that was kinda sad, not sure why it showed up on these website bit after I quit ksp and reloaded it lost the last part.

 

I would really like to be able to take a full resolution no ui picture and maybe if possible a map view for some of these events. So for launch maybe it to speaker 3 or 4 evenly spaced still pictures you can choose one picture to be the enlarge photo if needed.

 

Awesome mod, really hope it off. Would it be possible to automatically build a flow chart or subway map style chart of a mission?

 

An idea on docking, is it possible to make a separate mission for the docked vessels (Apollo -soyuz) that links to the main vessels profiles?

 

So a time line may go like 

 liftoff

Stage 1 separation

Orbit 

Docked with soyuz 

Undock with soyuz

Reentry 

Landing.

 

And you basically have a branch/link to a Apollo-soyuz mission that is self contained and ends when they undock.

 

Maybe you can manually insert that mission info into your main miasion, or keep it as it's own branch. 

 

Edited by Buster Charlie
Link to comment
Share on other sites

On 3/2/2016 at 0:41 PM, Buster Charlie said:

I'd like to be able adjust the pre and post event recordings for specific events. Maybe even vehicle specific 

Could you please elaborate on this? Not sure I understand. Do you mean changing the video recording time for specific events +/- seconds?

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

I would like it to recognize that a custom recording took place at the same time as a auto event, and maybe merge the two to reduce duplicates.

I agree that there should be some filtering for display to handle clusters of events. But if you have a two minute long time lapse recorded and staging (auto-event) happens in the middle of that recording you would still want both though, right? The auto-recording would capture the staging at a higher fps than the user capture.

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

Is there a way to auto record for engine burns over a certain amount of time or delta v? This might document events that are otherwise not triggered.

This has always been on the top of my list for the next event to record. It's not fired by the game so will need custom logic, but doable.

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

When I was trying to dock with the klaw, it recorded like 8 different touchdowns and liftoff in a small amount of time, maybe filter out these kind of events if they take place too close together or over a very short distance. 

I struggled a lot with correct-all-the-time touchdown and takeoff logic. I think I'll admit defeat for now and just block/prune duplicates as you suggest.

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

Can I custom name custom events or add a description?  

Not right now but coming soon to both the mod (0.6.3 or .4) and website.

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

The recorder lost my landing, so that was kinda sad, not sure why it showed up on these website bit after I quit ksp and reloaded it lost the last part.

Sorry about that. I think this would be the revert logic being too aggressive. I use mission time as an index so I can catch reverts/quick loads. If I detect a mission load with mission time T then all recorded events that took place after T are deleted. Perhaps it should be (T+BUFFER) and/or prompt for deletion. I will need to investigate.

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

I would really like to be able to take a full resolution no ui picture and maybe if possible a map view for some of these events. So for launch maybe it to speaker 3 or 4 evenly spaced still pictures you can choose one picture to be the enlarge photo if needed.

This is a great idea. Coming to mission recording in 0.6.2, VAB/SPH later.

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

Awesome mod, really hope it off. Would it be possible to automatically build a flow chart or subway map style chart of a mission?

Thanks! And thanks for the detailed feedback, it's very helpful. Yes to flow charts/maps! Stuff like that is behind the original idea for Gameframer. Collecting the data reliably with the mod and backend was step one, almost complete. Step two will be to use all the data in awesome ways like maps, tracking records, etc., continuously under development.

 

On 3/2/2016 at 0:41 PM, Buster Charlie said:

An idea on docking, is it possible to make a separate mission for the docked vessels (Apollo -soyuz) that links to the main vessels profiles?

Apollo-Soyuz is a interesting example. This visualization records everything in one mission timeline. I think what you are suggesting would be better. To confirm, a successful Apollo-Soyuz mission would result in three separate missions: S, A, and S+A.

  • S+A links to both S and A
  • S and A both link to S+A
  • S and A DO NOT link to each other (?)

Thoughts?

Link to comment
Share on other sites

On 3/6/2016 at 1:26 PM, MrMeeb said:

I'm going to be watching this very closely!

Thanks! Let me know if you think of any features that you would like. I have not watched the entire thing yet but Cooperation is really, really cool. I would love to be able to implement different camera angles like you used in the Gameframer mod. 

Have you seen the documentary "For All Mankind?" It's an Apollo documentary made with only Apollo footage and the only voiceovers are from Apollo-era astronaut recordings.

Link to comment
Share on other sites

"Could you please elaborate on this? Not sure I understand. Do you mean changing the video recording time for specific events +/- seconds?"

 

Yes, for example if my first stage separation has an interesting booster flyoff,  I might want a few more seconds after staging to capture that. But maybe I only want that on a specific vehicle or mission. I'm just saying if I could get a few more seconds on some of the auto capture events I probably wouldn't need some of my custom captures.

Everything else you said is golden.

 

On another note.

I'm just thinking of a orbital refueling space station, it's mission profile might be just a bunch of docking with random ships, and you obviously  wouldn't want a 40 ship docking history stuck in the middle of a duna Mission 

So from the duna missions pov, it's launch, circulaize, Hoffman and dock with space station, fuel transfer, undock, transfer to duna, orbit, detach lander, reattach lander, burn to kerbin, renter, land.

 

But then the duna lander detaches, lands, deploys a rover, reattached a Rover,  takes off, docks with duna mission.

The Rover detaches, does science  stuff, reattaches.

The space station, launches,  circulaize, then just has dozens of docking events.

 

So from the pov of the space station, nothing that happens after ships undock with it matters.

 

So I can see how complex this can get. Best I could say is the rovers mission starts when it's deployef, and ends when it reattached to lander, even though the rover is traveling  from launch to landing, it's like a sub mission. 

 

Because what if the lander left without the rover, and another duna  mission picked it up? Or it never leaves 

 

So I'd try and keep every docking and undocking as its own self contained mission, but allow them to be linked/branched together as needed to maintain  mission continuity 

 

Edited by Buster Charlie
Link to comment
Share on other sites

56 minutes ago, noisybit said:

Thanks! Let me know if you think of any features that you would like. I have not watched the entire thing yet but Cooperation is really, really cool. I would love to be able to implement different camera angles like you used in the Gameframer mod. 

Have you seen the documentary "For All Mankind?" It's an Apollo documentary made with only Apollo footage and the only voiceovers are from Apollo-era astronaut recordings.

I'll have a play around with it SoonTM and let you know if I think anything is missing :)

Also, thanks for the kind words about Cooperation :D, and no I haven't seen the documentary. Might have something to watch before bed time tonight now :P 

Link to comment
Share on other sites

33 minutes ago, Buster Charlie said:

I think I watch for all mankind off Netflix  dvd, it was pretty cool. IIRC it was done in the 80s, the documenatry, not the moon landing.

Yeah, the director, Al Reinert, was given access to ALL of the Apollo footage. He edited through some unknown hundreds of hours of it from all missions. The result is loosely one mission from start to finish composed of footage from all of them. Hands down my favorite space documentary.

Link to comment
Share on other sites

As one of the kOS developers, one of the things that immediately came to mind when I saw this mod/site was that a kOS script could be used to trigger a record event (including the event's title), or to confirm recording a mission.  Have you given any consideration to exposing a simple callback api that we could call using reflection?  Something along the lines of `TriggerNewEvent(string title)` `SetMissionTitle(string title)` and `SetMissionDescription(string description)`.  I suspect I can find the equivalent of these methods in your code, but thought I'd ask you directly.

Personally, I really like this mod so far.  I haven't done more than one mission yet, so I don't have much feedback yet.  I'm looking forward to seeing how the docking events are handled, as a lot of my kOS scripts are focused on various docking operations (building stations, refueling stations and ships, etc.).

Thanks for sharing a great mod!

Link to comment
Share on other sites

1 hour ago, Buster Charlie said:

Yes, for example if my first stage separation has an interesting booster flyoff,  I might want a few more seconds after staging to capture that. But maybe I only want that on a specific vehicle or mission. I'm just saying if I could get a few more seconds on some of the auto capture events I probably wouldn't need some of my custom captures.

This makes perfect sense. Thanks.

1 hour ago, Buster Charlie said:

On another note.

 

I was looking through my notes and apparently I had originally planned to make all EVAs and Rovers their own self-contained missions that would have links from the "root" mission. My gut is to try and record as much as possible and sort out the display of it on the website display, but there are some necessary mod tweaks too. I'll continue to consider the options (everyone please feel free to chime in). Some problems can hopefully be manually solved once the website has mission editing. Complex GUIs are much easier to implement in HTML than C#/Unity (at least for me).

Link to comment
Share on other sites

I've been playing around with this, seeing if it was something to use for a new career, and I must say I'm quite impressed - it has very little performance impact, and the mission recordings are very nice.

However, I have a couple of issues:

1) The mission report has gifs and timeline, but lacks data for speed, altitude, distance etc. http://gameframer.com/#/ksp/missions/56e140990e46bbe204cf1a00

2) The mission is reported as interplanetary, when in fact it was a suborbital mission (350km apoapsis, about 2340m/s fastest speed). It might be related to the other missing data though.

3) I can't upload craft files. It's no big deal for me, and I can understand if it gets thoroughly confused, because I'm running RSS/RO/RP-0 with a ton of other mods, so it'll be hell figuring out which mods are used (and then significantly altered by both RO and RP-0). Log files are at https://drive.google.com/file/d/0B6QwuxB14qLjc21MTzQ0VlROcms/view?usp=sharing.
The section when uploading is:

Spoiler

ArgumentNullException: Argument cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[Part,RUI.Algorithms.Vertex`1[Part]].get_Item (.Part key) [0x00000] in <filename unknown>:0 
  at RUI.Algorithms.ComponentListMaker.UpdatePartVertex (Boolean residual, .Part part, System.Collections.Generic.Dictionary`2 lookup) [0x00000] in <filename unknown>:0 
  at RUI.Algorithms.ComponentListMaker.GetStackFlowGraph (.ShipConstruct ship) [0x00000] in <filename unknown>:0 
  at EngineersReport.RunTests () [0x00000] in <filename unknown>:0 
  at EngineersReport+.MoveNext () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: 4294967295)

WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
WARNING: Shader Unsupported: '' - Setting to default shader.
NullReferenceException: Object reference not set to an instance of an object
  at Gameframer.GFDataUtils.PopulateVesselJsonWithSimulation (OldSimpleJSON.OldJSONNode vesselJSON) [0x00000] in <filename unknown>:0 
  at Gameframer.GFDataUtils.CreateJsonForVessel (.ShipConstruct v) [0x00000] in <filename unknown>:0 
  at Gameframer.VesselCreator+<DoCaptureAndUpload>d__2.MoveNext () [0x00000] in <filename unknown>:0 
 

And one final question: When this comes out of beta, will you wipe the data? If I use this for my next career, I would be sort of sad to see it lost.

Link to comment
Share on other sites

  • 3 weeks later...

 I have installed it and it worked fine. The disadvantage of this tool is that it claims more memory than i can spare. Every so often the game crashes due to memory shortage, so i have decided to keep the opther mods and remove this one. Still i consider this a great mod!

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

One thing I noticed in using this is that it breaks 

Which is unfortunate. CraftHistory allows for tagging vessels to categorize them in different ways. It also keeps a version history, which is helpful for when updates turn out to be serious downgrades. 

Link to comment
Share on other sites

  • 4 weeks later...

Hello All,

New release of website and mod out.

  • Mod has been compiled for 64-bit 1.1.2 KSP (works on Mac and Window 32/64 for me)
  • Take UI-free screenshots in addition to timelapse recording
  • Create an account on gameframer.com and link your username (recover your username and edit stuff on the web very soon)
  • Bug fixes, small optimizations

@hvacengi, I will update the git source soon. I've accidentally embedded some private keys in my local commit history. Need to purge them before I sync up. I like the idea of an API that others can use. Ultimately that's what Gameframer should be, I'd love to discuss ideas with you. And I'll be keeping the source up to date on github going forward.

@Torgo, when I get a moment I will install CraftHistory and see if I can find the conflict. Sounds like a cool mod.

@guitarxe, I had not planned on allowing private listings, part of the fun is seeing others' work. But I'll note the request and see if other people feel similarly.

@a_schack, Thanks for the stacktrace. The error occurred in a function that I just fixed up a bit to guard against those kind of errors. It's possible that the new version fixes the problem. Please give it a try if you have a chance. Not planning on wiping data, but there might be some missing or incompatible data in beta missions.

@TheCardinal How much memory did you clock the mod in at? I'm sure I can get it down, I'm a novice C# programmer.

 

Thanks again for the feedback and interest.

Link to comment
Share on other sites

@noisybit thanks for the update.  I hope you can get the source code updated soon (technically it should be updated for the release but I'm personally not that picky).  I am just finishing up some 3rd party plugin modifications to kOS and am looking forward to working on integration.  I have a fully automated station assembly script working, and this could be a really cool way to document assembly.  Combine it with my desire to add some camera controls to the kOS scripting api and this could be really interesting.

Link to comment
Share on other sites

On 6/2/2016 at 5:01 PM, hvacengi said:

@noisybit thanks for the update.  I hope you can get the source code updated soon (technically it should be updated for the release but I'm personally not that picky).  I am just finishing up some 3rd party plugin modifications to kOS and am looking forward to working on integration.  I have a fully automated station assembly script working, and this could be a really cool way to document assembly.  Combine it with my desire to add some camera controls to the kOS scripting api and this could be really interesting.

Hi @hvacengi I've finally updated the source on Github. I've also started a new branch "reflection-and-offline-dump" that has a new option in Settings for "Debug (local data dump)". This will make it easier to code against as it will dump all JSON and JPGs in Gameframer/Plugins/PluginData/Gameframer. It still needs to communicate with the servers, but will only run against my staging environment.

However, I need some help with the reflection. My C# and Unity foo are weak. I've made a method (Should it be in a MonoBehavior that exists in every scene?)

public bool CaptureNewEvent(string name, string description, Delegate callback = null)

I've calling it like this:

AssemblyLoader.LoadedAssembly GF = AssemblyLoader.loadedAssemblies.SingleOrDefault(a => a.dllName == "Gameframer");
MethodInfo method = GF.assembly.GetTypes().SingleOrDefault(t => t.Name == "GFPublicInterface").GetMethod("CaptureNewEvent");
object[] parametersArray = new object[] { "my name", "my description" };
method.Invoke(null, parametersArray);

But it's not working. Any tips? Not sure what the first parameter to method.Invoke(...) should be. 

Thanks!

Edited by noisybit
edit: forum put two unrelated replies into one.
Link to comment
Share on other sites

5 hours ago, noisybit said:

Hi @hvacengi I've finally updated the source on Github. I've also started a new branch "reflection-and-offline-dump" that has a new option in Settings for "Debug (local data dump)". This will make it easier to code against as it will dump all JSON and JPGs in Gameframer/Plugins/PluginData/Gameframer. It still needs to communicate with the servers, but will only run against my staging environment.

However, I need some help with the reflection. My C# and Unity foo are weak. I've made a method (Should it be in a MonoBehavior that exists in every scene?)


public bool CaptureNewEvent(string name, string description, Delegate callback = null)

I've calling it like this:


AssemblyLoader.LoadedAssembly GF = AssemblyLoader.loadedAssemblies.SingleOrDefault(a => a.dllName == "Gameframer");
MethodInfo method = GF.assembly.GetTypes().SingleOrDefault(t => t.Name == "GFPublicInterface").GetMethod("CaptureNewEvent");
object[] parametersArray = new object[] { "my name", "my description" };
method.Invoke(null, parametersArray);

But it's not working. Any tips? Not sure what the first parameter to method.Invoke(...) should be. 

Thanks!

The first parameter of method.Invoke is the instance variable.  So if your method is static, it accepts a null instance.  In your particular case (only a single MonoBehaviour loaded at any given time), you have two options: expose a static method which itself will make the call to the instance, or find the instance using MonoBehaviour.FindObjectsOfType.  Either way, you really want to store the MethodInfo in a static variable on the class, so that you don't need to do a reflection walk every time that you call the method.  In general, reflection itself is expensive.  There are some conflicting reports on exactly which style of invocation is the least expensive, but you save a lot of time by not constantly having to call GetTypes and GetMethod.

Static methods will be far easier for the reflection wrapper, because they don't need to store and refresh the instance.

If you use the instance method, here is how you would set up the method invokation.

// you should store these values in static variables and only initialize
// them once in OnStart or in an initiazation check loop.
AssemblyLoader.LoadedAssembly GF = AssemblyLoader.loadedAssemblies.SingleOrDefault(a => a.dllName == "Gameframer");
Type PublicInterfaceType = GF.assembly.GetTypes().FirstOrDefault(t => t.Name == "GFPublicInterface");
MethodInfo captureNewEventMethod = PublicInterfaceType.GetMethod("CaptureNewEvent");
// if your behavior is recreated every scene, you'll need to refresh this
// reference.  I'm assuming the GFPublicInterface itself is the behavior,
// but if it isn't you'll have to use reflection and fields or methods on
// the behavior to get the actual instance.
object PublicInterfaceInstance = MonoBehaviour.FindObjectsOfType(PublicInterfaceType).FirstOrDefault();

// make an API wrapper function to reference the above method
public void CaptureNewEvent(string name, string description)
{
    if (PublicInterfaceInstance != null)
    {
        object[] parametersArray = new object[] { name, description };
        method.Invoke(PublicInterfaceInstance, parametersArray);
    }
}

// you can do the same thing with fields and properties through reflection,
// but for properties you will get references to the set and get methods.

Honestly, you don't need to go through the trouble of writing the whole reflection wrapper just for my sake.  The modifications I'm making to kOS mean I only need public methods on your classes instead of being tied to reflection.  So kOS will be able to simply use your GFPublicInterface class directly.  But as long as you're writing it, the reflection wrapper should make life easier for other modders.  I'll look to see if I can find a simple example of another reflection API for you to look at (both RemoteTech and InfernalRobotics are great implementations, but they're way more complicated than what you need).

It would be very useful if you defined the KSPAssembly attribute in your "AssemblyInfo.cs" file.  That helps other mods set yours up as a dependency.  For kOS it looks like this:

[assembly: KSPAssembly("kOS", 0, 20)]

 

Edited by hvacengi
Link to comment
Share on other sites

Just had to remove this mod, which is a shame.  Seems there is a gameframer.cfg with no "nodes" in it, as in:

SOMENAME
{
	foo = something
	bar = somethingElse
}

Which in turn crashes "parttools" in the unity editor.  It's my understanding that the game it's self *may* not like seeing such a file either, so I'd suggest either A) adopting nodes or B) naming the file something else.  settings.txt, gameframer.ini, etc.

Link to comment
Share on other sites

On 6/13/2016 at 2:17 AM, tg626 said:

Just had to remove this mod, which is a shame.  Seems there is a gameframer.cfg with no "nodes" in it, as in:


SOMENAME
{
	foo = something
	bar = somethingElse
}

Which in turn crashes "parttools" in the unity editor.  It's my understanding that the game it's self *may* not like seeing such a file either, so I'd suggest either A) adopting nodes or B) naming the file something else.  settings.txt, gameframer.ini, etc.

 

Hi @tg626, sorry you're running into a problem, I'm sure we can solve it. I'm using ConfigNodeStorage from the KSPPluginFramework. I store settings in GFSettings.cfg, which does have what I think is a node in it? e.g.:

KARSettings
{
	seenMissionIntroHelp = True
	username = gold-pioneer
	...
}

 

Can you verify that your GameData/Gameframer/Plugins/PluginData/GFSettings.cfg is indeed nodeless/unparented/etc? I do have another non-standard config file called FlightRecorder.cfg in the same directory that does not follow the confignode standard and is loaded by KSP.IO.File.ReadAllLines and manually parsed. If that file extension is causing the problem I can definitely rename it (perhaps I should regardless).

Would you mind pointing me to a quick tutorial on how to use the Unity editor in this manner? I've installed Unity 5 and found the Parttools package here but I'm not sure how to proceed. Thanks!

Link to comment
Share on other sites

@noisybit

It must have been GFsettings,cfg then.  I opened it in notepad++ and it definity had no node/parent, so that must have been it.  

  • Once you have Unity and part tools, you need to create a project in Unity.
  • Once you have a project it will have a folder called "Assets"
  • You right click "Assets" in the lower left panel and import the parttools *.unitypackage
  • Now copy the folder "parttools" into the assets folder (./Assets/Parttools) I use file explorer to do this.
  • Restart Unity
  • You should see a menu item "Tools" and when you click it, KSP Part Tools & Create Color Animation.
  • Click on KSP Part Tools and a tiny window pops up asking you to set the data directory.  Browse to GameData and click OK.
  • This is where Gameframer will cause a hang.  You SHOULD get a list of all the IVAs in game, but it just sits there blank.
  • Look below for the "Console" tab (next to "Projects") and click it, you should see the error listed as that .cfg file
Edited by tg626
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...