Skip to content
This repository was archived by the owner on Sep 6, 2026. It is now read-only.

Damage Resistance for buildings

Darin McBride edited this page Oct 7, 2015 · 3 revisions

What

Buildings to take different amounts of damage from the same events.

Why

Damage that buildings take should not be so extreme. It should not take 3 snark warheads (on average) to destroy every single building, regardless of level. Flattening a level 1 planet should not be as difficult as flattening a level 30 planet.

How

Buildings have hit points instead of efficiency percentage.

Examples:

  • Standard HP: 50 + 1 / level / level (50 + (level * (level-1))/2), e.g., level 1 = 51, level 2 = 53, level 3 = 56, level 30 = 515
  • Standard glyph HP: 20 + 5 / level (level 30 = 170)
  • SAWs: TBD
  • Modules: 5 times the standard, or 250 + 5 / level / level.

Effective level of a building would be based on how many hp they have remaining. If they have enough HP for level 3, they're level 3, if they're in between 3 and 4, their production would be between 3 and 4 (but otherwise act as level 3 for things that can't be divided, such as berth level and such).

Snarks would do HP damage (random, but approx 20 per warhead, maybe partially depending on combat rating), BFG would also do HP damage (approx 5k). Fissures could still do % damage (buildings take x% of their max HP). Targeted warheads (seekers) could do more damage to their targets.

Citadel would absorb HP damage, and self-repair over time.

Hit points over level 30 may spike even faster than this. So a GG platform 31 may have more than 31 points more than a level 30 platform, for example. This would allow AIs to have higher levels to withstand extra damage for more challenge, though other safeguards would have to be there for players not to inherit such buildings.

Repair costs would remain more or less the same, overall. However, the minimum amount of resource for partial repairs would be based on hit points, not percentages. So, a building with 515 hit points could be partially repaired at 1/515th of its total cost. Though this could argue for even higher repair costs, the balance here is that you can only really produce so much resource at a time to perform those repairs. This does mean, however, that getting from level 5 to level 6 effectiveness would cost more if the real level of the building is level 30 than if the building is really level 8. Also, the building will produce or consume less with this change than it does currently for similar amounts of damage.

Repair costs for glyph buildings could use halls of vrbansk for repairs. I would suggest that getting a glyph building back to level 1 would be free (so if it has less than 20HP left, based on the above numbers, free to repair back to 20), but beyond that a single halls can be used to repair, say, 5 hit points. This means that repairing a level 30 glyph building would require 29 halls, again based on the above numbers.

This also opens up an idea for Unities: a unity that adds temporary hit points to a building or a planet. Helps protect a planet, and, to a lesser degree, helps repair the planet. On expiration, those temporary hit points should take their damage with them - if the unity provides 20HP to a building, and the building currently has 20HP or less damage, it's not really damaged, and the unity would take that damage away when it expired. Said Unity could also be calculated at all times as if the damage they're representing wasn't taken for purposes of effective level, though it would be considered present for purposes of repair so you can repair the damage it has taken and be able to absorb it again before the Unity has expired. I'm currently thinking that the Unity would provide 5, 10, 25, 50, 100, or 250 hit points to every building on the planet for two weeks, to provide some concrete numbers to discuss.

OLD IDEAS

How

  1. Move the logic for damage into Building.pm's spend_efficiency. This will ensure that a building can't go below zero. Simultaneously, Module.pm would have its around modifier also divide the incoming damage by 5. (The BFG failure code would have to re-add the x5 modifier that it had before when I assumed this code was already here.) Also in Module, we would need to call $self->$orig($amount) prior to determining if a demolish or downgrade was required, and check the current efficiency to see if it was zero to see if demolishing or downgrading will happen.

  2. In the Building.pm base class add in a method to describe the level-dependent modifier, such as:

     sub damage_modifier { 1 / (1 + log shift->level) }
    

    (The exact value is open for discussion) This will then be used by spend_efficiency as a multiplier to the damage being taken. Note that the Module.pm could have that divide-by-5 modifier changed to sub damage_modifier { shift->SUPER::damage_modifier / 5 } for simplicity.

  3. Find other buildings which may be stronger or weaker which would have their own damage modifier, e.g., sub damage_modifier { shift->SUPER::damage_modifier / 1.5 } for a building that takes damage a little bit slower than normal for its level, or sub damage_modifier { 1 } for a building that takes the same damage at level 1 as at level 30 (maybe glyph buildings?).

Alternative suggestions

  1. Give buildings a level-based "hit point" value, and then "spend_efficiency" would spend its damage every time, but when we calculate current efficiency, it would be a matter of dividing to find the percentage. This would be a more-extensive code change, but since many RPGers are familiar with hit point systems, this might make the whole thing make more sense to more players.

  2. Have the damage / hit points from above be also modified by an affinity (probably manufacturing). Probably harder to do as damage, easier to add some minor amount of hit points from affinities without blowing the advantages up too much.

  3. Snarks' combat ratings could also play a role in how much damage they do.

Clone this wiki locally