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.