Hello,
I've been looking on these forums and the wiki but can't seem to find the calculations that result in the cost of repairing 1 HP. basically the question is, what is the formula that determines the return value of (armGetRepairCost type)?
I would like to get this value for armor that is not installed on a ship.
cheers,
Pixelfck
armor hitpoint repair cost formula
- pixelfck
- Militia Captain
- Posts: 571
- Joined: Tue Aug 11, 2009 8:47 pm
- Location: Travelling around in Europe
Just a quick follow up if someone stumbles across this thread in the future:
The armor repair cost seems to be based on (repair) tech level:
The cost per HP can then be modified by the items specified repairCostAdj attribute, which is specified as a percentage value (so repairCostAdj=100 means unadjusted repair cost per HP).
Unfortunately, there is no scripting function to query the repairCostAdj value.
The repairing an armor from 0 HP back to full HP costs, on avarage, about 25% of the armors cost/value.
The armor repair cost seems to be based on (repair) tech level:
Code: Select all
+-------------------+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+
| Repair tech level | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | etc |
+-------------------+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+
| Cost per HP | 1 | 1 | 1 | 2 | 3 | 4 | 6 | 9 | 15 | 22 | 35 | 52 | 80 | ... |
+-------------------+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+
Unfortunately, there is no scripting function to query the repairCostAdj value.
The repairing an armor from 0 HP back to full HP costs, on avarage, about 25% of the armors cost/value.