Jump to content

How to Stop a Resource from Spawning?


fenderzilla

Recommended Posts

I'm trying to make a simple ModuleManager config to make it so the "Substrate" resource from Community Resource Pack is manufactured from Silicates rather than mined straight from the world. As part of this, though, I want to make it stop spawning on planets. I know modulemanager can make it so Substrate spawns at 0% on all planets, but I want to be able to remove it from the resource scanning UI altogether. I've tried 

Spoiler

!PLANETARY_RESOURCE[Substrate]:FINAL {}
!GLOBAL_RESOURCE[Substrate]:FINAL {}

As Well as 

Spoiler

!PLANETARY_RESOURCE[*]:HAS[ResourceName[Substrate]]:FINAL {}

!GLOBAL_RESOURCE[*]:HAS[ResourceName[Substrate]]:FINAL {}

Am I just getting the syntax wrong (I'm pretty new to MM, please be gentle), or is there some other problem? Is there a way to stop a resource from spawning altogether?

Edited by fenderzilla
Link to comment
Share on other sites

You could probably just directly modify the Substrate.cfg in CRP, if you really want it to stop spawning. Otherwise, you'll probably get better answers asking around in the CRP thread, or the Module Manager thread since you are trying to do this through MM, and those guys'll know how to do it if you can.

Link to comment
Share on other sites

1 hour ago, FungusForge said:

You could probably just directly modify the Substrate.cfg in CRP, if you really want it to stop spawning. Otherwise, you'll probably get better answers asking around in the CRP thread, or the Module Manager thread since you are trying to do this through MM, and those guys'll know how to do it if you can.

Thanks, I'll try that. I'm making it as part of a larger mod which adds a bunch of resources and I mainly just don't want to have a big menu that people have to click through a million times. I'll see what works.

Link to comment
Share on other sites

6 hours ago, fenderzilla said:

Thanks, I'll try that. I'm making it as part of a larger mod which adds a bunch of resources and I mainly just don't want to have a big menu that people have to click through a million times. I'll see what works.

I'd also like to know.  I'd love to stop Ore from being in the game as I split it into three for converting to fuel, life support and construction.

Peace.

Link to comment
Share on other sites

@fenderzilla You had it almost right in the second spoiler. What you (and @theJesuit) want is this:

!PLANETARY_RESOURCE,*:HAS[#ResourceName[Substrate]]:FOR[MyMod] {}
!GLOBAL_RESOURCE,*:HAS[#ResourceName[Substrate]]:FOR[MyMod] {}
!BIOME_RESOURCE,*:HAS[#ResourceName[Substrate]]:FOR[MyMod] {}

// instead of :FOR[MyMod] you can use :AFTER[CommunityResourcePack] (which only works if Community Resource Pack is installed)
// if you plan to share your mod, try not to use :FINAL

What's wrong with the original content was the use of [*] which assumes there's a key inside: name = xyz, which there isn't; and the missing # which means you're targeting a key or parameter.

ModuleManager has sufficient documentation here: https://github.com/sarbian/ModuleManager/wiki

Link to comment
Share on other sites

  • 1 month later...
On 8/14/2018 at 9:56 AM, JadeOfMaar said:

@fenderzilla You had it almost right in the second spoiler. What you (and @theJesuit) want is this:


!PLANETARY_RESOURCE,*:HAS[#ResourceName[Substrate]]:FOR[MyMod] {}
!GLOBAL_RESOURCE,*:HAS[#ResourceName[Substrate]]:FOR[MyMod] {}
!BIOME_RESOURCE,*:HAS[#ResourceName[Substrate]]:FOR[MyMod] {}

// instead of :FOR[MyMod] you can use :AFTER[CommunityResourcePack] (which only works if Community Resource Pack is installed)
// if you plan to share your mod, try not to use :FINAL

What's wrong with the original content was the use of [*] which assumes there's a key inside: name = xyz, which there isn't; and the missing # which means you're targeting a key or parameter.

ModuleManager has sufficient documentation here: https://github.com/sarbian/ModuleManager/wiki

Thanks, that was good advice. What ended up working was 

!PLANETARY_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}
!GLOBAL_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}
!BIOME_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}

so close enough. This seems to work for all instances of the substrate spawning configuration, even stuff that comes after it in the same config file. So if and of you want to edit the resource instead of deleting it altogether you have to use "@" the old fashioned way.

Link to comment
Share on other sites

2 hours ago, fenderzilla said:

Thanks, that was good advice. What ended up working was 


!PLANETARY_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}
!GLOBAL_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}
!BIOME_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}

so close enough. This seems to work for all instances of the substrate spawning configuration, even stuff that comes after it in the same config file. So if and of you want to edit the resource instead of deleting it altogether you have to use "@" the old fashioned way.

Hmm. Maybe the ,* needs to be before the :AFTER

!BIOME_RESOURCE:HAS[#ResourceName[Substrate]],*:AFTER[CommunityResourcePack] {}

But it's nice to know you got things working.

Link to comment
Share on other sites

On 9/20/2018 at 12:13 AM, fenderzilla said:

Thanks, that was good advice. What ended up working was 


!PLANETARY_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}
!GLOBAL_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}
!BIOME_RESOURCE:HAS[#ResourceName[Substrate]]:AFTER[CommunityResourcePack],* {}

so close enough. This seems to work for all instances of the substrate spawning configuration, even stuff that comes after it in the same config file. So if and of you want to edit the resource instead of deleting it altogether you have to use "@" the old fashioned way.

what does the star do?

Link to comment
Share on other sites

On 9/21/2018 at 11:05 AM, FreeThinker said:

what does the star do?

It makes the node affect all instances of whatever matches the parameters, instead of just the first one it finds. Basically. I think. 

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