Build 189 Alien armor evolve bug fix

BobLOLnessBobLOLness Join Date: 2011-12-07 Member: 136950Members
<b>Note: This is a server side bugfix.</b>

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

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->--- 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<!--c2--></div><!--ec2-->


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: 75079Members
    This one is really annoying, I would like this to be included !
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    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
  • PricePrice Join Date: 2003-09-27 Member: 21247Members
    <!--quoteo(post=1889150:date=Dec 8 2011, 05:15 PM:name=Yuuki)--><div class='quotetop'>QUOTE (Yuuki @ Dec 8 2011, 05:15 PM) <a href="index.php?act=findpost&pid=1889150"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->This one is really annoying, I would like this to be included !<!--QuoteEnd--></div><!--QuoteEEnd-->
    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 )
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    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: 21247Members
    edited January 2012
    <!--quoteo(post=1892071:date=Dec 30 2011, 05:05 AM:name=Schimmel)--><div class='quotetop'>QUOTE (Schimmel @ Dec 30 2011, 05:05 AM) <a href="index.php?act=findpost&pid=1892071"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->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.<!--QuoteEnd--></div><!--QuoteEEnd-->
    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?
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    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: 63260Members, 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

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->kBaseArmorAbsorption = 0.7        
    kHealthPointsPerArmor = 2

    ...

    // Damage types        
    kHealthPointsPerArmorLight = 4        
    kHealthPointsPerArmorHeavy = 1        
    kPuncturePlayerDamageScalar = 1.5        
    kStructuralDamageScalar = 2<!--c2--></div><!--ec2-->

    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.
  • FloodinatorFloodinator [HBZ] Member Join Date: 2005-02-22 Member: 42087Members, 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
  • Fluid CoreFluid Core Join Date: 2007-12-26 Member: 63260Members, 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
Sign In or Register to comment.