Dota2 skill System Design Analysis and dota2 skill System Design

Source: Internet
Author: User

Dota2 skill System Design Analysis and dota2 skill System Design

The first two weeks have completed the new game skill system. Although it is flexible, it is much worse than Dota2's skill system design. In terms of flexibility and function implementation, the skill system design is quite beautiful. If you analyze its skill system earlier, I think it can be faster and better.

There are also some games in the analogy, and their skill systems are well-designed. For example, Starcraft 3 Torch 2 Starcraft 2 is very flexible and can be seen from its many MOD, even the author of MOD can make amazing effects that game developers cannot imagine. They also have corresponding editors for analysis and research.

The skill System of Dota2 is driven by data and scripts. The configuration file is a format defined by v, which can be replaced by json. The script is lua, which is much simpler and clearer than creating a new script language by Blizzard.

"Percent" {"BaseClass" "ability_datadriven" "AbilityBehavior" "percent | percent" "AbilityUnitDamageType" "percent" "AbilityTextureName" percent "// Time // percent" AbilityCooldown "" 15.0 15.0 15.0 15.0 "" AbilityCastPoint "" 0.0 0.0 0.0 0.0 "// Cost // percent" abilitymanaco ST "" 50 50 50 50 "" OnSpellStart "{" AttachEffect "// create special effects {"EffectName" "participant \ units \ heroes \ hero_bounty_hunter \ character" "EffectAttachType" "follow_origin" "Target" "CASTER"} "FireSound" // playback sound {"EffectName """ Hero_BountyHunter.WindWalk "" Target "" CASTER "}" ApplyModifier "// Add modifier {" Target "" CASTER "" ModifierName "" success "}" RunScript "/ /start stealth {"ScriptFile" "scripts/vscripts/ability in the script. lua "" Target "" CASTER "" Function "" bounty_hunter_wind_0000_2 "}" Modifiers "{" Duration "{" duration "" % Duration "" IsHidden "1" "OnAttack" // The attack will remove stealth and cause extra damage {"RunScript" {"ScriptFile" "scripts/vscripts/ability. lua "" Target "" UNIT "" Function "" bounty_hunter_wind_rj_2_attack "}" OnAbilityExecuted "// cast skills to remove stealth {" RunScript "{" ScriptFile "" scripts/vscripts/ability. lua "" Target "" UNIT "" Function "" bounty_hunter_wind_walk_2_attack "}}// Special // callback" AbilitySpecial "{" 01 "{" var_type "" FIELD_FLOAT "" duration "" 20.0 25.0 30.0 35.0 "}" 02 "{" var_type "" FIELD_FLOAT "" fade_time "" 1.0 0.75 0.5 0.25 "}" 03 "{" var_type "" FIELD_INTEGER "" bonus_damage "" 30 60 90 120 "}}}

Skill configuration can be override. Fields such as AbilityCooldown can be used to describe the basic information of a skill, such as the type of its target, the cool-down time, And the magic consumption.

OnSpellStart is a series of event Callbacks. Others, such as OnAttack OnProjectileHit, can be called back in specific events.

In the Event Callback, you can use actions to describe specific actions. For example, AttachEffect adds light effects, FireSound means playing sound, Damage means Damage, and Stun means vertigo. In Damage and Stun, you can specify whether the target is the caster or the victim, the scope, the Damage value, and the vertigo time.

The more important thing is AddModifier. Modifier can be understood as a Buff. It can contain a set of Properties, which are specific behaviors, such as an increase of attack speed by 50% and an increase of damage by 100. Modifier can also have a series of internal callbacks, such as OnCreate, which can execute more complex combinations at the right time.

Another important part is RunScript. Through the lua script, you can easily implement behaviors that are not implemented by the program by default. For example, if xx damage is caused per second, or more targets are affected, the larger the damage is.


The skill system implemented through the EventCallback ---- Action ---- Modifier ---- Script system is highly scalable. Adding new skills is a combination of these elements. However, adding new results does not affect the entire skill system. Other things are based on these elements. For example, a shot is an Action. If a shot is hit, a Stun Action or a Modifier is added. If special judgment is required, for example, if the damage caused by each hit person increases by 10%, the corresponding Script is added and called in OnProjectileHit.


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.