Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JonnyOThan opened this issue Jan 8, 2024 · 4 comments
Open

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

JonnyOThan opened this issue Jan 8, 2024 · 4 comments

Comments

@JonnyOThan
Copy link

JonnyOThan commented Jan 8, 2024

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 + 500*2. 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
Copy link

yzmengnan commented Jan 8, 2024 via email

@sswelm
Copy link
Owner

sswelm commented Jan 8, 2024

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

@JonnyOThan
Copy link
Author

JonnyOThan commented Jan 9, 2024

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
Copy link
Owner

sswelm commented Jan 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants