Friday, August 27, 2021

Do Zombies Get Slower and Weaker as Time Progresses?


In the Sandbox settings, under Zombie Lore, there is the "Decomposition" dropdown.  By default, "Slows + Weakens" is selected.

The wiki says "Decomposition: How time will affect the zombie's speed and strength/toughness."

But do zombies actually get slower and weaker as time progresses?

I don't think so.

How do I figure that, based on the code?

The name of that setting is ZombieLore.Decomp (there can be slight variations, just as SandboxOptions.instance.Lore.Decomp), and I don't see that being used to make zombies slower or weaker.

NOT seeing code isn't particularly convincing, so I decided to take a look at "Slows + Weakens".  If decomposition did make zombies slower or weaker, where would that go in the code?  Probably where strength and speed are used, and where they are initially set.

In the IsoZombie class there is a method called "DoZombieStats".  It is called by both the constructor and the load method.

    public void DoZombieStats() {
        if (SandboxOptions.instance.Lore.Cognition.getValue() == 1) {
            this.cognition = 1;
        }
        if (SandboxOptions.instance.Lore.Cognition.getValue() == 4) {
            this.cognition = Rand.Next(0, 2);
        }
        if (this.strength == -1 && SandboxOptions.instance.Lore.Strength.getValue() == 1) {
            this.strength = 5;
        }
        if (this.strength == -1 && SandboxOptions.instance.Lore.Strength.getValue() == 2) {
            this.strength = 3;
        }
        if (this.strength == -1 && SandboxOptions.instance.Lore.Strength.getValue() == 3) {
            this.strength = 1;
        }
        if (this.strength == -1 && SandboxOptions.instance.Lore.Strength.getValue() == 4) {
            this.strength = Rand.Next(1, 5);
        }
        if (this.speedType == -1) {
            this.speedType = SandboxOptions.instance.Lore.Speed.getValue();
            if (this.speedType == 4) {
                this.speedType = Rand.Next(2);
            }
            if (this.inactive) {
                this.speedType = 3;
            }
        }

Both strength and speed are referenced in this code, but there is nothing referencing either "Decomp" or how long the game has been going on.  I've seen "GetNightsSurvived" and "DaysSinceStart" and "getCalender()" and "getWorldAgeDays" used to determine how much time has passed.  Nothing in IsoZombie seems to associate the date or time with zombie strength or speed.  In IsoZombie, strength isn't actually set to a valid value except for in this portion of code.

Somewhere else I looked was when multiple zombies surround you and drag you down.  This comes from the BodyDamage class

        int n7 = this.getParentChar().getSurroundingAttackingZombies();
        n7 = Math.max(n7, 1);
        n4 -= (n7 - 1) * 10;
        n5 -= (n7 - 1) * 30;
        n6 -= (n7 - 1) * 15;
        int n8 = 3;
        if (SandboxOptions.instance.Lore.Strength.getValue() == 1) {
            n8 = 2;
        }
        if (SandboxOptions.instance.Lore.Strength.getValue() == 3) {
            n8 = 6;
        }
        if (this.ParentChar.Traits.ThickSkinned.isSet()) {
            n4 = (int)((double)n4 / 1.3);
        }
        if (this.ParentChar.Traits.ThinSkinned.isSet()) {
            n4 = (int)((double)n4 * 1.3);
        }
        if (!"EndDeath".equals(this.getParentChar().getHitReaction())) {
            if (!this.getParentChar().isGodMod() && n7 >= n8 && SandboxOptions.instance.Lore.ZombiesDragDown.getValue() && !this.getParentChar().isSitOnGround()) {
                n5 = 0;
                n6 = 0;
                n4 = 0;
                this.getParentChar().setHitReaction("EndDeath");
                this.getParentChar().setDeathDragDown(true);

Here, n7 is the number of zombies surrounding the character, and it looks like the value for n8 is the number of zombies required to take down a survivor.  If zombie strength is normal (or, interestingly, random), it takes 3.  If zombie strength is superhuman, it takes 2.  If zombie strength is weak, it takes 6.  No mention of decomposition state or how long the world has been around.

While not conclusive, this appears to be pretty strong evidence that both the Zombie Decomposition sandbox setting and zombie decomposition in general are not used to weaken and slow down the zombies as time passes.

I've heard that zombies used to get weaker and slower as time progressed.  So either this is just a setting they haven't gotten around to taking out yet, or something that they plan on implementing (or re-implementing) in the future.

Additional Notes:

I didn't see zombie strength affecting how much damage a character takes when hit, so zombie strength may only affect how many zombies are needed to drag a character down.  When I do my post on wall strength, I'll check to see if zombie strength affects how much damage zombies do to constructions.


Thanks for reading!  If you notice a mistake or have any questions you'd like me to answer, please let me know!



No comments:

Post a Comment

Do Gloves Protect You From Broken Glass?

Yes, gloves protect you from handling broken glass - any pair of gloves.  But gloves are not needed when removing broken glass from a smashe...