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

  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,158
    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,158
    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 03: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,585
    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 - Old Timers Guild- Gladden:

    Partial cast
    Valamar: Dwarf Hunter - Level 100
    Valdicta: Dwarf Rune-keeper - Level 100
    Valanne: Beorning - Level 80

  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 11: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)

  10. #10
    Join Date
    Dec 2008
    Posts
    1
    What about making modifications to one of the "API Dump" tools to export the API to the script.log file using Turbine.Engine.Scriptlog()?

    Possible advantages:
    • The resulting text can be parsed automatically into the structure/files for API documentation.
    • Each object in the API is unique so the entries can correspond to existing items in a datastore with the additional text, examples, etc. appropriate for the API object.
    • Comparisons of older exports will identify changes made in the API so documentation maintainers can minimize the amount of effort keeping documentation up to date should any manual update be required.
    • API objects in the documentation can be associated with the particular value returned from Turbine.Engine.ScriptVersion() to allow for identifying version specific additions/removals.
    • The process is reusable to shorten the time for documentation updates when a new release comes out.


    I am not familiar with the wiki API(s) at lotrointerface to know if this can be integrated there.

    thoughts? arguments?

  11. #11
    Dumping the API and turning it into documentation is not enough. We need information on the intention and usage of classes and methods including the parameters.

    Examples are something we can do as a community (and I would be involved in this), however not having the rest of the documentation makes this a massive undertaking.

    There are also some really bizarre topics that have been worked out through sheer bloody minded blood and sweat (e.g. shortcuts).

    I seriously wish that Turbine would allocate a couple of weeks of developer time to getting the documentation straight.

    I'd also appreciate it if there were comments from Turbine about the future state of plugins and someone to address the existing bugs we have.
    [charsig=http://lotrosigs.level3.turbine.com/0420800000006abda/01006/signature.png]Kamindra[/charsig]

  12. #12
    Join Date
    Feb 2007
    Location
    Philadelphia, PA
    Posts
    2,585
    Quote Originally Posted by Kamindra View Post
    I'd also appreciate it if there were comments from Turbine about the future state of plugins and someone to address the existing bugs we have.
    We know from a comment by Sapience, I think it was in the thread about the Alien keyboard lights, that the Lua interface is a "pet project."

    Quote Originally Posted by Sapience View Post
    This seems like a perfect opportunity to introduce... Pet Projects.

    Devs are given a bit of free time here and there to investigate or work on pet projects. these an be small things they saw suggested on the forums or reworks of existing systems they think need some attention, or just little tweaks and features here and there.

    The Alienware FX project was one of those. There is more coming, and the dev responsible has read this thread and mentioned that I should point out that there's a lot he can do, but that this is a per project and so it's not a top shelf priority.

    As an example of a pet project that became a major system overhaul... Vaults. The entire revamp came out of a desire to just make them better. It ended up being a full-on revamp and expansion of the entire vault system.

    Lua Scrpiting and UI skinning are other examples.
    http://forums.lotro.com/showthread.p...56#post6707056 post #5

    The good news is that Narrel is still around!
    Bill Magill - Mac Player - Old Timers Guild- Gladden:

    Partial cast
    Valamar: Dwarf Hunter - Level 100
    Valdicta: Dwarf Rune-keeper - Level 100
    Valanne: Beorning - Level 80

 

 

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