The Unexplored World of Quicksave Editing

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#1
It's about time that I properly earn my title as the expert on Quicksave editing. In this thread (which is kind of a continuation of the previous thread of this title), I will be documenting the structure of the World Save Folders and the general formats of the files that can be found in each world. I will also be exploring old techniques which I've used in the past and new tricks I find along the way.

This thread will not be a tutorial. Feel free to ask me questions here. I've also been asking questions of yall (especially Altaïr and the planet editors), and I will continue to do so here.

While this thread will not be a tutorial, I do plan on documenting everything so I can make materials to teach everyone how to work with Quicksaves. Consider this my development thread for that project (so I will ask mods to delete unrelated conversations).

With that being said, let's get started!
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#2
One thing I've been looking into lately: Teleportation.
The qks records each independent ship's Position as an X-Y pair (same for the ship's velocity) which gives the information of the ship at the time of the save. Then, when you load the save, the game calculates the orbital data of every ship (and by ship, I mean every individual triangle on your map) you have in your save, and they will all start progressing along that orbit when the game loads.

Side-note: This is one reason why your save is a lot more efficient with less ships in it (although more parts on individual ships is also a drag on processing for different reasons).

With that being said, you can alter these values, and choosing new ones will teleport you to new places within the SOI. However, this also requires you to change the velocity of a craft to get the right orbit. For the purpose of SFS, this is the best formula to use to calculate the circular orbital velocity:

V = R*sqrt(g/(R + h))

V is the velocity, R is the Planet's radius, g is the planet's acceleration due to gravity, and h is the height of ths orbit above the planet's surface.
(This equation is a derivation of Newtons gravity equation v = sqrt(G*M/r))

So, with the orbital height we can calculate the position and velocity of the craft for a good orbit. To simplify things, it's best to start on an axis for position.
For Position, X=0, Y = R + h (in meters).
For Velocity, Y=0, X = V (in m/s)
Notice how Velocity is tangential to the position.

Example: For an Orbit of 60km above sfs Earth,
YPos = 375000, XVel = 1610.3
This is the orbit of my space station for the 1.5 challenges.

To get an orbit not on an axis is a little more tricky, as you have to deal with vectors to do so, and I'm not so much up to doing that (Dealing with vectors enough for school), but most people won't really need to do more than teleporting a ship to a planet's surface or to a circular orbit.

I'll put together a table of the sfs planets' radii and surface gravity at some point, and also some values people can use for easy teleports.
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
#3
Is this thread dedicated to 1.4?
 

James Brown

Thinker/INTJ/investigator/Natural Science lover
TEAM HAWK
Swingin' on a Star
Atlas
Deja Vu
Fly me to the Moon
Under Pressure
Registered
#5
Wow thank you qks expert!
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
#7
If you read the first post, you’d know the answer.
Only saw one reference to 1.5 about his space station orbit. I don't use .qks files. Not important. This is LT's thread let's see where he runs with it. I believe we are "cluttering" it up.
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#8
Sorry, you're right, I never specified.

Back in 1.4, the game used to use a single .qks file for each quicksave, and your persistent save too. Now though, the organization of quicksaves is more complex. Each save in 1.5 is actually a system of 4 files, "Version", "WorldState", "Branches", and "Rockets".

Also, these files are all .txt files now, the .qks designator is no longer in use. However, while this thread is 1.5, I may still refer to quicksaves as qks files just because that's the abrieviation I'm used to.
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
#9
Sorry, you're right, I never specified.

Back in 1.4, the game used to use a single .qks file for each quicksave, and your persistent save too. Now though, the organization of quicksaves is more complex. Each save in 1.5 is actually a system of 4 files, "Version", "WorldState", "Branches", and "Rockets".

Also, these files are all .txt files now, the .qks designator is no longer in use. However, while this thread is 1.5, I may still refer to quicksaves as qks files just because that's the abrieviation I'm used to.
I was just wondering if you knew about moving a ship , station or whatever to any world package. Say you've created a station in world 1 that you'd like to use in world 4 or any saved world. As far as teleporting I've found 3 ways to do that depending on your objective. Kiind of backed off that for now. The purpose of the game IS to move stuff with rockets. That's all I had to say. I'm looking forward to learning some new stuff:)
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#10
I was just wondering if you knew about moving a ship , station or whatever to any world package. Say you've created a station in world 1 that you'd like to use in world 4 or any saved world. As far as teleporting I've found 3 ways to do that depending on your objective. Kiind of backed off that for now. The purpose of the game IS to move stuff with rockets. That's all I had to say. I'm looking forward to learning some new stuff:)
Yes, that is entirely possible, and it's the reason I learned qks editing in the first place. More on that soon though, but I have exams this week, so this is far from my priority.
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#11
The 1.52 update has actually done something to really help one specific part of Qks editing: Not only is the Rocket Name helpful in-game, but the name value is stored the first line of the rocket's fragment (I refer to portions of the code which can be moved between quicksaves as fragments. Typically a fragment is a single rocket). That'll be so nice, we don't have to infer which rocket is which based on location and achievements list!
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#12
The 1.52 update has actually done something to really help one specific part of Qks editing: Not only is the Rocket Name helpful in-game, but the name value is stored the first line of the rocket's fragment (I refer to portions of the code which can be moved between quicksaves as fragments. Typically a fragment is a single rocket). That'll be so nice, we don't have to infer which rocket is which based on location and achievements list!
Ah, that will be interesting! I never tried editing qks, but I may consider it at some point :)
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
#13
Apropo to the teleportation have you played with the time travel aspect LT ? I'm not seeing a lot of applications at this point but in multiplayer or RP mode this might have some value. I don't know how much a tick equates to in real time. I'd hazard the guess that worldtime is unique to each created world and doesn't cross over as simply as location.
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#14
Apropo to the teleportation have you played with the time travel aspect LT ? I'm not seeing a lot of applications at this point but in multiplayer or RP mode this might have some value. I don't know how much a tick equates to in real time. I'd hazard the guess that worldtime is unique to each created world and doesn't cross over as simply as location.
I don't quite understand how time works in this game, so no, I haven't.
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#15
The only thing that changing the world time would affect is the planets though. World time doesn't factor into the rockets themselves. Theoretically, you could set the world time to get a certain alignment of the planets, but imo there's no practical way to do that (other than aligning all planets on the x axis at t=0
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#16
I don't quite understand how time works in this game, so no, I haven't.
I think the time is simply measured in seconds. I already used this to get a specific planet configuration, to be able to chain gravity assists without having to wait for an encounter (Grand Tour or Voyager 2 recreation). But you have to know what you do for this to work.
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
#17
I think the time is simply measured in seconds. I already used this to get a specific planet configuration, to be able to chain gravity assists without having to wait for an encounter (Grand Tour or Voyager 2 recreation). But you have to know what you do for this to work.
I was wondering if a solar system or group like eternia change location over time like in the real universe and where is 0,0 located?
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
#18
I think the time is simply measured in seconds. I already used this to get a specific planet configuration, to be able to chain gravity assists without having to wait for an encounter (Grand Tour or Voyager 2 recreation). But you have to know what you do for this to work.
My understanding of ticks is a way for the app to calculate events in real time in-between uses and a tick is a multiple of the CPU clock. Say events are transpiring at x number of units per y units of time the program takes those values and multiplies them by the number of ticks that have occurred since the last time the program was active. Not 100% accurate but keeps the CPU from having to perform second by second calculations to arrive at current values. This is based on how ticks are used in incremental games.
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#19
My understanding of ticks is a way for the app to calculate events in real time in-between uses and a tick is a multiple of the CPU clock. Say events are transpiring at x number of units per y units of time the program takes those values and multiplies them by the number of ticks that have occurred since the last time the program was active. Not 100% accurate but keeps the CPU from having to perform second by second calculations to arrive at current values. This is based on how ticks are used in incremental games.
It probably does, but the time values aren't ticks. You can tell that because it uses decimals. Here's the time value for my 1.4 world:
"worldTime": 1850738010.3588409,
Based on how long I played this world, this most likely is seconds, even accounting for time warps.
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#20
If that was seconds, it means about 57 years of in-game time, which pretty much checks out.
 

Lt. Snakestrike

The Kronian Serpent; Engineering Student
Head Professor
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#21
I was wondering if a solar system or group like eternia change location over time like in the real universe and where is 0,0 located?
No, 0,0 is always the center of the center planet. For the main solar system that planet is the sun. (Since stars are treated as planets in pretty much all respects).
 

bobbblair123

ሁልጊዜ ንጹህ የውስጥ ሱሪዎችን ይልበሱ
TEAM HAWK
Swingin' on a Star
Atlas
Fly me to the Moon
Under Pressure
Registered
#24
I got ticks from play time. It may be actual CPU clock speed. Not going to measure anything to the billionth of a second. Cool you can use it to align planets and synch different worlds. Still not seeing a lot of use for synching worlds. Yet. Lord I've been mooned! I'm blind!