AbuMaia Posted September 15, 2013 Share Posted September 15, 2013 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 More sharing options...
dc4bs Posted September 24, 2013 Share Posted September 24, 2013 (edited) 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 September 24, 2013 by dc4bs Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now