Closed Dunbaratu closed 3 years ago
I'll look into it, I'm not at all surprised that module cost modifiers aren't being applied on recovery. Fair warning though, it may prove to be the case that this isn't fixable from B9PartSwitch's side, i.e. that it's a fundamental limitation of KSP's vessel recovery logic. But we'll see.
So it's looking like KSP ignores module cost on recovery and there's probably not anything I can do about that.
This is a "feature" since KSP 1.11 or so. The KSP Recall mod has a temporary workaround.
If this is not B9PartSwitch's fault, but something in KiwiTechTree, I apologize for reporting it in the wrong place. I am assuming it's B9PartSwitch because that's the mod that does the part variant switching for KiwiTechTree, which is where I encountered this.
Screenshots showing a small basic example, using KiwiTechTree's adjustments to this probe core:
Stock cost of the part is 7500 funds:![screenshot42](https://user-images.githubusercontent.com/5216848/108629872-98bcf900-7427-11eb-8826-18b986318cbc.png)
KiwiTechTree uses B9PartSwitch to give this part a variant that has more ElectricCharge, and costs more (7968 funds):![screenshot43](https://user-images.githubusercontent.com/5216848/108629906-c0ac5c80-7427-11eb-8c15-a2eee19386aa.png)
When I launch the 7968 fund variant of the part to the runway, then recover, I don't get the full cost of the vessel refunded like would happen in stock. Instead I get only 7500 back, which is the stock price of the part, not the B9PartSwitch adjusted price of the part:![screenshot47](https://user-images.githubusercontent.com/5216848/108629926-d7eb4a00-7427-11eb-8a49-f317ede6b635.png)
The cost adjustments that B9PartSwitch does to the parts doesn't seem to be taking effect during KSP's "recover vessel" system, as far as I can tell, making this either steal money from the player (when the adjusted part cost is higher than stock), or grant free money to the player (when the adjusted part cost is lower than stock.)
I was testing a ship I was going to send to Duna and was fiddling with the ladder positions to test that it would work, and i was noticing my funds dwindling, and I traced the cause down to this. Every "put it on launchpad and test it" iteration I was doing was refunding about 10,000 fewer funds back than it was costing.