Jump to content

Quick question about parts/tech/careermode mod making


tjsnh

Recommended Posts

I'm considering creating a small mod just for personal use to re-arrange where some of the parts are on the tech tree. Not renaming any techs or anything serious, but for example just swapping a few things to lower or higher tiered techs.

Other then changing the TechRequired = [whatever] in the /parts/type/part/part.cfg file is there anything else that needs to be done?

If I want my mod to work with the ARM pack (but not modify/move any of the parts it added) any special considerations?

Link to comment
Share on other sites

My suggestion is to use a Module Manager .cfg file to update the "TechRequired" values -- that way, you can add whichever mods you like, and a well-written MM .cfg should work for both 0.23.0 and 0.23.5. (As well as forward-compatability to 0.24, etc.)

http://forum.kerbalspaceprogram.com/threads/55219-Module-Manager-1-5-6-%28Jan-6%29

My understanding is that TechRequired is the only change you'd need to make, but that your values may be overwritten if you use TreeLoader to load an alternate science tree.

Link to comment
Share on other sites

So I've created a mod (just called "CareerTweaks" for now) and created a sub folder with the correct tree behind it for the staputnik probe core, copied the files (and folder name) from the squad defaults and just changed the tech required to "start".

Loaded game, allows the core right from the start as desired, but it doesn't seem to have "overwritten" the squad default - there is still a stayputnik core further up the tree, and inf act now there are two of them assigned to the tech it normally needs - for a total of THREE stayputniks in the tech tree.

What have I missed here?

Link to comment
Share on other sites

Welcome to modding, you've just successfully built your first mod. :D

Let's see, what have we missed?

1. As you've found, copying the full part folder will add a duplicate part to your game.

If you want the OLD stayputnik to go away, you'd need to delete it out of the Squad folder. However, that puts you in the position where, when 0.24.0 comes out, you have to do that again .. and if the 0.24.0 Stayputnik has some other change in it, you either risk missing that change (keeping your 0.23.5 Stayputnik file) or having to re-apply your changes by hand (copying the new 0.24.0 Stayputnik, and then changing the techRequired).

That is why my recommendation was to use the Module Manager 2.0.1 - linked at page 52 of that thread, here: Module Manager 2.0.1.

2. The "uniquifier" is the name= portion of the part.cfg

If your only change was to the techRequired line of the config file, your change placed two items with the same "name", which can cause look-up problems. So, at the top of your version, change the "name=" line to a different new name. I presume that's why its showing up twice in the tech tree, unless you made more than one copy of the part folder.

(We could verify that, for example, by not fixing the "name" but instead changing the "title" entry, which is the value displayed to the user.)

= = =

Here is a sample ModuleManager configuration for you:

@PART[probeCoreSphere]
{
@TechRequired=start
}

That would give you an MM config capable of re-appling this change to any version of the game, e.g., 0.23.0, 0.23.5, 0.24.0, etc, without the "duplication" bug.

Link to comment
Share on other sites

I was worried about that (about mods not taking precedence over the squad folder, and needing to make edits there to avoid conflicts). That module manager seems pretty useful for making this less painful, thank you!

Link to comment
Share on other sites

You're welcome - please feel free to ask as many questions as you need.

and yeah, before the guys created Module Manager it was a nightmare to try and get all the part configurations lined up each time a new release came out.

I do strongly support your approach, though, playing around with stuff, breaking it terribly, getting it back to working :) Best way to learn!

Link to comment
Share on other sites

This is exactly what I was thinking yesterday

I tried to post this today, but I think the forums ate it. So I will reply here instead.

  Quote
Hi folks,

since I find the stock tech tree to easy, I looked for mods for a newly started save.

But all I found were tech trees that are tied to game altering mods like BTSM, as well as mods that require to copy a bunch of .cfg files to your GameData/Squad folder.

I wanted to use ModuleManager, but there doesn't seem to exist a MM using tech tree mod.

So I decided to write a little recursive descent parser for Squads .cfg files, written in Java.

It is bundled with an example tool that prints all the part RequiredTechs in a nice ModuleManager-ready list.

You will find the parser and example tool here:

http://pastebin.com/NyCZJhHk
http://pastebin.com/xGy8WEra

Just drop it in a java package folder called ksp, compile it with

javac ksp/*.java

and run it like

java ksp.Example C:\KSP\GameData\Squad\Parts

License: Do what you want with it.

The output when run on a stock game:

http://pastebin.com/qqcGJmmd

Partial output:

@PART[AdvancedCanard]
{
@TechRequired = hypersonicFlight
}
@PART[StandardCtrlSrf]
{
@TechRequired = aerodynamicSystems
}
@PART[airplaneTail]
{
@TechRequired = aerodynamicSystems
}
@PART[CanardController]
{
@TechRequired = hypersonicFlight
}
@PART[deltaWing]
{
@TechRequired = supersonicFlight
}
@PART[noseCone]
{
@TechRequired = stability
}
...
...

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