Maintance overhaul
Posted: Fri Apr 05, 2013 5:03 pm
Anyone know how the cost is calculated and how the amount of upgrades installed effects the overall cost? Also how long is it between overhauls?
For information and discussion about Oolite.
https://bb.oolite.space/
I'm not sure about the details of how things are calculated, but basically it has to do with how much damage you receive, particularly when you shields are spent, and of course, how long since your last overhaul.S-P wrote:Anyone know how the cost is calculated and how the amount of upgrades installed effects the overall cost? Also how long is it between overhauls?
Ah geez - - I should have figured . That's what I get for not typing "maintenance" into the search form . Although, it does look like the article could be expanded .Cody wrote:Maintenance - that covers the basics.
Code: Select all
- (double) renovationCosts
{
OOCreditsQuantity shipValue = [UNIVERSE tradeInValueForCommanderDictionary:[self commanderDataDictionary]];
double costs = 0.005 * (100 - ship_trade_in_factor) * shipValue;
costs += 0.01 * shipValue * [self missingSubEntitiesAdjustment];
return cunningFee(costs, 0.05); // rounding
}
ship_trade_in_factor
varies between 75 and 100. (read it as a percentage) It will never drop below 75 during combat.ship_trade_in_factor
drops below 85. And the resulting repair is calculated as:
Code: Select all
ship_trade_in_factor += 5 + techLevel; // you get better value at high-tech repair bases
Code: Select all
- (NSInteger) missingSubEntitiesAdjustment
{
// each missing subentity depreciates the ship by 5%, up to a maximum of 35% depreciation.
NSUInteger percent = 5 * ([self maxShipSubEntities] - [[[self shipSubEntityEnumerator] allObjects] count]);
return (percent > 35 ? 35 : percent);
}