Прокачка перков после 6лв и выше

Тема в разделе "Технические вопросы", создана пользователем Seraph1m, 25 фев 2015.

  1. Seraph1m

    Seraph1m Новенький

    Есть ли у кого нибудь или где нибудь готовый ServerPerksP с дальнейшей прокачкой перков после 6лв?,а то эта процентовка после 6лв ск.атаки,силы атака и т.д слишком много дает.
    Поиском пользовался,ни чего похожего не нашел,облазил весь форум в поисках чего-то подобного.

    Заранее благодарен.
     
  2. BAHO

    BAHO Fresh Meat

    Это только самому
     
  3. AitherKill

    AitherKill Солдат

    Учись собирать мутаторы из исходников, выше 6 лвла идет рост характеристик и очков для прокачки методом умножения на лвл вроде. Если не устраивает такое, нужно самому будет прописывать все желаемые значения.
     
  4. Seraph1m

    Seraph1m Новенький

    Ясно,спасибо за ответ.
     
  5. Seraph1m

    Seraph1m Новенький

    Я еще новечек,подскажите - что за что отвечает?

    Код:
    class SRVetBerserker extends SRVeterancyTypes
    	abstract;
    
    static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )
    {
    	switch( CurLevel )
    	{
    	case 0:
    		FinalInt = 5000;
    		break;
    	case 1:
    		FinalInt = 25000;
    		break;
    	case 2:
    		FinalInt = 100000;
    		break;
    	case 3:
    		FinalInt = 500000;
    		break;
    	case 4:
    		FinalInt = 1500000;
    		break;
    	case 5:
    		FinalInt = 3500000;
    		break;
    	case 6:
    		FinalInt = 5500000;
    		break;
    	default:
    		FinalInt = 5500000+GetDoubleScaling(CurLevel,500000);
    	}
    	return Min(StatOther.RMeleeDamageStat,FinalInt);
    }
    
    static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType)
    {
    	if( class<KFWeaponDamageType>(DmgType) != none && class<KFWeaponDamageType>(DmgType).default.bIsMeleeDamage )
    	{
    		if ( KFPRI.ClientVeteranSkillLevel == 0 )
    			return float(InDamage) * 1.10;
    		if( KFPRI.ClientVeteranSkillLevel>6 )
    			return float(InDamage) * (1.7 + (0.05 * KFPRI.ClientVeteranSkillLevel));
    
    		// Up to 100% increase in Melee Damage
    		return float(InDamage) * (1.0 + (0.20 * float(Min(KFPRI.ClientVeteranSkillLevel, 5))));
    	}
    	return InDamage;
    }
    
    static function float GetFireSpeedMod(KFPlayerReplicationInfo KFPRI, Weapon Other)
    {
    	if ( KFMeleeGun(Other) != none || Crossbuzzsaw(Other) != none )
    	{
    		switch ( KFPRI.ClientVeteranSkillLevel )
    		{
    			case 1:
    				return 1.05;
    			case 2:
    			case 3:
    				return 1.10;
    			case 4:
    				return 1.15;
    			case 5:
    				return 1.20;
    			case 6:
    				return 1.25; // 25% increase in wielding Melee Weapon
    			default:
    				return 0.95+0.05*float(KFPRI.ClientVeteranSkillLevel);
    		}
    	}
    
    	return 1.0;
    }
    
    static function float GetMeleeMovementSpeedModifier(KFPlayerReplicationInfo KFPRI)
    {
    	switch( KFPRI.ClientVeteranSkillLevel )
    	{
    	case 0:
    		return 0.05; // Was 0.10 in Balance Round 1
    	case 1:
    		return 0.10; // Was 0.15 in Balance Round 1
    	case 2:
    		return 0.15; // Was 0.20 in Balance Round 1
    	case 3:
    	case 4:
    	case 5:
    		return 0.20; // Was 0.25 in Balance Round 1
    	default:
    		return 0.30; // Was 0.35 in Balance Round 1
    	}
    }
    
    static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class<DamageType> DmgType)
    {
    	if ( DmgType == class'DamTypeVomit' )
    	{
    		switch ( KFPRI.ClientVeteranSkillLevel )
    		{
    			case 0:
    				return float(InDamage) * 0.90;
    			case 1:
    				return float(InDamage) * 0.75;
    			case 2:
    				return float(InDamage) * 0.65;
    			case 3:
    				return float(InDamage) * 0.50;
    			case 4:
    				return float(InDamage) * 0.35;
    			case 5:
    				return float(InDamage) * 0.25;
    			default:
    				return float(InDamage) * 0.20; // 80% reduced Bloat Bile damage
    		}
    	}
    
    	switch ( KFPRI.ClientVeteranSkillLevel )
    	{
    //		This did exist in Balance Round 1, but was removed for Balance Round 2
    		case 0:
    			return InDamage;
    		case 1:
    			return float(InDamage) * 0.95; // was 0.90 in Balance Round 1
    		case 2:
    			return float(InDamage) * 0.90; // was 0.85 in Balance Round 1
    		case 3:
    			return float(InDamage) * 0.85; // was 0.80 in Balance Round 1
    		case 4:
    			return float(InDamage) * 0.80; // was 0.70 in Balance Round 1
    		case 5:
    			return float(InDamage) * 0.70; // was 0.60 in Balance Round 1
    		case 6:
    			return float(InDamage) * 0.60; // 40% reduced Damage(was 50% in Balance Round 1)
    	}
    
    	return float(InDamage) * 1.f - FMin(float(KFPRI.ClientVeteranSkillLevel)*0.05f,0.65f);
    }
    
    // Added in Balance Round 1(returned false then, by accident, fixed in Balance Round 2)
    static function bool CanMeleeStun()
    {
    	return true;
    }
    
    static function bool CanBeGrabbed(KFPlayerReplicationInfo KFPRI, KFMonster Other)
    {
    	return !Other.IsA('ZombieClot');
    }
    
    // Set number times Zed Time can be extended
    static function int ZedTimeExtensions(KFPlayerReplicationInfo KFPRI)
    {
    	return Min(KFPRI.ClientVeteranSkillLevel, 4);
    }
    
    // Change the cost of particular items
    static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
    {
    	if ( Item == class'ChainsawPickup' || Item == class'KatanaPickup' || Item == class'ClaymoreSwordPickup'
            || Item == class'CrossbuzzsawPickup' || Item == class'ScythePickup' || Item == class'GoldenKatanaPickup'
            || Item == class'MachetePickup' || Item == class'AxePickup' || Item == class'DwarfAxePickup'
            || Item == class'GoldenChainsawPickup' )
    		return FMax(0.9 - (0.10 * float(KFPRI.ClientVeteranSkillLevel)),0.1); // Up to 70% discount on Melee Weapons
    	return 1.0;
    }
    
    // Give Extra Items as default
    static function AddDefaultInventory(KFPlayerReplicationInfo KFPRI, Pawn P)
    {
    	// If Level 5, give them Machete
    	if ( KFPRI.ClientVeteranSkillLevel == 5 )
    		AddPerkedWeapon(class'Machete',KFPRI,P);
    
    	// If Level 6, give them an Axe
    	else if ( KFPRI.ClientVeteranSkillLevel >= 6 )
    		AddPerkedWeapon(class'Axe',KFPRI,P);
    
    	// If Level 6, give them Body Armor(Removed from Suicidal and HoE in Balance Round 7)
    	if ( KFPRI.Level.Game.GameDifficulty < 5.0 && KFPRI.ClientVeteranSkillLevel == 6 )
    		P.ShieldStrength = 100;
    }
    
    static function string GetCustomLevelInfo( byte Level )
    {
    	local string S;
    
    	S = Default.CustomLevelInfo;
    	ReplaceText(S,"%s",GetPercentStr(0.05 * float(Level)-0.05));
    	ReplaceText(S,"%d",GetPercentStr(0.1+FMin(0.1 * float(Level),0.8f)));
    	ReplaceText(S,"%r",GetPercentStr(0.7 + 0.05*float(Level)));
    	ReplaceText(S,"%l",GetPercentStr(FMin(0.05*float(Level),0.65f)));
    	return S;
    }
    
    defaultproperties
    {
         CustomLevelInfo="%r extra melee damage|%s faster melee attacks|30% faster melee movement|80% less damage from Bloat Bile|%l resistance to all damage|%d discount on melee weapons|Spawn with a Axe and Body Armor|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
         SRLevelEffects(0)="10% extra melee damage|5% faster melee movement|10% less damage from Bloat Bile|10% discount on melee weapons|Can't be grabbed by Clots"
         SRLevelEffects(1)="20% extra melee damage|5% faster melee attacks|10% faster melee movement|25% less damage from Bloat Bile|5% resistance to all damage|20% discount on melee weapons|Can't be grabbed by Clots"
         SRLevelEffects(2)="40% extra melee damage|10% faster melee attacks|15% faster melee movement|35% less damage from Bloat Bile|10% resistance to all damage|30% discount on melee weapons|Can't be grabbed by Clots|Zed-Time can be extended by killing an enemy while in slow motion"
         SRLevelEffects(3)="60% extra melee damage|10% faster melee attacks|20% faster melee movement|50% less damage from Bloat Bile|15% resistance to all damage|40% discount on melee weapons|Can't be grabbed by Clots|Up to 2 Zed-Time Extensions"
         SRLevelEffects(4)="80% extra melee damage|15% faster melee attacks|20% faster melee movement|65% less damage from Bloat Bile|20% resistance to all damage|50% discount on melee weapons|Can't be grabbed by Clots|Up to 3 Zed-Time Extensions"
         SRLevelEffects(5)="100% extra melee damage|20% faster melee attacks|20% faster melee movement|75% less damage from Bloat Bile|30% resistance to all damage|60% discount on melee weapons|Spawn with a Machete|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
         SRLevelEffects(6)="100% extra melee damage|25% faster melee attacks|30% faster melee movement|80% less damage from Bloat Bile|40% resistance to all damage|70% discount on melee weapons|Spawn with an Axe and Body Armor|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
         PerkIndex=4
         OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker'
         OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold'
         VeterancyName="Berserker"
         Requirements(0)="Deal %x damage with melee weapons"
    }
     
    И если не жалко,поделитесь своими работами :smile:
     
  6. gall87

    gall87 Капо

    Код:
    class SRVetBerserker extends SRVeterancyTypes
        abstract;
    
    static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )
    {
        switch( CurLevel )
        {
        case 0:
            FinalInt = 5000;
            break;
        case 1:
            FinalInt = 25000;
            break;
        case 2:
            FinalInt = 100000;
            break;
        case 3:
            FinalInt = 500000;
            break;
        case 4:
            FinalInt = 1500000;
            break;
        case 5:
            FinalInt = 3500000;
            break;
        case 6:
            FinalInt = 5500000;
            break;
        case 7:
            FinalInt = 10000000;
            break;
        default:
            FinalInt = 10000000+GetDoubleScaling(CurLevel,10000000);
        }
        return Min(StatOther.RMeleeDamageStat,FinalInt);
    }
    
    static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType)
    {
        if( class<KFWeaponDamageType>(DmgType) != none && class<KFWeaponDamageType>(DmgType).default.bIsMeleeDamage )
        {
            if ( KFPRI.ClientVeteranSkillLevel == 0 )
                return float(InDamage) * 1.10;
            if( KFPRI.ClientVeteranSkillLevel>6 )
                return float(InDamage) * (1.7 + (0.05 * KFPRI.ClientVeteranSkillLevel));
    
            // Up to 100% increase in Melee Damage
            return float(InDamage) * (1.0 + (0.20 * float(Min(KFPRI.ClientVeteranSkillLevel, 5))));
        }
        return InDamage;
    }
    
    static function float GetFireSpeedMod(KFPlayerReplicationInfo KFPRI, Weapon Other)
    {
        if ( KFMeleeGun(Other) != none || Crossbuzzsaw(Other) != none )
        {
            switch ( KFPRI.ClientVeteranSkillLevel )
            {
                case 1:
                    return 1.05;
                case 2:
                case 3:
                    return 1.10;
                case 4:
                    return 1.15;
                case 5:
                    return 1.20;
                case 6:
                    return 1.25; // 25% increase in wielding Melee Weapon
                case 7:
                    return 1.30;
                default:
                    return 0.95+0.05*float(KFPRI.ClientVeteranSkillLevel);
            }
        }
    
        return 1.0;
    }
    
    static function float GetMeleeMovementSpeedModifier(KFPlayerReplicationInfo KFPRI)
    {
        switch( KFPRI.ClientVeteranSkillLevel )
        {
        case 0:
            return 0.05; // Was 0.10 in Balance Round 1
        case 1:
            return 0.10; // Was 0.15 in Balance Round 1
        case 2:
            return 0.15; // Was 0.20 in Balance Round 1
        case 3:
        case 4:
        case 5:
            return 0.20; // Was 0.25 in Balance Round 1
        case 6:
            return 0.25;
        default:
            return 0.30; // Was 0.35 in Balance Round 1
        }
    }
    
    static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class<DamageType> DmgType)
    {
        if ( DmgType == class'DamTypeVomit' )
        {
            switch ( KFPRI.ClientVeteranSkillLevel )
            {
                case 0:
                    return float(InDamage) * 0.90;
                case 1:
                    return float(InDamage) * 0.75;
                case 2:
                    return float(InDamage) * 0.65;
                case 3:
                    return float(InDamage) * 0.50;
                case 4:
                    return float(InDamage) * 0.35;
                case 5:
                    return float(InDamage) * 0.25;
                case 6:
                    return float(InDamage) * 0.21;
                default:
                    return float(InDamage) * 0.20; // 80% reduced Bloat Bile damage
            }
        }
    
        switch ( KFPRI.ClientVeteranSkillLevel )
        {
    //        This did exist in Balance Round 1, but was removed for Balance Round 2
            case 0:
                return InDamage;
            case 1:
                return float(InDamage) * 0.95; // was 0.90 in Balance Round 1
            case 2:
                return float(InDamage) * 0.90; // was 0.85 in Balance Round 1
            case 3:
                return float(InDamage) * 0.85; // was 0.80 in Balance Round 1
            case 4:
                return float(InDamage) * 0.80; // was 0.70 in Balance Round 1
            case 5:
                return float(InDamage) * 0.70; // was 0.60 in Balance Round 1
            case 6:
                return float(InDamage) * 0.61; 
            case 7:
                return float(InDamage) * 0.60; // 40% reduced Damage(was 50% in Balance Round 1)
        }
    
        return float(InDamage) * 1.f - FMin(float(KFPRI.ClientVeteranSkillLevel)*0.05f,0.65f);
    }
    
    // Added in Balance Round 1(returned false then, by accident, fixed in Balance Round 2)
    static function bool CanMeleeStun()
    {
        return true;
    }
    
    static function bool CanBeGrabbed(KFPlayerReplicationInfo KFPRI, KFMonster Other)
    {
        return !Other.IsA('ZombieClot');
    }
    
    // Set number times Zed Time can be extended
    static function int ZedTimeExtensions(KFPlayerReplicationInfo KFPRI)
    {
        return Min(KFPRI.ClientVeteranSkillLevel, 4);
    }
    
    // Change the cost of particular items
    static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
    {
        if ( Item == class'ChainsawPickup' 
    || Item == class'KatanaPickup' 
    || Item == class'ClaymoreSwordPickup'
    || Item == class'CrossbuzzsawPickup' 
    || Item == class'ScythePickup' 
    || Item == class'GoldenKatanaPickup'
    || Item == class'MachetePickup' 
    || Item == class'AxePickup' 
    || Item == class'DwarfAxePickup'
    || Item == class'GoldenChainsawPickup' )
            return FMax(0.9 - (0.10 * float(KFPRI.ClientVeteranSkillLevel)),0.1); // Up to 70% discount on Melee Weapons
        return 1.0;
    }
    
    // Give Extra Items as default
    static function AddDefaultInventory(KFPlayerReplicationInfo KFPRI, Pawn P)
    {
        // If Level 5, give them Machete
        if ( KFPRI.ClientVeteranSkillLevel == 5 )
            AddPerkedWeapon(class'Machete',KFPRI,P);
    
        // If Level 6, give them an Axe
        else if ( KFPRI.ClientVeteranSkillLevel == 6 )
            AddPerkedWeapon(class'Axe',KFPRI,P);
     
        // If Level 6, give them an Axe
        else if ( KFPRI.ClientVeteranSkillLevel == 7 )
            AddPerkedWeapon(class'GoldenKatana',KFPRI,P);
    
        // If Level 6, give them Body Armor(Removed from Suicidal and HoE in Balance Round 7)
        if ( KFPRI.Level.Game.GameDifficulty < 5.0 && KFPRI.ClientVeteranSkillLevel == 6 )
            P.ShieldStrength = 100;
    }
    
    static function string GetCustomLevelInfo( byte Level )
    {
        local string S;
    
        S = Default.CustomLevelInfo;
        ReplaceText(S,"%s",GetPercentStr(0.05 * float(Level)-0.05));
        ReplaceText(S,"%d",GetPercentStr(0.1+FMin(0.1 * float(Level),0.8f)));
        ReplaceText(S,"%r",GetPercentStr(0.7 + 0.05*float(Level)));
        ReplaceText(S,"%l",GetPercentStr(FMin(0.05*float(Level),0.65f)));
        return S;
    }
    
    defaultproperties
    {
    CustomLevelInfo="%r extra melee damage|%s faster melee attacks|30% faster melee movement|80% less damage from Bloat Bile|%l resistance to all damage|%d discount on melee weapons|Spawn with a Axe and Body Armor|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
    SRLevelEffects(0)="10% extra melee damage|5% faster melee movement|10% less damage from Bloat Bile|10% discount on melee weapons|Can't be grabbed by Clots"
    SRLevelEffects(1)="20% extra melee damage|5% faster melee attacks|10% faster melee movement|25% less damage from Bloat Bile|5% resistance to all damage|20% discount on melee weapons|Can't be grabbed by Clots"
    SRLevelEffects(2)="40% extra melee damage|10% faster melee attacks|15% faster melee movement|35% less damage from Bloat Bile|10% resistance to all damage|30% discount on melee weapons|Can't be grabbed by Clots|Zed-Time can be extended by killing an enemy while in slow motion"
    SRLevelEffects(3)="60% extra melee damage|10% faster melee attacks|20% faster melee movement|50% less damage from Bloat Bile|15% resistance to all damage|40% discount on melee weapons|Can't be grabbed by Clots|Up to 2 Zed-Time Extensions"
    SRLevelEffects(4)="80% extra melee damage|15% faster melee attacks|20% faster melee movement|65% less damage from Bloat Bile|20% resistance to all damage|50% discount on melee weapons|Can't be grabbed by Clots|Up to 3 Zed-Time Extensions"
    SRLevelEffects(5)="100% extra melee damage|20% faster melee attacks|20% faster melee movement|75% less damage from Bloat Bile|30% resistance to all damage|60% discount on melee weapons|Spawn with a Machete|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
    SRLevelEffects(6)="100% extra melee damage|25% faster melee attacks|30% faster melee movement|80% less damage from Bloat Bile|40% resistance to all damage|70% discount on melee weapons|Spawn with an Axe and Body Armor|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
    SRLevelEffects(7)="150% extra melee damage|30% faster melee attacks|30% faster melee movement|90% less damage from Bloat Bile|50% resistance to all damage|80% discount on melee weapons|Spawn with an Golden Catana and Body Armor|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
    PerkIndex=4
    OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker'
    OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold'
    VeterancyName="Berserker"
    Requirements(0)="Deal %x damage with melee weapons"
    }
    

    Вот тебе прокачка до 7 уровня с бонусами, для берсерка
    (если есть ошибки поправте, писал в торопях)
     
    Denkul999, Seraph1m и ЛОХМАТЫЙ нравится это.
  7. Seraph1m

    Seraph1m Новенький

    Сделал так.Подскажите на счет дамага,правильно ли что я так дописал?
    class SRVetBerserker extends SRVeterancyTypes
    abstract;

    static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )
    {
    switch( CurLevel )
    {
    case 0:
    FinalInt = 25000;
    break;
    case 1:
    FinalInt = 100000;
    break;
    case 2:
    FinalInt = 500000;
    break;
    case 3:
    FinalInt = 1500000;
    break;
    case 4:
    FinalInt = 3500000;
    break;
    case 5:
    FinalInt = 5500000;
    break;
    case 6:
    FinalInt = 8500000;
    break;
    default:
    FinalInt = 8500000+GetDoubleScaling(CurLevel,1500000);
    }
    return Min(StatOther.RMeleeDamageStat,FinalInt);
    }

    static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType)
    {
    if( class<KFWeaponDamageType>(DmgType) != none && class<KFWeaponDamageType>(DmgType).default.bIsMeleeDamage )
    {
    if ( KFPRI.ClientVeteranSkillLevel == 0 )
    return float(InDamage) * 1.10;
    if ( KFPRI.ClientVeteranSkillLevel == 1 )
    return float(InDamage) * 1.20;
    if ( KFPRI.ClientVeteranSkillLevel == 2 )
    return float(InDamage) * 1.40;
    if ( KFPRI.ClientVeteranSkillLevel == 3 )
    return float(InDamage) * 1.60;
    if ( KFPRI.ClientVeteranSkillLevel == 4 )
    return float(InDamage) * 1.80;
    if ( KFPRI.ClientVeteranSkillLevel == 5 )
    return float(InDamage) * 2.00;
    if ( KFPRI.ClientVeteranSkillLevel == 6 )
    return float(InDamage) * 2.00;
    if ( KFPRI.ClientVeteranSkillLevel == 7 )
    return float(InDamage) * 2.00;
    if ( KFPRI.ClientVeteranSkillLevel == 8 )
    return float(InDamage) * 2.00;
    if ( KFPRI.ClientVeteranSkillLevel == 9 )
    return float(InDamage) * 2.00;
    if ( KFPRI.ClientVeteranSkillLevel == 10 )
    return float(InDamage) * 2.00;
    if ( KFPRI.ClientVeteranSkillLevel == 11 )
    return float(InDamage) * 2.20;
    if ( KFPRI.ClientVeteranSkillLevel == 12 )
    return float(InDamage) * 2.20;
    if ( KFPRI.ClientVeteranSkillLevel == 13 )
    return float(InDamage) * 2.20;
    if ( KFPRI.ClientVeteranSkillLevel == 14 )
    return float(InDamage) * 2.20;
    if ( KFPRI.ClientVeteranSkillLevel == 15 )
    return float(InDamage) * 2.20;
    if ( KFPRI.ClientVeteranSkillLevel == 16 )
    return float(InDamage) * 2.20;
    if ( KFPRI.ClientVeteranSkillLevel == 17 )
    return float(InDamage) * 2.40;
    if ( KFPRI.ClientVeteranSkillLevel == 18 )
    return float(InDamage) * 2.40;
    if ( KFPRI.ClientVeteranSkillLevel == 19 )
    return float(InDamage) * 2.40;
    if ( KFPRI.ClientVeteranSkillLevel == 20 )
    return float(InDamage) * 2.40;
    if ( KFPRI.ClientVeteranSkillLevel == 21 )
    return float(InDamage) * 2.40;
    if ( KFPRI.ClientVeteranSkillLevel == 22 )
    return float(InDamage) * 2.40;
    if ( KFPRI.ClientVeteranSkillLevel == 23 )
    return float(InDamage) * 2.60;
    if ( KFPRI.ClientVeteranSkillLevel == 24 )
    return float(InDamage) * 2.60;
    if ( KFPRI.ClientVeteranSkillLevel == 25 )
    return float(InDamage) * 2.60;
    if ( KFPRI.ClientVeteranSkillLevel == 26 )
    return float(InDamage) * 2.60;
    if ( KFPRI.ClientVeteranSkillLevel == 27 )
    return float(InDamage) * 2.60;
    if ( KFPRI.ClientVeteranSkillLevel == 28 )
    return float(InDamage) * 2.60;
    if ( KFPRI.ClientVeteranSkillLevel == 29 )
    return float(InDamage) * 2.80;
    if ( KFPRI.ClientVeteranSkillLevel == 30 )
    return float(InDamage) * 3.00;
    if( KFPRI.ClientVeteranSkillLevel>30 )
    return float(InDamage) * (1.7 + (0.02 * KFPRI.ClientVeteranSkillLevel));

    // Up to 100% increase in Melee Damage
    return float(InDamage) * (1.0 + (0.20 * float(Min(KFPRI.ClientVeteranSkillLevel, 5))));
    }
    return InDamage;
    }

    static function float GetFireSpeedMod(KFPlayerReplicationInfo KFPRI, Weapon Other)
    {
    if ( KFMeleeGun(Other) != none || Crossbuzzsaw(Other) != none )
    {
    switch ( KFPRI.ClientVeteranSkillLevel )
    {
    case 1:
    return 1.05; // 5% increase in wielding Melee Weapon
    case 2:
    case 3:
    return 1.10; // 10% increase in wielding Melee Weapon
    case 4:
    return 1.15; // 15% increase in wielding Melee Weapon
    case 5:
    case 6:
    return 1.20; // 20% increase in wielding Melee Weapon
    case 7:
    return 1.22; // 22% increase in wielding Melee Weapon
    case 8:
    return 1.24; // 24% increase in wielding Melee Weapon
    case 9:
    return 1.26; // 26% increase in wielding Melee Weapon
    case 10:
    return 1.28; // 28% increase in wielding Melee Weapon
    case 11:
    case 12:
    return 1.30; // 30% increase in wielding Melee Weapon
    case 13:
    return 1.32; // 32% increase in wielding Melee Weapon
    case 14:
    return 1.34; // 34% increase in wielding Melee Weapon
    case 15:
    return 1.36; // 36% increase in wielding Melee Weapon
    case 16:
    return 1.38; // 38% increase in wielding Melee Weapon
    case 17:
    case 18:
    return 1.40; // 40% increase in wielding Melee Weapon
    case 19:
    return 1.42; // 42% increase in wielding Melee Weapon
    case 20:
    return 1.44; // 44% increase in wielding Melee Weapon
    case 21:
    return 1.46; // 46% increase in wielding Melee Weapon
    case 22:
    return 1.48; // 48% increase in wielding Melee Weapon
    case 23:
    case 24:
    return 1.50; // 50% increase in wielding Melee Weapon
    case 25:
    return 1.52; // 52% increase in wielding Melee Weapon
    case 26:
    return 1.54; // 54% increase in wielding Melee Weapon
    case 27:
    return 1.56; // 56% increase in wielding Melee Weapon
    case 28:
    return 1.58; // 58% increase in wielding Melee Weapon
    case 29:
    case 30:
    return 1.60; // 60% increase in wielding Melee Weapon
    }
    }

    return 1.0;
    }

    static function float GetMeleeMovementSpeedModifier(KFPlayerReplicationInfo KFPRI)
    {
    switch( KFPRI.ClientVeteranSkillLevel )
    {
    case 0:
    case 1:
    return 0.05; // Was 0.05 in Balance Round 1
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    return 0.10; // Was 0.10 in Balance Round 1
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    return 0.15; // Was 0.15 in Balance Round 1
    case 13:
    case 14:
    case 15:
    case 16:
    case 17:
    case 18:
    return 0.20; // Was 0.20 in Balance Round 1
    case 19:
    case 20:
    case 21:
    case 22:
    case 23:
    case 24:
    return 0.25; // Was 0.25 in Balance Round 1
    case 25:
    case 26:
    case 27:
    case 28:
    case 29:
    case 30:
    return 0.30; // Was 0.30 in Balance Round 1
    }
    }

    static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured, Pawn Instigator, int InDamage, class<DamageType> DmgType)
    {
    if ( DmgType == class'DamTypeVomit' )
    {
    switch ( KFPRI.ClientVeteranSkillLevel )
    {
    case 0:
    return float(InDamage) * 0.90;
    case 1:
    return float(InDamage) * 0.75;
    case 2:
    return float(InDamage) * 0.65;
    case 3:
    return float(InDamage) * 0.50;
    case 4:
    return float(InDamage) * 0.35;
    case 5:
    return float(InDamage) * 0.25;
    default:
    return float(InDamage) * 0.20; // 80% reduced Bloat Bile damage
    }
    }

    switch ( KFPRI.ClientVeteranSkillLevel )
    {
    // This did exist in Balance Round 1, but was removed for Balance Round 2
    case 0:
    return InDamage;
    case 1:
    return float(InDamage) * 0.95; // was 0.90 in Balance Round 1
    case 2:
    return float(InDamage) * 0.90; // was 0.85 in Balance Round 1
    case 3:
    return float(InDamage) * 0.85; // was 0.80 in Balance Round 1
    case 4:
    return float(InDamage) * 0.80; // was 0.70 in Balance Round 1
    case 5:
    return float(InDamage) * 0.70; // was 0.60 in Balance Round 1
    case 6:
    return float(InDamage) * 0.60; // 40% reduced Damage(was 50% in Balance Round 1)
    }

    return float(InDamage) * 1.f - FMin(float(KFPRI.ClientVeteranSkillLevel)*0.05f,0.65f);
    }

    // Added in Balance Round 1(returned false then, by accident, fixed in Balance Round 2)
    static function bool CanMeleeStun()
    {
    return true;
    }

    static function bool CanBeGrabbed(KFPlayerReplicationInfo KFPRI, KFMonster Other)
    {
    return !Other.IsA('ZombieClot');
    }

    // Set number times Zed Time can be extended
    static function int ZedTimeExtensions(KFPlayerReplicationInfo KFPRI)
    {
    return Min(KFPRI.ClientVeteranSkillLevel, 4);
    }

    // Change the cost of particular items
    static function float GetCostScaling(KFPlayerReplicationInfo KFPRI, class<Pickup> Item)
    {
    if ( Item == class'ChainsawPickup' || Item == class'KatanaPickup' || Item == class'ClaymoreSwordPickup'
    || Item == class'CrossbuzzsawPickup' || Item == class'ScythePickup' || Item == class'GoldenKatanaPickup'
    || Item == class'MachetePickup' || Item == class'AxePickup' || Item == class'DwarfAxePickup'
    || Item == class'GoldenChainsawPickup' )
    return FMax(0.9 - (0.10 * float(KFPRI.ClientVeteranSkillLevel)),0.1); // Up to 70% discount on Melee Weapons
    return 1.0;
    }

    // Give Extra Items as default
    static function AddDefaultInventory(KFPlayerReplicationInfo KFPRI, Pawn P)
    {
    // If Level 5, give them Machete
    if ( KFPRI.ClientVeteranSkillLevel == 5 )
    AddPerkedWeapon(class'Machete',KFPRI,P);

    // If Level 6, give them an Axe
    else if ( KFPRI.ClientVeteranSkillLevel >= 6 )
    AddPerkedWeapon(class'Axe',KFPRI,P);

    // If Level 6, give them Body Armor(Removed from Suicidal and HoE in Balance Round 7)
    if ( KFPRI.Level.Game.GameDifficulty < 5.0 && KFPRI.ClientVeteranSkillLevel == 6 )
    P.ShieldStrength = 100;
    }

    static function string GetCustomLevelInfo( byte Level )
    {
    local string S;

    S = Default.CustomLevelInfo;
    ReplaceText(S,"%s",GetPercentStr(0.05 * float(Level)-0.05));
    ReplaceText(S,"%d",GetPercentStr(0.1+FMin(0.1 * float(Level),0.8f)));
    ReplaceText(S,"%r",GetPercentStr(0.7 + 0.02*float(Level)));
    ReplaceText(S,"%l",GetPercentStr(FMin(0.05*float(Level),0.65f)));
    return S;
    }

    defaultproperties
    {
    CustomLevelInfo="%r extra melee damage|%s faster melee attacks|30% faster melee movement|80% less damage from Bloat Bile|%l resistance to all damage|%d discount on melee weapons|Spawn with a Axe and Body Armor|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
    SRLevelEffects(0)="10% extra melee damage|5% faster melee movement|10% less damage from Bloat Bile|10% discount on melee weapons|Can't be grabbed by Clots"
    SRLevelEffects(1)="20% extra melee damage|5% faster melee attacks|10% faster melee movement|25% less damage from Bloat Bile|5% resistance to all damage|20% discount on melee weapons|Can't be grabbed by Clots"
    SRLevelEffects(2)="40% extra melee damage|10% faster melee attacks|15% faster melee movement|35% less damage from Bloat Bile|10% resistance to all damage|30% discount on melee weapons|Can't be grabbed by Clots|Zed-Time can be extended by killing an enemy while in slow motion"
    SRLevelEffects(3)="60% extra melee damage|10% faster melee attacks|20% faster melee movement|50% less damage from Bloat Bile|15% resistance to all damage|40% discount on melee weapons|Can't be grabbed by Clots|Up to 2 Zed-Time Extensions"
    SRLevelEffects(4)="80% extra melee damage|15% faster melee attacks|20% faster melee movement|65% less damage from Bloat Bile|20% resistance to all damage|50% discount on melee weapons|Can't be grabbed by Clots|Up to 3 Zed-Time Extensions"
    SRLevelEffects(5)="100% extra melee damage|20% faster melee attacks|20% faster melee movement|75% less damage from Bloat Bile|30% resistance to all damage|60% discount on melee weapons|Spawn with a Machete|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
    SRLevelEffects(6)="100% extra melee damage|25% faster melee attacks|30% faster melee movement|80% less damage from Bloat Bile|40% resistance to all damage|70% discount on melee weapons|Spawn with an Axe and Body Armor|Can't be grabbed by Clots|Up to 4 Zed-Time Extensions"
    PerkIndex=4
    OnHUDIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker'
    OnHUDGoldIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold'
    VeterancyName="Berserker"
    Requirements(0)="Deal %x damage with melee weapons"
    }


     
  8. HATAXA

    HATAXA Солдат

    Код:
    class SRVetBerserker extends SRVeterancyTypes
    	abstract;
    
    
    static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType)
    {
    	if( class<KFWeaponDamageType>(DmgType) != none && class<KFWeaponDamageType>(DmgType).default.bIsMeleeDamage )
    	{
    		if ( KFPRI.ClientVeteranSkillLevel == 0 )
    			return float(InDamage) * 1.10;
    		if ( KFPRI.ClientVeteranSkillLevel == 1 )
    			return float(InDamage) * 1.20;
    		if ( KFPRI.ClientVeteranSkillLevel == 2 )
    			return float(InDamage) * 1.40;
    		if ( KFPRI.ClientVeteranSkillLevel == 3 )
    			return float(InDamage) * 1.60;
    		if ( KFPRI.ClientVeteranSkillLevel == 4 )
    			return float(InDamage) * 1.80;
    		if ( KFPRI.ClientVeteranSkillLevel == 5 )
    			return float(InDamage) * 2.00;
    		if ( KFPRI.ClientVeteranSkillLevel == 6 )
    			return float(InDamage) * 2.00;
    		if ( KFPRI.ClientVeteranSkillLevel == 7 )
    			return float(InDamage) * 2.00;
    		if ( KFPRI.ClientVeteranSkillLevel == 8 )
    			return float(InDamage) * 2.00;
    		if ( KFPRI.ClientVeteranSkillLevel == 9 )
    			return float(InDamage) * 2.00;
    		if ( KFPRI.ClientVeteranSkillLevel == 10 )
    			return float(InDamage) * 2.00;
    		if ( KFPRI.ClientVeteranSkillLevel == 11 )
    			return float(InDamage) * 2.20;
    		if ( KFPRI.ClientVeteranSkillLevel == 12 )
    			return float(InDamage) * 2.20;
    		if ( KFPRI.ClientVeteranSkillLevel == 13 )
    			return float(InDamage) * 2.20;
    		if ( KFPRI.ClientVeteranSkillLevel == 14 )
    			return float(InDamage) * 2.20;
    		if ( KFPRI.ClientVeteranSkillLevel == 15 )
    			return float(InDamage) * 2.20;
    		if ( KFPRI.ClientVeteranSkillLevel == 16 )
    			return float(InDamage) * 2.20;
    		if ( KFPRI.ClientVeteranSkillLevel == 17 )
    			return float(InDamage) * 2.40;
    		if ( KFPRI.ClientVeteranSkillLevel == 18 )
    			return float(InDamage) * 2.40;
    		if ( KFPRI.ClientVeteranSkillLevel == 19 )
    			return float(InDamage) * 2.40;
    		if ( KFPRI.ClientVeteranSkillLevel == 20 )
    			return float(InDamage) * 2.40;
    		if ( KFPRI.ClientVeteranSkillLevel == 21 )
    			return float(InDamage) * 2.40;
    		if ( KFPRI.ClientVeteranSkillLevel == 22 )
    			return float(InDamage) * 2.40;
    		if ( KFPRI.ClientVeteranSkillLevel == 23 )
    			return float(InDamage) * 2.60;
    		if ( KFPRI.ClientVeteranSkillLevel == 24 )
    			return float(InDamage) * 2.60;
    		if ( KFPRI.ClientVeteranSkillLevel == 25 )
    			return float(InDamage) * 2.60;
    		if ( KFPRI.ClientVeteranSkillLevel == 26 )
    			return float(InDamage) * 2.60;
    		if ( KFPRI.ClientVeteranSkillLevel == 27 )
    			return float(InDamage) * 2.60;
    		if ( KFPRI.ClientVeteranSkillLevel == 28 )
    			return float(InDamage) * 2.60;
    		if ( KFPRI.ClientVeteranSkillLevel == 29 )
    			return float(InDamage) * 2.80;
    		if ( KFPRI.ClientVeteranSkillLevel == 30 )
    			return float(InDamage) * 3.00;
    		if( KFPRI.ClientVeteranSkillLevel>30 )
    			return float(InDamage) * (1.7 + (0.02 * KFPRI.ClientVeteranSkillLevel));
    
    		// Up to 100% increase in Melee Damage
    		return float(InDamage) * (1.0 + (0.20 * float(Min(KFPRI.ClientVeteranSkillLevel, 5))));
    	}
    	return InDamage;
    }
    [color=#9c9c9c][font=helvetica, arial, sans-serif][size=3][/size][/font][/color]
    

    По поводу функции на бонус к урону...
    Сократила твои гигантские тексты хотя бы немного (вообще хотелось бы еще меньше всё сделать :turned: )
    Лишняя строка у тебя там была. И еще ошибка: у тебя на 30м уровне бонус *3.0, а на 32м уровне *2.34 (по твоей функции). То есть обидел ты тех, кто выше 30го уровня поднимется. Или может так задумано)

    Код:
    static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, KFPawn DamageTaker, int InDamage, class<DamageType> DmgType)
    {
        if( class<KFWeaponDamageType>(DmgType) != none && class<KFWeaponDamageType>(DmgType).default.bIsMeleeDamage )
        {
            if ( KFPRI.ClientVeteranSkillLevel == 0 )
                return float(InDamage) * 1.10;
            else if ( KFPRI.ClientVeteranSkillLevel == 1 )
                return float(InDamage) * 1.20;
            else if ( KFPRI.ClientVeteranSkillLevel == 2 )
                return float(InDamage) * 1.40;
            else if ( KFPRI.ClientVeteranSkillLevel == 3 )
                return float(InDamage) * 1.60;
            else if ( KFPRI.ClientVeteranSkillLevel == 4 )
                return float(InDamage) * 1.80;
            else if ( KFPRI.ClientVeteranSkillLevel > 4 && KFPRI.ClientVeteranSkillLevel < 11 )
                return float(InDamage) * 2.00;
            else if ( KFPRI.ClientVeteranSkillLevel > 10 && KFPRI.ClientVeteranSkillLevel < 17 )
                return float(InDamage) * 2.20;
            else if ( KFPRI.ClientVeteranSkillLevel > 16 && KFPRI.ClientVeteranSkillLevel < 23 )
                return float(InDamage) * 2.40;
            else if ( KFPRI.ClientVeteranSkillLevel > 22 && KFPRI.ClientVeteranSkillLevel < 29 )
                return float(InDamage) * 2.60;
            else if ( KFPRI.ClientVeteranSkillLevel == 29 )
                return float(InDamage) * 2.80;
            else if ( KFPRI.ClientVeteranSkillLevel == 30 )
                return float(InDamage) * 3.00;
            else if( KFPRI.ClientVeteranSkillLevel > 30 )
                return float(InDamage) * (1.7 + (0.02 * KFPRI.ClientVeteranSkillLevel));
    
        }
        return InDamage;
    }
    
    
     
    Denkul999, gall87, Seraph1m и 2 другим нравится это.
  9. route80

    route80 Новенький

    а кто подскажет какие все таки значения стоят и как вообще происходит повышение уровня по умолчанию....вот пример человек расписал на 30 уровней..... можно же например 5 уровней а дальше идет автоматом....
     
  10. STaJIKeR

    STaJIKeR Капо

    Смотришь и сам настраиваешь...

    Код:
    static function int GetPerkProgressInt( ClientPerkRepLink StatOther, out int FinalInt, byte CurLevel, byte ReqNum )
    {
        switch( CurLevel )
        {
        case 0:
            FinalInt = 10000;
            break;
        case 1:
            FinalInt = 25000;
            break;
        case 2:
            FinalInt = 100000;
            break;
        case 3:
            FinalInt = 500000;
            break;
        case 4:
            FinalInt = 1500000;
            break;
        case 5:
            FinalInt = 3500000;
            break;
        case 6:
            FinalInt = 5500000;
            break;
        default:
            FinalInt = 5500000+GetDoubleScaling(CurLevel,500000); //Значение которое и будет множить, либо расписать в ручную.
        }
        return Min(StatOther.RExplosivesDamageStat,FinalInt);
    }