Author Topic: Need help in understanding refit cost  (Read 2327 times)

0 Members and 1 Guest are viewing this topic.

Offline Iceranger (OP)

  • Registered
  • Commander
  • *********
  • I
  • Posts: 391
  • Thanked: 230 times
Need help in understanding refit cost
« on: June 27, 2020, 09:50:37 PM »
I did a few experiments to figure out the calculation for the refit cost.

It is known that the refit cost from class A to B, is the cost of components that are on B but not on A, then plus a size difference cost described in http://aurora2.pentarch.org/index.php?topic=8495.msg117467#msg117467.

This is an in-game screenshot of the refit detail screen, refitting from

Code: [Select]
Abilene class Ammunition Transport      626,779 tons       85 Crew       1,707.4 BP       TCS 12,536    TH 0    EM 0
1 km/s      Armour 1-652       Shields 0-0       HTK 19      Sensors 0/0/0/0      DCR 1      PPV 0
MSP 1    Max Repair 200 MSP
Cargo 625,000   
Lieutenant Commander    Control Rating 1   BRG   
Intended Deployment Time: 3 months   
The exact size of the above is 12535.56

to
Code: [Select]
Abilene - Copy class Ammunition Transport      751,999 tons       100 Crew       1,995.6 BP       TCS 15,040    TH 0    EM 0
1 km/s      Armour 1-736       Shields 0-0       HTK 22      Sensors 0/0/0/0      DCR 1      PPV 0
MSP 1    Max Repair 200 MSP
Cargo 750,000   
Lieutenant Commander    Control Rating 1   BRG   
Intended Deployment Time: 3 months   
The exact size of the above is 15039.97



The size difference cost can be calculated as
Code: [Select]
(200+4+84.2) * (15039.97 - 12535.56) / 12535.56 = 288.2 * 0.1997845 = 57.5779
which is rounded up to 58. So far so good.

However, there is another term 'refit overhead cost' of 80.7 coming out of somewhere. I don't know how it is calculated, but it seem to be 20% of the total cost of 403.5. Furthermore, if we add the 5 items, it comes to
Code: [Select]
200 + 4 + 84.2 + 80.7 + 58 = 426.9
There is a huge difference between this and the displayed total 403.5, which cannot be explained by rounding.

Other examples:



In all these examples, the total is not the sum of the listed items, but the refit overhead cost is always total * 0.2 rounded to the 1st decimal place.

Does anyone know what is this refit overhead cost and how the total is calculated?


 

Offline Iceranger (OP)

  • Registered
  • Commander
  • *********
  • I
  • Posts: 391
  • Thanked: 230 times
Re: Need help in understanding refit cost
« Reply #1 on: June 28, 2020, 09:26:22 AM »
After banging my head against the numbers a bit more, I realized that the 'refit overhead cost' is 20% of the total componnet cost, and there is a display bug showing it incorrectly.

In the first example, if we take 20% of the component cost:
Code: [Select]
288.2 * 0.2 = 57.64
288.2 + 57.64 + 58 = 403.84
This is close enough to the displayed 403.5, the difference can be explained in the rounding of size different cost and other costs.

For other examples:
Code: [Select]
(400+163.9+10)*1.2 + 229 = 917.68 vs 918

Code: [Select]
(200+79.7+10)*1.2 + 48 = 395.64 vs 395.8

Code: [Select]
6 * 1.2 + 1 = 8.2 vs 8.1

All can be explained by various rounding.

Looks like a bug report is needed :)
« Last Edit: June 28, 2020, 09:29:58 AM by Iceranger »
 
The following users thanked this post: Cosinus, skoormit

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11672
  • Thanked: 20455 times
Re: Need help in understanding refit cost
« Reply #2 on: September 12, 2020, 05:46:01 AM »
Fixed for v1.12
 
The following users thanked this post: Iceranger

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2837
  • Thanked: 673 times
Re: Need help in understanding refit cost
« Reply #3 on: September 12, 2020, 06:57:32 AM »
Fixed for v1.12

Something related but not exactly the same... but it does seem like when you scrap a ship you seem to gain 25% of the resources back PLUS the components. You then can scrap the components to get an additional 25% of them as well.

Not sure of this is intended, I think we are only suppose to get a total of 25% of total cost of a ship back.
 

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11672
  • Thanked: 20455 times
Re: Need help in understanding refit cost
« Reply #4 on: September 12, 2020, 07:09:50 AM »
Fixed for v1.12

Something related but not exactly the same... but it does seem like when you scrap a ship you seem to gain 25% of the resources back PLUS the components. You then can scrap the components to get an additional 25% of them as well.

Not sure of this is intended, I think we are only suppose to get a total of 25% of total cost of a ship back.

You should only get the components, fuel, supplies and ordnance. I can't find any code that gives you resources back as well.
 

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2837
  • Thanked: 673 times
Re: Need help in understanding refit cost
« Reply #5 on: September 12, 2020, 03:10:39 PM »
I did a test month or so ago where it seemed to work that way, I also did a test with 1.11 right now...

I basically started a new game, SM some component and built a typical 10000t destroyer with a cost of 1492 BP (mix of resources).

I then built four ships with SM in a fleet at Earth.

I then moved the fleet to Luna where I Created a Colony with 50 million people 20000 infrastructure and a 10000t shipyard with four slipways. There were no minerals at Luna, only the stuff I created.

I then proceeded to "scrap" all four ships. When this was done I had a bunch of components such as engines, weapons and sensors AND I also had exactly 1492 minerals on Lunas mineral storage, these minerals must be the 25% of the total cost of the ship, otherwise there is something else going on that I don't know what it is...   ;)
 

Offline Droll

  • Vice Admiral
  • **********
  • D
  • Posts: 1704
  • Thanked: 599 times
Re: Need help in understanding refit cost
« Reply #6 on: September 12, 2020, 03:15:05 PM »
I did a test month or so ago where it seemed to work that way, I also did a test with 1.11 right now...

I basically started a new game, SM some component and built a typical 10000t destroyer with a cost of 1492 BP (mix of resources).

I then built four ships with SM in a fleet at Earth.

I then moved the fleet to Luna where I Created a Colony with 50 million people 20000 infrastructure and a 10000t shipyard with four slipways. There were no minerals at Luna, only the stuff I created.

I then proceeded to "scrap" all four ships. When this was done I had a bunch of components such as engines, weapons and sensors AND I also had exactly 1492 minerals on Lunas mineral storage, these minerals must be the 25% of the total cost of the ship, otherwise there is something else going on that I don't know what it is...   ;)

I think it somewhat makes sense, in addition to whole components some raw materials that went into the hull might be able to be recycled into properly reusable material. Though I guess an overall 50% retention rate might be a little dubious. I might argue that maybe it should be 5% through direct resources and then the usual components so its still something low like 30%.
 

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 11672
  • Thanked: 20455 times
Re: Need help in understanding refit cost
« Reply #7 on: September 12, 2020, 03:25:58 PM »
I did a test month or so ago where it seemed to work that way, I also did a test with 1.11 right now...

I basically started a new game, SM some component and built a typical 10000t destroyer with a cost of 1492 BP (mix of resources).

I then built four ships with SM in a fleet at Earth.

I then moved the fleet to Luna where I Created a Colony with 50 million people 20000 infrastructure and a 10000t shipyard with four slipways. There were no minerals at Luna, only the stuff I created.

I then proceeded to "scrap" all four ships. When this was done I had a bunch of components such as engines, weapons and sensors AND I also had exactly 1492 minerals on Lunas mineral storage, these minerals must be the 25% of the total cost of the ship, otherwise there is something else going on that I don't know what it is...   ;)

Aha! Just realised what is happening. There is nothing in the scrap completion code to give you minerals. However, the normal shipyard task code is taking negative minerals and wealth from the population :)

So in fact you are getting the full minerals and wealth cost back, plus the components. Scrapping is very profitable at the moment.

Fixed for v1.12 and thanks for testing it.
« Last Edit: September 12, 2020, 03:34:41 PM by Steve Walmsley »
 
The following users thanked this post: Garfunkel

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2837
  • Thanked: 673 times
Re: Need help in understanding refit cost
« Reply #8 on: September 12, 2020, 03:36:00 PM »
I did a test month or so ago where it seemed to work that way, I also did a test with 1.11 right now...

I basically started a new game, SM some component and built a typical 10000t destroyer with a cost of 1492 BP (mix of resources).

I then built four ships with SM in a fleet at Earth.

I then moved the fleet to Luna where I Created a Colony with 50 million people 20000 infrastructure and a 10000t shipyard with four slipways. There were no minerals at Luna, only the stuff I created.

I then proceeded to "scrap" all four ships. When this was done I had a bunch of components such as engines, weapons and sensors AND I also had exactly 1492 minerals on Lunas mineral storage, these minerals must be the 25% of the total cost of the ship, otherwise there is something else going on that I don't know what it is...   ;)

I think it somewhat makes sense, in addition to whole components some raw materials that went into the hull might be able to be recycled into properly reusable material. Though I guess an overall 50% retention rate might be a little dubious. I might argue that maybe it should be 5% through direct resources and then the usual components so its still something low like 30%.

There could be a technology line for recycling resources with scraped ships/components giving at start 20% and go up to 50% at some point... but perhaps not that interesting or valuable tech to invest resources into.
 
The following users thanked this post: db48x