SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

Engine copypaste parameters miscalculation

atomontage04 opened this issue ยท 3 comments

commented

Engines incorrectly calculate their thrust after getting copied if they have more than one chamber. Other parameters remain correct (for me).

Steps to reproduce:

  1. put an engine on a vehicle in VAB (personally I tested the Merlin-1A, RL10A-3 and the F1)
  2. make it have 2+ chambers (double, triple, doesn't matter)
  3. copy it with alt+LMB
  4. replace the installed version with the copy

steps 3 and 4 are reproducable too: you can copy a copy, replace the original engine that is installed and get x4 thrust boost (if the initial version had double chambers).

KSP ver: 1.3.1.1891 (x64)
SSTU ver: 0.7.38.144

Tested on a clean stock install with SSTU only and KER/MJ to monitor thrust (tested with both one after another to exclude potential conflicts).

My friend who runs an RSS+RO install that is heavily modded gets different bug though. He gets mass multiplication. And its not that easy reproducable. Sometimes it multiplies and sometimes it does not. Probably its the RO configs which mess with the bug. He has RO v1762. The SSTU ver is the same as mine.

I'm not sure if a screenshot is required because the bug seems to be easily reproducable. But here it is. 9 chambers, copy-pasted multiple times.
(https://user-images.githubusercontent.com/4963365/32514319-51e9beda-c405-11e7-8a2c-d5b010e99723.jpg)

commented

Good find. Apparently there a few bugs in SSTU caused by the stock-codes (absolutely terrible) part-copying mechanics.

commented

Thought that I had a solution... but apparently I'm going to need to investigate more.

commented

Unity serialization... yech.
Had to resort to splitting up a multidimensional array into a flat values array, and a secondary array of lengths. Ugly.