enneract

[1.0.x] HoloDeck - Sandboxed Flight Simulations

Recommended Posts

Okay, this time I think I have a real bug. This is on OS X.

If I load up my career game with HoloDeck installed, the KSC screen is blank black with the text “Time Warp 1x”, except every three seconds (I lap-timed it) the KSC model shows for a tiny fraction of a second before being wiped out by the black. Also, there is no sound. Trying to click on buildings, whether in the black or during a flicker, has no response, though the KSP cursor shifts green at each click. If I hit [esc] then the menu is drawn during the next KSC flicker, but is unresponsive and is wiped away at the end of the following KSC flicker. If I hit ⌘Q to quit, the KSC view doesn’t flicker; it’s drawn and shows until the application quits, which is more or less immediate.

I have a number of mods, but I uninstalled literally all of them except HoloDeck, and the flicker was still there. Then I put back all my mods but took out HoloDeck, and everything was fine. The birds chirped as the KSC view was drawn and everything.

I have not tried a new launch in the un-HoloDecked install just in case doing that would wipe out the problem, so if you need save files or what-have-you, let me know. I’m relatively comfortable if not incredibly experienced on the command line, if that will help. I can also give you a list of mods I use, in case you think some interaction created this state even though the flicker happens even without any other mods installed.

(Sorry I can’t tell you what I did just before this problem arose; I honestly don’t remember. KSP was one of several things I was fiddling with in parallel when the problem first manifested, and I was doing the quit-and-relaunch dance with another mod to see why it wasn’t working, and then at some point this cropped up.)

[Edited to add: this is all in version 1.0.1, not 1.0.2.)

Edited by meyerweb
Cleaned up forum migration errors (Unicode and hyperlinking were both botched—sigh)

Share this post


Link to post
Share on other sites
Okay, this time I think I have a real bug. This is on OS X.

If I load up my career game with HoloDeck installed, the KSC screen is blank black with the text “Time Warp 1xâ€Â, except every three seconds (I lap-timed it) the KSC model shows for a tiny fraction of a second before being wiped out by the black. Also, there is no sound. Trying to click on buildings, whether in the black or during a flicker, has no response, though the KSP cursor shifts green at each click. If I hit [esc] then the menu is drawn during the next KSC flicker, but is unresponsive and is wiped away at the end of the following KSC flicker. If I hit ⌘Q to quit, the KSC view doesn’t flicker; it’s drawn and shows until the application quits, which is more or less immediate.

I have a number of mods, but I uninstalled literally all of them except HoloDeck, and the flicker was still there. Then I put back all my mods but took out HoloDeck, and everything was fine. The birds chirped as the KSC view was drawn and everything.

I have not tried a new launch in the un-HoloDecked install just in case doing that would wipe out the problem, so if you need save files or what-have-you, let me know. I’m relatively comfortable if not incredibly experienced on the command line, if that will help. I can also give you a list of mods I use, in case you think some interaction created this state even though the flicker happens even without any other mods installed.

(Sorry I can’t tell you what I did just before this problem arose; I honestly don’t remember. KSP was one of several things I was fiddling with in parallel when the problem first manifested, and I was doing the quit-and-relaunch dance with another mod to see why it wasn’t working, and then at some point this cropped up.)

[Edited to add: this is all in version 1.0.1, not 1.0.2.)

You've managed to get both your base saved-game and the holodeck backup saved game flagged as 'dirty' (ie, simulation in progress), and so when you try to load either, it is trying to load the backup over and over. Go into persistent.sfs using a text editor and change the line 'SimulationActive=1' to 'SimulationActive=0' in HoloDeckRevert.sfs in your save folder.

No clue how you did that. If you can figure out how to reproduce that bug, that would be great.

Share this post


Link to post
Share on other sites
enneract said:
You've managed to get both your base saved-game and the holodeck backup saved game flagged as 'dirty' (ie, simulation in progress), and so when you try to load either, it is trying to load the backup over and over. Go into persistent.sfs using a text editor and change the line 'SimulationActive=1' to 'SimulationActive=0' in HoloDeckRevert.sfs in your save folder.

Yep, that fixed it (though it was actually SimulationActive = True and I set it to False, same result in the end). Thanks! If I can figure out how I did it, I’ll definitely let you know.

Edited by meyerweb
Cleaned up forum migration errors (Unicode and hyperlinking were both botched—sigh)

Share this post


Link to post
Share on other sites

This mod is great!

Im more simulating than actually doing stuff :D

Share this post


Link to post
Share on other sites

I saw this and realized it would fit nicely into Roster manager as a compatible mod. I'm looking at cross training and training in general, and simulations would fit the training bill nicely, giving reasons for simulations and value to be gained for using them in career.

I'm going to look this over and see what will be needed to interact with HoloDeck to satisfy one of the training activities in Roster manager.

Edited by Papa_Joe

Share this post


Link to post
Share on other sites

You should have let me know you already had set up a thread :P Obviously, if you need any support from me, let me know. And if it wasn't already obvious, you can freely use anything from KCT.

We need to talk about managing the launch button. Minimally I'll be adding something to the KCT API so that other mods can register callback functions for a popup window (so default KCT will have "Build" and "Cancel" but HoloDeck would add "Simulate" or whatever). I might do it as a separate .dll instead, especially if the API is a ways out.

Without testing, I still think ContractConfigurator's method of spawning ships will be better than the current KCT method of moving vessels from the launchpad for orbital/landed simulations. You also can avoid limitations due to building upgrades and funds that way. Annoyingly, you'll still have to do whatever you're doing now for normal simulations.

Looking forward to when this gets to the level of functionality KCT's sims are at, so that I can replace them with this. Even more looking forward to when this surpasses KCT's ;)

Share this post


Link to post
Share on other sites
Hi folks.

This is the initial release of a mod that I've had on the backburner for a while, but decided to clean up and go ahead and throw out there.

Premise: Holodeck lets you launch flights from the VAB\SPH, and when the flight is over, it restores the game to the exact state that it was in before the simulation started. It handles restoring the state of any mod which stores its data in the vanilla persistence file (basically any of them worth their salt), and even handles it if you exit the game during a simulation.

Download: Mod \ Source

Screenshots:

http://i.imgur.com/jBBY1Axm.png

http://i.imgur.com/EJeiEnOm.png

http://i.imgur.com/VkEQ8kvm.png

Excellent enneract! Glad to see this in the public finally!

As integration with this and TestFlight is important to me, I will be sure to bombard you with any issues I run into, but first I need to get myself caught up on all that you've done.

I'll be back!

- - - Updated - - -

So I took a *very* quick glance over your code, and sadly I am not seeing any sort of API at the moment to allow integration. Do you have plans for such a thing?

Share this post


Link to post
Share on other sites
You should have let me know you already had set up a thread :P Obviously, if you need any support from me, let me know. And if it wasn't already obvious, you can freely use anything from KCT.

We need to talk about managing the launch button. Minimally I'll be adding something to the KCT API so that other mods can register callback functions for a popup window (so default KCT will have "Build" and "Cancel" but HoloDeck would add "Simulate" or whatever). I might do it as a separate .dll instead, especially if the API is a ways out.

Without testing, I still think ContractConfigurator's method of spawning ships will be better than the current KCT method of moving vessels from the launchpad for orbital/landed simulations. You also can avoid limitations due to building upgrades and funds that way. Annoyingly, you'll still have to do whatever you're doing now for normal simulations.

Looking forward to when this gets to the level of functionality KCT's sims are at, so that I can replace them with this. Even more looking forward to when this surpasses KCT's ;)

My local version no longer uses the launch button at all. Everything is handled through an AppLauncher menu, including configuration of initial flight-state. This allows sims to be begun from in-flight, also... so you can, for example, 'run a simulation' to see if you have enough dV to perform an emergency maneuver.

As for building limits, I'm pretty sure I can still bypass that with my method, but I haven't tried yet.

Excellent enneract! Glad to see this in the public finally!

As integration with this and TestFlight is important to me, I will be sure to bombard you with any issues I run into, but first I need to get myself caught up on all that you've done.

I'll be back!

- - - Updated - - -

So I took a *very* quick glance over your code, and sadly I am not seeing any sort of API at the moment to allow integration. Do you have plans for such a thing?

No API yet. This is POC code pretty much ripped straight from an aborted attempt at writing KCT2 from a blank slate. API is planned, though.

Biggest problem is that ending a simulation is completely destructive to the game state, I have a 'shelter' implemented which protects some data for restoration when ending the sim, but I need to figure out a clean way of allowing other mods to stuff things in there. If you have some ideas, feel free to let me know.

I saw this and realized it would fit nicely into Roster manager as a compatible mod. I'm looking at cross training and training in general, and simulations would fit the training bill nicely, giving reasons for simulations and value to be gained for using them in career.

I'm going to look this over and see what will be needed to interact with HoloDeck to satisfy one of the training activities in Roster manager.

API is definitely coming. See above section, and please feel free to chime up if you need anything in particular.

Share this post


Link to post
Share on other sites

Well pretty much what magico13 and I have been discussing on the KCT API issue: https://github.com/magico13/KCT/issues/33

If I can register methods to be called for certain events, like when a simulation starts, when it is restarted, and when it ends, then I can use those event hooks to do things.

Share this post


Link to post
Share on other sites
Well pretty much what magico13 and I have been discussing on the KCT API issue: https://github.com/magico13/KCT/issues/33

If I can register methods to be called for certain events, like when a simulation starts, when it is restarted, and when it ends, then I can use those event hooks to do things.

My basic thought is to push a 'simulation report' object to anything that requests it. Duration, SOIs entered, parts list?

Share this post


Link to post
Share on other sites
Any updates coming?

Eventually. Not abandoned, just slow. Finding work IRL has taken a lot of priority for me over hobbies.

Share this post


Link to post
Share on other sites
Eventually. Not abandoned, just slow. Finding work IRL has taken a lot of priority for me over hobbies.

No doubt.

Share this post


Link to post
Share on other sites
Is this running in 1.0.5? Edited by inigma

Share this post


Link to post
Share on other sites
Why name it holodeck?

I thought it was an actual working holodeck in KSP from like startrek :(

Share this post


Link to post
Share on other sites
[quote name='panzer1b']Why name it holodeck?

I thought it was an actual working holodeck in KSP from like startrek :([/QUOTE]

I'm halfway tempted to simply fork this and redistribute this as "KSC Simulator" or "Simulation Mode" ... but only if I understood the code. Alas I'm only a beginner programmer.

Share this post


Link to post
Share on other sites
I like the name. I instantly know what it is every time it comes up in the list of threads. "KSP Simulation Mode" is such a boring name I dozed off while typing it.

Share this post


Link to post
Share on other sites
On 11/22/2015 at 6:16 AM, panzer1b said:

Why name it holodeck?

I thought it was an actual working holodeck in KSP from like startrek :(

I just recently discovered it was a simulation mode, I wish I knew it before!

Also it would be nice to add a few simulation related things on the GUI such as drag forces, and also to have a feature to allow plugins such as mechjeb and KER to only work while in holodeck simulation mode.

Share this post


Link to post
Share on other sites

Oh man! I've been thinking of getting into KSP modding basically to make exactly this. I feel a little iffy reverting my flights after simple mistakes, and finding the line there. Like, okay, I put my parachutes on the first stage. I'll revert. But what if the rocket snaps in half a few kilometres up?

So, thank you, for saving me from trying to comprehend KSP modding.

Share this post


Link to post
Share on other sites

Time to download and evaluate.   Roster Manager will be moving forward with the new year...

Share this post


Link to post
Share on other sites

I was watching the alt-F12 debug log to see if I could figure out why the game crashes a lot these days, and I spotted “[Error]: Cannot find a Module of typename 'HoloDeck'”.  Though I did play with it for a while, I don’t have HoloDeck installed any more, and haven’t for quite some time.  Anyone know why KSP (or a mod thereof) is expecting to find HoloDeck when it isn’t installed, and how I can scrub this from KSP?

Share this post


Link to post
Share on other sites
1 hour ago, meyerweb said:

I was watching the alt-F12 debug log to see if I could figure out why the game crashes a lot these days, and I spotted “[Error]: Cannot find a Module of typename 'HoloDeck'”.  Though I did play with it for a while, I don’t have HoloDeck installed any more, and haven’t for quite some time.  Anyone know why KSP (or a mod thereof) is expecting to find HoloDeck when it isn’t installed, and how I can scrub this from KSP?

Probably in your sfs file. I know HoloDeck adds some stuff to the persistent.sfs file. I'd back it up, and then remove any blocks of code that include the word "HoloDeck" in them.

Share this post


Link to post
Share on other sites
10 hours ago, 5thHorseman said:

Probably in your sfs file. I know HoloDeck adds some stuff to the persistent.sfs file. I'd back it up, and then remove any blocks of code that include the word "HoloDeck" in them.

Exactly right!  Behold:

    SCENARIO
    {
        name = HoloDeck
        scene = 5, 6, 7, 8
        SimulationActive = False
    }

That was the only place it appeared in the entire 1.8MB file.

Was able to address a similar situation with DangIt, so thanks twice!

Share this post


Link to post
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.