Jump to content

Trying to make a light version of RealFuels


MAFman

Recommended Posts

I was inspired by NathanKell's RealFuels to go ahead and make my own lite version (that I won't release because I don't want any possible copyright problems...). Trouble is, I can't get my ModuleManager configs to behave with KSP's resources. Any tips?

Link to comment
Share on other sites

How are you trying to interact with KSP's resources, and what are you trying to accomplish with them?

Given your stated goal making "RealFuels Lite", I would assume that you want to directly remove some stock resources. This is impossible (and unwise), but you can do the next best thing: remove all references to stock fuels and replace them with your fuels/modules. For fuel tanks containing LiquidFuel, I would write this:

@PART
[*]:HAS[RESOURCE[LiquidFuel]] //This finds all parts with LiquidFuel in it
{
@PROPELLANT[LiquidFuel] //We want to convert the LiquidFuel to something else
{
@name = Kerosene //could be anything you want
@ratio *= 6.0976 //Math to convert from LiquidFuel numbers to Kerosene numbers, as defined by Community Resource Pack
}
}

Community Resource Pack is a mod that defines common resources used by different mods (like RealFuels). If you have installed several mods already, you probably already have it. More info here.

Also note that RealFuel's license permits derivatives under the same license, as long as you credit the authors and state ialdabaoth's (who is awesome) awesomeness.

Link to comment
Share on other sites

Yep, the license is open. :)

As to removing--wait, why do you say you can't remove stock resources? -RESOURCE_DEFINITION[LiquidFuel] {} will kill it. Though you will also have to change any references to it elsewhere or the game will hang on load.

Also, the MM script shown won't work. You're checking for RESOURCE, but then modifying PROPELLANT. You seem to be confusing tanks and engines.

Link to comment
Share on other sites

Yep, the license is open. :)

As to removing--wait, why do you say you can't remove stock resources? -RESOURCE_DEFINITION[LiquidFuel] {} will kill it. Though you will also have to change any references to it elsewhere or the game will hang on load.

Also, the MM script shown won't work. You're checking for RESOURCE, but then modifying PROPELLANT. You seem to be confusing tanks and engines.

Huh, I stand corrected then. I didn't know you could modify resources themselves. Also the propellant thing is an error. Should be "RESOURCE" instead. I would correct my example, but I'll just direct people to the documentation instead and not give bad advice.

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