Jump to content

Adding resources to a part


Enorats

Recommended Posts

So, I'm playing with Kerbalism installed. It's only got a couple of options for food/water containers, none of which I particularly like all that much. I'd love to expand the number of cargo options I have, and I really like the KIS inline container models. I'm attempting to add Food/Water to these containers, but nothing I try seems to be working. Either the parts load in normally, or they fail to load at all - never with food/water.

Ideally I'd love to have something like a B9 part switch option that allows me to switch from a cargo container with KIS inventory to something carrying food/water, to something carrying just food, and finally just water.. if not that, I'd take simply adding the food/water to the container with KIS inventory as well (I rarely use it anyway).

So far, I've tried simply adding something like 

    Resource
    {
        name = Food
        amount = 8200
        maxamount = 8200
    }

to the .cfg for the part, and that made them not load at all.

Creating a .cfg in the gamedata folder with something like 

@PART[KIS_Container3]:NEEDS[Kerbalism,KIS]
{
    Resource
    {
        name = Food
        amount = 8200
        maxamount = 8200
    }
}

makes them load, but doesn't add the food to them.

I don't know a lot about modding in KSP to be honest. I've modified plenty of parts before to make them more to my liking, but mostly by ripping out chunks of one part and simply dropping it into the .cfg of another. Bluedog Design Bureau had a comparability folder filled with .cfg's making the mod compatible with various other mods. Kerbalism wasn't one of those, but I was able to take the Snacks! compatibility .cfg and alter it to create new B9partswitch tanks for food/water, then get those parts to load those tanks. What's particularly frustrating is that BDB has a KIS tank of its own that now has food/water as I'd like (though it maintains the KIS inventory as well).

Does anyone have any idea how I could do this, or what I might be doing wrong? Even something as simple as just adding these resources to the normal part would be a workable solution for me.

Link to comment
Share on other sites

Ugh. Capitalization ftw. Teach me to try typing my own stuff out instead of copying it directly. Like four hours of wanting to strangle these unchangeable parts, only to find it was as simple as RESOURCE and maxAmount.

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