The SpellLibrary guide

edited November 2015 in Drafts

[Table of content here]


Welcome to the SpellLibrary guide!

This guide serves as an introduction to the SpellLibrary[LINK HERE] project and explains its usage. The SpellLibrary is a community project that started on December 15th, 2014. Its purpose is to help new and veteran modders with the creation of custom abilities by showcasing how original dota abilities would be coded.

Why would I use the SpellLibrary?

(Explain ability overrides and incorporate the Ability Type section here)

How do I start?

(2 ways, modkit way and manual way)

Modkit support

(Explain how to the SpellLibrary with Dota2Modkit, throw in some gifs)

Ability types

While browsing through the SpellLibrary you will find 3 types of abilities; Datadriven, Lua and Datadriven/Lua abilities. (Provide examples for each type maybe?)

Datadriven - Most common ability type in the SpellLibrary. Datadriven abilities are composed of purely KV functions or a mix of KV functions and Lua script calls. Lua scripts are called by using 'RunScript' and used for special logic cases. This is the recommended way of creating abilities for beginners.

Lua - Lua abilities are used mostly because they give much greater freedom when it comes to targeting, modifier and ability manipulation. It is not recommended to use Lua abilities if you aren't an experienced modder.

Datadriven/Lua - A hybrid ability type which uses KV and script calls but Lua modifiers. The reason to do this is because it is much easier to use Lua modifiers in situations when you want to use a specific modifier function but it turns out that it is unhandled in KV but works in Lua. e.g. You want to create a transformation ability which changes models of the caster. Doing it with a Lua modifier takes ~8 lines of code compared to ~100 when you don't use one.

Field explanations

(Explain the meaning of the fields custom fields like Date, requirements, etc. in ability files)

Ability examples

(Take some examples from the spelllib and explain what the code does, explain the importance of ordering actions)

Hero status

(Dropdown list of current hero status)

Link compilation

spell lib link

project thread link

modkit link

tutorials link

testing signature