Jump to content

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


medsouz

Recommended Posts

mmm weird, unity/KT are not directly related, a unity exported object is still what it is whatever which plug-in use it later.

And I can confirm it's not 100% true as I have exported my bigger launch pad and use it with KK as-is and got the issue (not a surprise IMHO).

Perhaps a side-effect (using old KT config style with KK for example) he's got which has masked another issue.

It's not the config that's masking it, as I see no difference between the older Beale KT-designed cfgs and the modern KerbinSide cfgs (which makes sense because they're designed to work for both).

Link to comment
Share on other sites

KeyNotFoundException: The given key was not present in the dictionary.

at System.Collections.Generic.Dictionary`2[system.String,System.Collections.Generic.Dictionar y`2[system.String,KerbalKonstructs.StaticObjects.Stati cGroup]].get_Item (System.String key) [0x00000] in <filename unknown>:0

at KerbalKonstructs.StaticObjects.StaticDatabase.cach eAll () [0x00000] in <filename unknown>:0

at KerbalKonstructs.StaticObjects.StaticDatabase.onBo dyChanged (.CelestialBody body) [0x00000] in <filename unknown>:0

This could be exactly what it says. I've been looking at OnDominantBodyChange trying to track down the bug where space centre third party statics don't appear after reverting a flight and exiting the VAB/SPH. Haven't identified exactly what the issue is but this may be related.

Link to comment
Share on other sites

This could be exactly what it says. I've been looking at OnDominantBodyChange trying to track down the bug where space centre third party statics don't appear after reverting a flight and exiting the VAB/SPH. Haven't identified exactly what the issue is but this may be related.

The issue may be here (StaticDatabase.cs):

if (groupList.ContainsKey([B]activeBodyName[/B]))
{
foreach (StaticGroup group in groupList[KerbalKonstructs.instance.getCurrentBody().[B]bodyName[/B]].Values)
{

activeBodyName is probably a defined string (ex: Minmus), but

KerbalKonstructs.instance.getCurrentBody().bodyName may not and there is no prior check

Such coding (which I can call "Squad style", or naive = "everything will ALWAYS work fine and as expected") is very weak against random cases not thoroughly anticipated.

All single items have to be checked before doing such thing. And checking doesn't take so much time but saves a lot, really a lot, of troubles.

At least, all potential place where a given exception can occurred should be check too.

Link to comment
Share on other sites

Ugh, where do I begin? okay, lets try a "dir" command in dos on my gamedata folder. This is likely to get messy.

Okay, So I have experienced the disappearing space center statics occasionally. Here's my complete list, and not completely alphabetical due to having to dig into the folder structures of vague mod directories.


Toolbar
ActionGroupManager
AdaptiveDockingNode
AdvancedAnimator
AKI
ART
AviationLights
B9_Aerospace
BahamutoD
BahaSP
BDArmory
BurnTogether
Chatterer
ChopShop
COM
CommunityResourcePack
ConnectedLivingSpace
CrossFeedEnabler
CustomAsteroids
DDSLoader
DefaultThrottle
DistantObject
DuneRaider
EditorExtensions
EnvironmentalVisualEnhancements
EVAMechJeb
EVAParachutes
FASA
FireCrew
Firespitter
FreeEVA
FShangarExtender
GlowStrips
HabitatPack
Hangar
HexCans
HullCameraVDS
JSI
KAS
KASA
KerbalFoundries
KerbalJointReinforcement
KerbinSide
KerbPaint
KineTechAnimation
Klockheed_Martian
Klockheed_Martian_CoolRockets
Klockheed_Martian_SmartParts
Klockheed_Martian_Special
Klockheed_Martian_SSE
KOSMOS
KronalUtils
KSO
KWRocketry
LoadOnDemand
MagicSmokeIndustries
MechJeb2
MEPS
ModRocketSys
ModularFuelTanks
ModuleRCSFX
MP_Nazari
MusicPauser
MWIndustries
MyTweaks (personal mod with custom MM patches)
NASAmission
NavHud
NearFutureConstruction
NearFutureElectrical
NearFutureProps
NearFuturePropulsion
NearFutureSolar
NearFutureSpacecraft
NohArksPnP
notes
NothkeSerCom
NovaPunch2
Nuke
OrbitusII
ORIGAMI
ORSX
PartHighlighter
PartWizard
PlanetShine
ProceduralDynamics
ProceduralFairings
QuantumStrutsContinued
R&SCapsuledyne
RadialEngineMountsPPI
RCSBuildAid
RcsSounds
RealChute
RealSolarSystem (for a specific visual effect only)
ResGen
RetroFuture
SCANsat
sceneJumper
SelectRoot
ShipManifest
SmokeScreen
SN_Fairings
SpannersBoomSticks1
SPFloor
SphericalFuelTanks
Squad
Stock Rebalance
stock5
StockScalingBugFix
SXT
TacFuelBalancer
TacSelfDestruct
Targetron
TCShipInfo
TextureReplacer
ThrottleMemory
TimeControl
ToadicusTools
TweakableEverything
TweakScale
VABHelper
VesselView
Virgin Kalactic
WheelSounds

ASET - ERS
BoulderCo - Clouds

CIT - KERT
CIT - NodeHelper

iPeer - AGroupOnStage
KashCorp - KAP
Kerbaltek - HyperEdit

KipEng - LPHubs
KipEng - UnivDockPorts
Lionhead_Aerospace_Inc - Circular Panel

medsouz - KerbalKonstructs

MSD - EvaFollower

RandomIndustrys - WarpStopper

SH_mk2CockpitInternal

SPD - HexTruss

TriggerTech - KSPAlternateResourcePanel

UmbraSpaceIndustries - AES
UmbraSpaceIndustries - Karbonite
UmbraSpaceIndustries - KarbonitePlus
UmbraSpaceIndustries - MKS
UmbraSpaceIndustries - OKS

VNG - FrementGUI
VNG - parachute

XanderTek - Landertron

Link to comment
Share on other sites

No longer needing mod lists. It was a red herring.

@Justin Your log helped find the actual bug. It is now squashed and the fix should be released in the next version. I'll get it pulled into KK asap.

EDIT - The bizarre behaviour on off-world launch sites can be explained thusly:

1 - When you first launch your vessel the vessel is actually being spawned before the launch site platform.

2 - It may or may not float in a lower gravity for a bit. KK may just try and plop it on the planet's surface.

3 - KK then actually activates/spawns the launch site object.

4 - Your vessel might float down on to the platform and wobble, or 'pop' on to the top of the launch platform if you're lucky.

5 - More likely the spawned vessel and the spawned launch site now occupy some of the same space. KSP physics does its thang and BOOM.

Edited by AlphaAsh
Link to comment
Share on other sites

Just released v0.4-PRE4

CHANGELOG

v0.4-PRE4 (11/1/14)

  • Lots of backend changes
  • AlphaAsh fixed statics disappearing in certain situations
  • AlphaAsh added "Category" setting to instance config for sorting in the launch site selector. Currently only supports "RocketPads", "Runways", "Helipads", and "Other" but will allow people to define custom categories in the future.

You can grab the update on Kerbal Stuff.

Thanks to AlphaAsh for doing all the heavy lifting in this release. Lately I've been busy with work and school and in the little free time that I have I haven't been able to find motivation to work on the project so thank you AlphaAsh for covering for me. Hopefully I'll get back to work some time soon.

I also added AlphaAsh as a contributor to the Kerbal Stuff page so that in the unlikely event of me disappearing they can put out a release to fix any issues that might pop up.

Link to comment
Share on other sites

@Justin Your log helped find the actual bug. It is now squashed and the fix should be released in the next version. I'll get it pulled into KK asap.

EDIT - The bizarre behaviour on off-world launch sites can be explained thusly:

1 - When you first launch your vessel the vessel is actually being spawned before the launch site platform.

2 - It may or may not float in a lower gravity for a bit. KK may just try and plop it on the planet's surface.

3 - KK then actually activates/spawns the launch site object.

4 - Your vessel might float down on to the platform and wobble, or 'pop' on to the top of the launch platform if you're lucky.

5 - More likely the spawned vessel and the spawned launch site now occupy some of the same space. KSP physics does its thang and BOOM.

Good to read :) thanks.

Are you sure ?

@medsouz ? Any thoughts ?

KK start by (constructor)

[KSPAddonFixed(KSPAddon.[B]Startup.MainMenu[/B], true, typeof(KerbalKonstructs))]

+ on Awake method, there is a call to loadObjects();

But I don't know yet where vessels are spawn to launchsite... I'll dig.

Perhaps it need something more to load objects BEFORE Flight scene, not sure if we can defined another line in KSPAddonFixed, or defined another scene to be included in/before.

Link to comment
Share on other sites

Good to read :) thanks.

Are you sure ?

...

Perhaps it need something more to load objects BEFORE Flight scene, not sure if we can defined another line in KSPAddonFixed, or defined another scene to be included in/before.

I didn't test to see if the off-world launch site issues were fixed. I'm fairly certain my bug fix for statics not appearing at the space centre should squash that one too. Let me know how your own testing goes.

Link to comment
Share on other sites

Thanks for the update, AlphaAsh and medsouz!

Could you please provide an example config for the recovery feature and category? Thanks!

Bug report: Recovering a vessel from a KK launchsite breaks KK. Menu still working, but statics won't spawn anymore.

(KSP 0.25; Kosmodrome 0.9, Kerbal Konstructs 0.4-pre4. No other mods)

- Start game, new game, VAB, launch something on a KK site (Kosmodrome LP-P, desert)

- Revert to VAB

- launch again

-> so far so good

- Recover vessel without launching (not revert)

- launch again

-> no KK statics loaded (location ok, just no statics. Emty desert)

Launching on a stock sites still works, but KK site stays broken. Restarting the game solves issue.

I can provide logs if needed.

Edited by Divico
mod versions
Link to comment
Share on other sites

Thanks for the update, AlphaAsh and medsouz!

Could you please provide an example config for the recovery feature and category? Thanks!

Bug report: Recovering a vessel from a KK launchsite breaks KK. Menu still working, but statics won't spawn anymore.

(KSP 0.25; Kosmodrome 0.9, Kerbal Konstructs 0.4-pre4. No other mods)

- Start game, new game, VAB, launch something on a KK site (Kosmodrome LP-P, desert)

- Revert to VAB

- launch again

-> so far so good

- Recover vessel without launching (not revert)

- launch again

-> no KK statics loaded (location ok, just no statics. Emty desert)

Launching on a stock sites still works, but KK site stays broken. Restarting the game solves issue.

I can provide logs if needed.

Reproduce the issue, and then yes please. ksp.log is all I need. KSP can sometimes be slow to flush to the log, so after reproducing the error just exit to main menu and shut the game down. Then grab that ksp.log. Cheers.

Could you please provide an example config for the recovery feature and category? Thanks!

In a launch static's instance you want:

Category = whatever

Where whatever can be RocketPad, Helipad, Runway or Other. Default is Other.

So

Category = RocketPad

would mean that the new filter will know that this belongs under RocketPads.

Edited by AlphaAsh
Link to comment
Share on other sites

Sorry but the "explodolaunch" feature is still there (tried a Mushine 3 on my Duna's launchpad).

@medsouz: what about also a filter by body ? (I know currently it will be 99% on Kerbin and 1 or 2 sites elsewhere but...)

Can you try a few different launch statics for me Justin and see if they are all equally troublesome? Cheers.

@Divico - Please see previous post.

Edited by AlphaAsh
Link to comment
Share on other sites

Can you try a few different launch statics for me Justin and see if they are all equally troublesome? Cheers.

Ok, need some time but will do it. We'll see :).

While waiting, a...don't even find a good name for it, pic (unedited, except for size):

J7MKCjl.png?1

EDIT: thinking back of this pic, it may be possible "ground" has not be made as clean and good for building as on Kerbin, as Squad tend to do only what they make their live easier (obviously), and they're not really interested by distant launch sites. Just a guess.

Edited by Justin Kerbice
Link to comment
Share on other sites

Here's the log, same procedure as prvious post (launch, revert, launch, recover, launch, exit).

... and I wouldn't post it if I can't reproduce it :)

KSP.log

Only thing I can see is this:

[untitled Space Craft]: ground contact! - error: -0.357m

...

[untitled Space Craft]: ground contact! - error: -31.730m

Link to comment
Share on other sites

Here's the log, same procedure as prvious post (launch, revert, launch, recover, launch, exit).

... and I wouldn't post it if I can't reproduce it :)

KSP.log

Only thing I can see is this:

[untitled Space Craft]: ground contact! - error: -0.357m

...

[untitled Space Craft]: ground contact! - error: -31.730m

Useful stuff thank you.

Wife and I are knackered from trying to track this one down and it's looking like recovery does something... unusual to the 'active' state of statics. We have some theories which we hope to pursue tomorrow. For now... time for some zzzzs. Thanks guys for being patient on this - it's proving trickier than I expected to crack but I'll get this bugger, yes I will :D

Link to comment
Share on other sites

Please update the .version file when you update.. I downloaded PRE0.4 from kerbalstuff and that was apparently made to run on 0.24.2, despite being updated yesterday and 0.25 support being added in PRE0.2..

Otherwise, thanks for the update, guys! Kinda sad to see Robau's icons didn't make the cut, but I like them too much to ignore :) Also, how would I add custom Launch Location pictures? I'm currently lacking ones for a couple of places and am not sure what to name them so they show up.

Link to comment
Share on other sites

Please update the .version file when you update.. I downloaded PRE0.4 from kerbalstuff and that was apparently made to run on 0.24.2, despite being updated yesterday and 0.25 support being added in PRE0.2.

WI have to get my .... together and get an actual 0.4 release going some time soon.

Kinda sad to see Robau's icons didn't make the cut, but I like them too much to ignore :)

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

Also, how would I add custom Launch Location pictures? I'm currently lacking ones for a couple of places and am not sure what to name them so they show up.

Put the image you want to use as the logo in the same directory as the config and add "LaunchSiteLogo = IMAGE NAME WITHOUT FILE EXTENSION HERE" to the site instance.

Link to comment
Share on other sites

I have done some more testing with different launchsites, on Duna mostly + test again my Minmus launch site.

The Minmus site works well, even with a Munshine IX (~1220 t), no issue at all.

On Duna, I get the same "explolaunch" again and I got a clue ! The snap to surface put the building at a wrong altitude (too high, about twice the ground level: 2500m => 5000m ) and vessel is spawn about 25m above the spawn point, I guess launchclamps suffer from very high unpredicted "stress" and drag all the connected part in opposite directions, so all joints brake everywhere on the vessel.

@Divico: issue confirmed, I got the exact same behaviour with your procedure. I have only a few launch sites, no NRE in log.

"ground contact error" msgs are... pointless I guess, they exists for stock game too and not sure what they exactly means.

There is an interesting log msg: "KK: cacleAll() activeBodyname is" (nothing)

=> cache is probably messed up there so later, nothing to load !

(KK: onLevelWasLocaed is FLIGHT + calling onBodyChanged with Kerbin + invoking updateCache)

note: going back to space center shows static objects nearby this time.

Edited by Justin Kerbice
Link to comment
Share on other sites

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

Put the image you want to use as the logo in the same directory as the config and add "LaunchSiteLogo = IMAGE NAME WITHOUT FILE EXTENSION HERE" to the site instance.

Ah I see. Sorry for misunderstanding, look forward to their inclusion then! Thanks for the help RE pictures, I (think I) know exactly what to do. Spent a few hours last night flying round to get nice shots :D

Link to comment
Share on other sites

I have done some more testing with different launchsites...

Launchsite statics Justin. The reason I asked is because this sounds like an issue with the origin and/or spawn transform of the one you're using on Duna.

EDIT-

There is an interesting log msg: "KK: cacleAll() activeBodyname is" (nothing)...

That's intended. It's part of my debugging and correct behaviour. Any error handling I do will have 'ERROR' or 'EXCEPTION' in any debug message related to it.

Edited by AlphaAsh
Link to comment
Share on other sites

Looks like misunderstanding is this thread middle name ! :cool:

Launchsite statics Justin. The reason I asked is because this sounds like an issue with the origin and/or spawn transform of the one you're using on Duna.

mmm AFAIK all buildings are static, so launchsites !

That's intended. It's part of my debugging and correct behaviour. Any error handling I do will have 'ERROR' or 'EXCEPTION' in any debug message related to it.

It seems you've missed the point here: "blah blah is ..." is what ? I guess there is a string "... is " + something.name(), but the variable is just an empty string or one or more space(s).

Link to comment
Share on other sites

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