Jump to content

NF Propulsion VASIMR Hydrogen: How to edit cfg.


Likasombodee

Recommended Posts

Hello,

I'd really like to be able to refuel VASIMR engines with hydrogen, but it was recently removed as a fuel for these specific engines. I was wondering if someone had a .cfg patch or can point me in the direction to learn how to edit .cfg's?

 

Thanks.

Link to comment
Share on other sites

The simplest solution: Go to Curseforge and download version 0_5_3. That's the last one that still has hydrogen fuel included.

In your 1.0.5 KSP install, you should have NF Propulsion version 0_6_1 installed.

Open the 0_5_3 download, find and copy the hydrogen tanks over to the appropriate place in your install. The directory structure must be preserved exactly. Also, delete the VASIMR directory in your install and replace it with the VASIMR directory from the older download.

You now have version 0_6_1 with hydrogen VASIMRs. It will not be balanced, but there should not be any functional problems unless you put the hydrogen tanks into the wrong place.

 

If you still want to learn to write config patches yourself, I can help you with that too, but the above is probably less effort for both of us. :P

 

Link to comment
Share on other sites

Thanks a lot! That sounds a lot simpler than I thought! 

 

I would be willing to learn more about config patches etc. If there are any useful threads, links, tutorials that provide help I'd be glad if you shared them. I find the more in depth I get into KSP the more and more I ask the generous KSP community to help me, it is reaching the point I have to start modding/patching myself. :lol:

Link to comment
Share on other sites

Well, the first two steps to successful config file editing/patching are:
 

1.) Understand the config file format. If you have any programming experience, it will likely make a sort of innate sense to you, but if not, it might not be immediately apparent what you are looking at... In that case, think of it like a large bag that can store smaller bags, which themselves can store smaller bags and so on.

It is a format of nested "nodes". A node is an element that contains other elements, including other nodes. Nodes are usually written in CAPITAL letters and followed by curly brackets. The brackets denote where a node opens, and where it closes again. Each config file starts with a top level node, of which there are several different types in KSP. But if you want to make or edit a part, the top level node is simply called... you guessed it, PART { }.

Unfortunately the node format is also a little inconsistent in places. Take the following example:

PART {
    MODULE {
        name = ModuleEnginesFX
        PROPELLANT {

        }
        atmosphereCurve {

        }
    }
}

First, you see the top level node opening a PART. The top level node contains another node, called MODULE. However, in contrast to PART, which always does the same thing, MODULE is multipurpose. You need to tell KSP what kind of MODULE you want it to be. In this case, you tell it that it is an advanced engine MODULE by giving it the name "ModuleEnginesFX". Why would you not simply open a node named MODULEENGINESFX { } instead? I don't know, ask Squad! :P  And to make matters worse, while one of the two subnodes of ModuleEnginesFX obeys the rule of the thumb that nodes are usually capitalized, the other does not! Ultimately, you'll just have to memorize and roll with these idiosyncracies.

The important part is that you realize that a part is nothing more than a top-level PART node that contains one or more subnodes which help define what kind of part it actually is. In addition to other nodes, a node can also contain any number of "fields". In the example above, "name = " is a field. Most parts tend to have a lot of fields. Many more are also hidden away in Physics.cfg in your KSP root directory; they are applied globally to all parts, but individual parts can override them if necessary.

Some documentation about which nodes and which fields exist can be found here: http://wiki.kerbalspaceprogram.com/wiki/CFG_File_Documentation
But honestly, you might as well just examine the config files of similar parts. Pretty much all the things have names that make it immediately clear what they do.

And at the end of the day, all nodes close their curly brackets again when they are done. The indentation in the example above is intentional, to illustrate that you must close everything in the proper order. Forgetting a bracket will mean your part will not even load. Get in the habit of immediately writing both brackets when opening a node, not just the opening bracket, and then hit enter a few times to move the closing bracket downwards and give yourself room to work. That way, you can never forget any brackets.

 

2.) And the second point is, understand ModuleManager's syntax. Because when you do edit existing parts, you should never ever edit the original config file directly. Instead, you write a patch that targets that particular part and, "at runtime" (while KSP is already running), dynamically replaces stuff in that part. ModuleManager documents all of its own syntax with examples in the first couple of posts in its thread, so that's where you should go to study it, but to give you a very rough idea:

It's all the same nodes and fields from above again, just targeted!

Say you want to edit an existing part called examplePart. That part, obviously, has its own config file that starts with a PART { } node, and that node includes a field called "name = examplePart". So what you do is write (in a new file) the ModuleManager command for "edit", which is the character "@", and then you open the PART node... while at the same time, targeting it by mentioning its name in square brackets.

You would write: @PART[examplePart] { }

And inside the curly brackets, you can then again do the same thing as you did before: you can write fields, or you can open additional subnodes. Everytime you prepend an @, it overwrites something that already exists with whatever you write down next; everytime you don't prepend an @, it adds whatever you write next to the part in addition to what's already there. You can also delete, you can say "edit if existing, else create new", you can target nodes using search terms, you can define the load order of your patch, and so on and so forth. All this and more, you can learn in the ModuleManager thread.

While you're there, worship the sarbian some! :P

 

Edited by Streetwind
Link to comment
Share on other sites

Just tried that patch and now I got my hydrogen Vasimr! But now my Xenon mode is gone. Based on what you said, I'm guessing I have to create a new node somewhere for a 3 fuel modes as opposed to 2?

I'll check out that thread and mess around a bit. Thanks a lot for your help!

Link to comment
Share on other sites

On 24.3.2016 at 8:02 PM, Likasombodee said:

Just tried that patch and now I got my hydrogen Vasimr! But now my Xenon mode is gone.

Of course it is gone. The xenon mode is a straight-up replacement of the hydrogen mode in newer versions. Unless you manually splice them together, you can only have one at a time.

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