Jump to content

[1.8.1] Kerbal Konstructs - 1.8.1.15 - 15.Dec.2019


Ger_space

Recommended Posts

6 minutes ago, IraqiWalker said:

Hold up, so if I'm reading this correctly. This mod can help me build bases on other planets, and launch my stuff from there?

Plus, it's up to date for 1.2.1!? Why have I not heard of this mod before?

I have no idea, why you never saw this mod, but yes you can build bases anywhere you want. (fly a ship to the place and press crtl+k)
I
f you don't want to model the bases yourself (with 3ds or unity), you could try the kerbin-side core package for a set of assets, or use the assets from any other installed KK-mod.

I strongly suggest to use the latest pre-release on from github, If you really want to create your own bases, because the last official release contains a bug in the editor.

Link to comment
Share on other sites

1 minute ago, Ger_space said:

I have no idea, why you never saw this mod, but yes you can build bases anywhere you want. (fly a ship to the place and press crtl+k)
I
f you don't want to model the bases yourself (with 3ds or unity), you could try the kerbin-side core package for a set of assets, or use the assets from any other installed KK-mod.

I strongly suggest to use the latest pre-release on from github, If you really want to create your own bases, because the last official release contains a bug in the editor.

I'll have to look into this family of mods, to get the bases, since my 3DS skills are almost zero.

Now, you mentioned the bug in the editor, would that have an impact on me if I DON'T want to model my own structures/assets?

 

Link to comment
Share on other sites

20 minutes ago, IraqiWalker said:

I'll have to look into this family of mods, to get the bases, since my 3DS skills are almost zero.

Now, you mentioned the bug in the editor, would that have an impact on me if I DON'T want to model my own structures/assets?

 

the ingame editor is only for the placement and configuration of the models(like giving a launchSite a name etc). and this is fixed in the pre-release. It's also got easier to use.

Creating new models is done outside of KSP.

A new official release should be done this weekend or early next week. I need some more time for testing and cleanup the mess I created the last few days. :confused:

Link to comment
Share on other sites

1 minute ago, Ger_space said:

the ingame editor is only for the placement and configuration of the models(like giving a launchSite a name etc). and this is fixed in the pre-release. It's also got easier to use.

Creating new models is done outside of KSP.

A new official release should be done this weekend or early next week. I need some more time for testing and cleanup the mess I created the last few days. :confused:

Take your time, I'll be here, waiting, and planning my system wide expansion, XD.

Link to comment
Share on other sites

@Ger_space

I've had some time to test KK with SD and konstructs are not even touched by my mod.

I would assume this is because either the PQSCity mods created by KK are not added to  CelestialBody.pqsSurfaceObjects or they are added after my mod goes through that list to edit all the mods.

I have yet to look into KK code, if you have any pointers that might save me some time I'd be grateful :)

Edited by Sigma88
Link to comment
Share on other sites

I cannot get KK to work together with RSS. I have the icon but pressing ctrl-k does nothing. 

At first when examining the log file it said :

[ERR 18:05:05.703] KK: Couldn't find body "Kerbin"

and:

Spoiler

[EXC 18:05:05.705] NullReferenceException: Object reference not set to an instance of an object
    KerbalKonstructs.Core.StaticDatabase.addStatic (KerbalKonstructs.Core.StaticObject obj)
    KerbalKonstructs.KerbalKonstructs.loadInstances (.ConfigNode confconfig, KerbalKonstructs.Core.StaticModel model, Boolean bSecondPass)
    KerbalKonstructs.KerbalKonstructs.LoadModelInstances ()
    KerbalKonstructs.KerbalKonstructs.Awake ()
    UnityEngine.GameObject:AddComponent(Type)
    AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
    AddonLoader:StartAddons(Startup)
    AddonLoader:OnLevelLoaded(Int32)
    AddonLoader:OnSceneLoaded(Scene, LoadSceneMode)
    UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)
[LOG 18:05:05.705] 

So edited all the .cfg files that said CelestialBody = Kerbin to be = Earth. That worked and the log-file didn't display the error anymore. Pressing ctrl-k however still does nothing. Anyone have any solutions for making KK and RSS work together?

Link to comment
Share on other sites

1 hour ago, Sigma88 said:

@Ger_space

I've had some time to test KK with SD and konstructs are not even touched by my mod.

I would assume this is because either the PQSCity mods created by KK are not added to  CelestialBody.pqsSurfaceObjects or they are added after my mod goes through that list to edit all the mods.

I have yet to look into KK code, if you have any pointers that might save me some time I'd be grateful :)

CelestialBody.pqsSurfaceObjects

there is such a thing? Cool :cool:

But, KK does't add itself to the array, yet... I expected that this is done automaticly, but it looks like I have to do this on my own. I'll post a updated prerelease later tonight, where I try to fill the qpsSurfaceObjects array.

 

Link to comment
Share on other sites

Hey, can I use this with the stock KSC assets, or are those locked away?

This doesn't seem to have been mentioned in this thread, but every other post saying "you need KerbinSide" or something similar makes me think I already know the answer to that :P

Is it a matter of not knowing how to locate the stock assets, or is it that they really can't be used?

Edited by monstah
Link to comment
Share on other sites

@SuperSimon

Ther is no RSS for 1.2.X, so I cannot support it in the moment. If you recompiled KK from the sources, then please open an issue on github and upload the logfiles, as I have no 1.1.3 install (at least not now).

 

@monstah

the stock assets are not usable by KK. At least not now. @Sigma88 showed me where I might find them, but currently I cannot access them to place copies of them or worse: edit them... It might be cool, but currently I have some other prioities, but I add a note to look into it.

Link to comment
Share on other sites

1 minute ago, Ger_space said:

Ther is no RSS for 1.2.X, so I cannot support it in the moment. If you recompiled KK from the sources, then please open an issue on github and upload the logfiles, as I have no 1.1.3 install (at least not now

I see yes. I found a dll for RSS compiled to work in 1.2.X someone posted in a thread, so thats how I got it to work. I guess I will have to wait for a proper RSS 1.2.x release then. Thanks anyway. 

Link to comment
Share on other sites

1 hour ago, Ger_space said:

CelestialBody.pqsSurfaceObjects

there is such a thing? Cool :cool:

But, KK does't add itself to the array, yet... I expected that this is done automaticly, but it looks like I have to do this on my own. I'll post a updated prerelease later tonight, where I try to fill the qpsSurfaceObjects array.

 

don't worry, I thought PQSmods were added to that list automatically, since they aren't I might as well just fish them out of the Celestialbody itself, that way I will be sure to get all of them, regardless of which mod adds them.

Edited by Sigma88
Link to comment
Share on other sites

11 minutes ago, Ger_space said:

I changed the loader a bit, so I think they get added... I'll run a few quick tests and report back. that were only 5 lines of code on my side. You will need much more to find them otherwise.

Actually it's a 1 line change for me :)

Instead of using foreach on body.surfaceobjects I use it on body.GetComponents<PQSMod>

Link to comment
Share on other sites

3 minutes ago, Sigma88 said:

Actually it's a 1 line change for me :)

Instead of using foreach on body.surfaceobjects I use it on body.GetComponents<PQSMod>

Does is work with your change? It looks I succefully filled the body.surfaceobjects array with some usable data. If nothing speaks agains it, I'll leave it included in the next release.

Link to comment
Share on other sites

@Sigma88

OK, that was not really expected: when I add KK statics to the body.surfaceobjects, they show up as anomalies in the scanners. (which is good to know, but nothing I really want for all objects I place).
But I now can add real hidden bases to the world, which only show only up in the scanner (or after they are open)

Edited by Ger_space
Link to comment
Share on other sites

1 hour ago, Ger_space said:

@Sigma88

OK, that was not really expected: when I add KK statics to the body.surfaceobjects, they show up as anomalies in the scanners. (which is good to know, but nothing I really want for all objects I place).
But I now can add real hidden bases to the world, which only show only up in the scanner (or after they are open)

cool, feel free to use that feature as you prefere. I decided I will keep getting my PQSmods the other way so that you don't have to worry about it.

PS: seems legit

Screenshot%202016-12-02%2020.02.34.png?d

Link to comment
Share on other sites

4 minutes ago, Sigma88 said:

cool, feel free to use that feature as you prefere. I decided I will keep getting my PQSmods the other way so that you don't have to worry about it.

PS: seems legit

Screenshot%202016-12-02%2020.02.34.png?d

This looks cool and disturbing at the same time. I'm glad you figured it out.

Link to comment
Share on other sites

5 minutes ago, Ger_space said:

This looks cool and disturbing at the same time. I'm glad you figured it out.

the weird thing is, doing that KSC gets called 2 times so, while everything is scaled 1/10 ksc is scaled 1/100 :D

I had to put a check to avoid just that

Link to comment
Share on other sites

ok, I managed to fix the basics of KK compatibility :)

@Ger_space I'll put here some thoughts about rescaling that came up while me and @AlphaAsh where discussing SD and KK compatibility way back when...

since it'll probably end up a wall of text I'll put everything into a spoiler so that I don't annoy people

Spoiler

so, when rescaling a planet there are a lot of things to keep in mind that can mess up KK.

first of all, the only real way to get a good result is to scale the buildings by the same factor you scale the planet.

of course this solution is not always the most enjoyable even if it is the most accurate, this is why other options might be considered.

 

when rescaling planets but not buildings, there are 2 main issues to solve:

1- Altitude

2- Latitude-Longitude

 

when rescaling a planet, the altitude of every surface point is multiplied by the "resize" parameter. so if a hill is 100 meters in stock Kerbin, it will become 1000 meters in 10x Kerbin.

This means that I just need to multiply the repositionRadiusOffset by 10 right? wrong!

most PQSCity in stock (and also in KK) are set up to load with a certain offset compared to the center of the planet or to the sea level.

the problem is that this kind of offset actually includes 2 different informations:

A- the offset required to move the model of the building to the surface
B- the offset required to make sure the model is intersecting the terrain at the correct altitude

this picture should help explain my issue:

KSC%20offset.png?dl=1

Here you can see a random building, which has a part that goes over the ground (black) and a part that goes under the ground (grey).

to position the building at the correct height KK and KSP use an offset (pink) relative to the sea level (blue)

What I need to know to calculate the correct position of the building is the two distances on the left (A and B)

This could be solved in a couple of different ways:

1- use repositionToSphereSurface = true

this would make the building spawn directly on the surface (arrow A) and so in the offset you can just put the offset necessary to hide underground parts (arrow B). All buildings positioned this way will always work fine with SD, but also they will always work with planet packs that change the shape of the planet.

 

2- store somewhere the value of "arrow B"

which would allow SD to read it and scale the building accordingly

honestly, this is the less efficient solution, the only reason I mention this is because there are a lot of KK packs out there and maybe some have a restrictive license that doesn't allow redistribution, this solution would allow to bring up-to-date with SD some of those abandoned KK packs with such restrictive licenses

 

Latitude and Longitude are also a problem when rescaling the planet but not the buildings:

lat_long_issue.png?dl=1

Here you can see a planet with buildings before and after being rescaled.

since latitude and longitude ramain constant, it means that the distance between the buildings will increase when making a planet bigger, and decrease when making a planet smaller.

this will lead to buildings "crunched" together, or spread on a wider area than they are supposed to.

This could be avoided by:

1- Put all the buildings inside the same "PQSCity" Mod

I have no idea if this would be possible

2- Save somewhere the "position" vector of the "center" of the buildings group.

for example, if every additional building of KSC2 (from kerbinside) had stored in their cfg the position vector of the building and the position vector of KSC (as a reference) I would be able to calculate the new lat-long necessary to maintain the correct distance between buildings.

@AlphaAsh told me he was working on something similar before his hiatus from ksp modding, so I don't know if this feature actually made it into the mods or not.

as expected, big wall of text there (those ms paint skillz tho)

anyways, @Ger_space I'm not writing this because I expect you to do anything about it, I'm just putting it out there in case you are interested in increasing the potential of KK.

in time, I will add to SD all the tools necessary to do a proper rescale of buildings.

like a loader for the offsets and a loader for the position references, since this is the main PQSMod adding mod I will gladly keep in touch with you during development to find solutions that are best for both of us.

But I have no interest in bothering you, so if this is not something you want to go into it's perfectly fine :wink:

cheers

Edited by Sigma88
Link to comment
Share on other sites

1 hour ago, Sigma88 said:

ok, I managed to fix the basics of KK compatibility :)

@Ger_space I'll put here some thoughts about rescaling that came up while me and @AlphaAsh where discussing SD and KK compatibility way back when...

since it'll probably end up a wall of text I'll put everything into a spoiler so that I don't annoy people

  Reveal hidden contents

so, when rescaling a planet there are a lot of things to keep in mind that can mess up KK.

first of all, the only real way to get a good result is to scale the buildings by the same factor you scale the planet.

of course this solution is not always the most enjoyable even if it is the most accurate, this is why other options might be considered.

 

when rescaling planets but not buildings, there are 2 main issues to solve:

1- Altitude

2- Latitude-Longitude

 

when rescaling a planet, the altitude of every surface point is multiplied by the "resize" parameter. so if a hill is 100 meters in stock Kerbin, it will become 1000 meters in 10x Kerbin.

This means that I just need to multiply the repositionRadiusOffset by 10 right? wrong!

most PQSCity in stock (and also in KK) are set up to load with a certain offset compared to the center of the planet or to the sea level.

the problem is that this kind of offset actually includes 2 different informations:

A- the offset required to move the model of the building to the surface
B- the offset required to make sure the model is intersecting the terrain at the correct altitude

this picture should help explain my issue:

KSC%20offset.png?dl=1

Here you can see a random building, which has a part that goes over the ground (black) and a part that goes under the ground (grey).

to position the building at the correct height KK and KSP use an offset (pink) relative to the sea level (blue)

What I need to know to calculate the correct position of the building is the two distances on the left (A and B)

This could be solved in a couple of different ways:

1- use repositionToSphereSurface = true

this would make the building spawn directly on the surface (arrow A) and so in the offset you can just put the offset necessary to hide underground parts (arrow B). All buildings positioned this way will always work fine with SD, but also they will always work with planet packs that change the shape of the planet.

 

2- store somewhere the value of "arrow B"

which would allow SD to read it and scale the building accordingly

honestly, this is the less efficient solution, the only reason I mention this is because there are a lot of KK packs out there and maybe some have a restrictive license that doesn't allow redistribution, this solution would allow to bring up-to-date with SD some of those abandoned KK packs with such restrictive licenses

 

Latitude and Longitude are also a problem when rescaling the planet but not the buildings:

lat_long_issue.png?dl=1

Here you can see a planet with buildings before and after being rescaled.

since latitude and longitude ramain constant, it means that the distance between the buildings will increase when making a planet bigger, and decrease when making a planet smaller.

this will lead to buildings "crunched" together, or spread on a wider area than they are supposed to.

This could be avoided by:

1- Put all the buildings inside the same "PQSCity" Mod

I have no idea if this would be possible

2- Save somewhere the "position" vector of the "center" of the buildings group.

for example, if every additional building of KSC2 (from kerbinside) had stored in their cfg the position vector of the building and the position vector of KSC (as a reference) I would be able to calculate the new lat-long necessary to maintain the correct distance between buildings.

@AlphaAsh told me he was working on something similar before his hiatus from ksp modding, so I don't know if this feature actually made it into the mods or not.

 

OK, I see the problems, wich arise with scaling. But here goes a new one: If I reposition the objects to new coordinates, so thier spaceing is OK, then they end up not where they belong. A waterlaunch system could end up in the desert, or a runway partial in a mountain.

reposition on surface = true will break all current mods, which is be very very bad.

If you only need the offset vector B):

it is (terrainhigh - pqsCity.repositionRadiusOffset)

unscaled terrainhight = (CelestialBody.pqsController.GetSurfaceHeight(pqsCity.repositionRadial) - CelestialBody.Radius)/TerrainScaleFactor

from there you can rescale the models as you need. (I don't have the rescale factor within KK, so I cannot convert legacy mods on the fly).

Edited by Ger_space
Link to comment
Share on other sites

26 minutes ago, Ger_space said:

OK, I see the problems, wich arise with scaling. But here goes a new one: If I reposition the objects to new coordinates, so thier spaceing is OK, then they end up not where they belong. A waterlaunch system could end up in the desert, or a runway partial in a mountain.

reposition on surface = true will break all current mods, which is be very very bad.

If you only need the offset vector B):

it is (terrainhigh - pqsCity.repositionRadiusOffset)


unscaled terrainhight = (CelestialBody.pqsController.GetSurfaceHeight(pqsCity.repositionRadial) - CelestialBody.Radius)/TerrainScaleFactor

from there you can rescale the models as you need.

oh there is a way to get surfaceheight?????? LOL I didn't know that. nevermind then (thank you)

 

and yes, if you change LONG-LAT on a non flat area the buildings may end up in weird places, but:

 

1- that's not something YOU do, that's something SD does. so it's not decreasing the quality of KK, at most it's decreasing the quality of SD, but that brings me to 

2- the problem itself arises from the fact that if you scale up kerbin you probably don't want to also scale up buildings. if that's the case you end up with this:

(KSC2 from KerbinSide on stock Kerbin compared with 10xKerbin)

Screenshot%202016-12-03%2022.44.24.png?d Screenshot%202016-12-03%2022.41.35.png?d

so clearly here it looks bad, either the user accepts the fact that he/she needs to have big-ass buildings or accepts the fact that the buildings will be spaced out seemingly with no reason.

I'm not saying you should do anything about it, but if there is a way that would allow me to know which buildings are supposed to go "together" I might give the option to choose between the standard resize which spaces out buildings and the alternative version which maintains the distance between buildings at the cost of some altitude issues if the terrain is not flat enough

 

EDIT:

btw, we can move the discussion on SD thread if you don't want to clutter this thread

Edited by Sigma88
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...