Sigma88

[WIP][1.3.0] KKtoSD

Recommended Posts

KKtoSD


 

Latest Release
Download
 
Follow on Twitter
Follow
Discord Invite
Discuss
GBPEURUSD
Donate

 

License

All Rights Reserved

Edited by Sigma88

Share this post


Link to post
Share on other sites

This is very cool @Sigma88!

So this will let me load a static pack on a resized planet without the buildings spacing getting messed up right?

Would this also let me move it to a new spot or different planet?

Share this post


Link to post
Share on other sites
18 minutes ago, Nightside said:

So this will let me load a static pack on a resized planet without the buildings spacing getting messed up right?

yes this is the idea, there are some limitations, for examples you need to specify which of the KK groups needs to be kept together (if there are more groups in the same place)

for example, if you scale a planet there's no way for SD to know that the group KSCUpgrades needs to be centered around the KSC

so you will need to add a small cfg to tell SD that the group KSCUpgrades needs to be centered around the KSC

Like this:

PQSCity_Groups
{
	GROUP
	{
		name = KSCUpgrades
		body = Kerbin
		CENTER
		{
			CentralPQSCity = KSC
		}
	}
}

 

(syntax is explained here)

 

 

 

18 minutes ago, Nightside said:

Would this also let me move it to a new spot

to do this you will need to create a PQSCityGroup in SigmaDimensions with the same name and define where you want it to be moved

so, assume you want to move "Arakebo" to Latitude = 5, Longitude = 74

you can do this:

PQSCity_Groups
{
	GROUP
	{
		name = Arakebo
		body = Kerbin
		MOVE
		{
			CentralLAT = 5
			CentralLON = 74
		}
	}
}

PS: to move groups that are centered around the KSC you just need to add the cfg that centers them around KSC, if in your install KSC is moved by some planet pack (like GPP) the statics will show up in the correct place

 

and finally...

 

18 minutes ago, Nightside said:

or different planet?

nope, can't change planet for now

Edited by Sigma88

Share this post


Link to post
Share on other sites

@Sigma88 when specifying "body", if a planet uses cbNameLater, should we use the cbNameLater name or the original name?

Body
{
	name = Kerbin
	cbNameLater = Gael
	...
}

Share this post


Link to post
Share on other sites
Just now, TheRagingIrishman said:

@Sigma88 when specifying "body", if a planet uses cbNameLater, should we use the cbNameLater name or the original name?


Body
{
	name = Kerbin
	cbNameLater = Gael
	...
}

I don't remember :)

if you try let me know :)

Share this post


Link to post
Share on other sites
Just now, TheRagingIrishman said:

working on it rn, I'll let you know

thanks! I'm a bit busy right now :) 

Share this post


Link to post
Share on other sites

This feature requires the latest prerelease of Kerbal Konstructs. I'll drop a notice here when a new full release of kk is available, which includes the api calls, so this mod can work correctly with a ckan installed kk.

Share this post


Link to post
Share on other sites
1 minute ago, Ger_space said:

This feature requires the latest prerelease of Kerbal Konstructs. I'll drop a notice here when a new full release of kk is available, which includes the api calls, so this mod can work correctly with a ckan installed kk.

yes I forgot to mention that :)

I'll add a note near the link to kk

 

Share this post


Link to post
Share on other sites
4 minutes ago, Sigma88 said:

yes I forgot to mention that :)

I'll add a note near the link to kk

that explains all the null-refs

Share this post


Link to post
Share on other sites

It seems to be working somewhat well in 1.3 using the latest KK Pre-release, however, I'm not sure that the CENTER node is functioning correctly. With my test system at 10.625 scale, when I center the group around the KSC PQSCity, it appears offset slightly as shown below:

aXnk2gj.png

When I change the center mode to center around the long and lat coordinates for the KSC SpaceCenter as specified in the planet's config, it stays in that offset position. If I then edit these coordinates to try and forcibly move the KSCUpgrades group, none of the statics change position.

It almost seems like they are not moving at all no matter what I enter into the CENTER node.

PQSCity_Groups:AFTER[SigmaDimensions]
{
	GROUP
	{
		name = KSCUpgrades
		body = Kerbin
		cbNameLater = Gael
		CENTER
		{
			CentralPQSCity = KSC
		}
	}
}

Config is as specified above. Did any of the syntax change compared to when I last tested this out, Sigma?

Share this post


Link to post
Share on other sites

@Poodmund I'm not sure how this plugin interacts with cbnamelater

I'll take a look to see what's going on

Share this post


Link to post
Share on other sites

I'm not even sure if it's needed, I just included it in the config as per discussion above. When I get home I'll upscale and downscale the planet and see if the offset gets worse, better or remains constant as the body size changes.

Could this possibly help at all as I know we were discussing the accuracy of the relocation at one point when thinking about calculating the repositioning? Just spitballing here.

Share this post


Link to post
Share on other sites

I tested it and it seems to work just fine

Screenshot%202017-08-15%2016.28.52.png?dl=1

 

this is an install with:

  • KSP 1.3.0
  • ModuleManager 2.8.1
  • Kopernicus 1.3.0-4
  • ModularFlightIntegrator (From Kopernicus 1.3.0-4)
  • SigmaDimensions v0.8.2
  • KKtoSD v0.1.0
  • KerbalKonstructs 1.1.9.4 (pre-release)
  • Kerbin-Side_Complete_continued-1.2 (I've removed all bases except for KSCUpgrades)
  • this custom cfg

are you sure there's nothing extra interfering with SD in GPP ?

I know GPP used to have custom statics, those will not work with SD groups, when SD groups stuff with the KSC it assumes the original group was positioned around the original position of KSC

Edited by Sigma88

Share this post


Link to post
Share on other sites
On 8/15/2017 at 3:36 PM, Sigma88 said:

I tested it and it seems to work just fine

Screenshot%202017-08-15%2016.28.52.png?dl=1

 

this is an install with:

  • KSP 1.3.0
  • ModuleManager 2.8.1
  • Kopernicus 1.3.0-4
  • ModularFlightIntegrator (From Kopernicus 1.3.0-4)
  • SigmaDimensions v0.8.2
  • KKtoSD v0.1.0
  • KerbalKonstructs 1.1.9.4 (pre-release)
  • Kerbin-Side_Complete_continued-1.2 (I've removed all bases except for KSCUpgrades)
  • this custom cfg

are you sure there's nothing extra interfering with SD in GPP ?

I know GPP used to have custom statics, those will not work with SD groups, when SD groups stuff with the KSC it assumes the original group was positioned around the original position of KSC

Yeah the above works fine for me too, I think there's a stumbling block when trying to reparent the statics around another body.

When you say that KKtoSD uses the original position of the KSC, would there be any way to scan all configs during load for the Homeworld body, then find the Long/Lat coordinates for the SpaceCenter in that config and use those coordinates for its KSC position; if none are found, then fall back to default KSC?

Share this post


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

When you say that KKtoSD uses the original position of the KSC, would there be any way to scan all configs during load for the Homeworld body, then find the Long/Lat coordinates for the SpaceCenter in that config and use those coordinates for its KSC position; if none are found, then fall back to default KSC?

the system is working this way to allow the use on modified kerbins (like Gael) of bases that are designed for stock kerbin

if you are using custom cfgs that puts statics in places that are specifically designed for the GPP system, you can't group them with the KSC

if you are using standard cfgs from KerbinSide (that are designed with stock kerbin in mind) then you just need to group them with the KSC and SD will do the rest

 

1 hour ago, Poodmund said:

I think there's a stumbling block when trying to reparent the statics around another body.

I have no idea what you mean with this

Share this post


Link to post
Share on other sites

KKtoSD v0.1.1

 

added a small fix to make sure KKtoSD does not consider "Ungrouped" a base

 

all the links are available in the OP

 

If you want to follow the development of my mods:  Sigma88Mods&style=social

If you want to buy me a cup of coffee:  iSFDI5f.png r8916yD.png 


 

Changelog:

v0.1.1

- "Ungrouped" is no longer considered a valid group name
     

Share this post


Link to post
Share on other sites

KKtoSD v0.1.2

 

added a small fix to make sure spawn points are moved together with the launchsites

 

all the links are available in the OP

 

If you want to follow the development of my mods:  Sigma88Mods&style=social

If you want to buy me a cup of coffee:  iSFDI5f.png r8916yD.png 


 

Changelog:

v0.1.2

- Spawn points are now moved together with their launchsites
     

Share this post


Link to post
Share on other sites

Hi.  So I can get KK to work with Sigma Dimensions slightly.  My planets are rescaled to 3.2x and I kept the buildings at original scale. I am able to get KSCupgrades centered properly using the PQScity .cfg you posted earlier.  However, because I did not also upscale the buildings some of it looks off (Rader Tower floating in the air instead of mounted on the hill behind KSC).  But, I cannot get other locations to function.  For example, the aircraft carriers appear about 1200 meters under  water when I launch from them.  And all the other locations appear to be underground.  Is KKtoSD able to account for building scales not matching the planet scale?  And if not, how do I get the statics to appear in at the right location?

 

Share this post


Link to post
Share on other sites

I guess what I am really trying to figure out is if KKtoSD can automatically move static items to the correct altitude.

Share this post


Link to post
Share on other sites

@Redleg1 this is a SigmaDimensions limitation rather than a KKtoSD one.

Actually there are multiple limitations that are at play here, and all of them are general limitations of the concept of rescaling itself rather than my implementation of it.

Let me explain one by one to be more clear, and how it is possible to get around these limitations.

 

1- buildings are not near the correct geographical features

4 hours ago, Redleg1 said:

Rader Tower floating in the air instead of mounted on the hill behind KSC

this is pretty straightforward, when you change the size of the planet, but not the size of the buildings, each group of buildings will cover the same area as in stock, but the geographical features in that area will be spread around on a bigger area.

since the radar tower is positioned at the same distance from KSC as in stock, but the hill is farther away, you get the tower floating in the air

the solution would be to not group the radar tower together with KSC, this can be done adding a custom group with SD that contains only the radar tower so that this building remains at the original LAT-LON position

@Wercho had the same problem here and I think he was able to solve it using this trick

 

2- Floating buildings are not at the correct altitude

4 hours ago, Redleg1 said:

the aircraft carriers appear about 1200 meters under  water when I launch from them

this is a problem linked with how buildings are positioned, I have no way of knowing if the building is supposed to float or stay underwater, so when I rescale the planet the buildings end up in weird places.

what you can do right now is define an altitude offset so that the whole group is moved at a new altitude

for doing that you just need to generate a new group with the same name as the KK group and add a MOVE node, like this:

PQSCity_Groups
{
    GROUP
    {
        body = Kerbin
        name = Aircarrier
        MOVE
        {
            fixAltitude = 1200
        }
    }
}

keep in mind that you need to use the correct name ( I have no idea of what that is) and you will probably need to fiddle around with the offset altitude until you find the correct number

Edited by Sigma88

Share this post


Link to post
Share on other sites

Sigma,

Thanks for the responses.  I kinda have it figured out.  But like you said there are limitations.  I was trying to keep the buildings the original size because it looks weird to me when for example the KSP Runway looks like it is wide enough to land 3 B747s on wing tip to wing tip at the same time.  No matter how I fiddle with it, KSC++ is all jacked up without hand moving all the pieces back together.

 

Share this post


Link to post
Share on other sites
2 minutes ago, Redleg1 said:

Sigma,

Thanks for the responses.  I kinda have it figured out.  But like you said there are limitations.  I was trying to keep the buildings the original size because it looks weird to me when for example the KSP Runway looks like it is wide enough to land 3 B747s on wing tip to wing tip at the same time.  No matter how I fiddle with it, KSC++ is all jacked up without hand moving all the pieces back together.

 

keep in mind that you cannot use KerbalKonstructs to reposition the statics, otherwise the next time you start KSP, SD will read those new values and rescale them

if you want help fixing a specific base let me know which one and I can take a look to see what's the best way to fix it

hopefully with a couple of examples it should be easier for you to figure out how to fix all remaining bases

Share this post


Link to post
Share on other sites

Thanks again.  I was trying to make Lack' s KSP++ work at 3.2 planet scale but keep building at stock size, or maybe 1.5 at the most.  I'm sure I'll figure it out.  I've spent most of the day fiddling around with it and I think I'm going to give up now.

Share this post


Link to post
Share on other sites
1 minute ago, Redleg1 said:

Thanks again.  I was trying to make Lack' s KSP++ work at 3.2 planet scale but keep building at stock size, or maybe 1.5 at the most.  I'm sure I'll figure it out.  I've spent most of the day fiddling around with it and I think I'm going to give up now.

do  you have a link to that mod?

also, are you playing on stock kerbin resized 3.2x ? or do you have planet packs that change kerbin?

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.