where to put custom made invoker abilities?

edited January 2017 in Questions

my question is : how do i add abilities to a hero, without them popping up in the ui?

----example that lead to the question : invoker casts invoke, error says : spell not found

1) my first solution :

// Dota Heroes File
// NOTE: This is not for creating new heroes, this is for taking a currently existing hero as a template and overriding
// the specified key-value combinations.  Use override_hero <hero_to_override> for this.
"DOTAHeroes"
{
    //=============================================================================================
  // HERO: Invoker
  //=============================================================================================
  "invoker_badass"
  {
      "override_hero"             "npc_dota_hero_invoker"
      "ModelScale"      "1.400"

      "Ability1"                  "quas_datadriven"
      "Ability2"                  "wex_datadriven"
      "Ability3"                  "exort_datadriven"
      "Ability4"                  "invoke_datadriven"
      "Ability5"                  "invoker_empty1_datadriven"
      "Ability6"                  "invoker_empty2_datadriven"
      "Ability7"                  "cold_snap_datadriven"
      "Ability8"                  "ghost_walk_datadriven"
      "Ability9"                  "ice_wall_datadriven"
      "Ability10"                  "emp_datadriven"
      "Ability11"                  "tornado_datadriven"
      "Ability12"                  "alacrity_datadriven"
      "Ability13"                  "sun_strike_datadriven"
      "Ability14"                  "forge_spirit_datadriven"
      "Ability15"                  "chaos_meteor_datadriven"
      "Ability16"                  "deafening_blast_datadriven"      
  }
}

but then the abilities show up at the start, so what do i do?

Comments

  • Posts: 329

    the spells are defined in the custom_abilties.txt and the lua script for "invoke" calls sunstrike_datadriven for example, but it does not recognize this spell

  • Posts: 273

    For the first question. This behaviors don't work? DOTA_ABILITY_BEHAVIOR_HIDDEN | DOTA_ABILITY_BEHAVIOR_NOT_LEARNABLE

    For the second question, are you sure you are not just making spelling errors? "sun_strike_datadriven" "sunstrike_datadriven"

  • Posts: 329

    nono im sure that was just an example out of my head,

    ill try out ur solution and post here the result

  • Posts: 329

    but if i use hidden and not learnable, will i be able to show them in the ui when invoker catss invoke?

    or are they hidden forever?

  • edited January 2017 Posts: 125

    @fallia, DOTA_ABILITY_BEHAVIOR_HIDDEN means they get SetHidden when created.

     ability:SetHidden(false)
     hero:SwapAbilities("ability_name", "ability_name2", bIsVisible1, bIsVisible2)
    

    So you can make them visible with functions above.

  • Posts: 329

    yup totally works,

    problem was the following : spellibrary by pizzalol does not have DOTA_ABILITY_BEHAVIOR_HIDDEN in some spells, so they pooped up on the ui