1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Stacks being damaged or destroyed when near enemy cities

Discussion in 'Bugs and Crashes' started by delijoe, Oct 18, 2011.

  1. charlesb96

    charlesb96 King

    Joined:
    Oct 17, 2008
    Messages:
    669
    Location:
    Upper left corner of the Map
    How about putting a max percent on the damage caused, so you get no kills, but they will cut your attack strength down to 70% or even 80% for the modern age defence buildings? Then you can sit next to the city and not die from the building but you will be getting cut down to 80% damage max every turn.
     
  2. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Having looked at what the code does, it should not be killing any units by itself (unless you accumulate a damage modifier over 100, which I don't think is currently possible). It damages by the accumulated percentage damage mod from all such buildings based on each unit's current hit points, not total hit points.
     
  3. delijoe

    delijoe Chieftain

    Joined:
    Oct 25, 2001
    Messages:
    37
    I had stacks of riflemen killed completely in one turn...

    The city had a defense of 265% though so maybe that defense level is a bug...
     
  4. charlesb96

    charlesb96 King

    Joined:
    Oct 17, 2008
    Messages:
    669
    Location:
    Upper left corner of the Map
    I did not see in the Schema a tag for adjacent damage max damage, so that means it is possible to have kills in one turn and definitly in two. Can a tag be put in the schema so as to limit the damage caused by the towers? That way you will not get any kills from the tower, but only a large damage to your stack of units.
     
  5. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    The EXACT damage done (not max currently) is iAdjacentDamagePercent. If the sum of those values from all buildings goes over 100 then we're in trouble. Is this possible? I thoguh it wasn't with current buildings?

    Also the way the code APPEARS to work you can not die in quite a large number of turns ONLY from this defense damage if it's under 100%. The way the code at least appears to work is that each turn it does the aggregate damage percentage as a percentage of the unit's CURRENT hitpoins (NOT total hitpoints). So if the unit had 10HP and the defense damage was 70% health should go:
    Turn 0: 10
    Turn 1: 3 (10 - 70% of 10)
    Turn 2: 0.9 (3 - 70% of 3)
    Turn 3: 0.2
    ...
    Rounding may well kill it eventually but you get the idea - and obviosuly with the chnage I already made each unit only has a 1 in 4 chance of taking the hit each turn anyway.

    If someone can provide a save game where stacks are outright dying almost immediately that would be helpful...
     
  6. charlesb96

    charlesb96 King

    Joined:
    Oct 17, 2008
    Messages:
    669
    Location:
    Upper left corner of the Map
    Looking at when they can be built and when they go obsolete, you can have the bombard tower at 25%, the mechanical traps at 10%, and the ballista turret at 20% for a total of 55%, and at the end of the upgrade line is antimatter battery at 45% and the robotic traps at 30% for a total of 75%. If it is only a 25% chance of a unit getting the damage, it is very small odds of an entire stack dying on the first turn, and should not happen anyway, unless there are additional things causing damage, terrain, opportunity fire and such.
     
  7. EldrinFal

    EldrinFal King

    Joined:
    Mar 22, 2011
    Messages:
    926
    What if terrain damage is turned on and the tile the stack is on is one that causes damage?
     
  8. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    That could do it, but I doubt that's what people have been reporting.
     
  9. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    26,239
    Gender:
    Male
    Location:
    Las Vegas
    I'm sure this is what we all had in mind too... but I actually think the danger is that it goes off the total rather than the current. I've never seen the damage take out troops in the first turn but I have seen it quickly eradicate some troops entirely and while I can't confirm that without seeing it happen again I was fairly certain the % was being done as if the troop were fully healthy and not on the current hp. So I could be wrong.
     
  10. need my speed

    need my speed Rex Omnium Imperarium

    Joined:
    Oct 3, 2009
    Messages:
    2,055
    Gender:
    Male
    Location:
    European Union (Magna Batavia)
    What if it simply can't kill troops? It can bring them down to 0.1 HP, but not outright kill them?
     
  11. charlesb96

    charlesb96 King

    Joined:
    Oct 17, 2008
    Messages:
    669
    Location:
    Upper left corner of the Map
    this is why I suggested a max damage limit, like the seige weapons have. It will bring the unit down to a max percent damage of total hit points and no further. A different limit for each level of tower, like catapults go to a higher max than ballistas.
     
  12. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    If it's working as intended it would be irrelevant. Of it's not working as intended we should get an example and fix it, not sticky tape it with another mechanic.
     
  13. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    26,239
    Gender:
    Male
    Location:
    Las Vegas
  14. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    15,711
    Gender:
    Male
    Location:
    Western IL. cornfields
    Is it intended to damage Invisible units; Assassin, Rogue, Thief, and Ambusher?

    Currently it does.

    JosEPh
     
  15. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    26,239
    Gender:
    Male
    Location:
    Las Vegas
    yes... though that should probably be another field setting, shouldn't it? If visible... hmm... I mean, pit traps and such should still injure but bombard towers?
     
  16. Hydromancerx

    Hydromancerx C2C Modder

    Joined:
    Feb 27, 2008
    Messages:
    16,281
    Location:
    California, USA
    Well any towers are just throwing stuff off at random. Rogues are bound to get bit by something falling down on them. Though if they are by themselves would they attack at nothing? Then again they are rogues and I would suspect they would be good at evading traps.

    So I am on the fence about this. I could see where they could get hit but then I could see where they could either not be seen or evade traps.
     
  17. bill2505

    bill2505 King

    Joined:
    Sep 16, 2009
    Messages:
    645
    hey guys can you make traps to damage units only when the city is attacked attacking.
     
  18. need my speed

    need my speed Rex Omnium Imperarium

    Joined:
    Oct 3, 2009
    Messages:
    2,055
    Gender:
    Male
    Location:
    European Union (Magna Batavia)
    So I've made it so buildings never go obsolete by technologies... Can I still take a city in, say, the Modern Age? Or will the defence instantly kill me and will I need to make some buildings go obsolete again? Or is there some other work around, like, lowering the city's defence value? And to what would I need to lower it then?
     
  19. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    At least until we have time to rework this system fully, I don't really want an extra modifier on the building since that adds lots of hidden complexity to the city internally (since it just totals the adjacentDamage values and uses the aggregate which it couldn't do if some parts had differnces in other properties). How about if I make the chance of being hit (currently 1 in 4 for all units) 1 in 8 for invisible units?
     
  20. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    15,711
    Gender:
    Male
    Location:
    Western IL. cornfields
    I had an Assassin Hiding on a hill with rocky outcropping next to an Australian city and I had to move him because of the damage he was taking.

    I was waiting for the Settler in that city to finish as Curin was starting to crowd my border with new cities and I wanted to put a stop to it by assassinating his settler and guards.

    I think Invisible units, since they are "special" units should be exempt from tower and pit damages. No matter if they are mine or AI.

    JosEPh
     

Share This Page