|
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.
|
^that last bit is very interesting o_o
|
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.
|
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.
|
I love blizzards algorithms =) Thx for the people doin all the testing
|
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.
|
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
|
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.htmlSome 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
|
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.
|
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 ?
|
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 ^^
|
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.htmlSome 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?
|
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.
|
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
|
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!
|
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.
|
|
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?
|
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.
|
Does it cost more if you repair with more scvs?
|
|
|
|