We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 12 of 12

Thread: API Definitions

Hybrid View

  1. #1
    Join Date
    Feb 2011
    Posts
    3

    API Definitions

    Sorry for the seemingly silly question...

    I have spent several evenings looking for the documentation. The best I could find was @ lotrointerface but this is clearly not the latest API (I am expecting to see something updated around 5/2012).

    Where are you getting the latest API information? For example I do not see the information for Vaults, Skills or Backpacks in any of the documentation. Do you have a tool you are able to grab the commands from while in game?

    Thank You!

    Sorry for the whacked out name, it is clearly not what I have entered in my profile!

  2. #2
    Join Date
    Mar 2007
    Posts
    1,191
    The API docs have not been updated in a LOOOOOOOONG while. However, you can fairly easily use Lua to examine the Turbine objects to find out the available methods. An easy way is to load any of several plugins that have debugging tools. Two simple ones are ItemTracker and CustomTips which include my debug window (debug.lua) which can be accessed by using "/itemtracker debug on" or "customtips debug on" (use "/itemtracker debug off" or "/customtips debug off" to turn it back off unless you want to have it pop back up on reload). The dialog has an object explorer at the bottom that lets you drill down through the objects and shows the methods and child objects at each tier. Some objects like _G can be referenced recursively so don't go digging infinately into _G._G._G._G._G._G etc. You will want to go to _G.Turbine and start digging through there to find the Turbine objects. If the plugin has not included a particular Turbine library, you can include it dynamically by entering the include command in the command window and clicking the Execute button. The ability to dynamically execute commands is particularly useful since you can not only view the objects but actually manipulate them (a number of the code samples from http://forums.lotro.com/showthread.p...gins-for-Noobs were created in this tool and can be easily copied, pasted and executed).

    There are other authors who also have object viewing tools, such as HereBeDragons by Equendil.

  3. #3
    Join Date
    Feb 2011
    Posts
    3
    Thank You Garan.

    Makes me wonder if I should look at dumping your output to a file and parse that output to create some API documentation. Similar to the javadoc process.

  4. #4
    Join Date
    Feb 2009
    Location
    Illinois
    Posts
    95
    Quote Originally Posted by twowitnesses View Post
    Makes me wonder if I should look at dumping your output to a file and parse that output to create some API documentation. Similar to the javadoc process.
    That's an awesome idea! Would you be able to share somewhere...GoogleDocs?

  5. #5
    Quote Originally Posted by Garan View Post
    The ability to dynamically execute commands is particularly useful since you can not only view the objects but actually manipulate them (a number of the code samples from http://forums.lotro.com/showthread.p...gins-for-Noobs were created in this tool and can be easily copied, pasted and executed).
    Many thanks for this! I wonder how difficult it would actually be to reverse engineer API documentation from Lua tables. It's by no means as descriptive as e.g. .NET reflection, is it? I don't think that method information that can be extracted would actually tell you what parameters the method expects, or does it?
    [B]Landroval[/B] [COLOR=#ff0000]off[/COLOR] [B]Feoktist [/B](brg)
    RU.Lotro U13 [B]Fornost [/B][COLOR=#ff0000]off[/COLOR] [B]Gustavo[/B] (brg) / [B]Narciss [/B] (wdn)

  6. #6
    Join Date
    Mar 2007
    Posts
    1,191
    Quote Originally Posted by Feoktist View Post
    Many thanks for this! I wonder how difficult it would actually be to reverse engineer API documentation from Lua tables. It's by no means as descriptive as e.g. .NET reflection, is it? I don't think that method information that can be extracted would actually tell you what parameters the method expects, or does it?
    You can't determine what parameters a method expects programatically, but they are usually fairly easy to determine once you get used to what Turbine has expected in other methods that are documented. You can determine what parameters Turbine passes to events by using the Table.Dump method from the Turbine samples code.

    Documentation is a bit harder to generate from our end than it might seem at first. I did start updating my own copy of the documentation a while back only to have Turbine make some significant changes which made my documentation invalid and I had to revert to the last published docs and I've just been too busy with other projects to bother updating them again. Turbine should have development tools that allow them to generate documentation from their end which would require a little polishing but would be considerably more accurate than what we can generate. I'm not sure why the documentation has not been updated for such a long time, but I would guess that the devs just don't have the time to do it since all of the Lua stuff has been done in what little spare time they have. It may even be that one or more devs that were working on Lua (there were only two last I knew) no longer work for Turbine as there have been some personnel changes since the last Lua update. Unfortunately, with no official communication on this issue we are left with guesses.

    FWIW, AltInventory and MoorMap also have my debug module.
    Last edited by Garan; Mar 10 2013 at 02:13 PM.

  7. #7
    Quote Originally Posted by Garan View Post
    , AltInventory and MoorMap also have my debug module.
    I actually gave it a try yesterday, that's one sweet little tool! Unfortunately I'm way behind the curve on LotRo API overall, so I guess I'd rather stick to what I know best: copying guru's code =)Seriously though, your tool helps A LOT in learning the object model.
    [B]Landroval[/B] [COLOR=#ff0000]off[/COLOR] [B]Feoktist [/B](brg)
    RU.Lotro U13 [B]Fornost [/B][COLOR=#ff0000]off[/COLOR] [B]Gustavo[/B] (brg) / [B]Narciss [/B] (wdn)

  8. #8
    Join Date
    Feb 2007
    Location
    Philadelphia, PA
    Posts
    2,725
    Quote Originally Posted by Garan View Post
    Documentation is a bit harder to generate from our end than it might seem at first. I did start updating my own copy of the documentation a while back only to have Turbine make some significant changes which made my documentation invalid and I had to revert to the last published docs and I've just been too busy with other projects to bother updating them again. Turbine should have development tools that allow them to generate documentation from their end which would require a little polishing but would be considerably more accurate than what we can generate. I'm not sure why the documentation has not been updated for such a long time, but I would guess that the devs just don't have the time to do it since all of the Lua stuff has been done in what little spare time they have. It may even be that one or more devs that were working on Lua (there were only two last I knew) no longer work for Turbine as there have been some personnel changes since the last Lua update. Unfortunately, with no official communication on this issue we are left with guesses.
    Some thoughts ...
    Narrel is still around... for some definition of "still." The Skinning pack for Update 10 was just posted on 6 March 2013.

    Update 10 Skinning Pack:
    http://www.lotrointerface.com/downlo...nningPack.html

    At lotrointerface.com exists "a wiki" -- which contains what was a start by Digital Utopia (now retired from LOTRO) towards documenting the LUA environment. This particular Wiki is (apparently) not well known as it has few contributors, so maybe this will stir up some interest. (Access it from the menu bar at the top of any page at lotrointerface.com.)

    Such a mechanism allows anyone who so desires to contribute to documenting the interface, and should, in theory, allow it to be updated fairly easily. (I do a lot of editing over a lotro-wiki.com, so that I am familiar with media-wiki, but I don't have the programming background to extrapolate documentation on the API.) See the now "stale" series of articles:
    http://lotro-wiki.com/index.php/Lua_Plugins


    The last official API documentation update (from Narrel) was for Isengard in 19 October 2011, the same date as the release of
    "Update 4, Rise of Isengard, Patch 1 - October 19, 2011" (Hint, Hint ...)

    Isengard Lua API Documentation
    http://www.lotrointerface.com/downlo...mentation.html

    I'm guessing, based solely on dates, but have not confirmed, the contents of the WIKI documenting the API are based on this document.

    I would like to see the various authors of plugins contribute to the Wiki.

    Two tools useful for creating Luas appear to be:

    http://www.lotrointerface.com/downlo...BeDragons.html Here be Dragons - Equendil

    http://www.lotrointerface.com/downlo...TableDump.html API Table Dump - Galuhad

    There appear to be a couple of other "tools" which seem, from their narrative descriptions, to be platform specific, and being a Mac player, they have not interested me!
    Bill Magill Mac Player Founder/Lifetimer
    Old Timers Guild - Gladden

    Val - Man Minstrel (90)
    Valalin - Dwarf Minsrel (69)
    Valamar - Dwarf Hunter (105)
    Valdicta - Dwarf RK (105)
    Valhad - Elf LM (65)
    Valkeeper - Elf RK (86)
    Valwood - Dwarf RK (80)

    Valhunt - Dwarf Hunter (70)
    Valanne - Beorning (92)
    Ninth - Man Warden (65)

    "Laid back, not so serious, no drama.
    All about the fun!"


  9. #9
    Quote Originally Posted by Valamar View Post
    There appear to be a couple of other "tools" which seem, from their narrative descriptions, to be platform specific, and being a Mac player, they have not interested me!
    For the lack of better place, has anyone been able to put Service and ServiceContainer to good use? Out of all the new classes they seem least self-explanatory. What little info I found so far suggests they were introduced in Update 7. HereBeDragons info can't provide that much of an insight beyond what their names already imply. So.. anyone know what are these mystical "services"?
    Last edited by Feoktist; Mar 26 2013 at 10:54 AM.
    [B]Landroval[/B] [COLOR=#ff0000]off[/COLOR] [B]Feoktist [/B](brg)
    RU.Lotro U13 [B]Fornost [/B][COLOR=#ff0000]off[/COLOR] [B]Gustavo[/B] (brg) / [B]Narciss [/B] (wdn)

 

 

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