Jump to content

[0.90][WIP] Kerbal Konstructs v0.6.6 (Dec 16) - Static Objects and Launch Sites!


medsouz

Recommended Posts

I guess I wasn't clear enough with my reply (I probably shouldn't write responses at 11PM after working for 8 hours then attending 5 hours of classes). I actually want to use Robau's icons, just waiting for him to send me them. :D

I read your responses saying that you wanted them but I totally forgot that I still needed to send them. Expect a PM.

Link to comment
Share on other sites

@Justin

1 - You can't launch from all statics. Try a different object that you can launch from. Use one from KerbinSide, or Divico's launchsite or whatever, off-planet. I'm just trying to eliminate the actual object you're using being the cause of your woes.

2 - Sometimes that variable is purposefully set to "", for reasons. So seeing that is not unexpected and not indicative of an error.

Link to comment
Share on other sites

@Justin

1 - You can't launch from all statics. Try a different object that you can launch from. Use one from KerbinSide, or Divico's launchsite or whatever, off-planet. I'm just trying to eliminate the actual object you're using being the cause of your woes.

2 - Sometimes that variable is purposefully set to "", for reasons. So seeing that is not unexpected and not indicative of an error.

1. I tried actually 2 different launch sites, the only common point is both made by me the same way,

off-planet could shows nothing (at least as I understand it, ie: altitude > maybe the highest ground altitude, cause static launchsite too high doesn't work anyway).

2. ok

Link to comment
Share on other sites

Gah. I'm struggling to be clear. Off-world, I meant off-Kerbin. So on the surface of Duna for example. Not in space. So take any static that isn't something you made that can be set up as a launch site, make a launch-site with it on the surface of a planet outside of the Kerbal SOI, like Duna and test launching off that. If you get a flawless launch, then the problems you are having are likely to be something up with your models. If you still have a flawed launch (something goes boom), then that possibility is eliminated and I know to keep digging.

Edited by AlphaAsh
Link to comment
Share on other sites

That's what not so hard after all !

I've tried Dimico Kosmodrome launchpad P, KK doesn't find the right transform by itself (dunno why) so I left it blank, it's seems to work but vessel (+launch clamps) is spawn dozens of meters above, without any explosion.

Setting the right span point in cfg (and nothing else) => explosion before launch !

In both case, launchsite is at 3398m (vessel altitude on the pad), far above the surface, just in case.

Vessel is spawned on the pad, then sink into it, then explode (using quick pauses).

use "snap to surface" make the buildings "climb" by about 2500m each click (5275.222->7910.443->10545.67->13180.89 ...)!

EDIT: new issue found:

------------------- initializing editor mode... ------------------

editor started

...

KK: onLevelWasLoaded calling updateCache

ArgumentException: Getting control 1's position in a group with only 1 controls when doing Repaint

Aborting

at UnityEngine.GUILayoutGroup.GetNext () [0x00000] in <filename unknown>:0

at UnityEngine.GUILayoutUtility.BeginLayoutArea (UnityEngine.GUIStyle style, System.Type LayoutType) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginArea (Rect screenRect, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginArea (Rect screenRect) [0x00000] in <filename unknown>:0

at KerbalKonstructs.UI.LaunchSiteSelectorGUI.drawSelectorWindow (Int32 id) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

...

Game State Saved as persistent

[HighLogic]: =========================== Scene Change : From EDITOR to FLIGHT (Async) =====================

I didn't notice any visual issue but maybe a window or a button was in trouble somewhere.

Edited by Justin Kerbice
Link to comment
Share on other sites

...use "snap to surface" make the buildings "climb" by about 2500m each click (5275.222->7910.443->10545.67->13180.89 ...)!...

This is a good pointer for where I need to look, thanks. This suggests that the surface has in fact moved between the two clicks. Which suggests that planets outside of Kerbin's SOI are doing something differently from Kerbin. We know their size is different. We know their orbits are different. These are useful clues. I'll continue digging.

Link to comment
Share on other sites

Maybe this thread could help, it contains useful informations about some bodies' properties.

EDIT: snap to surface code is

selectedObject.altitude = (float)(selectedObject.parentBody.pqsController.GetSurfaceHeight(selectedObject.position) - selectedObject.parentBody.pqsController.radius);
updateSelection(selectedObject);

Which means... selectedObject.parentBody.pqsController.radius decrease (I don't buy it as it is allegedly constant) or GetSurfaceHeight(selectedObject.position) increase on each click :huh:

Edited by Justin Kerbice
Link to comment
Share on other sites

After a lot of coding, testing, coding testing ad infinitum it's time for me to give up on the out of Kerbin SOI issues with launch-sites. I'm 99% certain that KSP's spawn code is hard-coded in such a way that it can't be done using KSP's launch-site elements of the API. I suspect there is an assumption in KSP's code that launching IS happening on Kerbin. If launching also works on Minmus and the Mun this is coincedence because the circumstances aren't different enough for the problems seen on out of Kerbin SOI launch-sites.

I'm not pursuing this further. So unless medsouz or someone else wants to prove differently, I don't believe KK can support launch-sites on planets outside of Kerbin's SOI. A totally different approach to spawning from a launch-site, ie a work-around, might find a way but I'm not interested in doing it.

Link to comment
Share on other sites

After a lot of coding, testing, coding testing ad infinitum it's time for me to give up on the out of Kerbin SOI issues with launch-sites. I'm 99% certain that KSP's spawn code is hard-coded in such a way that it can't be done using KSP's launch-site elements of the API. I suspect there is an assumption in KSP's code that launching IS happening on Kerbin. If launching also works on Minmus and the Mun this is coincedence because the circumstances aren't different enough for the problems seen on out of Kerbin SOI launch-sites.

I'm not pursuing this further. So unless medsouz or someone else wants to prove differently, I don't believe KK can support launch-sites on planets outside of Kerbin's SOI. A totally different approach to spawning from a launch-site, ie a work-around, might find a way but I'm not interested in doing it.

Not surprising at all, when you look at assembly-csharp file, all is code, even scenarii :( with mostly no doc.

Could you please send me what did you do, where you go, etc it could spares me some digging.

I'll try maybe.

A workaround is still EPL, we just have to drop some kind of mobile base, and using it without resources and build time, it's very like static launch site, except all is in game and shapes are limited to what parts can offer, but it still be possible to create a building as a (big) part and add the launch feature from EPL to it. Colliders will just sucks probably.

How to Access the Editor?

CRTL-K (not really the "editor", just the GUI), reading Kerbtown doc is a good step as they work pretty much the same way.

Link to comment
Share on other sites

...Could you please send me what did you do, where you go, etc it could spares me some digging...

My latest commit to my fork of KK has all of my debug code in it chap. Beyond that, there's nothing extra I can show you to work with. Go nuts.

What ever happened with the "discovery" mechanic that would require you to find the launch sites before using them in career? Did it not work out? I never saw it added to the list in the OP.

Other than the new Category filter, I haven't had time to work on any new features. Too busy trying to squash bugs. I may have squashed the recovery bug finally. May.

Link to comment
Share on other sites

Regarding the "snap to surface" issue, it also happens on Kerbin ?? looks like a regression to me, it has worked before, now it just go higher and higher on each click.

Separate bug and the fix is being prepped. As for regression, no idea chap. I can't read your mind and know about it before I read about it.

Link to comment
Share on other sites

This may sound a little stupid but, How do I install this?

EDIT: I put the medsouz folder in the Gamedata folder. When I launch the game and go to the VAB there's a question mark and nothing but KSC loads in the GUI.

EDIT2: I got Kerbin side installed but now I can't open the gui.

Edited by stanz25
Link to comment
Share on other sites

Other than the new Category filter, I haven't had time to work on any new features. Too busy trying to squash bugs. I may have squashed the recovery bug finally. May.

Oh ok, I thought Medouz had said he was working on it a while back. That's ok though.

Link to comment
Share on other sites

Oh ok, I thought Medouz had said he was working on it a while back. That's ok though.

Its really far back on my todo list. I want to get stuff like custom space centers and destruction (which I have half working, I just need to learn how to make some test *.mu files) done first. :)

Link to comment
Share on other sites

I have test Kerbtown with a launch site on Duna (my Chalice Tower) with KerbalX vessel on 0.23.5 (with KJR by the way) => immediate "explolaunch" ! (it's happen faster and quite stronger than with KK on 0.25).

So, at least, both plug-in suffer from the same issue and it's not related to 0.25 potential bodies changes. Not really a surprise I guess.

Link to comment
Share on other sites

What ever happened with the "discovery" mechanic that would require you to find the launch sites before using them in career? Did it not work out? I never saw it added to the list in the OP.

I've started working on this. Just get familiar with the new API, added required config items.

Hiding icons + launch site on the menu will be not too hard (I start something for icons), the only big part will be the discovery itself on flight.

Maybe calculating distance between all site and current vessel on onUpdate(Fixed) perhaps, but it's just an idea for now.

I think add a simple bool for discovery (a one-time-only trigger), and a min distance to be to define a site as "discovered" or known, considering restarting a "dead" launch facility may need some care, the distance will be very short, like land on site itself for example.

Link to comment
Share on other sites

...stuff...

Most excellent Justin. Keep in mnd that save/persistence support is currently stripped from KK and will need re-instating or replacing if you want to keep track of what's been found per save. If you can make this as re-usable as possible in the code (i.e. as close to another API as possible), it can handle other features in future.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...