Jump to content

Random Zombie Speeds?


Deko

Recommended Posts

  • 2 weeks later...

check out the file entityclass.xml and the code within each zombie usually has a parameter that randomizes the speed. i forgot the actual name and not at my computer atm... but this speed randomizer value is presented as a range like -0.08 to 0.2, and added to the zombie's base speed. this randomized value is a narrow range, so you don't see drastic variations in zombie speed.

 

so I'd figure you can do a bigger range like -0.5 to 0.5 and you'll see a larger variation of speeds.

 

btw, the typical zombie speeds are like 0.2 which is close to walking and 0.8 is a brisk jog. feral sprinting zombies are at speeds around 1.3.

Link to comment
Share on other sites

From the zombieTemplateMale

 

    <property name="MoveSpeed" value="0.08"/> <!-- Just shambling around -->
    <property name="MoveSpeedAggro" value="0.2, 1.25"/> <!-- Chasing a target min/max (like day or night)-->
    <property name="MoveSpeedRand" value="-.2, .25"/> <!-- Rand added to min aggro speed -->
    <property name="MoveSpeedPanic" value="0.55"/>

 

It looks like the randomizer just affects Aggro speed (based on the comments)

 

From zombieFatCop

 

    <property name="MoveSpeedAggro" value="0.2, 1.2"/>

 

So it doesn't look like they are modifying the base speed, just the aggro speed (there might be examples but I looked at 5-6 of them and they only modified aggro speed).

Link to comment
Share on other sites

the comments are a bit confusing. "MoveSpeed" is the speed of the zombie when it doesn't see you. for "MoveSpeedAggro", the first value is the speed of the zombies when they notice and chasing you, and the 2nd number is the speed when they're feral or it turns night time. i regularly change that first number quite often for my various enZombies to customize the speed at which the zombies chase you.

 

i think that the MoveSpeedRand is the random value between -0.2 and 0.25 (or whichever you change it to) that is added to that first number of MoveSpeedAggro. so this was the the number i was thinking about that can be changed to something like say -0.2 and 0.75 to give a larger random speed effect for when zombies chase you.

Edited by ErrorNull (see edit history)
Link to comment
Share on other sites

37 minutes ago, ErrorNull said:

the comments are a bit confusing. "MoveSpeed" is the speed of the zombie when it doesn't see you. for "MoveSpeedAggro", the first value is the speed of the zombies when they notice and chasing you, and the 2nd number is the speed when they're feral or it turns night time. i regularly change that first number quite often for my various enZombies to customize the speed at which the zombies chase you.

 

i think that the MoveSpeedRand is the random value between -0.2 and 0.25 (or whichever you change it to) that is added to that first number of MoveSpeedAggro. so this was the the number i was thinking about that can be changed to something like say -0.2 and 0.75 to give a larger random speed effect for when zombies chase you.

 

Good to know.  I just started modding recently so I have learned a lot, but there is a lot that I still have to figure out.

 

So you could also randomize it even more if you add MoveSpeedAggro to each entity with different ranges (if you are inclined) - so one group of zombies are more varied at a lower level while others are varied at a higher level.

 

What is MoveSpeedPanic for (if you know)?  I don't think the zombies panic  🙂

Link to comment
Share on other sites

so how it works is that zombieTemplateMale is the entity that all other zombies inherit their default attributes value from. for example, among the many other properties, zombieTemplateMale defines the following:

 

<!-- when zombie does not see you -->
<property name="MoveSpeed" value="0.08"/> 

<!-- 1st number: when zombie sees you, 2nd number: when zombie is feral or is night time -->
<property name="MoveSpeedAggro" value="0.2, 1.25"/> 

<!-- a random number between -0.2 and 0.25 is added to the "1st number" of MoveSpeedAggro" above -->
<property name="MoveSpeedRand" value="-.2, .25"/> 

<!-- speed when zombie is @%$#ed off after you hit it a coule times -->
<property name="MoveSpeedPanic" value="0.55"/> 

 

so any zombie that does not explicitly define their own value for MoveSpeed, MoveSpeedAggro, MoveSpeedRand, and MovespeedPanic, will just take on the above default values.

 

you're right, you can vary the speeds of different zombies by specifying different values for MoveSpeedAggro. for example:

 

custom zombie 1:

<property name="MoveSpeedAggro" value="0.2, 1.25"/>

 

custom zombie 2:

<property name="MoveSpeedAggro" value="0.4, 1.25"/>

 

custom zombie 3:

<property name="MoveSpeedAggro" value="0.6, 1.25"/>

 

this will give each of the above zombies different 'chasing' speeds (0.2, 0.4, 0.6), but have the same speed (1.25) if they're feral or when it's at night. you can also vary the 'chasing' speeds by using only the MoveSpeedRand property. i haven't actually tested the below yet, but this should produce zombies that have the same base speeds (MoveSpeedAggro) initially, but then have a 'randomizer' value (MoveSpeedRand) added to it on the fly to achieve the random speed variation:

 

custom zombie 1:

<property name="MoveSpeedAggro" value="0.2, 1.25"/>

<property name="MoveSpeedRand" value="-0.2, 0.0"/>

 

custom zombie 2:

<property name="MoveSpeedAggro" value="0.2, 1.25"/>

<property name="MoveSpeedRand" value="0.1, 0.3"/>

 

custom zombie 3:

<property name="MoveSpeedAggro" value="0.2, 1.25"/>

<property name="MoveSpeedRand" value="0.3, 0.6"/>

 

custom zombie 4:

<property name="MoveSpeedAggro" value="0.2, 1.25"/>

<property name="MoveSpeedRand" value="-0.3, 0.7"/>

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...