Jump to content

Adding parts to RP-0/1?


Recommended Posts

So I'm currently fiddling around with my RP-0 dev branch install and I wanted to add a few parts (ballutes, some modular station bits and a few toys from KSP Interstellar,) but it seems these don't play nicely with the new custom tech tree.  Regular module manager patches don't seem to work.

I've found the TREE-parts.cfg and managed to get one part to show up in the tree...but none of the others past that.

A sample of relevant lines from the TREE-parts.cfg:

	@PART[InlineBallute062]:FOR[xxxRP0]
{
    %TechRequired = interplanetaryRovers
    %cost = 400
    %entryCost = 5000
	    RP0conf = true
    @description ^=:$: <b><color=green>From Ballutes (RO Config) mod</color></b>
	}
	@PART[InlineBallute125]:FOR[xxxRP0]
{
    %TechRequired = interplanetaryRovers
    %cost = 1000 %entryCost = 10000
    RP0conf = true
    @description ^=:$: <b><color=green>From Ballutes (RO Config) mod</color></b>
	}

And so on down the line.

The .62m ballute shows up and seems functional, but the 1.25m (and all other parts) are nowhere to be found.  What am I messing up?

 

Quick edit:

OK, so I went in and modified the costs of Raidernick's Soviet Rockets (since they're hilariously expensive by default,) and now the ballutes have shown up, but not the other parts I added using the same format.  I'm confused.

Edited by TheDamDog
Link to comment
Share on other sites

Sample MM config:

@PART[PartName]:FOR[MyMod]:NEEDS[RP-0]
{
    %TechRequired = <The requested tech node>
    @description ^=:$: <color=green>From MyMod mod.</color>
    %cost = <part cost>
    %entryCost = <entry unlock cost>
    %RP0conf = True
}

If a part is not showing then check if:

  • The config format is correct.
  • The tech node actually exists.
  • The tech node is correct.
Link to comment
Share on other sites

  • 2 years later...

Neat!
I wrote a little script since I am lazy:

MOD_NAME=MIR
TECH_NODE=modularSpaceStations

for FILE_NAME in `find ../GameData/$MOD_NAME/ |grep cfg`
do
	PART_NAME=`grep -hrA 4 "^PART" ${FILE_NAME} |grep name | cut -d = -f 2|xargs| tr -d '\r'`
	if [ "$PART_NAME" != "" ] 
	then
		echo "@PART[${PART_NAME}]:FOR[${MOD_NAME}]:NEEDS[RP-0]"
		echo "{"
		echo "  %TechRequired = ${TECH_NODE}"
		echo "	@description ^=:$: <color=green>From ${MOD_NAME} mod.</color>"
 		echo "	@cost *= 1.2"
    		echo "	%entryCost *= 3"
    		echo "	%RP0conf = True"
		echo "}"
		echo ""
	fi
done

It grabs all the config files that start with PART and extracts the name. It will dump all in the same node, but you can always change that. It also makes an assumption on the cost based on the few examples that I saw.

capricorn:CKAN macluky$ . rp_config_create 
@PART[Mir_Core_Module1]:FOR[MIR]:NEEDS[RP-0]
{
  %TechRequired = modularSpaceStations
	@description ^=:$: <color=green>From MIR mod.</color>
	@cost *= 1.2
	%entryCost *= 3
	%RP0conf = True
}

@PART[Mir_DockingPortProbe1]:FOR[MIR]:NEEDS[RP-0]
{
  %TechRequired = modularSpaceStations
	@description ^=:$: <color=green>From MIR mod.</color>
	@cost *= 1.2
	%entryCost *= 3
	%RP0conf = True
}

Snippet of the output

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