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

    How to find skill ID when we have tome ID

    Hello,

    i'm going to create a new plugin ofr horse collection.
    Based on Pets collection plugin.

    I scan the database to have all the tome ID but i can't find the id for skill / icon.

    An example :

    For pets - Red Chicken

    skill id : 1879305766
    tome id: 1879305770

    I try several digit around the tome id to find the skill id but it's a very long way.

    Do you have an idea ?

    thx a lot

  2. #2
    Join Date
    Jun 2011
    Posts
    391
    I am afraid you cannot calculate the skill ID (as pets are skills once granted) from the item ID of the item granting the skill. Whenever an update adds skills of any type, they are just added at the end of the list of skills, and the item granting a skill points to some ID in that list. So there might be only 3 items added but 20 skills. There is no calculated, systematic way how those are related.

  3. #3
    Join Date
    Mar 2007
    Posts
    1,590
    I have a simple (i.e. really, really ugly and not suitable for public consumption) plugin that I use to identify skills (and items). Basically, it has a scan function that starts at a known value and iteratively tries to create a shortcut and assign it to a quickslot using each ID until the user cancels the search. For each successfully assigned skill, it adds an entry into a skill table which can then be viewed in a window with a series of dynamically created quickslot controls. Yes, it is quick and ugly but it works - it could be greatly improved if I felt like spending time on it but we don't often need to find new skill IDs and when we do, it's easy to just fire up the quick and dirty tool and then look at all of the recently added skills.

    To test a skill, use the Lua pcall function to attempt to create and assign a shortcut with a given ID. The code snippet from my fugly scanner that tests a skill with ID="index" is below. The SkillData table was meant to have entries with information about each skill but currently just creates a non nil entry to signify that the ID is a valid skill (if it wasn't valid, the pcall would trap an error instead of succeeding). The item scanner part works very similarly but uses type Turbine.UI.Lotro.ShortcutType. Item and actually assigns item info from the shortcut since there is a shortcut:GetItem() method in the API (there is no shortcut:GetSkill() method) to populate the ItemData entry with stuff like Name and Description, etc.
    Code:
    				-- test this index
    				local sc=Turbine.UI.Lotro.Shortcut()
    				sc:SetType(Turbine.UI.Lotro.ShortcutType.Skill)
    				sc:SetData(string.format("0x%x",index))
    				local success, results=pcall(Turbine.UI.Lotro.Quickslot.SetShortcut,SkillWindow.TestQS,sc);
    				if success and results==nil then
    					SkillData[index]={};
    					if index>maxSkillID then maxSkillID=index end
    				end
    That should be enough to get you headed down the right road if you want to create your own Item and Skill scanner.

  4. #4
    Join Date
    Jun 2011
    Posts
    391
    Quote Originally Posted by Garan View Post
    I have a simple (i.e. really, really ugly and not suitable for public consumption) plugin that I use to identify skills (and items).
    Shoutout to Garan, I have used a version of that code (via /alerter debug) to get skill IDs for my plugin. Very useful.

  5. #5
    Join Date
    Jan 2016
    Posts
    0
    Quote Originally Posted by Hyos View Post
    Shoutout to Garan, I have used a version of that code (via /alerter debug) to get skill IDs for my plugin. Very useful.
    Hey, I was hoping to use something to find an item ID for me, but I've not looked into the LUA code yet (only just downloaded API docs). How can I turn the code above into a usable plugin just to test locally for me? Thanks!

  6. #6
    Join Date
    Mar 2007
    Posts
    1,590
    Quote Originally Posted by Cor-Jhan View Post
    Hey, I was hoping to use something to find an item ID for me, but I've not looked into the LUA code yet (only just downloaded API docs). How can I turn the code above into a usable plugin just to test locally for me? Thanks!
    Check out the thread:
    https://www.lotro.com/forums/showthr...gins-for-Noobs
    It covers the basics of how Lua is implemented in LotRO as well as how to get started writing plugins and using the Turbine API. Pretty much everything you need to get started.

    One of the best approaches is to download any plugins that are similar to what you want to do (the API is pretty limited so most of what can be done with it has already been done in one form or another) and see how it does what it does, then make it do what you want. Lotrointerface.com has quite a few plugins to choose from.

    As to testing code locally, you can use the debug window from my plugins to dynamically execute lua code - note, most of my plugins run in private Apartments so you are probably better off copying debug.lua to your own project if you intend to execute code to test your own plugin (Apartments are explained in the thread above).

  7. #7
    Join Date
    Jan 2016
    Posts
    0
    Quote Originally Posted by Garan View Post
    Check out the thread:
    https://www.lotro.com/forums/showthr...gins-for-Noobs
    It covers the basics of how Lua is implemented in LotRO as well as how to get started writing plugins and using the Turbine API. Pretty much everything you need to get started.

    One of the best approaches is to download any plugins that are similar to what you want to do (the API is pretty limited so most of what can be done with it has already been done in one form or another) and see how it does what it does, then make it do what you want. Lotrointerface.com has quite a few plugins to choose from.

    As to testing code locally, you can use the debug window from my plugins to dynamically execute lua code - note, most of my plugins run in private Apartments so you are probably better off copying debug.lua to your own project if you intend to execute code to test your own plugin (Apartments are explained in the thread above).
    Great, will do, thanks! Just need to get some quiet time at home and start to digest this! As a simple starter, I wanted to add the new Gourd Lurker to the Pets plugin. I found where to add it but I need the ID numbers to make it work but don't know how to retrieve the IDs (or where to retrieve them from!).

    Thanks for your help!

 

 

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