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?
Sorry for the whacked out name, it is clearly not what I have entered in my profile!
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.
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.
That's an awesome idea! Would you be able to share somewhere...GoogleDocs?
Originally Posted by twowitnesses
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?
Originally Posted by Garan
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.
Originally Posted by Feoktist
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.
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.
Originally Posted by Garan
Some thoughts ...
Originally Posted by Garan
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:
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:
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
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! :)
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"?
Originally Posted by Valamar
What about making modifications to one of the "API Dump" tools to export the API to the script.log file using Turbine.Engine.Scriptlog()?
- 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.
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.
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."
Originally Posted by Kamindra
http://forums.lotro.com/showthread.p...56#post6707056 post #5
Originally Posted by Sapience
The good news is that Narrel is still around!