We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Warning: JavaScript is required for some functionalities of this page. Please enable the use of JavaScript in your browser. Log In
Register My Account
Log Out (%1$s)

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

Warning: JavaScript is required for some functionalities of this page. Please enable the use of JavaScript in your browser.

Documentation and examples updated!

Updated 10/11/2017 to link to new Lua API Documentation

Both the API documentation and the script examples zips have successfully been uploaded! We apologize for the delay. As always, if you have any questions or comments about the current API, please post in the Current API Issues and Discussions sub-forum and we will get you the answers you need as soon as we can. Now that everything is updated, here is a quick set of Lua patch notes for what changed with this week's update. Enjoy!

-Nar

API Additions:

-Started to expose attributes for player type, classes, and races. Examples:

GetAttributes, GetClassAttributes, GetRaceAttributes.

GetFocus, GetAttunement, GetFervor, GetRampage

GetStance

etc.; check the updated documentation for the full function set

-Added a ClearItems function to list boxes
-Added an initial implementation of a TreeView control
-Added Engine.GetCallStack for getting the Lua call stack for debugging purposes

API Fixes/changes:

-Fixed a bug where the changed event for CheckBoxes did not fire when clicking on the check image itself
-Fixed a bug where ScrollBars not properly positioning themselves when the minimum value was not 0
-Fixed a bug where using Quickslots in a ListBox would cause the client to crash when plugins were unloaded
-Fixed a bug in PluginData where the first save operation would fail
-The local player can no longer be accessed via “Turbine.Gameplay.LocalPlaye r()” and instead must now be accessed via “Turbine.Gameplay.LocalPlaye r.GetInstance()”
-Windows now start as invisible by default; you must explicitly call “SetVisible(true)” on them after creating them if you want them to be immediately visible

Re: Documentation and examples updated!

Originally Posted by Hazado

WooHoo! API documentation is updated...
So are plugins! Just the OP for the download links. They are the correct ones now
Thanks Narrel!

Excellent! I was hesitant to make a post until I tried it from outside the building this evening to be super sure we got the cache refreshed but since you're able to get it, I think we're in business =). You're very welcome! Sorry it took so long to get it out there for real. If anyone else has any other issues with downloading the updated docs and examples, let us know. Thanks!

Re: Documentation and examples updated!

Still seeing the older version of TheOneBag in the example scripts. Frustrating too..... I'm having difficulty getting the older version to work correctly after the November 2010 update....

What specific issues are you having with TheOneBag after downloading the current examples zips? We'll try to figure out what the deal is from there. It could be another caching problem or could be a problem with the uploaded files themselves.

Re: Documentation and examples updated!

Originally Posted by Narrel

What specific issues are you having with TheOneBag after downloading the current examples zips? We'll try to figure out what the deal is from there. It could be another caching problem or could be a problem with the uploaded files themselves.

Aside from the Player.GetInstance() bug, it seems like some of the events relating to the inventory aren't firing correctly, causing TheOneBag to not behave correctly. Most of the stuff I've done was figuring out which events are being fired, to attempt to determine where the bug(s?) are. Notes are at http://forums.lotro.com/showthread.p...-Plugins-Issue.

I'm guessing that there's some interaction between the player inventory and the character panel that's not firing events correctly.

Maley Oakensage, Captain of Elendilmir

Alas Elendilmir, may you *jingle jangle* forever in the Forgotten West

Re: Documentation and examples updated!

Man I wish we'd had a heads up this was coming. The modification to the location of Class.lua has broken every plugin user out there who downloads the new "Example Scripts" archive (which actually isn't just Example scripts but contains the Turbine folder which is needed to run any plugin).

Sorry, I'm a little frustrated with this as it was not available for testing prior to being pushed on Live. Literally every plugin is broken. A few days or a week would have been really nice. We could have patched up plugins that aren't currently being worked on anymore as well as seen to our own since in most cases it's simply importing "Turbine" in addition to "Turbine.Utils" (we have to keep Turbine.Utils around to support those who have not upgraded).

[Edit: Turns out we can't keep Turbine.Utils around since it doesn't exist in the new package. Ah well, upgrade or die!!!]
[Edit2: Turns out you can keep it by using pcall(import, 'Turbine.Utils')]

As a developer, I realize sometimes things need to be pushed without warning. I sincerely hope this type of release cycle is not the norm and we'll be given an opportunity to test these types of drops in the future.

I have all the respect in the world for you guys in getting this great API out to us, I just ask for a little heads up.

I'd also strongly encourage changing the link from "example scripts" to be something which indicates you actually need it to run any plugins out there.

Now back to patching all the plugins I use.

Frell

Last edited by Biabo; Dec 01 2010 at 11:28 PM.
Reason: found out more info... again

Re: Documentation and examples updated!

Originally Posted by Almagnus1

Aside from the Player.GetInstance() bug, it seems like some of the events relating to the inventory aren't firing correctly, causing TheOneBag to not behave correctly. Most of the stuff I've done was figuring out which events are being fired, to attempt to determine where the bug(s?) are. Notes are at http://forums.lotro.com/showthread.p...-Plugins-Issue.

I'm guessing that there's some interaction between the player inventory and the character panel that's not firing events correctly.

There are definitely bugs in current Player.GetInstance() implementation:
Most importantly GetBackpack() : GetItem doesn't get updated properly when items are moved from & to bags inventory, like when item is equiped or drag & droped from character screen or vault.
There is also seem to be improper event firing when items are moved in, into or out of inventory - DragDrop event also generates not only ItemMoved, but also ItemRemoved & ItemAdded events, which I think cases ItemMoved to send args.OldIndex with empty item.
Also Turbine.UI.Lotro.ItemControl no longer has :SetParent method for some reason.
The above misbehavior makes item management plugins to malfunction for most external (character, vault, shortcut) to internal (bags) manipulations.
We really need some kind of fix or workaround for this issue.

Re: Documentation and examples updated!

Originally Posted by Almagnus1

Aside from the Player.GetInstance() bug, it seems like some of the events relating to the inventory aren't firing correctly, causing TheOneBag to not behave correctly. Most of the stuff I've done was figuring out which events are being fired, to attempt to determine where the bug(s?) are. Notes are at http://forums.lotro.com/showthread.p...-Plugins-Issue.

I'm guessing that there's some interaction between the player inventory and the character panel that's not firing events correctly.

Unfortunately, the character panel <--> inventory messages do appear to have been broken with the update. We are looking into what caused that now.

Re: Documentation and examples updated!

I don't understand LUA scripting; the jargon is a complete foreign language to me. I can figure out from the discussion here that you guys realize that something is not quite working in the new download.

In the meanwhile, what can I do to make my plugins work? Only one out of like, half a dozen of them actually work. I don't have access to the old download, AVG killed my computer and I had to reinstall everything. Is there a place I can get the old working documentation thing, the one that worked? Or is there something I can do to the files in my plugins to make them work again?

Re: Documentation and examples updated!

There's two main issues with Lua Plugins:
1) Some of Turbine's hooks in the game for us Lua coders to attach our plugins to aren't working correctly.
2) What this thread is focused on, some of the updates to the Turbine coding examples aren't working correcly

Keep in mind that Lua Plugins are a Beta feature to LotRO - that means that it's still being developed (on both sides), so while what's going on is frustrating, it's something to be expected.

Maley Oakensage, Captain of Elendilmir

Alas Elendilmir, may you *jingle jangle* forever in the Forgotten West

[COLOR=blue][charsig=http://lotrosigs.level3.turbine.com/04208010000094540/signature.png]Kugnakhaluk[/charsig]
[/COLOR]
[SIZE=3][COLOR=lime]"Once you master a people by force, you rely upon force for control."--Chris Hedges[/COLOR][/SIZE]