lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 11-24-2013, 11:24 AM
DaBear78 DaBear78 is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Nov 2010
Location: Duisburg, Germany
Posts: 5
How to get Skill IDs?

Hi,

I wanted to make a patch for the Travel plugin to include the missing port(s), but there is one problem: I don't know how to get the skill ids? Is there any way to get the ids drom the game?

Greets,
DaBear78
Reply With Quote
  #2  
Unread 11-24-2013, 01:15 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
I know you can drag skills to a quickslot and then get the skillID from the data in the quickslot. A quick way to do this is to use the Alerter plugin and drag a skill to the alert quickslot and it will display the data value.

You can also get a table of known skills and purchasable skills via lua. I will post the method later if I get a chance.
EDIT: Alas, this table does not have skill IDs, just skill names

Last edited by Garan : 11-24-2013 at 08:49 PM.
Reply With Quote
  #3  
Unread 11-24-2013, 06:38 PM
DaBear78 DaBear78 is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Nov 2010
Location: Duisburg, Germany
Posts: 5
Quote:
Originally Posted by Garan
I know you can drag skills to a quickslot and then get the skillID from the data in the quickslot. A quick way to do this is to use the Alerter plugin and drag a skill to the alert quickslot and it will display the data value.
That helped a lot, thx. Now I know that the ID of "Return to Aldburg" (reputation) is 0x7003DC81... I don't have the hunter / warden ports yet ^^

Quote:
Originally Posted by Garan
You can also get a table of known skills and purchasable skills via lua. I will post the method later if I get a chance.
That would be great, so I could get those other ports I don't have yet. Thx! I never wrote a lua-script before, but I'm sure I will be able to write those "2 or 3 lines" I need for doing nothing but printing the IDs for all my skills into the chatwindow with this method
Reply With Quote
  #4  
Unread 11-24-2013, 08:54 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
It turns out the table returned by GetUntrainedSkills will not help for two reasons. First, the SkillInfo object doesn't include the skill ID. Second, even if it did, the untrained skill table will only include trainable skills and since the travel skills are "earned" rather than "trained" they do no show up.

The next best thing would normally be to look it up in the lorebook but the lorebook doesn't exist anymore. So now we need to create a small plugin that allows us to display an array of quickslots which are assigned sequential skill IDs and have a user defined starting point. Then you can enter the last known skillID and display all possible skills from that number on - basically the same method I use to discover new items after an update. I'll throw together a sample later.
Reply With Quote
  #5  
Unread 11-24-2013, 10:40 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
Here's a simple skill explorer. It would probably be better if it was set up to skip IDs that are not skills but it is a quick and dirty solution. You can either copy and paste the code into the debug window from any of my plugins or you can create a lua file from it and add it to your own plugin.
Code:
import "Turbine.UI";
import "Turbine.UI.Lotro";
skillWindow=Turbine.UI.Lotro.Window()
skillWindow.cols=math.floor((Turbine.UI.Display:GetWidth()-10)/100)
skillWindow.rows=math.floor((Turbine.UI.Display:GetHeight()-105)/62)
skillWindow:SetSize(Turbine.UI.Display:GetWidth(),Turbine.UI.Display:GetHeight())
skillWindow:SetText("Skill Explorer")
skillWindow.StartCaption=Turbine.UI.Label()
skillWindow.StartCaption:SetParent(skillWindow)
skillWindow.StartCaption:SetText("Start:")
skillWindow.StartCaption:SetPosition(10,45)
skillWindow.StartCaption:SetSize(50,20)
skillWindow.Start=Turbine.UI.Lotro.TextBox()
skillWindow.Start:SetParent(skillWindow)
skillWindow.Start:SetPosition(65,45)
skillWindow.Start:SetSize(100,20)
skillWindow.Start:SetFont(Turbine.UI.Lotro.Font.Verdana16)
skillWindow.Prev=Turbine.UI.Lotro.Button()
skillWindow.Prev:SetParent(skillWindow)
skillWindow.Prev:SetSize(100,20)
skillWindow.Prev:SetPosition(170,45)
skillWindow.Prev:SetText("Previous")
skillWindow.Prev.Click=function()
    local start=tonumber(skillWindow.Start:GetText())
    if start==nil then start=0 end
    start=start-skillWindow.rows*skillWindow.cols
    if start<0 then start=0 end
    skillWindow.Start:SetText(string.format("0x%x",start))
    skillWindow.refresh()
end
skillWindow.Show=Turbine.UI.Lotro.Button()
skillWindow.Show:SetParent(skillWindow)
skillWindow.Show:SetSize(100,20)
skillWindow.Show:SetPosition(275,45)
skillWindow.Show:SetText("Refresh")
skillWindow.Show.Click=function()
    skillWindow.refresh()
end
skillWindow.Next=Turbine.UI.Lotro.Button()
skillWindow.Next:SetParent(skillWindow)
skillWindow.Next:SetSize(100,20)
skillWindow.Next:SetPosition(380,45)
skillWindow.Next:SetText("Next")
skillWindow.Next.Click=function()
    local start=tonumber(skillWindow.Start:GetText())
    if start==nil then start=0 end
    start=start+skillWindow.rows*skillWindow.cols
    skillWindow.Start:SetText(string.format("0x%x",start))
    skillWindow.refresh()
end
skillWindow:SetVisible(true)
skillWindow.QS={}
for row=1,skillWindow.rows do
    skillWindow.QS[row]={}
    for col=1,skillWindow.cols do
        skillWindow.QS[row][col]=Turbine.UI.Lotro.Quickslot()
        local qs=skillWindow.QS[row][col]
        qs:SetParent(skillWindow)
        qs:SetSize(34,34)
        qs:SetPosition(col*100-32, row*62+23)
        qs.label=Turbine.UI.Label()
        qs.label:SetParent(skillWindow)
        qs.label:SetSize(100,20)
        qs.label:SetPosition(col*100-32, row*62+57)
    end
end
skillWindow.refresh=function()
    local start=tonumber(skillWindow.Start:GetText())
    if start==nil then start=0 end
    
    for row=1,skillWindow.rows do
        for col=1,skillWindow.cols do
            local qs=skillWindow.QS[row][col]
            local sc=Turbine.UI.Lotro.Shortcut();
            sc:SetType(Turbine.UI.Lotro.ShortcutType.Skill)
            local val=string.format("0x%x",start+(row-1)*skillWindow.cols+col-1)
            sc:SetData(val)
            local success, result=pcall(Turbine.UI.Lotro.Quickslot.SetShortcut,qs,sc)
            qs:SetVisible(success)
            qs.label:SetText(val)
        end
    end
end
skillWindow.Start:SetText("0x70033832")
just set the "start" value to the highest travel skill ID that is known to you and start scanning. you should be able to find the missing skill IDs fairly easily (you will have to hover over the skills to check the tooltips to see if they are musters or travels).
Reply With Quote
  #6  
Unread 11-25-2013, 02:02 AM
DaBear78 DaBear78 is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Nov 2010
Location: Duisburg, Germany
Posts: 5
Thx a lot! Just one question left: Debug window? (Where is it for example in Alerter?) *gg*
Reply With Quote
  #7  
Unread 11-25-2013, 08:32 AM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
Most of my plugins include a debugging window which can be accessed by using the chat command for the plugin with either "debug" or "debug on" as a parameter. I just noticed that the published version of Alerter does not have he debug window. Try MoorMap, TerrainMap, AltInventory, AltViewer, Cards, Custom Tips or Wallet. In the older ones, the command is simply "/pluginname debug" and there is no way to turn it off without reloading. The newer ones will support "/pluginname debug on" and "/pluginname debug off" so for AltInventory it would be "/altinventory debug on"
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SetBackground(), Asset IDs and custom skins Lynx3d Lua Programming Help (L) 2 06-09-2013 12:20 AM
Event for successful use of a skill. Lumbra Lua Programming Help (L) 6 04-28-2012 05:52 PM
Skill Cooldowns Alanion Interface Requests (L) 2 09-17-2010 09:21 AM
Panel File IDs hoojahmoolah General Authoring Discussion (L) 7 10-27-2008 04:33 PM
Skill/Spell Icons pdjkeelan General Authoring Discussion (L) 1 05-23-2007 11:35 PM


All times are GMT -5. The time now is 11:00 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui