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

Resource cost is applied twice #178

Closed
pellinor0 opened this issue Feb 18, 2017 · 1 comment
Closed

Resource cost is applied twice #178

pellinor0 opened this issue Feb 18, 2017 · 1 comment

Comments

@pellinor0
Copy link

stock wet cost becomes dry cost when MFT is installed.

Example Rockomax X200-16:
stock: dry=816, wet=1550
with MFT: dry=1550, wet=2284

@Starwaster
Copy link
Contributor

Confirmed. And the discrepancy is by exactly the cost of the resources. (in the example given by @pellinor0 the discrepancy corresponds to the default LF-O ratio but it could actually vary depending on specific resources assigned by the player). For the big 3.75m stock tanks this is a big hit for the player: A 13000 fund tank balloons to 19610.

Probably an issue with ModuleFuelTanks.GetModuleCost() which I see two things going wrong in:

  1. It's returning a set amount instead of an offset (GetModuleCost calculates the cost but returns that value which is then seen by stock KSP as an amount to increase the part cost by)
  2. Only resource costs are getting calculated here. The code may support dry tank cost calculation but that needs a baseCost to be configured. (Applies to MFS, not to RF which does handle dry costs for tanks in its configs)

DRVeyl added a commit that referenced this issue Mar 18, 2022
Fix #178
Let stock handle that, we provide an offset to the calculated cost = the value of the tanks, not the resources in them.
DRVeyl added a commit that referenced this issue Mar 29, 2022
Fix #178
Let stock handle that, we provide an offset to the calculated cost = the value of the tanks, not the resources in them.
DRVeyl added a commit that referenced this issue May 16, 2022
Fix #178
Let stock handle that, we provide an offset to the calculated cost = the value of the tanks, not the resources in them.
DRVeyl added a commit that referenced this issue Jun 4, 2022
Fix #178
Let stock handle that, we provide an offset to the calculated cost = the value of the tanks, not the resources in them.
NathanKell pushed a commit that referenced this issue Jul 4, 2022
Fix #178
Let stock handle that, we provide an offset to the calculated cost = the value of the tanks, not the resources in them.
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

2 participants