Help Support Our Growing Community

DOTAFire is a community that lives to help every Dota 2 player take their game to the next level by having open access to all our tools and resources. Please consider supporting us by whitelisting us in your ad blocker!

Want to support DOTAFire with an ad-free experience? You can support us ad-free for less than $1 a month!

Go Ad-Free
Smitefire logo

Join the leading DOTA 2 community.
Create and share Hero Guides and Builds.

Create an MFN Account






Or

Elfansoer's Blog
Blog Posts: 9     Views: 19205     Comments: 6
Elfansoer
Show From:
DotA 2
Off Topic
January 26, 2018

Troll Warlord's Fervor


a stack neverflow

EDIT: Some links have been updated due to github repository change.

Overview


There's not much to discuss for Fervor's base .txt and main lua. As a passive, Fervor does not require targetting filter and other important values, so the txt file is pretty much similar to Spell Shield. There is one difference, however, that it states "SpellDispellable" as no. This is optional, since it only affects the tooltip.
The ability file is also as simple as Spell Shield. A copy-paste, in fact, since the ability is not required to do anything other than spawning the modifier.

The actual actions happened at modifier instead, so let's focus on that one.

Modifier: Characteristics


This modifier should appear at buff bar, hence we need to show it. Since it is not on the background anymore, its characteristics should be specified, such as:
  • Is it hidden?
  • Is it a debuff? (Otherwise is a buff)
  • Is it can be purged?
  • Is it removed on death?

So far, Spell Shiel…
Read More
January 25, 2018

Antimage: Spell Shield Lua


Let's get our hands dirty.

EDIT: Some links have been updated due to github repository change.

Ability Form Review


Take a brief look on the ability's .txt file. It's quite short, since it's a simple ability.
Notice that the ability has been renamed as "antimage_spell_shield_lua" in order to avoid collision with the real one.
It is a basic ability with a passive behavior, and nothing else. No need for cast points, unit targetting, spell immunity, etc etc. It also has just one ability specials, which defines the magic resistance bonus on each level.
In short, it's short.

Introducing: Main Lua File


Open up a text-editor, create new file and save it as "antimage_spell_shield_lua.lua", placed according to the .txt file. This will be the main script file, which defines what the ability does. Let's begin with the keypoints.

Class Identifier


You should generally want this particular line at the start of your lua files. This defines the start of a class for c…
Read More
January 23, 2018

Registering and Testing Ability

Time to make the dream come true.

EDIT: Some notes has been edited due to github repository change.

Dota 2 Addon: Ability Lua Example


Valve actually made their own tutorial on how to create custom abilities using lua. Well, "giving examples" is more accurate, but still it's very useful. The tutorial is an addon (custom game) named

"ability_lua_example"

.

To play the addon, simply open Dota 2, then on your console (make sure you enabled it first), put:
Code:
dota_launch_custom_game lua_ability_example hero_demo_main

Go with the flow (Lina recommended; she's hot), and voila: it looks like a hero demo! Go play with her and everything seems normal, except for the fact that she has 5 abilities.

Random guy: Okay, now what?

If you still didn't notice it, here's the hint: all of her abilities are written in Lua, and you may see (also edit) the script file(s).
The addon files are located on:
Code:
"<YourSteamLibrary>/dota 2 beta/game/dota_addons/lu

Read More
January 22, 2018

Ability Lua Tutorial 1: Ability Form

Views: 2646 Elfansoer
Okay, since this is my very first tutorial, there may be some mistakes. Just go along with me and ask some question, and we'll be fine. After a lot of considerations (mostly in sleeping, but still), I decided to take this one as the first tutorial.

Ability Form



I'm pretty sure that you guys are already an expert in designing unique abilities and explain them to us, but how do you explain your abilities to Dota 2 engine?
You can tell the machine about your abilities by using a certain registration form. With this, there'll be more clarity for the machine about the description of your abilities, what they can do and what they cannot do.

Now the form, here you go.

Random Guy: Dafuq is that?

Relax, I'll explain them one by one. Just copy it to your editor, and save it as:
"<heroname>_<abilityname>.txt"
Where to? Anywhere, for now.

Hey, don't just read it. Copy and save it, get your hands dirty.

Now, here's the guide to fill the form. The form above has been filled with an abili…
Read More
<< 1 2

DOTAFire is the place to find the perfect build guide to take your game to the next level. Learn how to play a new hero, or fine tune your favorite DotA hero’s build and strategy.

Copyright © 2019 DOTAFire | All Rights Reserved