Opened 8 years ago

Closed 4 years ago

#3707 closed defect (fixed)

[PATCH] Rebalance repairable

Reported by: bb Owned by:
Priority: Should Have Milestone:
Component: Simulation Keywords: patch simple
Cc: Patch:

Description (last modified by Silier)

Currently the repair rates are very unbalanced. This defect is best displayed on walls. Walls have a repair rate of 33.3 health / second / "worker". 2 or 3 workers repair a wall faster than a ram can damage it (without upgrades), while the ram takes up a population of 5 and costs much more. If wall is attacked by 2 rams, it should not be possible to defend by just repairing from the other side. On one side of a big wall are fitting 16 workers. If all workers are repairing and on the other side are 2 rams attacking, the wall should slowly be destroyed.

Simple equotation (skipping buildMultiplier part): Lets say now the repair rate A * 2 workers = damage of 1 ram so repair rate A * 4 workers = damage of 2 rams We want a repair rate B * 18 workers = damage of 2 rams Then B = A * 4 workers / 18 workers A= 33.3 B=7.4

With the new value (7.4) 18 workers could repair a wall as fast as 2 rams are damaging it. But only about 16 workers fit on one side.

A wall is build with one worker in 15 to 45 seconds, witch is very fast compared to other structures (it flies up in the sky). Even 1 worker can build a wall faster than 1 ram can destroy the foundation. The build time should be checked.

The repair rate of Ships (10) got overcompensated in a19. It should be lowered.

The stone gate has a BuildTime of 0, resulting in an infinity repair rate (from tooltip) and it's repairing at 1 Hp/second/worker. BuildTime should get a value, but no displayed in the "build tooltip".

At line 53 of Repairable.js there is a TODO for resource cost by repairing. This will incline with balance too, so adding it too this ticket.

Attachments (3)

t3707_repair_cost.diff (2.2 KB ) - added by bb 8 years ago.
patch for repair costs
gate.patch (5.5 KB ) - added by mimo 8 years ago.
t3707_repair_cost2.diff (2.5 KB ) - added by bb 8 years ago.

Download all attachments as: .zip

Change History (22)

by bb, 8 years ago

Attachment: t3707_repair_cost.diff added

patch for repair costs

by mimo, 8 years ago

Attachment: gate.patch added

comment:1 by mimo, 8 years ago

the patch gate.patch removes the display of the build time in the gate tooltip (as it does not apply), and set the same buildTime for gate as the long wall to be used when repairing. In addition, the repairTimeRatio for walls is increased from 2 (default for structures) to 4.5. Can be finetuned later if not enough.

Concerning the possibility to add a cost for repairing, it is rather a design decision. We already discussed it in the past, and the consensus was to not have any repair cost, but keep repairing slow. And i would still go with that, but we can reopen the discussion if there is some will for it. There are also some additional points which would have to be taken into account if we want to go with costs:

  • when building, if we are under enemy fire and the structure is damaged while being built, the corresponding extra cost should be taken into account.
  • what if we have not enough resources at a given moment ? we would have to order the units to repair, but they would only repair according to the current resources and stop, and the next turn, if we have gathered some resources, we have to order them again to repair. That would quickly become annoying.

comment:2 by mimo, 8 years ago

In 17536:

decrease the repair rate of walls, refs #3707

comment:3 by mimo, 8 years ago

previous patch only modifies the repairTimeRatio of walls, but the problem with gates having buildTime=0 has still to be solved, ideally in a Convert component. Note that currently, all gates have buildTime 0 (so will be repaired at a rate of 1) except gaul and brit ones which have a non-zero buildtime, so will be repaired at a faster rate.

comment:4 by elexis, 8 years ago

Review resource costs:

  • costsToPay useless variable
  • 0.5 should become a member variable, maybe it becomes a template setting at some point
  • Unneeded comments, besides that one about TrySubtractResources showing a notification. (and don't use the word "should" because it is ambiguous)
  • those are objects, not arrays, therefore use {} instead of [] when initializing them
  • the two PostMessage calls in that function could be merged if you save the result of TrySubtractResources in a new variable affordable
  • I'm not sure if there might be unintended side-effects of sending the FinishedConstruction message. Maybe some receiver assumes the building has 100% health in that case?

comment:5 by elexis, 8 years ago

TODO: The repairrate of ships has not been addressed yet!

comment:6 by bb, 8 years ago

The repair rate of Ships (10) got overcompensated in a19. It should be lowered.

(from description)

by bb, 8 years ago

Attachment: t3707_repair_cost2.diff added

comment:7 by mimo, 8 years ago

Note as i have said in comment 1, there was a decision some time ago to not have repair cost (which has still my preference). So if you want to change that, you must explain what are the benefits concerning the gameplay. Futhermore, I quoted two drawbacks in comment 1 which does not seem to be addressed by this patch.

comment:8 by elexis, 8 years ago

To me it feels wrong being able to repair for free. If an entity is destroyed 90%, it will have to be rebuilt and that requires resources, since the building is made out of it (Some of them can likely be reused, hence there is a factor 0,5 in the patch). (AoE2 also has it that way (not that we have to clone everything)).

benefits of resource costs concerning the gameplay

The benefit to the gameplay is that attacking buildings but then not completely destroying them would not be completely useless.

when building, if we are under enemy fire and the structure is damaged while being built, the corresponding extra cost should be taken into account.

Which extra cost? The HP is reduced, so you have to repair more and thus you are charged more. The computation is even accurate towards fractions of resources.

what if we have not enough resources at a given moment ? we would have to order the units to repair, but they would only repair according to the current resources and stop, and the next turn, if we have gathered some resources, we have to order them again to repair. That would quickly become annoying.

Which is to be expected if one wants to repair something without having the needed resources. Compare to the need of placing 30 houses but only having the resources for one at a time.

comment:9 by mimo, 8 years ago

The repair cost is taken care by the repair time which is bigger that the build time (and during that time, workers do not gather). With a cost, you should decrease all these repair times. And i think it is more penalizing that it takes time to repair.

When building, the cost is substracted at the beginning, and then the construction continue until the structure is fully build. So all extra damages during construction are free.

The factor 0.5 is completely arbitrary: stone for example should be fully reused.

I don't understand how adding something which force you to do some micro (having to check that you have enough resources, and if not reordering your units to repair when you have) can be an improvment (even if AoE2 did it that way) while the present way already is doing the job nicely (by having longer repair time).

comment:10 by ffm, 8 years ago

I am for repair costs.

Now the game supports highly a booming/turtling mix with extreme trading, making the endgame a death-match game. This has several reasons, but adding repair costs will suck on the resources and will help to get away from this "delete workers, only champs, do all upgrades", as the player has to be more careful, with his resources.

Reality reasons: If a construction is attacked, the construction would not go on and naturally the destroyed parts would have to be replaced, which will cost more.

If a fort is under long catapult siege and the folk is too poor to restore the ruins, it just cant. It not about the more time or men the repair takes.

The repair cost factor 0.5 to me seems fine to me. As it is 0 (for free) < f < 1 (just build a new one). This sure can be balanced for civ/resource/building

If a player is on a small island, all resources are gathered, no trade, but he has a CC, 2 forts, 3 towers and walls on the island. After each invasion, the player can just repair everything and this will stretch the game very long.

comment:11 by Itms, 8 years ago

Milestone: Alpha 20Alpha 21

comment:12 by fatherbushido, 8 years ago

It seems that repairing costs was yet discussed for #633, #537. Imo if the repair time is bigger enough, there is no need for repairing costs (other than time and workers). For the gate issue, perhaps #2706 can fix it too ?

comment:13 by scythetwirler, 8 years ago

I'd be in favor of repair time, but with one caveat - workers repair at a normal rate if the structure has not taken damage in x seconds (maybe 5?), otherwise, workers repair at 0 or a very slow rate if the structure has been damage in the last x seconds.

comment:14 by scythetwirler, 8 years ago

Keywords: design added

in reply to:  13 comment:15 by elexis, 8 years ago

Keywords: review removed

Taking out of the review queue because it's kind of decided now not to have the resource costs when repairing.

Replying to scythetwirler:

workers repair at a normal rate if the structure has not taken damage in x seconds (maybe 5?), otherwise, workers repair at 0 or a very slow rate

Not sure if that would be transparent to the player.

comment:16 by fatherbushido, 8 years ago

see r18502 for gate

comment:17 by elexis, 8 years ago

Keywords: simple added; design removed
Milestone: Alpha 21Backlog

So only ship repair rates are remaining? Should be simple to fix then.

comment:18 by Imarok, 5 years ago

Component: UI & SimulationSimulation

Move tickets to Simulation as UI & Simulation got some sub components.

comment:19 by Silier, 4 years ago

Description: modified (diff)
Milestone: Backlog
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.