Jump to content

Customizing available parts for teaching


Recommended Posts

Hello,

We're using Kerbal as part of an after-school science activity with high-school students.  At the moment this is a work-in-progress--trying to actually get some learning in amidst blowing things up.  The students come from a very wide range of abilities, so our goal is to just give them an intuitive sense of how spaceflight works without any math.

We've been using Sandbox mode because we want to focus on getting to orbit and not dealing with science or funds.  However, sandbox mode really has too many options, and the kids get either overwhelmed or distracted.  Keeping them focused while in the rocket parts candy store is hard.

Right now I have created a bunch of saved games in at various stages in a mission so that we can all start in the same place each session:

1. In the VAB

2. With a functional rocket on the launch pad

3. In orbit

4. In transit to the Mun

5. In Munar Orbit

6. Landed on Mun  etc.

However, what would be great is to be able to customize the available parts.  I'd like to start them off building a simple orbit-capable or Munar capable rocket with only a select set of highlighted parts.  I'd also like to delete the pre-fabricated rockets and planes within the pre-saved game (as opposed to deleting the actual files and messing up the program). This would cut down the distraction and keep them on task.  Is this possible?  Or are there mods that will accomplish this?

 

Thanks.

Link to comment
Share on other sites

I don’t know the code myself, but I know it’s possible to remove stock parts from the game because mods like Ven’s stock revamp do so in order to replace them. 

Side question, what parts would you remove? I’d say they’re all pretty functional, don’t see what ones would hurt.

IMO, if they aren’t modivated to go to the Mun, then they won’t go there. And remember it takes most of us many many missions to land on the mun and return.

Link to comment
Share on other sites

The easiest solution would be to use science mode and make sure only the essential parts have been unlocked in the tech tree.

 

The best solution is the DLC which will be released today. You can make custom missions ion the mission builder (I think you can even specify which parts are allowed)

 

another option would be to make your own mod that contains only the parts you wanted and use Janitors Closet to filter everything else out.

 

 

Also, don't take this too seriously, let them play around. I'd set challenges in the class like "get into orbit". at least one or two of them will be able to do it and can show the others how.

Edited by Human Person
Link to comment
Share on other sites

@Klapaucius:

As @Flavio hc16 said, disallowing stock vessels is a setting available under custom difficulty at the beginning of the save.  However, I think you can change the setting inside the pause menu at KSC.  If not, I believe that you can force-change it from the save's settings file, but I'll have to do a bit of research before I know for certain.

For the rest of it, I suppose that you could use the Mission Builder from Making History, but it's not part of the base game and you may not be interested in paying USD $15 per copy--especially for the v1.0 release (yes, I know it's KSP v1.4.1 but it's v1.0 of Making History) since you can well expect that Making History will have a point release in the next couple of weeks.  Squad's Q&A people are good but they're not omniscient.

For removing parts, there are a few ways to accomplish this.  Probably the most user-friendly is, as @Human Person said, to use Janitor's Closet.  As of this post, it is compatible with KSP v1.3.1.  It's not the most straightforward user interface, but it has a few advantages:  for one thing, its default behaviour is to hide parts, rather than remove them.  That lets you load vessels that may have inadvertently used a part that you don't want the students to use but without breaking the game.  Second, you have to click on the part itself in the Vehicle Assembly Building or Spaceplane Hangar to hide them, which is easier than getting into the part configuration files and finding that the file names are not the part names, are slightly different from the part names, or are named part.cfg.  It also lets you export your disallowed parts list, so you would only need to manually filter the parts once.  Third (and probably weighing the most in its favour), you can add the Janitor's Closet to an existing save:  the work you put into flying and landing your scenario ships will not have been wasted.

Another way is to write a Module Manager patch.  This would also let you copy the file to different copies of the game, so you'd only have to write it once, but it would be a bit more difficult to do because you have to know the part name in order to disallow it.  The code for doing this is very easy to learn, and it has the added benefit of being easy to revert--just remove the patch.  You don't do anything to the game's files.  This can also work with your existing save.

Also as Human Person said, Science Mode is a viable alternative, but it has less resolution than mods that allow you to remove individual parts; parts from locked nodes will not appear in the VAB or SPH parts list, but all of the parts from an unlocked node will be there.  This may suit your purposes; if you want to use only the parts from a specific technology level but still leave plenty of room to fail, then you can get your intuitive sense of rocket science without the overwhelming array of parts.  To set up the game after starting Science Mode, use the Alt+F12 menu to cheat in a ton of science points, unlock the parts that you want, and then use the Alt+F12 menu to cheat away the science points that are left.  This does require making a new save, though, so weigh it carefully.

As a side note, you may want to keep the Kerbal X stock vessel (you can do that by copying the craft file from the game's Ships folder to your save file's Ships folder) because it is a good example of a Mun-capable rocket that nonetheless has problems and can be improved.  Specifically, the Kerbal X is perfectly capable of reaching the Mun, but returning from the Mun depends entirely on the skill level of the player.  There are a few things that the player can do to improve the mission (including becoming a better pilot) and that's part of the challenge of the stock rockets:  they each do something adequately, but not so well that they cannot be improved.

Edited by Zhetaan
Link to comment
Share on other sites

I agree with @Zhetaan on using a Module Manager patch. I would in fact suggest it above Janitor's Closet, because the mod would add an interface and additional functionality to the game that your students might stumble over by accident. Unless you plan to utilize the ability to unlock additional parts in the middle of a lesson, the MM patch is the better choice because it gives you a game that looks completely unchanged from stock KSP except for the absence of whatever parts you wish to filter out.

And yes, the syntax is indeed easy. It's so easy I can write it off the top of my head, without even having access to a copy of KSP at the moment.

@PART[partname1,partname2,partname3,etc,etc]:FINAL
{
    @category = None
    @title = __removed__
    !tags
}

This patch hides the parts by setting them to show up in a part category that doesn't exist, so there is no way to view them. The tags list is cleared as well, to prevent the part from showing up in most searches with the search bar at the top of the parts list. It will probably still show up if its exact name is searched, but that can't really be prevented. Actually, no, it's a simple thing to replace the ingame title with garbage.

The part names you have to put into the comma-delimited list in the square brackets are the internal part names defined in the config files of each part, right at the top. Example: the LV-T45 Swivel engine has the internal part name "liquidEngine2". I recommend you make a one-time effort to compile a list with all the part names in a separate file; that will make customizing the patches easier going forward.

Edited by Streetwind
Link to comment
Share on other sites

On 3/13/2018 at 9:51 AM, Not Sure said:

Side question, what parts would you remove? I’d say they’re all pretty functional, don’t see what ones would hurt.

IMO, if they aren’t modivated to go to the Mun, then they won’t go there. And remember it takes most of us many many missions to land on the mun and return.

Thanks for the advice.  I'd remove all the aircraft parts for the moment. When they focus on one thing, they do really well, but there are just too many other bits. One of them goes off flying and crashing planes, and the whole group gets distracted.  Also, I want to keep it simpler to start. There is so much to search through in Sandbox mode, and if you don't know what you are looking for, you can get bogged down when you are new.  There is a big learning curve in this game, and you need to get past that before you start really learning the orbital mechanics. 

 

On 3/13/2018 at 10:53 PM, Human Person said:

The easiest solution would be to use science mode and make sure only the essential parts have been unlocked in the tech tree.

 

The best solution is the DLC which will be released today. You can make custom missions ion the mission builder (I think you can even specify which parts are allowed)

 

another option would be to make your own mod that contains only the parts you wanted and use Janitors Closet to filter everything else out.

 

 

Also, don't take this too seriously, let them play around. I'd set challenges in the class like "get into orbit". at least one or two of them will be able to do it and can show the others how.

Yes, I think for the moment doing it in Science mode is the best option. As mentioned above, I've saved a game in various stages which I can then use to focus on one particular task. eg. focusing on getting to the Mun from orbit without having to worry about the launch every time.  Some of the kids are very capable but have trouble focusing, so I want to cut down distractions.

And yes, if we can afford the licenses, the new expansion may be just the ticket. I've bought it for myself and will have a play over the next week and see how it goes.

 

@Zhetaan

Thanks so much for the detailed response. I will look into those mods.

 

@Streetwind

Thanks as well. Alas, I don't know a thing about coding...at least not yet.  For the moment I don't have the skills for that, unfortunately.

Thanks everyone for the advice.

 

 

Edited by Klapaucius
typo
Link to comment
Share on other sites

3 hours ago, Klapaucius said:

Thanks as well. Alas, I don't know a thing about coding...at least not yet.  For the moment I don't have the skills for that, unfortunately.

What coding? I already wrote everything out for you. All that's left for you to do is the liberal application of copy and paste :P 

But if you'd rather not deal with it, that's fine too. You have options, after all.

Link to comment
Share on other sites

4 hours ago, Streetwind said:

What coding? I already wrote everything out for you. All that's left for you to do is the liberal application of copy and paste :P 

But if you'd rather not deal with it, that's fine too. You have options, after all.

I think that proves how little I know :confused:  Actually, I should not say that. I'm just in the very very beginner stages of learning Javascipt, but I am an absolute beginner to coding. I'm also new to KSP so I have not played around much with Mods etc.

So how to I actually apply the patch?  Do I just paste that into a txt file? And where do I put it? I'm assuming it just goes in the GameData folder like a mod?

Thanks again.

Edited by Klapaucius
rewritten for better clarity
Link to comment
Share on other sites

2 hours ago, Klapaucius said:

So how to I actually apply the patch?  Do I just paste that into a txt file? And where do I put it? I'm assuming it just goes in the GameData folder like a mod?

Correct.  Usually, in the interests of reducing GameData folder clutter, I put my self-written patches in a folder called PatchesMyPatches, or, if I'm feeling frustrated, ZhetaansCrazyAttemptsToBreakTheGameByInsufficientKnowledgeOfCoding, but that takes a long time to type.  The point is to keep your own modifications in one place for easy access later.

Link to comment
Share on other sites

47 minutes ago, Zhetaan said:

Correct. (...)

Actually, no, not correct. :P There are steps missing. You have to keep in mind that  @Klapaucius has never been in contact with Module Manager before.

Here's the most-detail-possible step-by-step process (I assume you use Windows, since the vast majority of players does):
- Download Module Manager. 1.3.x here, or 1.4.x here, depending on what KSP version is in use.
- Put the downloaded DLL file directly in GameData, not in a subfolder.
- Copy the code snippet I wrote for you and paste it into a text file. It does not matter what you call it.
- Put this text file somewhere in GameData. Anywhere is fine, subfolder or no subfolder. Up to you.
- Tell Windows to show file extensions, if you have not done so in the past. It's a checkbox in the View menu in the file explorer.
- Rename your text file, changing the extension from .txt to .cfg, and confirm the following warning dialog (it is without consequence).

You now have everything you need to load patches, and you have added the patch. However, it will not actually do anything yet, because it is not targeting any parts yet.

Attempt to open your newly renamed file, and choose Editor/Notepad as the program you want to use. Make sure "always open this file with this program" is checked. Now you can continue to edit it as if it was a plain text file. In addition, Windows now knows that all files ending in .cfg are to be opened in this way. This is important, because you're going to be opening a lot of them now.

Navigate to .../GameData/Squad/Parts/. All the stock parts are stored here. Since you want to remove plane parts, let's start with that as an example. Open Aero, and then open Wings. You will find a list of files, a lot of which will be .cfg files. Open any one of them. Right at the top, you will see the first data field, called 'name = something'. Every part in the game has a .cfg file, and every one of these files has the name field right at the top. This is the internal part name that you need.

Copy the internal part name. Paste it into your patch file, in between the square brackets. You should remove all the placeholder text I put there. Save the file. If you start the game now, you will be unable to find this part in the craft editor. When you add a second part name in between the square brackets, separated from the first by a comma, just like my placeholder text showed, then that part too will be hidden. And so on.

As you probably already guessed, you now have a bit of initial setup work to do, because there are a lot of parts. (But then again, you have that setup work regardless of which solution you choose.) As I already recommended to you earlier, you should probably make yourself a list of all parts and their internal part names, so that in the future, you don't have to dig for the part configs again and again whenever you want to hide or unhide a part.

There's also a handy trick you can use. When looking at the wings, you'll notice that a lot of them have similar names. wingConnector, wingConnector2, wingConnector3, wingConnector4... If you encounter such a case, you can save yourself some work by simply writing wingConnector* to hit all of them at once. The asterisk is a so-called wildcard character, and means "any and all text that may or may not follow".

 

Edited by Streetwind
Link to comment
Share on other sites

6 minutes ago, Streetwind said:

Here's the most-detail-possible step-by-step process (I assume you use Windows, since the vast majority of players does):

 

Just brilliant. Thanks all of you. I'll give it a try this evening when I get home from work and see how we go.

Link to comment
Share on other sites

27 minutes ago, Streetwind said:

Actually, no, not correct. :P There are steps missing. You have to keep in mind that  @Klapaucius has never been in contact with Module Manager before.

Apologies; you're right.  I completely missed converting the .txt to a .cfg file.  Have a like.

One more thing, @Klapaucius:  on your mad quest to hide the aeroplane parts, don't hide the basic fins (basicFin is the internal part name) or the AV-R8 (R8winglet), AV-T1 (winglet), and delta (winglet3) winglets.  You'll need them for your rockets--you may decide not to have such a large selection, but you'll need something.  There are other technically-aero parts that you may wish to keep as well (nose cones, perhaps?), but you can do without if you're using the single-seat pod or fairings.



As a somewhat on-topic side note:

Once, a student went to see Professor John Von Neumann after a calculus lecture and asked, 'Professor Von Neumann, I don't understand how you got the answer to the last problem on the board'.  The professor looked at the problem for a minute and said, 'ex'.  The student thought he had been unclear, and said, 'I know that's the answer, Professor, but I don't see how to get there'.  Von Neumann looked at the student for a minute, stared into nothing, and repeated, 'ex'.  The student, now frustrated, asked, 'But how did you get that answer?'  Von Neumann turned to the student and said, 'Look kid, what do you want?  I just did it for you two different ways'.

The moral of the story is that sometimes, we get so caught up in helping new players with this game that we wonder why they haven't mastered it yet.  It's good to have people like @Streetwind who know how to throw a tether.

Link to comment
Share on other sites

8 minutes ago, Tyko said:

You can also use Janitor's Closet mod to hide parts.

As was suggested multiple times further up already... :P

The advantage of Module Manager is that there is no ingame GUI that the students can find and unlock the parts again while the teachers aren't looking, or accidentally hide more parts without knowing how to bring them back.

Link to comment
Share on other sites

10 minutes ago, Streetwind said:

As was suggested multiple times further up already... :P

The advantage of Module Manager is that there is no ingame GUI that the students can find and unlock the parts again while the teachers aren't looking, or accidentally hide more parts without knowing how to bring them back.

Sorry...I'd skimmed the previous posts and missed it. thanks!

Link to comment
Share on other sites

On 3/13/2018 at 10:53 PM, Human Person said:

The best solution is the DLC which will be released today. You can make custom missions ion the mission builder (I think you can even specify which parts are allowed)

I've started playing around with the Mission Builder, and you are correct. You can create a parameter where you either have a created ship already in action or "player built".  With player built you can both require certain parts to be used and you can restrict what parts are available.

The only obstacle is that we have 50 licenses we'd need to update, so I'd have to make a case for that to folks up the food chain.  It also probably makes sense to hold off for  a bit until some of the bugs are dealt with.

Link to comment
Share on other sites

3 hours ago, fourfa said:

@Klapaucius are you aware of Kerbal EDU?

https://kerbaledu.com/

I don't know any of the details, but hopefully it's a system set up to deal with your multiple-site-license issue as I imagine all teachers face the same problem.  Worth inquiring.  Or if anyone here knows more details...

We are a public library with community learning centers for students and adult education, and we are already using the EDU version.  Given the Mission Builder in the new add-on, I might see if we can get that expansion added, however, while it is ony $15 per license extra for us, however with 50 licenses, that translates to $750, so I will have to make a case for it.

But thanks for the suggestion :-)

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