• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:48
CEST 11:48
KST 18:48
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
BGE Stara Zagora 2025: Info & Preview25Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL46Code S RO12 Preview: Cure, Zoun, Solar, Creator4[ASL19] Finals Preview: Daunting Task30
Community News
[BSL20] ProLeague: Bracket Stage & Dates7GSL Ro4 and Finals moved to Sunday June 15th12Weekly Cups (May 27-June 1): ByuN goes back-to-back0EWC 2025 Regional Qualifier Results26Code S RO12 Results + RO8 Groups (2025 Season 2)3
StarCraft 2
General
The SCII GOAT: A statistical Evaluation Magnus Carlsen and Fabi review Clem's chess game. BGE Stara Zagora 2025: Info & Preview Jim claims he and Firefly were involved in match-fixing GSL Ro4 and Finals moved to Sunday June 15th
Tourneys
Master Swan Open (Global Bronze-Master 2) Bellum Gens Elite: Stara Zagora 2025 $5,100+ SEL Season 2 Championship (SC: Evo) SOOPer7s Showmatches 2025 Cheeseadelphia 2025 - Open Bracket LAN!
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 476 Charnel House Mutation # 475 Hard Target Mutation # 474 Futile Resistance Mutation # 473 Cold is the Void
Brood War
General
BW General Discussion Will foreigners ever be able to challenge Koreans? BGH auto balance -> http://bghmmr.eu/ I made an ASL quiz [BSL20] ProLeague: Bracket Stage & Dates
Tourneys
[ASL19] Grand Finals [Megathread] Daily Proleagues [BSL20] ProLeague Bracket Stage - Day 2 [BSL20] ProLeague Bracket Stage - Day 1
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Path of Exile What do you want from future RTS games? Stormgate/Frost Giant Megathread Nintendo Switch Thread Mechabellum
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Heroes of the Storm 2.0 Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Vape Nation Thread European Politico-economics QA Mega-thread
Fan Clubs
Maru Fan Club Serral Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard
TL Community
The Automated Ban List
Blogs
Cognitive styles x game perf…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Poker
Nebuchad
Customize Sidebar...

Website Feedback

Closed Threads



Active: 23484 users

[Q] Cost to repair?

Forum Index > Brood War Strategy
Post a Reply
Normal
seppolevne
Profile Blog Joined February 2009
Canada1681 Posts
Last Edited: 2009-04-25 18:19:52
April 23 2009 23:07 GMT
#1
I was just wondering if the cost to repair a damaged building/unit follows a specific formula. Obviously more expensive things will cost more to repair, but would something that costs 200min/100gas cost say 100min/50gas to repair from 1 hp?

Update: Unit repair info:
+ Show Spoiler +

Siege tank: 1-150hp
Minerals/Gas: 33/33
%of new: 22/33

SCV: 1-60hp
Minerals: 17
%of new: 34

Goliath: 1-125
Minerals/Gas: 34/17
%of new: 34/34

Vulture: 1-80hp
Minerals: 25
%of new: 33

Valkyrie: 1-200hp
Minerals/Gas: 84/42
%of new: 34/34

Wraith: 1-120hp
Minerals/Gas: 33/33
%of new: 22/33

Science Vessel: 1-200hp
Minerals/Gas: 33/66
%of new: 33/29

Dropship: 1-150hp
Minerals/Gas: 33/33
%of new: 33/33

Battlecruiser: 1-500hp
Minerals/Gas: 96/96
%of new: 24/32


Update: Building repair info:
+ Show Spoiler +

CC: 1-1500hp
Minerals: 128
%of new: 31,25

Supply Depot: 1-500hp
Minerals: 28
%of new: 35,7

Bunker: 1-350hp
Minerals: 24
%of new: 41,6

Turret: 1-200hp
Minerals: 26
%of new: 28,8

Barracks: 1-1000hp
Minerals: 50
%of new: 30

Refinery: 1-750hp
Minerals: 32
%of new: 31,25

Engineering Bay: 1-850hp
Minerals: 42
%of new: 29,76

academy: 1-600hp
Minerals: 50
%of new: 30

Factory: 1-1250hp
Minerals/Gas: 68/34
%of new: 29,41/29,41

Armory: 1-750hp
Minerals/Gas: 36/18
%of new: 27,7/27,7

Starport:1-1300hp
Minerals/Gas: 34/34
%of new: 44,1/29,4

Science Facility: 1-850hp
Minerals/Gas: 34/34
%of new: 29,4/44,1

Thanks to Jiiks for the repair info
Thanks to everyone for their theorycrafting/two cents
J- Pirate Udyr WW T- Pirate Riven Galio M- Galio Annie S- Sona Lux -- Always farm, never carry.
arb
Profile Blog Joined April 2008
Noobville17921 Posts
April 23 2009 23:10 GMT
#2
i think its 1 min /1 gas for 2hp..though im not sure
Artillery spawned from the forges of Hell
MuR)Ernu
Profile Joined September 2008
Finland768 Posts
April 23 2009 23:11 GMT
#3
i think its only like something like 2 minerals per HP or something. Havent tested it but it isn't anything big i assume
Azrael1111
Profile Joined July 2008
United States550 Posts
April 23 2009 23:12 GMT
#4
I know it takes no gas, and its probably like 5 hp per mineral
peidongyang
Profile Joined January 2009
Canada2084 Posts
April 23 2009 23:15 GMT
#5
Sry, tried googling noone knows the exact cost lol

people just keep saying, the more it cost, the more to repair, basically useless stuff like that.
the throws never bothered me anyway
KwarK
Profile Blog Joined July 2006
United States42416 Posts
April 23 2009 23:19 GMT
#6
I often wonder this too when I'm just setting fire to stuff aimlessly early game in PvT. I think it'd be really interesting if a unit cost significantly more to repair from 1 hp than to replace because it'd mean that repair should only be used when unit production is limited and a boost in unit count is essential, such as a timing push or a desperate defence. Whether to repair or not would become a great benefit/cost question which players would have to deal with in split second decisions.
I expect it's cheaper to repair though.
ModeratorThe angels have the phone box
seppolevne
Profile Blog Joined February 2009
Canada1681 Posts
April 23 2009 23:27 GMT
#7
On April 24 2009 08:19 Kwark wrote:
I often wonder this too when I'm just setting fire to stuff aimlessly early game in PvT. I think it'd be really interesting if a unit cost significantly more to repair from 1 hp than to replace because it'd mean that repair should only be used when unit production is limited and a boost in unit count is essential, such as a timing push or a desperate defence. Whether to repair or not would become a great benefit/cost question which players would have to deal with in split second decisions.
I expect it's cheaper to repair though.


Or choosing which base to attack at the wall-in to make the biggest (albeit small) economic impact.
J- Pirate Udyr WW T- Pirate Riven Galio M- Galio Annie S- Sona Lux -- Always farm, never carry.
LosingID8
Profile Blog Joined December 2006
CA10825 Posts
April 23 2009 23:28 GMT
#8
On April 24 2009 08:12 Azrael1111 wrote:
I know it takes no gas, and its probably like 5 hp per mineral

i don't think that's right.

buildings that only cost minerals will not cost any gas to repair. however advanced structures that cost gas to build will use gas to repair. i think it's the same with units as well.
ModeratorResident K-POP Elitist
Clasic
Profile Blog Joined January 2009
Bosnia-Herzegovina1437 Posts
April 23 2009 23:30 GMT
#9
On April 24 2009 08:28 LosingID8 wrote:
Show nested quote +
On April 24 2009 08:12 Azrael1111 wrote:
I know it takes no gas, and its probably like 5 hp per mineral

i don't think that's right.

buildings that only cost minerals will not cost any gas to repair. however advanced structures that cost gas to build will use gas to repair. i think it's the same with units as well.


So wait, tanks cost gas to repair? Funny, thought it was only minerals.
No no no no its not mine!
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
April 23 2009 23:32 GMT
#10
On April 24 2009 08:11 MuR)Ernu wrote:
i think its only like something like 2 minerals per HP or something. Havent tested it but it isn't anything big i assume

That would be a lot... A battlecruiser has 500HP. If it had 1 life and you repaired it to 500 according to your answer that would be just about 1000$ to repair. This obviously isn't the case, I would think it's maybe something like 1 mineral/gas per 2 or 3 HP like mentioned before.

Also, note: Buildings repair faster than units; I don't know if that has anything to do with it but yeahhhhh. Different units/buildings repair faster than others.

I'm pretty sure the cost and repair rate are unit specific though. Repairing 100HP of a battlecruiser costs more than 100HP of a siege tank, even though they both cost minerals + cast.

Someone want to test this?
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
Michaelj
Profile Joined February 2008
United States186 Posts
Last Edited: 2009-04-23 23:41:30
April 23 2009 23:35 GMT
#11
Some empirical testing..

supply depot from 20 hp to 500 hp - 33 mineral
barrack from 20 hp to 1000 hp - 51 mineral
factory from 10 hp to 1250 hp - 68 min, 34 gas


It generally seems to cost 1/3 of the minerals/gas it costs to build, in order to repair something from scratch. It also seems to be a linear function of how much hp you repar
---
deathgod6
Profile Blog Joined January 2008
United States5064 Posts
April 23 2009 23:36 GMT
#12
If it costs gas to build it, you need gas to repair it.
4.0 GPA = A rank 5.0 GPA = Olympic --------- Bisu, Best, Fantasy. i ♥ oov. They can get in my BoxeR anyday.
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
April 23 2009 23:38 GMT
#13
On April 24 2009 08:30 Clasic wrote:
Show nested quote +
On April 24 2009 08:28 LosingID8 wrote:
On April 24 2009 08:12 Azrael1111 wrote:
I know it takes no gas, and its probably like 5 hp per mineral

i don't think that's right.

buildings that only cost minerals will not cost any gas to repair. however advanced structures that cost gas to build will use gas to repair. i think it's the same with units as well.


So wait, tanks cost gas to repair? Funny, thought it was only minerals.

Nope, they cost gas as well. like LID said, primary buildings only cost minerals to repair because none of the primary buildings cost gas, so no gas is used to repair. I'm pretty sure the most expensive buildings cost more minerals+gas to repair than other buildings if you used a ratio.
Ex: factory(200,100) costs 4minerals + 2gas to repair 25 HP.
However science facility(150,200) costs 3minerals + 4gas to repair 25 HP.

The science facility costs more gas to produce, so to repair it it costs more gas than a factory, even though they both require some amount of gas. These are just examples I made, but I assume it works in this fashion.
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
Zoler
Profile Blog Joined June 2008
Sweden6339 Posts
April 23 2009 23:40 GMT
#14
I think its 1 mineral for 1 hp.
Lim Yo Hwan forever!
APurpleCow
Profile Blog Joined August 2008
United States1372 Posts
Last Edited: 2009-04-23 23:42:57
April 23 2009 23:42 GMT
#15
Just performed a quick test.

Buildings:
0.043 minerals/HP
0.023 gas/HP

Units:
0.172 minerals/HP
0.517 gas/HP

It only costs gas if the original entity cost gas.
Pawsom
Profile Blog Joined February 2009
United States928 Posts
Last Edited: 2009-04-23 23:49:50
April 23 2009 23:45 GMT
#16
Can you seriously not test this yourself? Do you own starcraft?
I'll do your work for you.

Repairing a siege tank from 1 hp to 150 hp-
Trial 1: 26m 26g
Trial 2: 26m 26g
Trial 3: 26m 26g

HP per Mineral: 5.73
HP per Gas: 5.73

Cost of full repair in terms of % of Unit cost(mineral): 17.3%
Cost of full repair in terms of % of Unit cost(gas): 26%
Cost of full repair in terms of % of Unit cost(Total): 34.6%


Repairing a vulture from 1 hp to 80hp-

Trial 1: 16m 0g
Trial 2: 16m 0g
Trial 3: 16m 0g

HP per Mineral: 4.94
HP per Gas: 0

Cost of full repair in terms of % of Unit cost(mineral): 21.3%
Cost of full repair in terms of % of Unit cost(gas): n/a
Cost of full repair in terms of % of Unit cost(Total): 21.3%

Repairing a goliath from 1hp to 125hp
Trial 1: 28m 14g
Trial 2: 28m 14g
Trial 3: 28m 14g

HP per Mineral: 4.43
HP per Gas: 8.85

Cost of full repair in terms of % of Unit cost(mineral): 28%
Cost of full repair in terms of % of Unit cost(gas): 28%
Cost of full repair in terms of % of Unit cost(Total): 28%

Conclusions


Units that cost only minerals require only minerals to repair. Units that cost both gas and minerals require both resources to repair. Health appears to be restored at a rate of 4-6 units of health per mineral. I am unable to identify the exact algorithm used from quick inspection.

Practical application

In game it's always better to repair. This doesn't have to do with cost analysis or anything, it's just always better to have the unit now than remake it later. The mining time lost is negligible.


**I tested in single player with operation cwal turned on. If this makes a difference in the exact numbers I don't really care, someone else can do it The main point is that units only require the resources required to create them to repair, and it is always significantly cheaper to repair.


Edit: I see a lot of people posted before me while testing. Good work A few things I noticed: people testing on buildings are making a mistake. These buildings are burning at the values you tested off and will cause your answers to be slightly off. Also you guys testing with only one unit need to consider this and try with multiple units. I have already shown that the repair rate appears to be different for different units.
deathgod6
Profile Blog Joined January 2008
United States5064 Posts
April 23 2009 23:46 GMT
#17
On April 24 2009 08:40 Zoler wrote:
I think its 1 mineral for 1 hp.

That's why people repair 1500 hp command centers when they cost 400 minerals to build.
4.0 GPA = A rank 5.0 GPA = Olympic --------- Bisu, Best, Fantasy. i ♥ oov. They can get in my BoxeR anyday.
paper
Profile Blog Joined September 2004
13196 Posts
Last Edited: 2009-04-23 23:51:08
April 23 2009 23:50 GMT
#18
On April 24 2009 08:42 APurpleCow wrote:
Just performed a quick test.

Buildings:
0.043 minerals/HP = 23.25 hp / mineral ~ 25
0.023 gas/HP = 43.47 hp / mineral ~ 45

Units:
0.172 minerals/HP = 5.81 hp / mineral ~ 6
0.517 gas/HP = 1.93 hp / mineral ~ 2

It only costs gas if the original entity cost gas.


>_> better units
Hates Fun🤔
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
April 23 2009 23:50 GMT
#19
On April 24 2009 08:46 deathgod6 wrote:
Show nested quote +
On April 24 2009 08:40 Zoler wrote:
I think its 1 mineral for 1 hp.

That's why people repair 1500 hp command centers when they cost 400 minerals to build.

obviously ;D
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
KwarK
Profile Blog Joined July 2006
United States42416 Posts
April 23 2009 23:52 GMT
#20
If the cost is related to building cost, as suggested, and not to raw hp value then damage done to a supply depot will cost more to repair than the same damage done to a barracks because the hp to cost ratio of a depot is worse. I think that's really pretty interesting.
ModeratorThe angels have the phone box
Pawsom
Profile Blog Joined February 2009
United States928 Posts
April 23 2009 23:56 GMT
#21
On April 24 2009 08:52 Kwark wrote:
If the cost is related to building cost, as suggested, and not to raw hp value then damage done to a supply depot will cost more to repair than the same damage done to a barracks because the hp to cost ratio of a depot is worse. I think that's really pretty interesting.

It's interesting, however it still doesn't change much. A supply depot obviously demands more immediate attention when attacked early game than the barracks. A barracks me be repaired much more casually and probably has less effective cost to repair.
StRyKeR
Profile Blog Joined January 2006
United States1739 Posts
April 24 2009 00:03 GMT
#22
Bold clarification: Repair cost depends on the unit being repaired.

I'm quoting for truth:


Some empirical testing..

supply depot from 20 hp to 500 hp - 33 mineral
barrack from 20 hp to 1000 hp - 51 mineral
factory from 10 hp to 1250 hp - 68 min, 34 gas


It generally seems to cost 1/3 of the minerals/gas it costs to build, in order to repair something from scratch. It also seems to be a linear function of how much hp you repar
Ars longa, vita brevis, principia aeturna.
RoieTRS
Profile Blog Joined July 2008
United States2569 Posts
April 24 2009 00:30 GMT
#23
Science vessels, i'm pretty sure, get repaired tons more slowly.
konadora, in Racenilatr's blog: "you need to stop thinking about starcraft or anything computer-related for that matter. It's becoming a bad addiction imo"
APurpleCow
Profile Blog Joined August 2008
United States1372 Posts
April 24 2009 00:45 GMT
#24
I tested a tank and SCV for the units and a CC, supply depot, and factory for the buildings.All came out with the same answer +/- ~3%.
dirtnap
Profile Joined March 2009
United States20 Posts
April 24 2009 00:46 GMT
#25
i think it's something like 5 minerals per HP. not much at all.
Zoler
Profile Blog Joined June 2008
Sweden6339 Posts
April 24 2009 00:48 GMT
#26
On April 24 2009 08:46 deathgod6 wrote:
Show nested quote +
On April 24 2009 08:40 Zoler wrote:
I think its 1 mineral for 1 hp.

That's why people repair 1500 hp command centers when they cost 400 minerals to build.


sounds totally logical
Lim Yo Hwan forever!
Zoler
Profile Blog Joined June 2008
Sweden6339 Posts
April 24 2009 00:48 GMT
#27
On April 24 2009 09:30 RoieTRS wrote:
Science vessels, i'm pretty sure, get repaired tons more slowly.


lol I also get that feel
Lim Yo Hwan forever!
SpiritoftheTunA
Profile Blog Joined August 2006
United States20903 Posts
Last Edited: 2009-04-24 00:49:40
April 24 2009 00:48 GMT
#28
On April 24 2009 09:46 dirtnap wrote:
i think it's something like 5 minerals per HP. not much at all.

do you idiots even read the thread

1. it's dependent on which unit or building

2. YEAH CAUSE A SUPPLY DEPOT WOULD TAKE 2500 MINERALS TO REPAIR ALL THE WAY

3. kill yourself
posting on liquid sites in current year
LxRogue
Profile Blog Joined March 2007
United States1415 Posts
Last Edited: 2009-04-24 01:15:09
April 24 2009 00:59 GMT
#29
Repair cost is proportional to unit cost. (at 1/3)

Repair time is proportional to build time. (at 1 per scv)

So to repair anything using 1 scv from nearly dead will cost 1/3 of its initial cost and last the same time as its initial build time.

It's pretty simple.

edit: ok, its apparently not always exactly 1/3. BC's cost 100/100 to repair from dead, so thats actually a bit cheaper because they cost 400/300. Most units seem to be 1/3 though.
Chill
Profile Blog Joined January 2005
Calgary25977 Posts
Last Edited: 2009-04-24 12:25:44
April 24 2009 01:28 GMT
#30
On April 24 2009 08:35 Michaelj wrote:
Some empirical testing..

supply depot from 20 hp to 500 hp - 33 mineral
barrack from 20 hp to 1000 hp - 51 mineral
factory from 10 hp to 1250 hp - 68 min, 34 gas


It generally seems to cost 1/3 of the minerals/gas it costs to build, in order to repair something from scratch. It also seems to be a linear function of how much hp you repar

Thank you. 1/3 cost seems accurate for buildings, now we just need to see if units are the same. Also if the rates are comparable between units and buildings, and between lesser HP and higher HP things.
Moderator
Chill
Profile Blog Joined January 2005
Calgary25977 Posts
April 24 2009 01:29 GMT
#31
On April 24 2009 09:48 SpiritoftheTunA wrote:
Show nested quote +
On April 24 2009 09:46 dirtnap wrote:
i think it's something like 5 minerals per HP. not much at all.

do you idiots even read the thread

1. it's dependent on which unit or building

2. YEAH CAUSE A SUPPLY DEPOT WOULD TAKE 2500 MINERALS TO REPAIR ALL THE WAY

3. kill yourself

Alright, I get annoyed too but let's not go this far.
Moderator
LosingID8
Profile Blog Joined December 2006
CA10825 Posts
April 24 2009 01:32 GMT
#32
On April 24 2009 10:29 Chill wrote:
Show nested quote +
On April 24 2009 09:48 SpiritoftheTunA wrote:
On April 24 2009 09:46 dirtnap wrote:
i think it's something like 5 minerals per HP. not much at all.

do you idiots even read the thread

1. it's dependent on which unit or building

2. YEAH CAUSE A SUPPLY DEPOT WOULD TAKE 2500 MINERALS TO REPAIR ALL THE WAY

3. kill yourself

Alright, I get annoyed too but let's not go this far.

well other than #3 he was pretty spot on
ModeratorResident K-POP Elitist
Ryshi
Profile Blog Joined June 2004
Canada361 Posts
April 24 2009 01:35 GMT
#33
I'm pretty sure it's not solely based on cost of structure/unit. The repair time in itself is a cost. I did a quick test with a supply depot at 250/500 hp. Using map editor, when repair took 5secs (or 10, I forgot) to build, it cost 10 minerals. When it took 20 secs to build, it cost 16 minerals. Using 20 secs, I also adjusted the supply depot to a cost of 1000 minerals and it took almost 100 minerals to repair that 250 hp.

I don't know the formula but I'm pretty sure build time affects it from this testing.
The World God Only Knows
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
April 24 2009 01:42 GMT
#34
On April 24 2009 10:32 LosingID8 wrote:
Show nested quote +
On April 24 2009 10:29 Chill wrote:
On April 24 2009 09:48 SpiritoftheTunA wrote:
On April 24 2009 09:46 dirtnap wrote:
i think it's something like 5 minerals per HP. not much at all.

do you idiots even read the thread

1. it's dependent on which unit or building

2. YEAH CAUSE A SUPPLY DEPOT WOULD TAKE 2500 MINERALS TO REPAIR ALL THE WAY

3. kill yourself

Alright, I get annoyed too but let's not go this far.

well other than #3 he was pretty spot on

Mhmmm <333 Tuna
He obviously didn't read the thread, but either way 5 minerals per HP is obviously not even close to the correct answer, it's pretty common sense when you look at the CC example or Tuna's 2nd note.


On April 24 2009 10:28 Chill wrote:
Show nested quote +
On April 24 2009 08:35 Michaelj wrote:
Some empirical testing..

supply depot from 20 hp to 500 hp - 33 mineral
barrack from 20 hp to 1000 hp - 51 mineral
factory from 10 hp to 1250 hp - 68 min, 34 gas


It generally seems to cost 1/3 of the minerals/gas it costs to build, in order to repair something from scratch. It also seems to be a linear function of how much hp you repar

Thank you. 1/3 cost seems accurate for buildings, now we just need to see if buildings are the same. Also if the rates are comparable between units and buildings, and between lesser HP and higher HP things.

I agree that 1/3 the cost of buildings seems accurate, but there isn't a definite answer for units yet, unless it is completely unique to each unit. I have nothing else to do right now so I'm gonna go do some tests.
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
dhe95
Profile Blog Joined December 2008
United States1213 Posts
April 24 2009 01:45 GMT
#35
For me it seemed to take 21 Minerals to repair half of 150Mineral buildings, and 9 minerals to repair half of a supply depot and half a turret.
il0seonpurpose
Profile Blog Joined January 2007
Korea (South)5638 Posts
April 24 2009 01:48 GMT
#36
On April 24 2009 08:12 Azrael1111 wrote:
I know it takes no gas, and its probably like 5 hp per mineral



It takes gas once you get gas
dirtnap
Profile Joined March 2009
United States20 Posts
Last Edited: 2009-04-24 02:05:27
April 24 2009 02:03 GMT
#37
On April 24 2009 09:48 SpiritoftheTunA wrote:
Show nested quote +
On April 24 2009 09:46 dirtnap wrote:
i think it's something like 5 minerals per HP. not much at all.

do you idiots even read the thread

1. it's dependent on which unit or building

2. YEAH CAUSE A SUPPLY DEPOT WOULD TAKE 2500 MINERALS TO REPAIR ALL THE WAY

3. kill yourself


you obviously have no sense of humor or you would have noticed it was a joke and i was making fun of the other outrageous guesses of repair costs.

You get an A for effort though.
LosingID8
Profile Blog Joined December 2006
CA10825 Posts
April 24 2009 02:11 GMT
#38
On April 24 2009 11:03 dirtnap wrote:
Show nested quote +
On April 24 2009 09:48 SpiritoftheTunA wrote:
On April 24 2009 09:46 dirtnap wrote:
i think it's something like 5 minerals per HP. not much at all.

do you idiots even read the thread

1. it's dependent on which unit or building

2. YEAH CAUSE A SUPPLY DEPOT WOULD TAKE 2500 MINERALS TO REPAIR ALL THE WAY

3. kill yourself


you obviously have no sense of humor or you would have noticed it was a joke and i was making fun of the other outrageous guesses of repair costs.

You get an A for effort though.

i mean this completely honestly with no intention of offense but that type of humor doesn't really work on TL when you have a single digit post count
ModeratorResident K-POP Elitist
29 fps
Profile Blog Joined March 2008
United States5724 Posts
April 24 2009 02:25 GMT
#39
some common sense would tell you that it doesnt cost more to repair something than to build a new one. repairing is cheaper than making a new one

it depends on the unit, as people have already mentioned. unit that costs gas to build would require gas to fix.

imagine that there's an scv inside each factory and they're using min and gas to build stuff. then on the battlefield, the scvs would need gas/min proportionate to the unit they're repair to fix something.
4v4 is a battle of who has the better computer.
kakisama
Profile Joined March 2008
Canada82 Posts
April 24 2009 02:25 GMT
#40
so what about repair time?
Pride of War
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
Last Edited: 2009-04-24 02:42:25
April 24 2009 02:41 GMT
#41
Okay I got totally confused in my testing, and I have to go soon but I made a UMS map for testing it which can be found here:
http://files.filefront.com/test33scx/;13648175;/fileinfo.html

Some things to note:
- Operation cwal + changing the build time of the unit/building DOES AFFECT THE REPAIR COST
- Sending any unit to the beacon automatically sets your resource count(mineral and gas) to exactly 1000 each time. This is for setting a number that is high enough and easily recordable for seeing how much it cost to repair.
- The marine and ghost have modified damages incase you want to attack one of your units, reducing it's health so you can do another trial on it or something.
- I put duplicates of every mech unit, one with 100% health and the other set with 1% health.
- The factory and starport are there for building more units, in the case that you accidently killed your own or something.

Some things I noted in my little bit of testing:

- siege tank(150/100) had a repair cost of a ratio 1:1 with minerals to gas, EVEN THOUGH it is more mineral heavy than gas.
- I tried repairing a goliath(100,50) and it cost more minerals(i believe, or maybe it was gas) to repair than gas. I.E not a 1:1 mineral:gas ratio like the siege tank. it was more like 1.4:1 or something.
- When I changed the goliaths unit cost to 150/100 like the tank, it DID REPAIR AT A 1:1 RATIO.
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
Ryshi
Profile Blog Joined June 2004
Canada361 Posts
April 24 2009 03:57 GMT
#42
^that last bit is very interesting o_o
The World God Only Knows
Polemarch
Profile Joined August 2005
Canada1564 Posts
Last Edited: 2009-04-24 04:58:14
April 24 2009 04:55 GMT
#43
I'm guessing it's meant to be a 1:3 ratio of the unit/building's cost, but there's some rounding error that makes it equal gas/minerals for e.g. tank/BC.

e.g. mineral cost per repair-animation for a tank might be 1.2 and gas cost per repair animation might be 0.8; but both get rounded to 1.
I BELIEVE IN CAPITAL LETTER PUNISHMENT!!!!!
CharlieMurphy
Profile Blog Joined March 2006
United States22895 Posts
April 24 2009 09:01 GMT
#44
On April 24 2009 11:25 kakisama wrote:
so what about repair time?

That's the first thing I thought of when I saw this thread because I was already fairly certain everything is about 1/3 cost to repair.
..and then I would, ya know, check em'. (Aka SpoR)
Patriot.dlk
Profile Blog Joined October 2004
Sweden5462 Posts
April 24 2009 09:37 GMT
#45
I love blizzards algorithms =)
Thx for the people doin all the testing
jeppew
Profile Joined April 2009
Sweden471 Posts
April 24 2009 11:08 GMT
#46
it's probably like in Wc3, units have a repair cost, seperate from their acutal cost.
the repair cost is how many resources you need to repair from 0 to max hp.
so the rates should be related to their real cost but there might not be a universal algoritm for all of them, some units might be more cost effiecent to repair than others.
Jiiks
Profile Joined January 2009
Finland487 Posts
April 24 2009 11:31 GMT
#47
I tested all the units might test buildings if im bored here's my results:
Played on fastest didn't get times cause advloader clock bugged.
+ Show Spoiler +
Siege tank: 1-150hp
Minerals/Gas: 33/33
%of new: 22/33

SCV: 1-60hp
Minerals: 17
%of new: 34

Goliath: 1-125
Minerals/Gas: 34/17
%of new: 34/34

Vulture: 1-80hp
Minerals: 25
%of new: 33

Valkyrie: 1-200hp
Minerals/Gas: 84/42
%of new: 34/34

Wraith: 1-120hp
Minerals/Gas: 33/33
%of new: 22/33

Science Vessel: 1-200hp
Minerals/Gas: 33/66
%of new: 33/29

Dropship: 1-150hp
Minerals/Gas: 33/33
%of new: 33/33

Battlecruiser: 1-500hp
Minerals/Gas: 96/96
%of new: 24/32
niteReloaded
Profile Blog Joined February 2007
Croatia5281 Posts
April 24 2009 11:47 GMT
#48
On April 24 2009 11:41 Grobyc wrote:
Okay I got totally confused in my testing, and I have to go soon but I made a UMS map for testing it which can be found here:
http://files.filefront.com/test33scx/;13648175;/fileinfo.html

Some things to note:
- Operation cwal + changing the build time of the unit/building DOES AFFECT THE REPAIR COST
- Sending any unit to the beacon automatically sets your resource count(mineral and gas) to exactly 1000 each time. This is for setting a number that is high enough and easily recordable for seeing how much it cost to repair.
- The marine and ghost have modified damages incase you want to attack one of your units, reducing it's health so you can do another trial on it or something.
- I put duplicates of every mech unit, one with 100% health and the other set with 1% health.
- The factory and starport are there for building more units, in the case that you accidently killed your own or something.

Some things I noted in my little bit of testing:

- siege tank(150/100) had a repair cost of a ratio 1:1 with minerals to gas, EVEN THOUGH it is more mineral heavy than gas.
- I tried repairing a goliath(100,50) and it cost more minerals(i believe, or maybe it was gas) to repair than gas. I.E not a 1:1 mineral:gas ratio like the siege tank. it was more like 1.4:1 or something.
- When I changed the goliaths unit cost to 150/100 like the tank, it DID REPAIR AT A 1:1 RATIO.

now thats what I call a scientific approach
mahnini
Profile Blog Joined October 2005
United States6862 Posts
April 24 2009 11:48 GMT
#49
repair time and cost are related to build time and cost of whatever you're repairing. this is how people make stuff take forever to repair in UMS games, they just crank up the build times.
the world's a playground. you know that when you're a kid, but somewhere along the way everyone forgets it.
RaiZ
Profile Blog Joined April 2003
2813 Posts
April 24 2009 12:02 GMT
#50
Quick ! I'll do it before anyone can say something !
Insert a [we still have something to learn after 10 years ? Jez] comment ~
Okay solved.
Too much tl.net / starcraft yes ?
Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth. Oscar Wilde
seppolevne
Profile Blog Joined February 2009
Canada1681 Posts
April 24 2009 13:41 GMT
#51
On April 24 2009 20:31 Jiiks wrote:
I tested all the units might test buildings if im bored here's my results:
Played on fastest didn't get times cause advloader clock bugged.
+ Show Spoiler +
Siege tank: 1-150hp
Minerals/Gas: 33/33
%of new: 22/33

SCV: 1-60hp
Minerals: 17
%of new: 34

Goliath: 1-125
Minerals/Gas: 34/17
%of new: 34/34

Vulture: 1-80hp
Minerals: 25
%of new: 33

Valkyrie: 1-200hp
Minerals/Gas: 84/42
%of new: 34/34

Wraith: 1-120hp
Minerals/Gas: 33/33
%of new: 22/33

Science Vessel: 1-200hp
Minerals/Gas: 33/66
%of new: 33/29

Dropship: 1-150hp
Minerals/Gas: 33/33
%of new: 33/33

Battlecruiser: 1-500hp
Minerals/Gas: 96/96
%of new: 24/32


Do you think I could throw this in OP? Great work ^^
J- Pirate Udyr WW T- Pirate Riven Galio M- Galio Annie S- Sona Lux -- Always farm, never carry.
jeppew
Profile Joined April 2009
Sweden471 Posts
Last Edited: 2009-04-24 15:22:09
April 24 2009 13:45 GMT
#52
On April 24 2009 11:41 Grobyc wrote:
Okay I got totally confused in my testing, and I have to go soon but I made a UMS map for testing it which can be found here:
http://files.filefront.com/test33scx/;13648175;/fileinfo.html

Some things to note:
- Operation cwal + changing the build time of the unit/building DOES AFFECT THE REPAIR COST
- Sending any unit to the beacon automatically sets your resource count(mineral and gas) to exactly 1000 each time. This is for setting a number that is high enough and easily recordable for seeing how much it cost to repair.
- The marine and ghost have modified damages incase you want to attack one of your units, reducing it's health so you can do another trial on it or something.
- I put duplicates of every mech unit, one with 100% health and the other set with 1% health.
- The factory and starport are there for building more units, in the case that you accidently killed your own or something.

Some things I noted in my little bit of testing:

- siege tank(150/100) had a repair cost of a ratio 1:1 with minerals to gas, EVEN THOUGH it is more mineral heavy than gas.
- I tried repairing a goliath(100,50) and it cost more minerals(i believe, or maybe it was gas) to repair than gas. I.E not a 1:1 mineral:gas ratio like the siege tank. it was more like 1.4:1 or something.
- When I changed the goliaths unit cost to 150/100 like the tank, it DID REPAIR AT A 1:1 RATIO.



maybe the cost of repairing 1hp is (mineralcost)*k/MaxHp for minerals and 1.5*(gascost)*k/MaxHp for gas.

where k is some konstant, so if k was 1 then repairing a tank from half hp would cost 75/75.
but, i would guess that k is probably somewhere around 0.2
so repairing a unit from 1hp to max should cost somewhere around 0.2 minerals of it's cost and 0.3 gas.

edit; didn't read the cwal part, sry.
so construction speed is a factor aswell, does the cost increase the quicker the unit is built or the other way around?
Jiiks
Profile Joined January 2009
Finland487 Posts
April 24 2009 14:00 GMT
#53
On April 24 2009 22:41 seppolevne wrote:
Show nested quote +
On April 24 2009 20:31 Jiiks wrote:
I tested all the units might test buildings if im bored here's my results:
Played on fastest didn't get times cause advloader clock bugged.
+ Show Spoiler +
Siege tank: 1-150hp
Minerals/Gas: 33/33
%of new: 22/33

SCV: 1-60hp
Minerals: 17
%of new: 34

Goliath: 1-125
Minerals/Gas: 34/17
%of new: 34/34

Vulture: 1-80hp
Minerals: 25
%of new: 33

Valkyrie: 1-200hp
Minerals/Gas: 84/42
%of new: 34/34

Wraith: 1-120hp
Minerals/Gas: 33/33
%of new: 22/33

Science Vessel: 1-200hp
Minerals/Gas: 33/66
%of new: 33/29

Dropship: 1-150hp
Minerals/Gas: 33/33
%of new: 33/33

Battlecruiser: 1-500hp
Minerals/Gas: 96/96
%of new: 24/32


Do you think I could throw this in OP? Great work ^^


Yea sure i dont mind.
cyronc
Profile Joined March 2008
218 Posts
April 24 2009 15:48 GMT
#54
as far as i know (and im not quite sure about this) the formula sc uses is something like (hp-to-repair/maxhp)*(unit cost in mins and gas)*constant value

i dont know what the constant value is but it would be neat if somebody could try to run the numbers gained via experiments above through this formula and see whether its a viable explanation (and if it is what the constant value lokks like) or not

gl hf
iH82G8!
HeaDStrong
Profile Blog Joined January 2009
Scotland785 Posts
April 24 2009 16:48 GMT
#55
This is nice read. I wish I wasn't that lazy and would experiment with stuff i'm curious about.

BTW has anyone though how an SCV can repair air units but cant atack them?! a mystery to be solved...

On April 24 2009 09:46 dirtnap wrote:
i think it's something like 5 minerals per HP. not much at all.


epic troll!
SirNukes
Profile Joined April 2009
18 Posts
Last Edited: 2009-04-26 20:54:20
April 24 2009 17:38 GMT
#56
I did some testing using staredit to modify single unit values (cost, build time, health) and came up with something that should be close to the SC repair logic. Testing was done with units at 50% health. It seems to me there are three variables that describe repairs: the cost per repair cycle, the time per repair cycle, and the health healed per repair cycle. I will lay out the logic I found for calculating these in steps.

---Finding the cost per repair cycle
1) Calculate 1% of the mineral and gas cost of the repair target, ignoring zeroes.
ex1. Siege Tank: 150 min * 0.01 = 1.5 min, , 100 gas * 0.01 = 1 gas.
ex2. Armory: 100 min * 0.01 = 1 min, 50 gas * 0.01 = 0.5 gas
ex3. CC: 400 min * 0.01 = 4 min
2) Divide the smallest value from (1) into 1 and note this new value, which I will call proportional change.
ex1. Siege Tank: 1 / 1 gas = 1
ex2. Armory: 1 / 0.5 gas = 2
ex3. CC: 1 / 4 min = 0.25
3) Apply this proportional change from (2) to each of the values from (1).
ex1. Siege Tank: 1.5 min * 1 = 1.5 min, 1 gas * 1 = 1 gas
ex2. Armory: 1 min * 2 = 2 min, 0.5 gas * 2 = 1 gas
ex3. CC: 4 min * 0.25 = 1 min
4) Round down the values from (3) to obtain the cost per repair cycle.
ex1. Siege Tank: 1 min, 1 gas
ex2. Armory: 2 min, 1 gas
ex3. CC: 1 min, 0 gas

---Finding the time per repair cycle
5) Calculate 2.8% of the unit's Build Time.
ex1. Siege Tank: 50 seconds *0.028 = 1.4s
ex2. Armory: 80 seconds *0.028 = 2.24s
ex3. CC: 120 seconds *0.028 = 3.36s
6) Multiply the value from (5) by the proportional change from (2) to obtain the time per repair cycle.
ex1. Siege Tank: 1.4s * 1 = 1.4 seconds
ex2. Armory: 2.24s * 2 = 4.48 seconds
ex3. CC: 3.36s * 0.25 = 0.84 seconds

---Finding the health healed per repair cycle
7) Divide the value(s) from (4) into the unit's total cost.
ex1. Siege Tank: 1 min / 100 min = 0.01, 1 gas / 150 gas = 0.00667...
ex2. Armory: 2 min / 100 min = 0.02, 1 gas / 50 gas = 0.02
ex3. CC: 1 min / 400 min = 0.0025
8) Multiply the highest of the values from (7) by the unit's maximum health and by 3.15 (this is not exact; the game appears to use a '3' value but some framerate rounding causes it to vary between 3 and 3.3 or so). This is approximately the health healed per repair cycle.
ex1. Siege Tank: 0.01 * 150 health * 3.15 = 4.725 health
ex2. Armory: 0.02 * 750 health * 3.15 = 47.25 health
ex3. CC: 0.0025 * 1500 health * 3.15 = 11.8125 health

To summarize the examples:
ex1. Siege Tank: Costs 1 min and 1 gas to heal 4.725 health over 1.4 seconds.
ex2. Armory: Costs 2 min and 1 gas to heal 47.25 health over 4.48 seconds.
ex3. CC: Costs 1 min to heal 11.8125 health over 0.84 seconds.

The above results appear to work for costs down to 1 and up to several thousand. The numbers are likely not exact in a couple places due to rounding, but should generally be close (+/- 5% or so).

Some extra observations:
If an SCV gets its repair command interrupted during a repair cycle (likely by another command), you do not get any sort of refund on unused repair time and will have to pay the initial cost again to resume repairs. However, if the repair target moves, the repair cycle pauses until the SCV catches up, at which time it will resume the cycle from where it left off, costing no extra resources. Multiple SCVs repairing the same target each run on their own repair cycles and do not seem to interact. While the game does track fractional health values (in 256ths, I read somewhere), it does not appear to track fractional resource values, at least not with repairs.
Impervious
Profile Blog Joined March 2009
Canada4198 Posts
April 24 2009 21:10 GMT
#57
^^

Wow. Nice work.
~ \(ˌ)im-ˈpər-vē-əs\ : not capable of being damaged or harmed.
Polemarch
Profile Joined August 2005
Canada1564 Posts
April 24 2009 21:34 GMT
#58
Wow that's great, sirnukes, thank you!

Regarding the extra observation about the repair command interruption; does this mean that e.g. if you spam an SCV and repeatedly tell it to repair a bunker, then it costs more (and repairs at the same rate) than if you had just told it to repair once and let it finish?
I BELIEVE IN CAPITAL LETTER PUNISHMENT!!!!!
SirNukes
Profile Joined April 2009
18 Posts
April 24 2009 22:33 GMT
#59
On April 25 2009 06:34 Polemarch wrote:
Regarding the extra observation about the repair command interruption; does this mean that e.g. if you spam an SCV and repeatedly tell it to repair a bunker, then it costs more (and repairs at the same rate) than if you had just told it to repair once and let it finish?

It will cost more and, it seems, repair slower since there is a tiny delay after giving the repair order and the SCV starting repairs. A 50% bunker took 10 seconds and 17 minerals to repair normally, while a spam-clicked 50% bunker took 15 seconds and 104 minerals to repair for me. If you click fast enough you can stop the SCV from repairing because it will be stuck in that tiny delay. In theory, I think you could click just right so that the SCV only repairs 1 health each time, meaning a 50% bunker would take 175 minerals to repair.
arb
Profile Blog Joined April 2008
Noobville17921 Posts
April 24 2009 23:23 GMT
#60
Does it cost more if you repair with more scvs?
Artillery spawned from the forges of Hell
SirNukes
Profile Joined April 2009
18 Posts
April 24 2009 23:45 GMT
#61
On April 25 2009 08:23 arb wrote:
Does it cost more if you repair with more scvs?

Yes, but not by much. When an SCV is healing that last little bit of health they will charge for a full repair cycle, so that last cycle isn't as efficient in terms of health per cost. If you have a bunch of SCVs repairing the same thing, they will all have charged for an inefficient last repair cycle.

As an extreme example, if a CC is at 1490 health, you can have one SCV repair it in just under one cycle (~.8 seconds) for 1 mineral, or you can have 10 SCVs all repair it at the same time in just under a tenth of a cycle (~.08 seconds) but 10 minerals (1 mineral each). The counterpart to this will be when the CC has enough damage on it for 10 repair cycles, so each of the 10 SCVs will be efficient and cost nothing extra over one SCV.

On average, I figure each SCV will waste half a repair cycle worth of resources when they finish, so that can give an idea of how much each extra repairing SCV will cost you. This would only be half a mineral and gas on a Siege Tank per SCV, for instance, so it doesn't really matter compared to lost mining time and other concerns.
ZeKk
Profile Blog Joined November 2004
Sweden320 Posts
April 25 2009 02:20 GMT
#62
You guys seriously have nothing better to do than analyzing repair cost!?
Kentor *
Profile Blog Joined December 2007
United States5784 Posts
April 25 2009 06:01 GMT
#63
On April 25 2009 11:20 ZeKk wrote:
You guys seriously have nothing better to do than analyzing repair cost!?

you got a problem with people contributing to the community?
what's wrong with studying the best game in the world?
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
April 25 2009 06:19 GMT
#64
On April 24 2009 20:47 niteReloaded wrote:
Show nested quote +
On April 24 2009 11:41 Grobyc wrote:
Okay I got totally confused in my testing, and I have to go soon but I made a UMS map for testing it which can be found here:
http://files.filefront.com/test33scx/;13648175;/fileinfo.html

Some things to note:
- Operation cwal + changing the build time of the unit/building DOES AFFECT THE REPAIR COST
- Sending any unit to the beacon automatically sets your resource count(mineral and gas) to exactly 1000 each time. This is for setting a number that is high enough and easily recordable for seeing how much it cost to repair.
- The marine and ghost have modified damages incase you want to attack one of your units, reducing it's health so you can do another trial on it or something.
- I put duplicates of every mech unit, one with 100% health and the other set with 1% health.
- The factory and starport are there for building more units, in the case that you accidently killed your own or something.

Some things I noted in my little bit of testing:

- siege tank(150/100) had a repair cost of a ratio 1:1 with minerals to gas, EVEN THOUGH it is more mineral heavy than gas.
- I tried repairing a goliath(100,50) and it cost more minerals(i believe, or maybe it was gas) to repair than gas. I.E not a 1:1 mineral:gas ratio like the siege tank. it was more like 1.4:1 or something.
- When I changed the goliaths unit cost to 150/100 like the tank, it DID REPAIR AT A 1:1 RATIO.

now thats what I call a scientific approach

lol thanks.
On April 25 2009 11:20 ZeKk wrote:
You guys seriously have nothing better to do than analyzing repair cost!?

gtfo
On April 24 2009 22:45 jeppew wrote:
Show nested quote +
On April 24 2009 11:41 Grobyc wrote:
Okay I got totally confused in my testing, and I have to go soon but I made a UMS map for testing it which can be found here:
http://files.filefront.com/test33scx/;13648175;/fileinfo.html

Some things to note:
- Operation cwal + changing the build time of the unit/building DOES AFFECT THE REPAIR COST
- Sending any unit to the beacon automatically sets your resource count(mineral and gas) to exactly 1000 each time. This is for setting a number that is high enough and easily recordable for seeing how much it cost to repair.
- The marine and ghost have modified damages incase you want to attack one of your units, reducing it's health so you can do another trial on it or something.
- I put duplicates of every mech unit, one with 100% health and the other set with 1% health.
- The factory and starport are there for building more units, in the case that you accidently killed your own or something.

Some things I noted in my little bit of testing:

- siege tank(150/100) had a repair cost of a ratio 1:1 with minerals to gas, EVEN THOUGH it is more mineral heavy than gas.
- I tried repairing a goliath(100,50) and it cost more minerals(i believe, or maybe it was gas) to repair than gas. I.E not a 1:1 mineral:gas ratio like the siege tank. it was more like 1.4:1 or something.
- When I changed the goliaths unit cost to 150/100 like the tank, it DID REPAIR AT A 1:1 RATIO.



maybe the cost of repairing 1hp is (mineralcost)*k/MaxHp for minerals and 1.5*(gascost)*k/MaxHp for gas.

where k is some konstant, so if k was 1 then repairing a tank from half hp would cost 75/75.
but, i would guess that k is probably somewhere around 0.2
so repairing a unit from 1hp to max should cost somewhere around 0.2 minerals of it's cost and 0.3 gas.

edit; didn't read the cwal part, sry.
so construction speed is a factor aswell, does the cost increase the quicker the unit is built or the other way around?

It was cheaper. Something like 2/3 or 1/2 of the cost of what it would be without cwal on I think; I'm not too sure though, I didn't save the results. I just know there was a difference.
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
Ota Solgryn
Profile Blog Joined January 2008
Denmark2011 Posts
April 25 2009 09:28 GMT
#65
On April 25 2009 11:20 ZeKk wrote:
You guys seriously have nothing better to do than analyzing repair cost!?


You seriously have nothing better to do than critisize other peoples hard work at helping answer a sc question made by someone from the sc community on a sc site?
ihasaKAROT: "Wish people would stop wasting their lives on finding flaws in others"
latent
Profile Joined March 2009
United States428 Posts
April 25 2009 10:41 GMT
#66
This is an interesting thread. I never realized how much gas it cost to repair science vessels. i wonder if this is why you rarely see players repair SVs during late-game TvZ: the cost benefit may not be worth the loss of utility and APM.
Moo
Jiiks
Profile Joined January 2009
Finland487 Posts
Last Edited: 2009-04-25 11:32:02
April 25 2009 11:09 GMT
#67
Seems like you get the build time when you divide normal speed build time with 1,6.

+ Show Spoiler [build time] +
Unit/Normal/Fastest
Vulture/30s/18,75s
Goliath/40s/25s
Tank/50s/31,25s
SCV/20s/12,5s
Wraith/60s/37,5s
Vessel/80s/50s
Dropship/50s/31,25s
BC/133s/83,12s
Valkyrie/50s/31,25s

Building/Normal/Fastest
CC/120s/75s
Depot/40s/25s
Refinery/40s/25s
Barracks/80s/50s
Academy/80s/50s
Factory/80s/50s
Starport/70s/43,75s
Facility/60s/37,5s
EBay/60s/37,5s
Armory/80s/50s
Turret/30s/18,75s
Bunker/30s/18,75s
Addons/40s/25s
Silo/80s/50s



Also here's the repair costs for buildings.

+ Show Spoiler [repair cost] +
CC: 1-1500hp
Minerals: 128
%of new: 31,25

Supply Depot: 1-500hp
Minerals: 28
%of new: 35,7

Bunker: 1-350hp
Minerals: 24
%of new: 41,6

Turret: 1-200hp
Minerals: 26
%of new: 28,8

Barracks: 1-1000hp
Minerals: 50
%of new: 30

Refinery: 1-750hp
Minerals: 32
%of new: 31,25

Engineering Bay: 1-850hp
Minerals: 42
%of new: 29,76

academy: 1-600hp
Minerals: 50
%of new: 30

Factory: 1-1250hp
Minerals/Gas: 68/34
%of new: 29,41/29,41

Armory: 1-750hp
Minerals/Gas: 36/18
%of new: 27,7/27,7

Starport:1-1300hp
Minerals/Gas: 34/34
%of new: 44,1/29,4

Science Facility: 1-850hp
Minerals/Gas: 34/34
%of new: 29,4/44,1
Gliche
Profile Blog Joined August 2008
United States811 Posts
Last Edited: 2009-04-25 11:51:25
April 25 2009 11:50 GMT
#68
Damn this is a really nice thread. I always felt like every time I repaired, I was throwing away resources that I could have spent on more units. Kudos to all the work put in here!
KT fighting~!! | Designing things is fun!
jello_biafra
Profile Blog Joined September 2004
United Kingdom6635 Posts
April 25 2009 14:01 GMT
#69
Interesting thread, never knew most of this stuff.

On April 25 2009 01:48 [GMTA]_HumBug wrote:
BTW has anyone though how an SCV can repair air units but cant atack them?! a mystery to be solved...

I've always wondered about this and came to the conclusion that the air unit must, not land, but fly really low for the duration of the repair, lol.
The road to hell is paved with good intentions | aka Probert[PaiN] @ iccup / godlikeparagon @ twitch | my BW stream: http://www.teamliquid.net/video/streams/jello_biafra
jtype
Profile Blog Joined April 2009
England2167 Posts
April 25 2009 14:28 GMT
#70
I know this is more of a scientific and stats-based discussion here, but I feel that repairing your units, while not always the most cost effective action in every situation, can have a very detrimental effect on your opponent's psyche.

The feeling of frustration that it can give them to see your units lasting longer than they expected is worth more than just a few minerals in some cases and can potentially lead to mistakes and wasted actions/attention on their part.

This does, of course, vary immensely from player to player, so can not be scientifically proven, but I feel that it is definitely a factor worth bearing in mind.
Reason
Profile Blog Joined June 2006
United Kingdom2770 Posts
Last Edited: 2009-04-25 14:32:42
April 25 2009 14:28 GMT
#71
On April 25 2009 19:41 latent wrote:
This is an interesting thread. I never realized how much gas it cost to repair science vessels. i wonder if this is why you rarely see players repair SVs during late-game TvZ: the cost benefit may not be worth the loss of utility and APM.

?????
It doesn't cost much at all.

In fact, pound for pound, it costs less gas to repair than any other unit shown in this thread so far.
Speak properly, and in as few words as you can, but always plainly; for the end of speech is not ostentation, but to be understood.
Gnojfatelob
Profile Joined April 2008
Belgium216 Posts
Last Edited: 2009-04-25 14:59:12
April 25 2009 14:56 GMT
#72
So seeing repair costs are small in sc terms, it seems that the more important questions is:

"How many scv's does it take to repair a tank so it will survive another hit from a dragoon?"

or

"How many scv's does it take to repair a tank so it will survive more hits from a dragoon until it can fire an extra time?"

With these questions you as a terran player can quickly make a decision if its worth it to pull scvs and repair a tank or not. If i pull scvs to repair, will my tank be able to fire again? Otherwise it is useless to send scv's to repair. Ofc 1 goon vs 1 tank is just a single scenario, what if more tanks? What if more goons? What if other units are mixed in?? Seems to me these questions answered could lead to a terran guide if and how many scv's to send along a push or to pull of from mining to repair a tank.

EDIT: I am not a terran player, so i will not put in the work to solve these complex problems, but it seems like you can eventually get some basic rules of thumb out of it at least. e.g. send 1 scv per tank with a push or 1 scv repairing a tank per goon firing upon it or something like that.
Probably the best starcraft player in the world
Polemarch
Profile Joined August 2005
Canada1564 Posts
April 25 2009 15:17 GMT
#73
On April 25 2009 07:33 SirNukes wrote:
It will cost more and, it seems, repair slower since there is a tiny delay after giving the repair order and the SCV starting repairs. A 50% bunker took 10 seconds and 17 minerals to repair normally, while a spam-clicked 50% bunker took 15 seconds and 104 minerals to repair for me. If you click fast enough you can stop the SCV from repairing because it will be stuck in that tiny delay. In theory, I think you could click just right so that the SCV only repairs 1 health each time, meaning a 50% bunker would take 175 minerals to repair.


Thanks again; that's a really good takeaway from this. I'm pretty sure I've spammed repair before, and had no idea it was actually counterproductive.
I BELIEVE IN CAPITAL LETTER PUNISHMENT!!!!!
jeddus
Profile Blog Joined September 2005
United States832 Posts
April 25 2009 15:35 GMT
#74
Can an allied T repair, say, toss buildings?
Just curious.
sex appeal
Michaelj
Profile Joined February 2008
United States186 Posts
April 25 2009 16:06 GMT
#75
On April 26 2009 00:35 jeddus wrote:
Can an allied T repair, say, toss buildings?
Just curious.


No, they can only repair terran units
---
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
April 25 2009 21:07 GMT
#76
On April 26 2009 00:35 jeddus wrote:
Can an allied T repair, say, toss buildings?
Just curious.

You cannot repair toss buildings....
+ Show Spoiler +
Even if you mind controlled an SCV
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
arb
Profile Blog Joined April 2008
Noobville17921 Posts
April 25 2009 22:28 GMT
#77
On April 26 2009 01:06 Michaelj wrote:
Show nested quote +
On April 26 2009 00:35 jeddus wrote:
Can an allied T repair, say, toss buildings?
Just curious.


No, they can only repair terran units

and power generators..
Artillery spawned from the forges of Hell
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
April 25 2009 23:13 GMT
#78
itd be cool if scvs could repair bunkers from the inside
Grobyc
Profile Blog Joined June 2008
Canada18410 Posts
April 26 2009 00:49 GMT
#79
On April 26 2009 07:28 arb wrote:
Show nested quote +
On April 26 2009 01:06 Michaelj wrote:
On April 26 2009 00:35 jeddus wrote:
Can an allied T repair, say, toss buildings?
Just curious.


No, they can only repair terran units

and power generators..

Power generators do count as Terran buildings. Go into the editor, they are under Terran > Special Buildings.
On April 26 2009 08:13 travis wrote:
itd be cool if scvs could repair bunkers from the inside

Indeed :D
If you watch Godzilla backwards it's about a benevolent lizard who helps rebuild a city and then moonwalks into the ocean.
LaLuSh
Profile Blog Joined April 2003
Sweden2358 Posts
April 26 2009 01:44 GMT
#80
On April 24 2009 08:40 Zoler wrote:
I think its 1 mineral for 1 hp.


Typical zoler reply, haha. Read the thread before commenting dude.
Archaic
Profile Blog Joined March 2008
United States4024 Posts
April 26 2009 02:33 GMT
#81
This is just a theory, but perhaps the amount of minerals or gas for repair cost is by the hundreds.
For example
Ranges:
0-99 mineral/gas cost, then it has one rate of gas spending.
100-199 mineral/gas cost has a lower rate, etc.

This could explain why a goliath (100/50) has a 1.4:1 mineral/gas repair cost ratio while a tank (100/150) has a 1:1 mineral/gas repair cost ratio.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
April 26 2009 02:51 GMT
#82
Does anyone go out into the field with a bunch of scvs though? I mean maybe for building turrets during a push vs a toss. I use them for BCs and vessels, bunkers, burning buildings, that's about it.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Clasic
Profile Blog Joined January 2009
Bosnia-Herzegovina1437 Posts
April 26 2009 03:05 GMT
#83
On April 26 2009 11:51 obesechicken13 wrote:
Does anyone go out into the field with a bunch of scvs though? I mean maybe for building turrets during a push vs a toss. I use them for BCs and vessels, bunkers, burning buildings, that's about it.


Ugh, people repair their tanks.
No no no no its not mine!
SirNukes
Profile Joined April 2009
18 Posts
Last Edited: 2009-05-07 14:23:21
April 26 2009 03:27 GMT
#84
On April 25 2009 15:19 Grobyc wrote:
It was cheaper. Something like 2/3 or 1/2 of the cost of what it would be without cwal on I think; I'm not too sure though, I didn't save the results. I just know there was a difference.


In a quick test, a 50% CC took 63 minerals to repair normally, but 32 under operation cwal. A 50% rax took 25 normally, 21 under opcwal. I suspect the calculated repair cycle length with operation cwal's build times is getting significantly rounded by whatever framerate Starcraft runs repairs at internally (I know in Diablo 2 uses 25 fps for everything, for instance). For example, if the calculation comes out to 1 mineral for 10 health over half a frame duration (20 health/frame), the duration might get rounded up to 1 frame and 20 health will be repaired (double the health per mineral). D2 is loaded with stuff like that.

From a quick test on a CC with built time set to 1000, it looks like operation cwal divides build time by around 16. A normal CC (no longer talking about the modified build time) repair cycle is around 0.84 seconds, so under the cheat it should be divided by 16 to become ~0.0525 seconds. Since the cheat allows a CC to repair for almost half cost overall and using the logic from my example above, it would suggest Starcraft's handles repairs at ~10 fps. I don't know enough about SC to say anything more about framerates.

On April 25 2009 23:56 Gnojfatelob wrote:
So seeing repair costs are small in sc terms, it seems that the more important questions is:

"How many scv's does it take to repair a tank so it will survive another hit from a dragoon?"

Well, four SCVs can repair a tank slightly faster than a goon can damage it. But I think there might be too many battlefield dynamics to answer the questions you seem to be asking.

On April 26 2009 11:33 Archaic wrote:
This is just a theory, but perhaps the amount of minerals or gas for repair cost is by the hundreds.

That was one of my ideas when I first looked at it, but it isn't how it works. For instance, if you set a unit to cost 50 minerals and 25 gas, repairs will cost twice as many minerals as gas, similar to a Goliath. Really, my earlier post laying out the calculation steps should cover the repair logic pretty well.

It occurs to me I should add some interpretations of the repair logic to make it a little clearer, so I will do that here. The programmers' intent seems to have been to charge 1% of the unit's cost to repair 3% of the unit's health, or thereabouts. Before inefficiencies and rounding, this would mean repairing a full unit would cost around 33.3% of its base cost. However, to get the resource numbers to calculate nice, the lower 1% resource is adjusted to '1' while the higher resource is kept proportional, but rounded down to a whole number. So in general, fully repairing a unit will cost ~33% of its lower resource value and anywhere between 16% and 33% of its higher resource value, before rounding and inefficiencies. A notable inefficiency is that the last repair cycle will not heal a full amount of health since the unit reaches maximum health, lowering the percentages. An apparent notable rounding is that the duration of a repair cycle rounds up to the nearest frame and provides a little extra health, raising the percentages.

On April 25 2009 20:09 Jiiks wrote:
Also here's the repair costs for buildings.

Jiiks, are you sure your building numbers are correct? I saw the bunker had an oddly high percentage cost so I took a closer look: repairing a 1hp bunker to full cost 35 minerals, repairing a 175hp bunker to full cost 17 minerals and extrapolates to 34 for a full bunker (this method avoids burning damage), and even using your number (24) it does not come out a 41.6% cost. The percentages on other buildings seem to be off, though I didn't check their repair costs like I did with the bunker.
Jiiks
Profile Joined January 2009
Finland487 Posts
Last Edited: 2009-04-26 13:45:44
April 26 2009 13:45 GMT
#85
Jiiks, are you sure your building numbers are correct? I saw the bunker had an oddly high percentage cost so I took a closer look: repairing a 1hp bunker to full cost 35 minerals, repairing a 175hp bunker to full cost 17 minerals and extrapolates to 34 for a full bunker (this method avoids burning damage), and even using your number (24) it does not come out a 41.6% cost. The percentages on other buildings seem to be off, though I didn't check their repair costs like I did with the bunker.


Yeah there might be typos i tested bunker again and it took 34minerals/34%, other then that they seem to be right maybe 0,x off.
Normal
Please log in or register to reply.
Live Events Refresh
Next event in 13m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Bellum Gens Elite223
EnDerr 35
StarCraft: Brood War
Calm 13231
Sea 3099
Bisu 681
Jaedong 470
Hyuk 397
BeSt 218
EffOrt 215
Zeus 189
PianO 124
Leta 111
[ Show more ]
sorry 96
Mind 73
Hyun 43
Sacsri 19
GoRush 16
ivOry 9
Noble 8
Dota 2
XcaliburYe700
Counter-Strike
Stewie2K1213
Heroes of the Storm
Khaldor223
Other Games
singsing1317
Mew2King213
XaKoH 147
Organizations
Dota 2
PGL Dota 2 - Main Stream4285
Other Games
gamesdonequick740
StarCraft: Brood War
UltimateBattle 19
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 11 non-featured ]
StarCraft 2
• LUISG 49
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Upcoming Events
CranKy Ducklings
13m
Bellum Gens Elite
13m
Reynor vs ShoWTimE
Serral vs Lambo
Clem vs Zoun
SC Evo League
2h 13m
Fire Grow Cup
5h 13m
CSO Contender
7h 13m
BSL: ProLeague
8h 13m
StRyKeR vs MadiNho
Cross vs UltrA
TT1 vs JDConan
Bonyth vs Sziky
Replay Cast
14h 13m
SOOP Global
17h 13m
Creator vs Rogue
Cure vs Classic
SOOP
23h 13m
Classic vs GuMiho
Sparkling Tuna Cup
1d
[ Show More ]
AllThingsProtoss
1d 1h
Fire Grow Cup
1d 5h
BSL: ProLeague
1d 8h
HBO vs Doodle
spx vs Tech
DragOn vs Hawk
Dewalt vs TerrOr
Replay Cast
1d 14h
Replay Cast
2 days
Replay Cast
3 days
WardiTV Invitational
3 days
WardiTV Invitational
3 days
GSL Code S
3 days
Rogue vs GuMiho
Maru vs Solar
Replay Cast
4 days
GSL Code S
4 days
herO vs TBD
Classic vs TBD
The PondCast
5 days
Replay Cast
5 days
GSL Code S
5 days
WardiTV Invitational
6 days
Korean StarCraft League
6 days
Liquipedia Results

Completed

CSL Season 17: Qualifier 1
DreamHack Dallas 2025
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL Season 17: Qualifier 2
2025 GSL S2
BGE Stara Zagora 2025
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025

Upcoming

CSL 17: 2025 SUMMER
Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Murky Cup #2
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.