Jump to content

Hiding a modded resource


ISOREX_

Recommended Posts

Hello,

I am working on getting some mods together for my first modded career gameplay. Some of those mods come with custom resources, including ones that aren't useful for me. I was wondering if there is a way to hide these resources? Or perhaps convert them?

 

Link to comment
Share on other sites

37 minutes ago, ISOREX_ said:

I was wondering if there is a way to hide these resources?

In what context are these resources showing up?  Generally, if a resource is not used in a part, you won't see it on the part.  Thus, all you should 'see' are the resources that are actively used on any specific part.

Link to comment
Share on other sites

Hey @Shadowmage, thanks once again for helping me out.

I am talking about the payload modules of Station Parts Expansion Redux. I'm getting resources like water, lead, rock, fertiliser, minerals and more stuff that I don't think any of my mods use. I'm using the NF mods, Snacks! and some more, but I don't think any of these use those. 

Another one which is slightly different are the CryoTanks from the CryoEngines. I used the patch to make the engines use LF instead of LH, unfortunately the patch doesn't convert the tanks, and B9PartSwitch doesn't support the tanks I think(?) since I don't have any buttons to switch the contents of the tanks.

Both aren't really huge issues, I was just wondering if anything was possible at all.

Link to comment
Share on other sites

1 hour ago, ISOREX_ said:

I am talking about the payload modules of Station Parts Expansion Redux.

Sounds like someone went a bit overboard on their resource patches for those parts.  Ideally if no mod is present that uses a resource, it should never be available in a container.

1 hour ago, ISOREX_ said:

unfortunately the patch doesn't convert the tanks,

Again, sounds like the authors missed some nuance in their patches.

 

If the resources are truly not used anywhere, it should be possible to remove them from the game entirely with ModuleManager through a simple patch.

-RESOURCE_DEFINITION[resource_name_goes_here]{}

 

Link to comment
Share on other sites

3 hours ago, Shadowmage said:

Sounds like someone went a bit overboard on their resource patches for those parts.  Ideally if no mod is present that uses a resource, it should never be available in a container.

SSPXr adds most resource types when the CommunityResourcePack is installed and a few more for Snacks, MKS, et.al. So it already supports only resources installed by other mods.

@ISOREX_ could remove the resource subtypes with a MM patch likes this one:

Spoiler

@PART[sspx-cargo-container*]:FINAL
{
    @MODULE[ModuleB9PartSwitch]
    {
        !SUBTYPE:HAS[~name[Ore]] {}
    }
}

!B9_TANK_TYPE[SSPX*]:HAS[~name[SSPXOre]] {}

 

The idea is to revert the additions made by StationPartsExpansionRedux/Patches/SSPXR-Containers-Switches.cfg and keep just the Ore resource. Removing the tank types added by StationPartsExpansionRedux/Patches/SSPXR-B9TankTypes.cfg is probably not necessary but they're not going to be used anywhere else.

Edited by HansAcker
updated patch, actually tested before posting this time :)
Link to comment
Share on other sites

So if I understand it correctly, I create a .cfg file with;

@PART[sspx-cargo-container*]:FINAL
{
    @MODULE[ModuleB9PartSwitch]
    {
        !SUBTYPE:HAS[~name[Ore]] {}
    }
}

!B9_TANK_TYPE[SSPX*]:HAS[~name[SSPXOre]] {}

And repeat that for each of the resources that are not used, then save that file in the Gamedata folder? For example I replace the 'Ore' with 'Lead', 'SSPXOre' with 'SSPXLead' and so forth.

I've tried finding more info on how to make a Module Manager patch, but I doubt that I'm searching in the correct place since I haven't found much.

 

Link to comment
Share on other sites

1 hour ago, ISOREX_ said:

I've tried finding more info on how to make a Module Manager patch, but I doubt that I'm searching in the correct place since I haven't found much.

https://github.com/sarbian/ModuleManager/wiki/Module Manager Syntax

https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Handbook

Enjoy :)

(everything you need on patch documentation should be available behind those links)

Link to comment
Share on other sites

On 7/27/2019 at 3:07 PM, ISOREX_ said:

And repeat that for each of the resources that are not used, then save that file in the Gamedata folder? For example I replace the 'Ore' with 'Lead', 'SSPXOre' with 'SSPXLead' and so forth.

No, the patch as shown removes all resources from the cargo containers except Ore. If you'd like to remove just a few specific resources, the patch would use something like "!SUBTYPE[ExoticMinerals] {}".

I need to look up MM syntax in the handbook almost every time :D

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