Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble using non-Kerbin template for Kerbin in 1.5.0-1 #319

Closed
gordonfpanam opened this issue Oct 18, 2018 · 10 comments
Closed

Having trouble using non-Kerbin template for Kerbin in 1.5.0-1 #319

gordonfpanam opened this issue Oct 18, 2018 · 10 comments

Comments

@gordonfpanam
Copy link

gordonfpanam commented Oct 18, 2018

I might have the "Automatically inject the KSC transform into Kerbin, this makes it possible to change the template to something different" misunderstood. Or I'm making a mistake with my configs.

Attempting to swap Kerbin and Eve for homeworlds is giving me this error in ksp.log: "PSystemSetup: Cannot find PQS of name 'Kerbin'!" Which is interesting because there is a Kerbin in the Kopernicus log files, which happens to be using Eve's template. The game stays locked on a loading loop before presenting the main menu. Alt-F4 can still exit.

I think I'm still following Kerbin = Home correctly. "Bin" uses the Kerbin template and isHomeWorld = False, and "Kerbin" uses the Eve template and isHomeWorld = True. "Kerbin" has a SpaceCenter{} section defined. I deliberately simplified the configs to draw from the Stock templates as much as possible.

cannot-find-kerbin-logs.zip

Attached is a zip file with the example config, Kopernicus logs, and ksp.log.

@StollD
Copy link
Member

StollD commented Oct 18, 2018

On line 4 in your EveSpaceProgram.cfg you have !Body[Kerbin] {} which removes Kerbin.

On the bottom of the file you then do %Body[Kerbin] { }. The % operator is edit-or-create, so thats fine, but since you deleted the existing Kerbin node you create a new one. If you look at it closely, the new Kerbin node is missing a name = Kerbin statement, causing the planet to inherit the name from its template (so your Kerbin is called Eve)

This worked previously when Kerbin was the template and donated the name, but now you need to declare it explicitly (which is probably better practice anyways)

@gordonfpanam
Copy link
Author

gordonfpanam commented Oct 18, 2018

I thought %Section[someName] automatically inserted name = someName. This appears to be the case when I inspect the Module Manager cache. If I explicitly add a name = statement then there are two name = statements.

In any case I tried again without using % to explicitly define the two Body{} sections:

@Kopernicus:FOR[EveSpaceProgram]
{
	!Body[Eve]{}
	!Body[Kerbin]{}

	Body
	{
		name = Bin
		cbNameLater = Bin
		Template
		{
			name = Kerbin
		}
		//[…]
	}

	Body
	{
		//Legacy cbNameLater, I might remove it, replaced with displayName in Properties
		//cbNameLater = Eve
		name = Kerbin
		cbNameLater = Kerbin
		Template
		{
			name = Eve
		}
		//[…]
	}
}

I get the same result.

In this updated log I included the Module Manager cache so you can inspect the Kopernicus{} section.

cannot-find-kerbin-logs-part-two.zip

Thanks for taking a look.

Sorry, something went wrong.

@gordonfpanam
Copy link
Author

gordonfpanam commented Oct 19, 2018

I think I know what happened... by deleting Kerbin and Eve I've omitted important parts of the default configuration for these worlds. I'll populate them and try again.

[Update] Well that didn't make a difference. Same end result. Adding placeholders for PQS{} and other settings that were present in the system.cfg file gave me the same result of not being able to find the PQS for Kerbin.

In the meantime, the original mechanism of building the home world from a fully defined configuration still works. Alien Space Programs 1.3, with the Eve config so far, works on Kopernicus 1.5.0-1 without modifications.

@Sigma88
Copy link
Contributor

Sigma88 commented Oct 19, 2018

Using

%Body[name] {}

Should add the name if the node doesn't exist

@Sigma88
Copy link
Contributor

Sigma88 commented Oct 19, 2018

If you can show us the modulemanager cache it should help us see what is happening in your game

@gordonfpanam
Copy link
Author

@Sigma88 the MM cache is in the second upload:

cannot-find-kerbin-logs-part-two.zip

But it seems I need to avoid deleting Kerbin and instead edit it. When @StollD raised a concern about me having deleted Kerbin and then re-adding it using Eve's template, I instead looked at deleting Eve, editing Kerbin to use Eve's template and then adding Bin using Kerbin's template. The end result worked much better:

EveSpaceProgram.zip

The only difference I found was that the order of words in the resulting system was different. Kerbin was the second world after Moho, and Bin was last after the asteroid definition. But I might have missed other important differences.

I'll inspect the system to see if anything else crops up.

@Sigma88
Copy link
Contributor

Sigma88 commented Oct 19, 2018

ok, a couple of pointers:

		Body
		{
			name = Bin
			cbNameLater = Bin
			Template
			{
				name = Kerbin
			}
			Properties
			{
				displayName = Kerbin^N
				isHomeWorld = False
			}
		}
		Body
		{
			name = Kerbin
			cbNameLater = Kerbin
			Template
			{
				name = Eve
			}
			Properties
			{
				displayName = Eve^N
				isHomeWorld = True
			}
		}

For "Bin":
1- you don't need cbNameLater = Bin since the name is already "Bin"

For "Eve-Kerbin":
1- you don't need cbNameLater = Kerbin since the name is already "Kerbin"
2- you need to use a Kerbin template for the homeworld planet

everything else looks fine

if you change the template to "Kerbin" it should solve this issue. you will then need to change all the PQSMods in order to make sure the planet actually looks like Eve

@gordonfpanam
Copy link
Author

if you change the template to "Kerbin" it should solve this issue. you will then need to change all the PQSMods in order to make sure the planet actually looks like Eve

This is how the current Alien Space Programs works, and it still works in Kopernicus 1.5.0-1. However, Gregrox and I were looking into drastically simplifying ASP's configuration since 1.5.0-1 is supposed to support using a different template for the home world now.

This config works:

EveSpaceProgram.zip

Using this though, tracking stations appear on Bin and not on "Kerbin," and a Space Center clone appears on Bin as well. But that's OK as this is the behaviour I saw with pre-1.3 versions of Kopernicus. That is a completely different problem though, which I think can be fixed by removePQSMods removing the other decals.

The big takeaway I have from this is I cannot !Body[Kerbin]{} if I intend to change the template. I have to @Body[Kerbin]{} and edit everything accordingly.

@Sigma88
Copy link
Contributor

Sigma88 commented Oct 19, 2018

I don't think you will be able to change the template of the homeplanet from Kerbin to anything else

@StollD
Copy link
Member

StollD commented Oct 19, 2018

You can since 1.5.0-1, because of this commit bf210f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants