Astatium_209
Alliance’s Executor // Unstable and Toxic
TEAM HAWK
Moon Maker
Swingin' on a Star
Atlas
Deja Vu
Fly me to the Moon
Under Pressure
Copycat
Registered
MOTY 2021
'ello 'ello,
I've been experimenting with quicksave editing to get a piston to work, specifically in the "joints" list that's in the rockets.txt file. The point was to be able to get some tight tolerances on sliding parts, which would have otherwise ended with the parts connected.
Joints are just lists of dictionaries which contain the indexes of the connected parts. If we want to connect the first and fifth part, the joint would look like this: {"a": 0, "b": 4}. That's all.
(This part may be incoherent, feel free to skip, and you have been warned)
Now, adjusting all of the connections manually would be a right pain in the neck, and as such, I made myself a python script that does it for me. To distinguish which parts belong to the piston and which to the housing, I used a, perhaps inelegant, but functional method of adjusting orientation values to a number that is unlikely to appear by course of normal part placing or manual bp editing, i.e. "o": {"x": 1.0} could be changed to "o": {"x": 0.991234}. Once the script is run, it's runs through the parts and identifies the indexes of parts of interest, at the same time assigning them to their proper connection groups. After this is done, the necessary joints are created. Certain joints will need to be disconnected, so we need to check for those and remove them if they appear.
Apon loading a quicksave into the world, the old joints will remain up until any separation event, during which the game goes through the joints and updates the craft.
Here's the result (Imgur link):
It's actually quite smooth, the gif compression makes the video stutter.
Here's a look inside the build screen:
I plan to use this on a lunar lander landing leg.
I've been experimenting with quicksave editing to get a piston to work, specifically in the "joints" list that's in the rockets.txt file. The point was to be able to get some tight tolerances on sliding parts, which would have otherwise ended with the parts connected.
Joints are just lists of dictionaries which contain the indexes of the connected parts. If we want to connect the first and fifth part, the joint would look like this: {"a": 0, "b": 4}. That's all.
(This part may be incoherent, feel free to skip, and you have been warned)
Now, adjusting all of the connections manually would be a right pain in the neck, and as such, I made myself a python script that does it for me. To distinguish which parts belong to the piston and which to the housing, I used a, perhaps inelegant, but functional method of adjusting orientation values to a number that is unlikely to appear by course of normal part placing or manual bp editing, i.e. "o": {"x": 1.0} could be changed to "o": {"x": 0.991234}. Once the script is run, it's runs through the parts and identifies the indexes of parts of interest, at the same time assigning them to their proper connection groups. After this is done, the necessary joints are created. Certain joints will need to be disconnected, so we need to check for those and remove them if they appear.
Apon loading a quicksave into the world, the old joints will remain up until any separation event, during which the game goes through the joints and updates the craft.
Here's the result (Imgur link):
It's actually quite smooth, the gif compression makes the video stutter.
Here's a look inside the build screen:
I plan to use this on a lunar lander landing leg.