We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2009
    Location
    UK
    Posts
    1,461

    Game client load problem

    I'm working on a plugin that uses items in the barter wallet, but I'm experiencing a few problems with the Wallet:ItemAdded() function being called for every single item in the wallet during the client load process. I would like to defer the event registration in my plugin to after the game has finished loading to avoid the call being made too soon. I've considered using updates on the main window for a period of time before registering the functions, but that doesn't seem to help in all situations as client load times can vary. The other method I've considered, but not tried, is to register the functions when the chat channels have been detected - from looking at the output to the chat window, this seems to happen after the wallet has loaded - but I'm a bit dubious encase the game load sequence changes in future.

    Does anyone have any other tips I could try please? If any dev is still working on the Lua APIs, a call/event linked to game loading would be quite useful please.

    Thanks
    [CENTER][SIZE=3][B]Galuhad | Narvelan[/B]
    Lore Breakers of Eldar[/SIZE]

    [URL="http://www.lotrointerface.com/list.php?skinnerid=3762"]Plugins[/URL] | [URL="https://www.lotro.com/forums/showthread.php?538975-Accounts-for-New-Players"]New Player Guide[/URL] | [URL="http://www.twitch.tv/galuhad"]Twitch[/URL]
    [/CENTER]

  2. #2
    Join Date
    Mar 2007
    Posts
    1,158
    This has been an issue since the wallet API was released. It used to be slightly worse since the ItemAdded event didn't always fire. I implemented a work around in the Wallet plugin although I don't recall all of the details and I don't currently have access to my game machine or the dev box - this laptop barely lets me access the forums Anyway, you should be able to use the Wallet plugin as a starting point.

    EDIT: Sadly, after looking back at the published version of Wallet, it looks like I wound up using an Update event handler and checking the current barter wallet size against the stored size to determine whether a new currency had been added that way multiple new currencies could be handled in a single update event. Obviously not the most efficient solution but I may have given up on the ItemAdded issue and just brute forced it to be sure I caught all currencies
    Last edited by Garan; Dec 09 2013 at 08:10 PM.

  3. #3
    Join Date
    Jun 2009
    Location
    UK
    Posts
    1,461
    Thanks for responding Garan. I was hoping there was some obvious way I hadn't considered, but I guess not.
    [CENTER][SIZE=3][B]Galuhad | Narvelan[/B]
    Lore Breakers of Eldar[/SIZE]

    [URL="http://www.lotrointerface.com/list.php?skinnerid=3762"]Plugins[/URL] | [URL="https://www.lotro.com/forums/showthread.php?538975-Accounts-for-New-Players"]New Player Guide[/URL] | [URL="http://www.twitch.tv/galuhad"]Twitch[/URL]
    [/CENTER]

  4. #4
    Join Date
    Jun 2011
    Location
    Lancaster, England
    Posts
    81
    Quote Originally Posted by Galuhad View Post
    Thanks for responding Garan. I was hoping there was some obvious way I hadn't considered, but I guess not.
    I rather like the idea of monitoring the chat log to see when login is complete - thanks for the that, I may steal it!

  5. #5
    Join Date
    Mar 2007
    Posts
    1,158
    Quote Originally Posted by Dvarlin View Post
    I rather like the idea of monitoring the chat log to see when login is complete - thanks for the that, I may steal it!
    The problem is, as Galuhad suspected, login to the chat servers often completes before the Lua inventory and wallet initialization completes. If you put a message in the ItemAdded events for the bags and the wallet currencies, you will see that often the ItemAdded events fire after you get the messages about joining chat channels. This becomes even less dependable when you consider that the chat servers are on a different network than the game servers so they will have a different response time depending on the number of users in the player's region.

    What we really need is a Lua event that fires once all initialization is complete. Something along the lines of Turbine.Engine.InitializationC omplete()

  6. #6
    Join Date
    Jun 2009
    Location
    UK
    Posts
    1,461
    I've decided to go with a timed delay, with a 30 second delay on the .ItemAdded() etc. event being registered. This is highlighted with a progress bar showing the time remaining until the plugin is 'unlocked'. Hopefully this will give users enough time to load without causing too many problems. I'll likely add a cancel button to force unlock the plugin, should the user find the loading time to be relatively fast.
    Last edited by Galuhad; Dec 11 2013 at 06:40 PM.
    [CENTER][SIZE=3][B]Galuhad | Narvelan[/B]
    Lore Breakers of Eldar[/SIZE]

    [URL="http://www.lotrointerface.com/list.php?skinnerid=3762"]Plugins[/URL] | [URL="https://www.lotro.com/forums/showthread.php?538975-Accounts-for-New-Players"]New Player Guide[/URL] | [URL="http://www.twitch.tv/galuhad"]Twitch[/URL]
    [/CENTER]

 

 

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