We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2011
    Posts
    72

    RoR Lua additions

    There seem to be quite a few changes to LUA code in RoR.

    Specifially the following are likely to be important for coders;
    • When Mounted all the buffs on the player, stances too, are cleared.
    • player:GetMount() returns either a Mount or CombatMount object that can be polled for information.
    • ActiveSkill
    • SkillList
    • Skill
    • SkillInfo
    • SkillType
    • UntrainedSkill
    • GambitSkill (Just logged out, so not sure of syntax there, sorry!)
    The skill items I haven't played with but include descriptions and cooldowns. I think this could open the door to timers on quickslot bars - something I have wanted to do for a while. HOWEVER, I go back to work tomorrow and have no time to work on it. Dammit!

    If anyone else has played with the LUA in Beta and has some interesting info, indeed ANY info, I would love to hear it!
    Formerly know as [B]MrJackdaw[/B]
    Author of [I]Bevy-o-Bars, SortPack, VBar[/I] and [I]BuffFrame[/I]
    Characters; [B]Dirmac[/B], [B]Dvarlin [/B]and [B]Fathiriel[/B]

  2. #2
    Join Date
    Jan 2008
    Posts
    794
    Turbine.Gameplay.SkillList
    GetCount() - gets the count
    GetItem(i) - gets the ith item
    event: SkillAdded(object, args) - args.Index (index), args.Skill (skill object)
    event: SkillRemoved(object, args) - args.Index (index), args.Skill (skill object)

    Turbine.Gameplay.SkillInfo
    GetName() - gets the name
    GetDescription() - gets part of the tooltip
    GetType() - one of Turbine.Gameplay.SkilType (Normal, Mount, Gambit)
    GetIconImageID() - presumably the image ID of the skill

    Turbine.Gameplay.Skill
    GetSkillInfo() - gets the SkillInfo of the skill.

    Turbine.Gameplay.ActiveSkill (child of Turbine.Gameplay.Skill)
    GetResetTime() - returns -1 or the time when the current skill cooldown will end
    GetCooldown() - returns the skill's cooldown
    GetBaseCooldown() - returns -1
    IsUsable() - returns if the skill is usable
    event: ResetTimeChanged(obj) - no arguments, fires when the skill is used if there is a cooldown. Probably fires any time the current cooldown changes.

    There does not appear to be a UsableChanged() event for Turbine.Gameplay.ActiveSkill.
    I have not determined if there is a CooldownChanged() event for Turbine.Gameplay.ActiveSkill.

    Turbine.Gameplay.GambitSkill (probably a child of Turbine.Gameplay.Skill)
    (no functions)

    Turbine.Gameplay.GambitSkillIn fo (probably a child of Turbine.Gameplay.SkillInfo)
    GetGambit(i?) - probably returns the ith gambit builder of the gambit
    GetGambitCount() - probably returns the number of gambit builders

    Looks like I can finally replace SkillInfo. Apparently that particular library was horrible enough that I was the only person using it. Well, mostly replace it. There's a couple things that SkillInfo appears to do that the current implementation doesn't. Fortunately, I wasn't using that functionality.
    Last edited by moebius92; Sep 02 2012 at 07:39 AM.

  3. #3
    Join Date
    Jun 2011
    Posts
    72
    Just been playing with this and would really like to get a hold of the shortcut from the skillinfo table.

    I can't make this work currently - can anyone out there?
    Formerly know as [B]MrJackdaw[/B]
    Author of [I]Bevy-o-Bars, SortPack, VBar[/I] and [I]BuffFrame[/I]
    Characters; [B]Dirmac[/B], [B]Dvarlin [/B]and [B]Fathiriel[/B]

  4. #4
    Join Date
    Jan 2008
    Posts
    794
    SkillData has a table which maps shortcut data strings to skill names that you can use to search the Active and Untrained skills.

  5. #5
    Join Date
    Jun 2009
    Posts
    1,371
    Quote Originally Posted by Dvarlin View Post
    Just been playing with this and would really like to get a hold of the shortcut from the skillinfo table.

    I can't make this work currently - can anyone out there?
    Been toying around with this for an hour or so but can't get anything directly from the skill or skill info.. I've even tried assigning it to itemcontrols and iteminfocontrols to see if they would take the skill but unfortunately not.

    The only way that seems to work for setting a shortcut is to use the hex ID for the skill..
    Quickslot:SetShortcut(Turbine. UI.Lotro.Shortcut(Turbine.UI.L otro.ShortcutType.Skill, "0x70003E8A"))

    Quote Originally Posted by moebius92 View Post
    SkillData has a table which maps shortcut data strings to skill names that you can use to search the Active and Untrained skills.
    Exactly this.. You can use the :GetName() function to cross-reference within a skills database such as the one mentioned above.

    Again another case of where being able to access the hex IDs would make things ten times easier.
    Galuhad | Narvelan
    Evernight (formally of Eldar) | Plugins
    Kinship Revamp Proposal

  6. #6
    Join Date
    Jun 2009
    Posts
    1,371
    Quote Originally Posted by moebius92 View Post
    Turbine.Gameplay.SkillList
    GetCount() - gets the count
    GetItem(i) - gets the ith item
    event: SkillAdded(object, args) - args.Index (index), args.Skill (skill object)
    event: SkillRemoved(object, args) - args.Index (index), args.Skill (skill object)

    Turbine.Gameplay.SkillInfo
    GetName() - gets the name
    GetDescription() - gets part of the tooltip
    GetType() - one of Turbine.Gameplay.SkilType (Normal, Mount, Gambit)
    GetIconImageID() - presumably the image ID of the skill

    Turbine.Gameplay.Skill
    GetSkillInfo() - gets the SkillInfo of the skill.

    Turbine.Gameplay.ActiveSkill (child of Turbine.Gameplay.Skill)
    GetResetTime() - returns -1 or the time when the current skill cooldown will end
    GetCooldown() - returns the skill's cooldown
    GetBaseCooldown() - returns -1
    IsUsable() - returns if the skill is usable
    event: ResetTimeChanged(obj) - no arguments, fires when the skill is used if there is a cooldown. Probably fires any time the current cooldown changes.

    There does not appear to be a UsableChanged() event for Turbine.Gameplay.ActiveSkill.
    I have not determined if there is a CooldownChanged() event for Turbine.Gameplay.ActiveSkill.

    Turbine.Gameplay.GambitSkill (probably a child of Turbine.Gameplay.Skill)
    (no functions)

    Turbine.Gameplay.GambitSkillIn fo (probably a child of Turbine.Gameplay.SkillInfo)
    GetGambit(i?) - probably returns the ith gambit builder of the gambit
    GetGambitCount() - probably returns the number of gambit builders

    Looks like I can finally replace SkillInfo. Apparently that particular library was horrible enough that I was the only person using it. Well, mostly replace it. There's a couple things that SkillInfo appears to do that the current implementation doesn't. Fortunately, I wasn't using that functionality.
    Trying to get access to the active skills part of the API but I can't for the life of me work out which event calls this..
    Galuhad | Narvelan
    Evernight (formally of Eldar) | Plugins
    Kinship Revamp Proposal

  7. #7
    Join Date
    Jan 2008
    Posts
    794
    Quote Originally Posted by Galuhad View Post
    Trying to get access to the active skills part of the API but I can't for the life of me work out which event calls this..
    Turbine.Gameplay.LocalPlayer:G etInstance():GetTrainedSkills( ), Turbine.Gameplay.LocalPlayer:G etInstance():GetUntrainedSkill s(), Turbine.Gameplay.LocalPlayer:G etInstance():GetClassAttribute s():GetTrainedGambits(), and
    Turbine.Gameplay.LocalPlayer:G etInstance():GetClassAttribute s():GetUntrainedGambits() return a Turbine.Gameplay.SkillList object. (The last two only work for Wardens, of course.)

    Turbine.Gameplay.SkillList.Get Item(x) returns a Turbine.Gameplay.ActiveSkill (GetTrainedSkills), Turbine.Gameplay.Gambit (GetTrainedGambits), or Turbine.Gameplay.Skill (GetUntrainedSkills and GetUntrainedGambits). Oddly enough GetUntrainedGambits returns a Turbine.Gameplay.Skill instead of a Turbine.Gameplay.Gambit.

    If you want some undocumented code examples, Response Timer and CC Timer both use ActiveSkills in order to track skill cooldowns. It's pretty basic, but it didn't need to be complex.

  8. #8
    Join Date
    Jun 2009
    Posts
    1,371
    Quote Originally Posted by moebius92 View Post
    Turbine.Gameplay.LocalPlayer:G etInstance():GetTrainedSkills( ), Turbine.Gameplay.LocalPlayer:G etInstance():GetUntrainedSkill s(), Turbine.Gameplay.LocalPlayer:G etInstance():GetClassAttribute s():GetTrainedGambits(), and
    Turbine.Gameplay.LocalPlayer:G etInstance():GetClassAttribute s():GetUntrainedGambits() return a Turbine.Gameplay.SkillList object. (The last two only work for Wardens, of course.)

    Turbine.Gameplay.SkillList.Get Item(x) returns a Turbine.Gameplay.ActiveSkill (GetTrainedSkills), Turbine.Gameplay.Gambit (GetTrainedGambits), or Turbine.Gameplay.Skill (GetUntrainedSkills and GetUntrainedGambits). Oddly enough GetUntrainedGambits returns a Turbine.Gameplay.Skill instead of a Turbine.Gameplay.Gambit.

    If you want some undocumented code examples, Response Timer and CC Timer both use ActiveSkills in order to track skill cooldowns. It's pretty basic, but it didn't need to be complex.
    Thank you
    Galuhad | Narvelan
    Evernight (formally of Eldar) | Plugins
    Kinship Revamp Proposal

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload