Maintance overhaul

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
S-P
Dangerous
Dangerous
Posts: 64
Joined: Wed Aug 10, 2011 8:34 pm

Maintance overhaul

Post by S-P »

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?
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Maintance overhaul

Post by CommRLock78 »

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?
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.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Maintance overhaul

Post by Cody »

I think it's 1% of the ship's total value (including kit), and the frequency is variable, depending on how much combat/number of jumps.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Maintance overhaul

Post by CommRLock78 »

I was just on the wiki poking around - it doesn't appear to have anything in the manual or FAQ about overhauls - perhaps there should be some details about how overhauls work since it seems to be a common inquiry.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Maintance overhaul

Post by Cody »

[EliteWiki] Maintenance - that covers the basics.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: Maintance overhaul

Post by CommRLock78 »

Cody wrote:
[EliteWiki] Maintenance - that covers the basics.
Ah geez - :oops: - I should have figured :). That's what I get for not typing "maintenance" into the search form :roll: . Although, it does look like the article could be expanded :D.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Maintance overhaul

Post by Eric Walch »

If you want to puzzle. The used formula in original code is:

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
}
The value ship_trade_in_factor varies between 75 and 100. (read it as a percentage) It will never drop below 75 during combat.

A renovation is only offered when the 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
So, anyone that wants to update the wiki page with above in plain English. :D

EDIT: This was still missing in above puzzle:

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);
}
Last edited by Eric Walch on Fri Apr 05, 2013 7:55 pm, edited 4 times in total.
S-P
Dangerous
Dangerous
Posts: 64
Joined: Wed Aug 10, 2011 8:34 pm

Re: Maintance overhaul

Post by S-P »

Many thanks for clearing that up for me guys. :D
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Maintance overhaul

Post by Eric Walch »

The calculation was always a bit vague, but now the value itself is exposed to the JS system, it is better that scripters know how Oolite itself deals with it.
Post Reply