Jump to content

Issues Changing Biomes with Module Manager and Kopernicus


Superfluous J

Recommended Posts

Actually the title here should be "Issues NOT Changing Biomes with Module Manager and Kopernicus" but anyway.

I'm trying - unsuccessfully - to remove all biomes from the game and set up all worlds to have a single biome named "Surface." I've created a a biome map named 1biome.png and it's just a black rectangle.

What I want is a generic config that modifies every planet, not 15 different lines one for each planet, with add-on packs for JNSQ, RSS, or whatever. I'd like to just throw this mod into Gamedata and have it work.

So I created a modulemanager config to modify Kopernicus. Below is the current iteration of it though I've taken about 20 stabs at it.

@Kopernicus:FINAL
{
	@Body[*]
	{
		@Properties
		{
			@biomeMap=1biome/1biome.png
			@Biomes
			{
				-Biome[*] {}
			}
			-Biomes
			+Biomes
			{
				+Biome
				{
					+name = Surface
					+displayName = #autoLOC_900621 // Surface
					+value = 1
					+color = 0,0,0,1
				}
			}
		}
	}
}

 

Included in my stabs are not having those "+" symbols, not having the @Biomes block with -Biome[*] in it, not having -Biomes, changing the * in @Body to Kerbin just to test. Sometimes the changes I make get an error that Sun can't exist without a biome or something like that, but whenver the game loads wihtout error, all the biomes on Kerbin are still there.

Any ideas what I'm doing wrong, or (even better) how I can tell what is happening when KSP loads so I can figure out what I'm doing wrong myself?

Link to comment
Share on other sites

I'd need to rummage through a Kopernicus config for complete syntax but some things I can spot that seem off.

+ is copy but you appear to be using it to add entries. To create an entry you don't need a symbol or you can use % as a fail safe to create or edit.

Something else that sticks out but might be correct, typically, sub modules and nodes will be in caps. So things like @Body might want to be @BODY. Same for Biomes.

Might be wrong on this also but while @PART[*] is the usual syntax for targeting all parts, for nodes I think you want @NODEname,*

 

Edit: Hmm, ok, referencing the Kopernicus GitHub and JNSQ pages...

@Kopernicus:FINAL
{
	@Body,*
	{
		@Properties
		{
			%biomeMap=1biome/1biome.png
			!Biomes,*{}
			Biomes
			{
				Biome
				{
					name = Surface
					displayName = #autoLOC_900621 // Surface
					value = 1
					color = 0,0,0,1
				}
			}
		}
	}
}

Try that. Dunno if it will work and if it does, there's probably a more elegant way.

Edited by Manwith Noname
Link to comment
Share on other sites

3 hours ago, Manwith Noname said:

+ is copy but you appear to be using it to add entries. To create an entry you don't need a symbol or you can use % as a fail safe to create or edit.

Oops that was a brain fart, though I'd farted that particular brain after trying it without a symbol with no luck.

3 hours ago, Manwith Noname said:

Something else that sticks out but might be correct, typically, sub modules and nodes will be in caps. So things like @Body might want to be @BODY. Same for Biomes.

That doesn't seem necessary. I cased them that way as it's what was in the other configs.

3 hours ago, Manwith Noname said:

Might be wrong on this also but while @PART[*] is the usual syntax for targeting all parts, for nodes I think you want @NODEname,*

I'd never used that syntax before I think I understand what it does :)

3 hours ago, Manwith Noname said:

Try that. Dunno if it will work and if it does, there's probably a more elegant way.

It worked! Thanks. I super appreciate it!

Link to comment
Share on other sites

2 hours ago, Superfluous J said:

It worked!

Aw man. it worked for JNSQ, but not for the stock game. I'm guessing because the stock game and Kopernicus are not defining the planets the same, and I'm assuming I can't modify the stock planets with modulemanager unless I do something crazy like remove them all and re-add them with Kopernicus.

 

Link to comment
Share on other sites

Interesting. Looking at the Kopernicus wiki, it seems for stock you might need to make a different config using a template node.

https://kopernicus.github.io/wiki/main/Template.html

I missed that the supplied Kopernicus configs already use this.

 

Edit: So I think it would be something like...

@Kopernicus:FINAL
{
	@Body,*
	{
		@Template
		{
			removeBiomes = true
		}
		@Properties
		{
			%biomeMap=1biome/1biome.png
			Biomes
			{
				Biome
				{
					name = Surface
					displayName = #autoLOC_900621 // Surface
					value = 1
					color = 0,0,0,1
				}
			}
		}
	}
}

This might break the Sun as you previously mentioned. Then you might need to come up with a way of ignoring the sun body with a :HAS[!name = sun] or something. Would need to look up the proper MM syntax.

 

Another Edit: After reading the MM wiki, I think changing the @Body line with...

@Body:HAS[~name[Sun]]

...might work.

Edited by Manwith Noname
Link to comment
Share on other sites

3 hours ago, Manwith Noname said:

So I think it would be something like...

Again it worked perfectly! Didn't even need to do the sun stuff. I think that error was because the sun was the first thing it checked, and I had successfully removed all biomes somehow but didn't successfully add any.

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...