Jump to content

[Help Please] Empty Resource Containers cause Negative Cost in VAB


DSM92

Recommended Posts

I originally Posted this in the "Support Modded Install" section, but after 42 views and no replies, I started to think I put it in the wrong place.

I have recently made a few custom resources along with storage containers to transport those resources.

Here is an abstract of the issue and the parts that cause it.

Fuel tanks that hold either 10k or 5K of a certain resources.

the density of these resources range from 0.009 to 0.001.

The unit cost of these resources are between 5.00 and 6.00

The tanks start out empty because the resources are supposed to be mined and then transported back to Kerbin for profit.

However, when I place the empty tanks in VAB the cost reads in the area of -40,000, but when filled with the resource in the vab, the cost reads 0.

I've checked to make sure that there arn't any misplaced characters in the part.config files. They are identical to parts that I have modded and still work, except for the resource amounts and type of resource.

I've checked the resource config files, and everything checks out there too.

The only Add-on I'm using is mechjeb.

I've reloaded KSP and the problem persists.

EDIT: also, the parts operate completely normally in flight, The problem is in the VAB (Didn't check the SPH because they arnt space plane parts)

Here is some additional Information:

I changed the unit cost of the resources, who's containers were causing the problem, to 1 and the VAB returned to normal. I then bumped them up to 4(because I noticed that Xenon has a unit cost of 4) and the problem returned. Logically, that does't make any sense. I triple checked the part config files and the resource config file and EVERYTHING checks out.

Is there anyone out there who can help me?

Link to comment
Share on other sites

For some *unfathomable* reason, Squad decided that the cost of a part as specified in a cfg is the cost 'wet' rather than dry. Which means every time a resource has less than its maxAmount, the amount less than maxAmount is *subtracted* from the part's cost.

So you have to set cost (in the cfg) to be the cost dry PLUS the cost of all resources added.

Link to comment
Share on other sites

As I read the title, I was just thinking that it had to be something like "cost for resources" is greater than "cost of part" which results in "I'm sending up an empty tank, and being payed to do it!" Either way, sounds awesome. It's like how I live with my parents while going to college and actually make a bit of extra money on the deal with Financial Aid where they try and compensate me for living costs, and I have none.

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