как создать и поставить кастомного крипа в Valve Hammer Editor

Programist

Пользователь
28 Июн 2019
12
0
Проект
cave adventure
Всем юным программистам привет, создал гайд, чтоб много вопросов не задавали в темах.Итак начнём.

1.Создать юнитов в npc_units_custom

объяснять как это делается не буду есть гайды на форуме поэтому просто покажу моих крипов:

"DOTAUnits"
{
"Version" "1"

"boss"
{
// General
//----------------------------------------------------------------
"Model" "models/heroes/undying/undying.vmdl" // Model.
"BaseClass" "npc_dota_creature"
"SoundSet" "n_creep_Ranged"
"GameSoundsFile" "soundevents/game_sounds_creeps.vsndevts"
"Level" "3"
"ModelScale" "3" "CanBeDominated" "0"

// Abilities
//----------------------------------------------------------------
"Ability1" "boss_ability_hardcore" // Ability 1
"Ability2" "the_flash_power" // Ability 2
"Ability3" "" // Ability 3
"Ability4" "" // Ability 4

// Armor
//----------------------------------------------------------------
"ArmorPhysical" "250" // Physical protection.

// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin" "5000" // Damage range min.
"AttackDamageMax" "5000" // Damage range max.
"AttackRate" "0.01" // Speed of attack.
"AttackAnimationPoint" "0.2" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "800" // Range within a target can be acquired.
"AttackRange" "300" // Range within a target can be attacked.
"ProjectileModel" "particles/neutral_fx/gnoll_base_attack.vpcf" // Particle system model for projectile.
"ProjectileSpeed" "1500" // Speed of projectile.

// Bounds
//----------------------------------------------------------------
"RingRadius" "40"
"HealthBarOffset" "170"

// Bounty
//----------------------------------------------------------------
"BountyXP" "5000" // Experience earn.
"BountyGoldMin" "15000" // Gold earned min.
"BountyGoldMax" "22000" // Gold earned max.

// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND"
"MovementSpeed" "320" // Speed.

// Status
//----------------------------------------------------------------
"StatusHealth" "400000" // Base health.
"StatusHealthRegen" "25" // Health regeneration rate.
"StatusMana" "0" // Base mana.
"StatusManaRegen" "0.0" // Mana regeneration rate.

// Vision
//----------------------------------------------------------------
"VisionDaytimeRange" "400" // Range of vision during day light.
"VisionNighttimeRange" "400" // Range of vision at night time.

// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_NEUTRALS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_BASIC"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"

// Creature Data
//----------------------------------------------------------------
"Creature"
{
//Level Up
"HPGain" "50"
"DamageGain" "2"
"ArmorGain" "0.25"
"MagicResistGain" "0.1"
"MoveSpeedGain" "1"
"BountyGain" "3"
"XPGain" "15"
}
}
"boss_obormoss"
{
// General
//----------------------------------------------------------------
"Model" "models/heroes/doom/doom.vmdl" // Model.
"BaseClass" "npc_dota_creature"
"SoundSet" "n_creep_Ranged"
"GameSoundsFile" "soundevents/game_sounds_creeps.vsndevts"
"Level" "3"
"ModelScale" "3"
"CanBeDominated" "0"

// Abilities
//----------------------------------------------------------------
"Ability1" "boss_ability_hardcore" // Ability 1
"Ability2" "the_flash_power" // Ability 2
"Ability3" "" // Ability 3
"Ability4" "" // Ability 4

// Armor
//----------------------------------------------------------------
"ArmorPhysical" "250" // Physical protection.

// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin" "25000" // Damage range min.
"AttackDamageMax" "25000" // Damage range max.
"AttackRate" "1" // Speed of attack.
"AttackAnimationPoint" "0.4" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "800" // Range within a target can be acquired.
"AttackRange" "300" // Range within a target can be attacked.
"ProjectileModel" "particles/neutral_fx/gnoll_base_attack.vpcf" // Particle system model for projectile.
"ProjectileSpeed" "1500" // Speed of projectile.

// Bounds
//----------------------------------------------------------------
"RingRadius" "40"
"HealthBarOffset" "170"

// Bounty
//----------------------------------------------------------------
"BountyXP" "4000" // Experience earn.
"BountyGoldMin" "3000" // Gold earned min.
"BountyGoldMax" "3000" // Gold earned max.

// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND"
"MovementSpeed" "320" // Speed.

// Status
//----------------------------------------------------------------
"StatusHealth" "2" // Base health.
"StatusHealthRegen" "25" // Health regeneration rate.
"StatusMana" "0" // Base mana.
"StatusManaRegen" "0.0" // Mana regeneration rate.

// Vision
//----------------------------------------------------------------
"VisionDaytimeRange" "400" // Range of vision during day light.
"VisionNighttimeRange" "400" // Range of vision at night time.

// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_NEUTRALS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_BASIC"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"


}

"human"
{
// General
//----------------------------------------------------------------
"Model" "models/heroes/dragon_knight/dragon_knight.vmdl" // Model.
"BaseClass" "npc_dota_creature"
"SoundSet" "n_creep_Ranged"
"GameSoundsFile" "soundevents/game_sounds_creeps.vsndevts"
"Level" "3"
"ModelScale" "1" "CanBeDominated" "0"

// Abilities
//----------------------------------------------------------------
"Ability1" "" // Ability 1
"Ability2" "" // Ability 2
"Ability3" "" // Ability 3
"Ability4" "" // Ability 4

// Armor
//----------------------------------------------------------------
"ArmorPhysical" "5" // Physical protection.

// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin" "25" // Damage range min.
"AttackDamageMax" "35" // Damage range max.
"AttackRate" "1" // Speed of attack.
"AttackAnimationPoint" "0.6" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "800" // Range within a target can be acquired.
"AttackRange" "150" // Range within a target can be attacked.
"ProjectileModel" "particles/neutral_fx/gnoll_base_attack.vpcf" // Particle system model for projectile.
"ProjectileSpeed" "1500" // Speed of projectile.

// Bounds
//----------------------------------------------------------------
"RingRadius" "40"
"HealthBarOffset" "170"

// Bounty
//----------------------------------------------------------------
"BountyXP" "25" // Experience earn.
"BountyGoldMin" "20" // Gold earned min.
"BountyGoldMax" "22" // Gold earned max.

// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND"
"MovementSpeed" "320" // Speed.

// Status
//----------------------------------------------------------------
"StatusHealth" "450" // Base health.
"StatusHealthRegen" "25" // Health regeneration rate.
"StatusMana" "0" // Base mana.
"StatusManaRegen" "0.0" // Mana regeneration rate.

// Vision
//----------------------------------------------------------------
"VisionDaytimeRange" "400" // Range of vision during day light.
"VisionNighttimeRange" "400" // Range of vision at night time.

// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_NEUTRALS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_PIERCE"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_BASIC"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"

"Creature"
{
"DisableClumpingBehavior" "1"
"AttachWearables"
{
"Wearable1" { "ItemDef" "63" }
"Wearable2" { "ItemDef" "64" }
"Wearable3" { "ItemDef" "65" }
"Wearable4" { "ItemDef" "66" }
"Wearable5" { "ItemDef" "67" }
"Wearable6" { "ItemDef" "68" }
}
}
}
"fish"
{
// General
//----------------------------------------------------------------
"Model" "models/heroes/slark/slark.vmdl" // Model.
"BaseClass" "npc_dota_creep_neutral"
"SoundSet" "n_creep_Melee"
"Level" "6"
"IsAncient" "1"
"ModelScale" "1.15"
"IsNeutralUnitType" "1"

// Abilities
//----------------------------------------------------------------
"Ability1" "granite_golem_hp_aura" // Ability 1
"Ability2" "" // Ability 2
"Ability3" "" // Ability 3
"Ability4" "" // Ability 4

// Armor
//----------------------------------------------------------------
"ArmorPhysical" "20" // Physical protection.
"MagicalResistance" "90" // Magical protection.

// Attack
//----------------------------------------------------------------
"AttackCapabilities" "DOTA_UNIT_CAP_MELEE_ATTACK"
"AttackDamageMin" "200" // Damage range min.
"AttackDamageMax" "300" // Damage range max.
"AttackRate" "0.5" // Speed of attack.
"AttackAnimationPoint" "0.3" // Normalized time in animation cycle to attack.
"AttackAcquisitionRange" "500" // Range within a target can be acquired.
"AttackRange" "128" // Range within a target can be attacked.
"ProjectileModel" "" // Particle system model for projectile.
"ProjectileSpeed" "0" // Speed of projectile.

// Bounds
//----------------------------------------------------------------
"RingRadius" "60"
"HealthBarOffset" "220"

// Bounty
//----------------------------------------------------------------
"BountyXP" "500" // Experience earn.
"BountyGoldMin" "350" // Gold earned min.
"BountyGoldMax" "350" // Gold earned max.

// Movement
//----------------------------------------------------------------
"MovementCapabilities" "DOTA_UNIT_CAP_MOVE_GROUND"
"MovementSpeed" "270" // Speed.

// Status
//----------------------------------------------------------------
"StatusHealth" "2400" // Base health.
"StatusHealthRegen" "1.5" // Health regeneration rate.
"StatusMana" "600" // Base mana.
"StatusManaRegen" "1.5" // Mana regeneration rate.

// Vision
//----------------------------------------------------------------
"VisionDaytimeRange" "800" // Range of vision during day light.
"VisionNighttimeRange" "800" // Range of vision at night time.

// Team
//----------------------------------------------------------------
"TeamName" "DOTA_TEAM_NEUTRALS" // Team name.
"CombatClassAttack" "DOTA_COMBAT_CLASS_ATTACK_HERO"
"CombatClassDefend" "DOTA_COMBAT_CLASS_DEFEND_BASIC"
"UnitRelationshipClass" "DOTA_NPC_UNIT_RELATIONSHIP_TYPE_DEFAULT"
}
}


2. заходим в Valve Hammer Editor и открываем свою карту. (ну это все знают как делать)

3. создаём объект npc_dota_base

4. в строке Unit Name пишем имя вашего юнита которого вы создали в документе

всё ничего лишнего.

P.S если юнита нет то перезаходим в Valve Hammer Editor и если после этого не появился то открываем npc_dota_units_custom и начинаем проверять где вы накосячили

Всем пока
 
Реклама: