Build 189 Alien armor evolve bug fix

BobLOLnessBobLOLness Join Date: 2011-12-07 Member: 136950Posts: 2Members
Note: This is a server side bugfix.

There is currently a bug with alien armor that occurs in the following situation:

1) The alien commander has researched armor upgrades.
2) As an alien you evolve to another lifeform or evolve an upgrade.

The bug causes you to have your armor set to the max possible armor level of the lifeform, but without the upgrade applied. Meaning that after coming out of the egg you have to heal at hive,crag or gorge to get to your max armor level with upgrades. In the case of evolving upgrades it means you could have full armor and you will actually have your armor reduced after coming out the egg.


Here the fix

CODE
--- Embryo.lua    Wed Dec 07 17:33:46 2011
+++ Embryo.lua    Thu Dec 08 15:44:25 2011
@@ -206,7 +206,7 @@
                 end    

                 newPlayer:SetHealth( self.healthScalar * LookupTechData(self.gestationTypeTechId, kTechDataMaxHealth) )
-                newPlayer:SetArmor( self.armorScalar * LookupTechData(self.gestationTypeTechId, kTechDataMaxArmor) )
+                newPlayer:SetArmor( self.armorScalar * newPlayer:GetArmorAmount())
                
                 // Return false so that we don't get called again if the server time step
                 // was larger than the callback interval



For reference here is what happens to your armor in different situations before and after patch:


BEFORE

Evolving to new lifeforms sets armor to the max armor for that lifeform excluding armor upgrades.
Evolving upgrades keeps the percentage armor you had, but is applied to the max armor of lifeform without armor upgrades.


AFTER

Evolving to different lifeforms sets armor to max armor for that lifeform + armor upgrades.
Evolving upgrades keeps the percentage armor amount you had when you clicked evolve.


Extra fun fact, damage to egg has no effect on the health or armor of the lifeform after hatching.

Comments

  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Posts: 1,731Members
    This one is really annoying, I would like this to be included !
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Posts: 464Members
    edited December 2011
    i think its cause they broke the upgrades attack upgrades are all together missing also.

    also that just looks like a change log not a fix
    Post edited by Unknown User on
  • PricePrice Join Date: 2003-09-27 Member: 21247Posts: 1,281Members
    QUOTE (Yuuki @ Dec 8 2011, 05:15 PM) »
    This one is really annoying, I would like this to be included !

    YES!
    Nice done BobLOLness...so simple?
    Anyway i hate always running back to hive or search for a gorge...or maybe get killed (happend never, after i notice, i have just to hide :P )
    Buy NS2 @ Steam![Support the Indie Devs!]
    ( my english isn't the best... )

    ,,NS1 was one of the best mods."
    ,,NS2 is one of the best MP games."

    A NS2 classic mod, will it be a remake?
    New NS2 Maps: Biodome, Ignore: BVKnight, Metal Man
    EVERYONE is a Winner, because you won the race against 400–800 other Sperms :P
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Posts: 2,331Members, NS2 Developer, NS2 Playtester, Squad Five Gold
    thanks for submitting this, but i changed most of that code already (and fixed all armor bugs, for marines as well)

    in future the alien armor upgrades will be different: for each hive you have you get armor1 - armor3. those passive upgrades will not increase your armor values, but increase their effectiveness: armor1 translates 1:2 HP:AP, armor2: 1:3 etc. that change has been made since we also unlocked carapace and didn't want that the upgrades overlap. so that new armor upgrades are actually the same as in ns1, except that they will be shown in the buy menu instead of being entirely hidden

    back to your bug fix: i made a similar change as you did here when setting the armor after evolving / ejecting from hive with the carapace upgrade. so that annoying bug we had before (evolving and need to heal up afterwards...) is finally gone ;)
  • PricePrice Join Date: 2003-09-27 Member: 21247Posts: 1,281Members
    edited January 2012
    QUOTE (Schimmel @ Dec 30 2011, 05:05 AM) »
    in future the alien armor upgrades will be different: for each hive you have you get armor1 - armor3. those passive upgrades will not increase your armor values, but increase their effectiveness: armor1 translates 1:2 HP:AP, armor2: 1:3 etc.

    Sorry but i don't understand.
    You said "not increase your armor values" but you said HP:AP = 1:2 so it will double, right? or did you mean don't increase your HP values?
    Or did you mean that with armor 1 passive upgrade, the aliens take half of the damage, like 50% instead of 100% damage?
    Post edited by Unknown User on
    Buy NS2 @ Steam![Support the Indie Devs!]
    ( my english isn't the best... )

    ,,NS1 was one of the best mods."
    ,,NS2 is one of the best MP games."

    A NS2 classic mod, will it be a remake?
    New NS2 Maps: Biodome, Ignore: BVKnight, Metal Man
    EVERYONE is a Winner, because you won the race against 400–800 other Sperms :P
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Posts: 2,331Members, NS2 Developer, NS2 Playtester, Squad Five Gold
    1:2 means 1 armor point is worth 2 health points. when you deal 10 normal damage to armor it will reduce armor points by 5
  • Fluid CoreFluid Core Join Date: 2007-12-26 Member: 63260Posts: 399Members, Reinforced - Shadow
    How does the damage types even work? It's all pretty confusing to me really. I mean, I found this in the BalanceHealth.lua

    CODE
    kBaseArmorAbsorption = 0.7        
    kHealthPointsPerArmor = 2

    ...

    // Damage types        
    kHealthPointsPerArmorLight = 4        
    kHealthPointsPerArmorHeavy = 1        
    kPuncturePlayerDamageScalar = 1.5        
    kStructuralDamageScalar = 2


    The damage scalars are easy enough to understand, but the HealthPointsPerArmor aren't quite so intuitious. So let's pretend a lerk hits a 100/90 marine for 100 light damage. What will the marine end up having left? As long as we have armor, 70% of the damage is reduced, so we will take 70 damage? Then, we have the two HPA modifiers, supposedly they are multiplicative? So for each 8 health taken, one armor is reduced? If this is how it works, then you end up with 30 health and 82 armor. Can't be right.
    .....//\\......This is a pylon
    ....///\\\....Copy this to your
    ....\\\///....Signature if you
    .....\\//......Must Construct
    '''''''''''''''''''''Additional Pylons
  • FloodinatorFloodinator [HBZ] Member Join Date: 2005-02-22 Member: 42087Posts: 1,301Members, Reinforced - Shadow
    edited January 2012
    I understand it so that the armor absorbs 70% of the DMG, the marine would end 70/72 (because the 70 lightDMG only do a quarter DMG to armor)then.

    And the khealthpointsperarmor is the normal damage : khealthpointsperarmor==khealthpointsperarmornormal

    LightDMG: 4 light DMG hits reduce armor by 1
    NormalDMG: 2 normalDMG hits reduce armor by 1
    HeavyDMG: 1 heavyDMG hits reduces armor by 1
    Post edited by Unknown User on
    image
  • Fluid CoreFluid Core Join Date: 2007-12-26 Member: 63260Posts: 399Members, Reinforced - Shadow
    That makes sense, thanks for clarifying :)

    I even said that 70% of damage was reduced, next sentence I had messed that up.. fail :P
    .....//\\......This is a pylon
    ....///\\\....Copy this to your
    ....\\\///....Signature if you
    .....\\//......Must Construct
    '''''''''''''''''''''Additional Pylons
Sign In or Register to comment.