Page 1 of 1

Expose gravity information at runtime

Posted: Thu Mar 19, 2026 6:43 pm
by PFQNiet
I'm trying to make a "flight time calculator" tool, and that is a function of:

- Thrust
- Platform weight
- Platform width
- Distance
- Gravity at origin and target

Thrust can be tricky since that's adjustable with throttling but I'll worry about that later. The big thing missing is the gravity values, as these are only defined on the prototype stage and not exposed on LuaSpaceLocationPrototype.

I would be very grateful to have this information, because when I hardcode it for testing purposes I get flawless results.

Re: Expose gravity information at runtime

Posted: Sun Mar 22, 2026 7:37 pm
by braxbro
For now as a workaround you can rip those values in final-fixes and put it in a ModData object, but I do agree - no reason not to have that exposed as a prototype member in runtime.

Re: Expose gravity information at runtime

Posted: Tue Mar 24, 2026 5:59 pm
by protocol_1903
+1

Re: Expose gravity information at runtime

Posted: Thu Mar 26, 2026 3:51 pm
by Rseding91
Ok, I added that, and the rest of the values from the prototype for 2.1.