Jump to content

Help needed relocating parts on my station in orbit


Recommended Posts

I have a station in orbit, on which I noticed I made a building mistake as I added the last two components to it. I have two spotlights, intended to light the open docking ports, but instead lighting the docking ports to which I added the hab modules. I need to somehow edit the spotlights positions 90 degrees around the large orange fuel tank they're attached to, to put them in the right spot. Right now, if you were to look at the end of the tank, the lights are positioned at N and S. I need them to be at E and W.

Now I've found them in the persistent save file, and I think I know which sets of numbers needs to be edited, I just need help figuring out what to edit them to.

Here's part of the entry for one of the lights:

name = spotLight1
uid = 3600605496
mid = 321872164
parent = 9
position = -1.24575194604404E-07,-18.6309623718262,1.42497611045837
rotation = -7.105427E-15,-1,0,-4.37114E-08
mirror = 1,1,1
istg = 0
dstg = 0
sqor = -1
sidx = -1
attm = 1
sym = 12
srfN = srfAttach, 9

... and the other:

name = spotLight1
uid = 2846248987
mid = 321872164
parent = 9
position = 2.49150957642996E-07,-18.6309623718262,-1.42497670650482
rotation = 2.650556E-15,8.742278E-08,2.4869E-14,-1
mirror = 1,1,1
istg = 0
dstg = 0
sqor = -1
sidx = -1
attm = 1
sym = 11
srfN = srfAttach, 9

Link to comment
Share on other sites

  • 2 weeks later...

Looks like coordinates and rotation based from the root node.

I dealt with similar looking numbers coding moving parts in "Second Life" several years ago (Delorian gull-wing car doors, etc...).

I never did use math to do it though. I would edit the part to each position I wanted and then query it's location relative to root as the scripting code had commands built in to do that. Then simply paste those numbers "as is" into the final code used to move the part to position "xyz", etc...

EG:

During car code initialization, call "close door" to make sure it was in the right place, then call either function as needed.

function open door -> move part "A" to position "XYZ(2)" with rotation "ABC(2)"

function close door -> move part "A" to position "XYZ(1)" with rotation "ABC(1)"

I have no idea if it will work in KSP as it did in SL but you could try this:

1:Copy your current save game folder somewhere safe in case this all blows up in your face... ;)

2: Place an exact copy of the incorrect station section (except with the lights moved to the correct locations) on the launchpad.

3: Edit the save file and copy the location/rotation info for the lights from this new version.

4: Undock the section of the station that has these lights on it so it has the same root node as the template that you placed on the pad.

5: Rename the undocked section as needed to make it easy to find.

7: Edit the file and update the light coordinates with the new location/rotation numbers from the version on the pad.

8: If the lights are located correctly back in game then re-dock the corrected section.

If you don't want to or can't undock the affected section as it would become debris, it MIGHT also work if you could duplicate the entire station in the VAB ensuring you start with the correct root node. put that on the pad and get the light locations from that. I think that has less chance of success though as there could be slight rotation/position flaws due to docking ports not lining up EXACTLY in your orbiting station as they would coming pre-assembled from the VAB... But it still MIGHT be "close enough".

NOTE: ignore the parent id's, uids, etc. as they might be different. ONLY copy the position/rotation strings over.

EDIT: if the lights are on the original, 1st station (primary root) section, you could probably skip the undock/redock steps above...

I'm VERY interested in finding out if this idea works!

Edited by dc4bs
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...