armor hitpoint repair cost formula

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

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
Last edited by pixelfck on Mon Jul 29, 2013 3:01 pm, edited 1 time in total.
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
User avatar
pixelfck
Militia Captain
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:

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 | ... |
+-------------------+----+----+----+----+----+----+----+----+----+----+----+----+----+-----+
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.
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
Post Reply