Skip to content

Pizzalol/SpellLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

SpellLibrary

This repository is a collection of remade Dota 2 Hero abilities for the use of the Dota2 modding community by the Dota2 modding community

If you have any questions regarding the project or if you have found a bug/issue with the spells then feel free to create an issue or contact us on irc

Forum thread

Progress so far

Contribution & Guidelines

If you wish to contribute to this project then it is prefered if you could follow the following guidelines when contributing

  • Lua scripts should be separated on a per hero basis

  • Use as many AbilitySpecials as possible, do not hardcode the lua file.

  • Don't use Global Lua Events, abilities should work without any main addon scripts.

  • Don't bother with completely dota-hardcoded interactions

  • Implementing Aghanims upgrades and casting animations is not neccessary

  • Implementing Refresher compatibility is recommended but not mandatory

  • Use default particles and sounds

  • If you find an ability that seems hard or impossible to rewrite, ask and document your attempts, others will help you

  • It is fine to use BMD's Timers and Physics libraries

  • KV abilities should be saved as abilityname_datadriven.txt inside scripts/npc/abilities/HERONAME/ folder

  • Lua abilities should be saved as abilityname_lua.txt inside scripts/npc/abilities/HERONAME/ folder

  • Lua scripts should be saved as abilityname.lua inside scripts/vscripts/heroes/hero_HERONAME/ folder

  • Every KV file should have this in its header(EXAMPLE)

// Rewrite of HERONAME ABILITYNAME
// Author: AUTHORNAME - the name of the author or authors that created this ability
// Date: MONTHNAME DAY, YEAR(eg. February 12, 2016) - date on which the file was created or had modifications
// Version: eg. 6.86 - latest game version for which this ability is up to date
// Type: Datadriven, Lua or Datadriven/Lua - what kind of type this ability is
// Notes: write any notes regarding the ability such as particle incomplete, minor differences compared to the original ability, etc.
//
// List the file requirements if the ability requires other files to function
// ----- FILE REQUIREMENTS -----
// Script files:
// scripts/vscripts/heroes/hero_HERONAME/ABILITYNAME.lua
//
// KV files:
// scripts/npc/abilities/HERONAME/ABILITYNAME_datadriven.txt
//
// Unit files:
// scripts/npc/units/UNITNAME.txt
  • Follow this coding style:

For Datadriven KeyValues

"OnSpellStart"
{
    "RunScript"
    {
        "ScriptFile"    "heroes/hero_name/ability_name.lua"
        "Function"      "AbilityName"
    }
}

For Lua functions

--[[
    Author:
    Date: Monthname Day, Year
    (Description)
]]
function AbilityName( event )
    -- Variables
    local caster = event.caster
    local ability = event.ability
    local value = = ability:GetLevelSpecialValueFor( "value" , ability:GetLevel() - 1  )

    -- Try to comment each block of logical actions
    -- If the ability handle is not nil, print a message
    if ability then
        print("RunScript")
    end
end
  • Modifier Name conventions

    • Start with "modifier_"
    • Then add the spell name (no hero name)
    • Add "_buff" "_debuff" "_stun" or anything when appropiate

Recommended resources

Special Thanks

Noya for many of his tutorials

BMD for his libraries

Attero for his npc_abilities splitter

cris9696 for his files joiner

zedor for Custom Errors plugin

Myll for his Dota2ModKit tool

About

Repo for recreating the original dota skills

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages