Classes

This chapter documents the Classes used in this package.

Health

Health(level, health_cap, outbreak, multiplier):

Get zombie health and armour values. Creates a list of zombie health values. Uses desired level and a health cap value to compute health level.

Parameters
  • level (int) – Desired zombie level to test weapon strength at.

  • health_cap (int) – The level when zombie health values stop increasing. In season 5 this is level 55. Season 4 was 85. Optional

  • outbreak (bool) – If level is True, parameter is referencing an outbreak level, default is False. Optional

  • multiplier (int) – Value used to calculate armour, default is 2. Optional

Example
from health_armour import Health
zombie = Health(level=20, health_cap=55, outbreak=False, multiplier=2)
zombie_health = zombie.get_health # 2450
zombie_armour = zombie.get_armour # 1225
Note

The multiplier is what number you would like to divide the health number by to get armour health. Prior to season 4 this was half the zombies health.

zombie.health_armour.Health.get_health

Returns zombie health value.

zombie.health_armour.Health.get_armour

Returns zombie armour value.

DamageProfile

DamageProfile(weapon_class_levels, perk_class_levels, max_range):

Builds a DamageProfile Class, which holds weapon and perk class levels to be applied later on.

Parameters
  • weapon_class_levels (dict) – Dict of weapon types and tier level.

  • perk_class_levels (dict) – Dict of perk type and tier level.

  • max_range (int) – Maximum range for calculations, default is 100. Optional

Example
weapon_class_levels = {'Launcher': '5', 'Special': '5', 'Smg': '5', 'Shotgun': '5', 'Pistol': '5',
                       'Marksman': '5', 'Sniper': '5', 'Lmg': '5', 'Assault': '5', 'Melee': '5'}
perk_class_levels = {'speed': '5', 'stamin up': '5', 'deadshot': '5', 'death_perception': '5'}
damage_profile = DamageProfile(weapon_class_levels=weapon_class_levels, perk_class_levels=perk_class_levels,
                               max_range=100)
Note

By default the values are set to 0. User inputs change these and the effects are applied across the weapons:

zombie.processor.DamageProfile.hits

Returns hit value multipliers to account for accuracy and critical hit percentages.

zombie.processor.DamageProfile.get_weapon_classes

Returns user input weapon tier levels

zombie.processor.DamageProfile.get_perk_classes

Returns user input perk tier levels

zombie.processor.DamageProfile.consecutive

Returns a bool value representing if consecutive shots used

zombie.processor.DamageProfile.max_range

Max distance for calculations

ModifiedWeapon

ModifiedWeapon:

Builds a ModifiedWeapon Class, which holds default and modified weapon stats.

Parameters
  • weapon_name (str) – Name of the weapon.

  • weapon_class_levels (dict) – Dict of weapon types and tier level.

  • perk_class_levels (dict) – Dict of perk type and tier level.

  • nickname (str) – User input name for the weapon. Optional

  • equipped_attachments (dict) – Dict of weapon attachment location and attachment name. Optional

  • rarity (str) – Rarity color. Optional

  • pap (str) – Pack a punch level. Optional

  • accuracy (float) – Accuracy percent with the weapon. Optional

  • critical (float) – Critical hit percent with the weapon. Optional

Example

None

Note

An internal Class for organizing weapon stats.

zombie.processor.ModifiedWeapon.pack_a_punch_level

Returns pack a punch level

zombie.processor.ModifiedWeapon.rarity_level

Returns rarity level

zombie.processor.ModifiedWeapon.default_stats

Returns default stats for the weapon before perks, weapon tiers and attachments

zombie.processor.ModifiedWeapon.modified_stats

Returns default stats for the weapon after perks, weapon tiers and attachments

zombie.processor.ModifiedWeapon.get_attachments

Returns attachments and effects as a DataFrame

Analysis

Analyze(damage_profile, zombie_info, weapon_dic_lst):

Constructs dicts, pd.DataFrames and visualizations for comparing various weapons.

Parameters
  • damage_profile (DamageProfile) – DamageProfile class object.

  • zombie_info (Health) – Health class object.

  • weapon_dic_lst (dict) – List of weapons and weapon info.

  • columns_lst (List[str]) – Select columns to highlight, default is None. Optional

  • x_limit (int) – X limit on the graphs, default is 75. Optional

  • viz_index_point (int) – Reference point on the graphs, default is 40. Optional

  • save_image (bool) – If True, will save the plots, default is False. Optional

Example
from zombie.health_armour import Health
from zombie.processor import DamageProfile
from zombie.analysis import Analyze

# User inputs
weapon_class_levels = {'Launcher': '5', 'Special': '5', 'Smg': '5', 'Shotgun': '5', 'Pistol': '5',
                       'Marksman': '5', 'Sniper': '5', 'Lmg': '5', 'Assault': '5', 'Melee': '5'}
perk_class_levels = {'speed': '5', 'stamin up': '5', 'deadshot': '5', 'death_perception': '5'}
# Core Classes
damage_profile = DamageProfile(weapon_class_levels=weapon_class_levels, perk_class_levels=perk_class_levels,
                               max_range=100)
# Set Zombie Health
zom = Health(level=60, health_cap=55, outbreak=False, multiplier=2)

MP5 = {
    'Muzzle': 'Agency Suppressor',
    'Barrel': 'Task Force',
    'Body': 'Ember Sighting Point',
    'Underbarrel': 'Bruiser Grip',
    'Magazine': 'Salvo Fast Mag',
    'Handle': 'Serpent Wrap',
    'Stock': 'Raider Stock'}

PPSH = {
    'Muzzle': 'GRU Suppressor',
    'Barrel': 'Task Force',
    'Body': 'Ember Sighting Point',
    'Underbarrel': 'Bruiser Grip',
    'Magazine': 'VDV Fast Mag',
    'Handle': 'Serpent Wrap',
    'Stock': 'KGB Skeletal Stock'}

# Returns a Dict with the specific weapon stats, adjusted for attachments.
# Accuracy and Critical values (float) can be found in game at
# Barracks\\Combat Record\\Zombies\\Weapon Name.
gun_lst = [
    {'weapon': 'MP5', 'nickname': 'Temp MP5', 'equipped_attachments': MP5, 'rarity': 'common',
     'pap': '0', 'accuracy': None, 'critical': None},
    {'weapon': 'PPSH', 'nickname': 'Temp PPSH', 'equipped_attachments': PPSH, 'rarity': 'common',
     'pap': '0', 'accuracy': None, 'critical': None}]

# Calculate
analysis = Analyze(damage_profile=damage_profile, zombie_info=zom, weapon_dic_lst=gun_lst)
Note

None

zombie.analysis.Analyze.weapons_lst

Returns a list of ModifiedWeapons

zombie.analysis.Analyze.damage_per_second_plot()

Returns Damage Per Second Plot

zombie.analysis.Analyze.damage_per_max_ammo_plot()

Returns Damage Per Max Ammo Plot

zombie.analysis.Analyze.damage_per_clip_plot()

Returns Damage Per Clip Plot

zombie.analysis.Analyze.time_to_kill_plot()

Returns Time To Kill Plot

zombie.analysis.Analyze.shots_to_kill_plot()

Returns Shots To Kill Plot