[Tutorial] Buffing the Super Zombie

Results 1 to 4 of 4
  1. #1
    m70b1jr#9501 m70b1jr is offline
    MemberRank
    May 2013 Join Date
    North CarolinaLocation
    862Posts

    [Tutorial] Buffing the Super Zombie

    Hello guys, here's how to fix the super zombie to make him look 'Better'

    Start off in WarZ.sln, and search for

    Code:
    BOOL obj_Zombie::OnCreate()
    In the function, look for

    Code:
    HalloweenZombie = true;
        }


    Under that, add

    Code:
        if (CreateParams.HeroItemID == 20204)
        {
            SetScale(r3dPoint3D(1.6066f, 1.6732f, 1.8344f));
        }

    Thats to resize the super zombie.

    Next search for

    Code:
    void obj_Zombie::StartWalkAnim(bool run)
    {
        int aid = 0;
        float wsk = 1.0f;


    Under it add

    Code:
    if (CreateParams.HeroItemID == 20204) {
    
    
                 if(!run && !CreateParams.FastZombie) {
                         aid = AddAnimation("Super_Zombie_Walk_01");
                         wsk = .8f; //2.2f;
                 } else if(!run && CreateParams.FastZombie) {
                         aid = AddAnimation("Super_Zombie_Walk_01");
                         wsk = 1.0f;
                 } else if(run && !CreateParams.FastZombie) {
                         aid = AddAnimation("Super_Zombie_Run_01");
                         wsk = 0.425f; //1.3f;
                 } else if(run && CreateParams.FastZombie) {
                         aid = AddAnimation("Super_Zombie_Run_01");
                         wsk = 0.5f; //0.3f;
                 } else r3d_assert(false);
    
    
        }


    Now look for

    Code:
    if (CreateParams.HeroItemID == 20204) {
                             switch(u_random(2)) {
                                        default:
                                        case 0:    aid = AddAnimation("Super_Zombie_Swing_Attack01"); break;
                                        case 1:    aid = AddAnimation("Super_Zombie_Swing_Attack02"); break;
                              }
    


    Then search for

    Code:
    if(md.state == 1 && !staggeredTrack)
        {
    


    Under it add

    Code:
    if (CreateParams.HeroItemID == 20204) {
            static const char* anims[] = {
                "Super_Zombie_Staggered_01_B",
                "Super_Zombie_Staggered_01_L",
                "Super_Zombie_Staggered_01_R",
                "Super_Zombie_Staggered_Small_01_B",
                "Super_Zombie_Staggered_Small_01_F"
                };
    Code:
        case EZombieStates::ZState_Sleep:
            {
                int aid = 0;
    


    Under it add

    Code:
    if (CreateParams.HeroItemID == 20204) {
                            switch(u_random(2)) {
                                    default:
                                    case 0:    aid = AddAnimation("Super_Zombie_Dead_Stand_B_01"); break;
                                    case 1:    aid = AddAnimation("Super_Zombie_Dead_Stand_F_01"); break;
                            }
                }
    
    

    Then look for

    Code:
            case EZombieStates::ZState_Attack:
            case EZombieStates::ZState_BarricadeAttack:
                // select new attack animation
                int aid = 0;


    Now in Bin/Data/Weapons/ItemDB.xml, look for

    Code:
    <Hero itemID="20170" category="16" Weight="-1">
                <Model file="Data/ObjectsDepot/Characters/Zombie" />
                <Store name="Basic Zombie Character" icon="$Data/Weapons/StoreIcons/Zombie.dds" desc="" LevelRequired="0" />
                <HeroDesc damagePerc="0" damageMax="0" maxHeads="5" maxBodys="5" maxLegs="5" ProtectionLevel="1" />
            </Hero>
    


    Under that add

    Code:
    <Hero itemID="20204" category="16" Weight="-1">
                <Model file="Data/ObjectsDepot/Characters/Zombie" />
                <Store name="Super Zombie" icon="$Data/Weapons/StoreIcons/Super_Zombie.dds" desc="" LevelRequired="0" />
                <HeroDesc damagePerc="0" damageMax="0" maxHeads="5" maxBodys="5" maxLegs="5" ProtectionLevel="1" />
            </Hero>

    Now to increase super zombie's health, in WarZ_Server.sln, look for

    Code:
    bool obj_Zombie::ApplyDamage(GameObject* fromObj, float damage, int bodyPart, STORE_CATEGORIES damageSource)
    Add this function
    Code:
    if(bodyPart!=1 && HeroItemID != 20204) // only hitting head will lower zombie's health
            dmg = 0;
    
    
        if(damageSource != storecat_MELEE && bodyPart == 1 && HeroItemID != 20204 && damageSource != storecat_punch) // everything except for melee: one shot in head = kill
            dmg = 1000;
    
    
        if (HeroItemID == 20204)
            ZombieHealth -= dmg*15/100;
        else
            ZombieHealth -= dmg;
    
    
        if(ZombieHealth <= 0.0f)
        {
            DoDeath();


    ADD IS SOMEWHERE AFTER float dmg = damage;


    There you go guys! Remember to like, and rep me


    - - - Updated - - -

    Ragezone messed up the boxes, don't worry about it.
    Last edited by GigaToni; 29-08-14 at 05:07 PM. Reason: fixed empty boxes


  2. #2
    Valued Member MrCrazyDude115 is offline
    MemberRank
    Oct 2013 Join Date
    Look Behind YouLocation
    139Posts

    Re: [Tutorial] Buffing the Super Zombie

    Thanks man, I think I may be able to add new zombie types using this and not just the super zombie.

  3. #3
    Titan Guard Dev iTzTonyR703 is offline
    MemberRank
    Apr 2013 Join Date
    US, STL.Location
    296Posts

    Re: [Tutorial] Buffing the Super Zombie

    I think I might retexture the super zombie to something else. I might post it on rage I might not :).

    thxsfor this helpful tut <3

  4. #4
    Member doouglasgfx is offline
    MemberRank
    Apr 2013 Join Date
    ColoradoLocation
    94Posts

    Re: [Tutorial] Buffing the Super Zombie

    where can I change his life?



Advertisement