sswelm / KSP-Interstellar-Extended

continuation of KSP Interstellar
Other
98 stars 99 forks source link

Dry cost on switched parts and cost scaling seems incorrect #731

Open JonnyOThan opened 8 months ago

JonnyOThan commented 8 months ago

https://github.com/sswelm/KSP-Interstellar-Extended/blob/8a55a180d0f940510ffc508df90e915c05dd81b8/FuelSwitch/InterstellarFuelSwitch.cs#L941C106-L941C106

I don't understand the logic behind this line...if you switch a FL-t400 tank to monoprop, it costs 536 funds dry (why? a dry fl-t400 with LFOX costs 316). Then scaling it up to 2.5m (2x linear scale, 8x volume scale) makes it cost 3531. This is the result of 316.4 8 + 5002. I would have expected the cost to be either 2531 (if the unscaled cost is supposed to be 316), or 4288 (if the unscaled cost really is supposed to be 536). Or maybe even 536 + 1500 or something (if you're trying to make the dry cost scale with the surface area).

yzmengnan commented 8 months ago

邮件已收到。

sswelm commented 8 months ago

The code may look weird but originaly its was is to compensate for Tweaksize scaling.

JonnyOThan commented 8 months ago

Well sure, but the behavior I described is with tweakscale installed (and IFS depends on tweakscale in ckan at least). So is there a bug here, or in tweakscale?

is the dry coat supposed to increase with scale factor squared or cubed?

sswelm commented 8 months ago

Well my main concern was wether or not it worked orrectly for the realy expansive containers, like with antimatter. By default cost grows by cube, but for some realy cheap resources this was different. By I admit I forgot the exact intricaties. Just know that if you want to use or modify it, you need to test it with a wide variarity of containers and resources.