Quantcast
VGInterface.com
Search Downloads


Go Back   LoTROInterface > LotRO Stand-Alone Plugins > Other

Category: OtherLoTRO Alerts
Interface Information
Download
Garan's Portal Bug Reports Feature Requests
How do I install this? (FAQ)
Name: LoTRO Alerts   Popular!
Author:
Date: 03-10-2016 06:47 PM
Size: 57.19 Kb
Version: 1.08
Rate File: 5 out of 5 with 12 votes  
Pictures
Click to enlarge 

Views: 0
Size: 48.48 Kb
Dimensions: 990 x 468
Sample Lm stun break alert
 
Click to enlarge 

Views: 0
Size: 55.60 Kb
Dimensions: 822 x 478
The Trigger settings for the 'Tracked' alert.
 
Click to enlarge 

Views: 0
Size: 51.70 Kb
Dimensions: 820 x 474
The Response settings for the 'Tracked' alert.
 
Description
Ever get blown-up while wandering in stealth just to realize you missed the tracking warning? Ever have some stray arrow break your stun/daze/mez on a critical NPC and not know who to rant at, er I mean provide constructive criticism too?

Well, never miss an important message just because it's burried in a rapidly scrolling mountain of chat. Welcome to Alerter.

This plugin allows you to set specific phrases to watch for in specific chat channels and if any match occurs in a specified channel, a message is displayed prominantly on your screen. You can control the position, size, text, color and duration of the message as well as whether it flashes and how quickly.

See samples of alert setups at http://www.lotrointerface.com/portal.php?id=35&a=faq

You can use the Chat Log Window to determine the channel and text you are trying to match. Click the "Show Log" button or use the "/Alerter Log Show" command to display the Chat Log Window. The chat log will have three columns, the first is the channel (text if recognized, numeric if unknown), the second is the "Sender" which currently seems to always show the current player and the third is the message Text with all hidden XML tags exposed. You can start/stop logging and clear the log from the window. You can also start/stop loggin with the "/Alerter Log Start" and "/Alerter Log Stop" chat commands. The chat log will retain up to 1000 messages before it starts automatically recycling space by dropping the oldest entries.

To install, simply download the file and unzip it into your /Plugins folder. There are no dependancies on 3rd party files, everything you need is in the zip.

To load it, use /Plugins load Alerter.

The "/Alerter setup" command will display the setup/configuration screen. By default the plugin loads hidden, you will have to display the setup screen at least once to define one or more alerts. There is no practical limit to the number of alerts you can set, but you will eventually start to notice a performance hit if you define a hundred or so

To define an Alert, select "New" from the Alert selection list. Then enter a label for the alert (this is what will display in the Alert selection list so you can modify the alert later if you wish. Then enter the text that you want to display - note, if you leave the message text blank, the entire message that triggers the alert will be used for the message (see the stun break example). Enter a Duration in seconds. You can use decimal values to get partial seconds. Select a Color and Font for the message text. Select the flash interval in seconds - by entering 0, the message will not flash but will display for the entire Duration. Select the Chat channel(s) where you wish to trap a message - note in the LM example, the stun break message occurs in the Death channel, not the Combat channel which you might expect, so some experimentation may be required to get the proper channel. Lastly, enter the portion of the message that should trigger the alert - the larger the section of text the better - and click Save. If you want to see how the alert will look, click Test.

Version 1.08
Added custom Lua code snippets for Trigger and Response. The Trigger snippet can be used to provide custom filtering of alerts while the Response snippet can be used to define additional response capabilities or alter the existing responses.
To learn more about the code snippets and their capabilites, read the ReadMe.txt file.
Changed "Show Log" Button to "Show Chat Log" to reflect that it is a log of incomming Chat messages
Changed "Add to Custom Log" Checkbox to "Add to Alert Log" and added "Show Alert Log" Button to view the log of alerts.
Added Log Viewer window. This window will display the history of alerts that had the "Add to Alert Log" check box checked during a specific session. I recommend not logging alerts unless you are trying to debug something as the log viewer doesn't handle large tables very well. However, it does have a couple of handy features:
You can left drag column headings to reorder the columns, you can left drag the header separators to resize columns and you can right click the header to check/uncheck columns to be displayed
You can control the size of the text in the grid by selecting a font and size by clicking the font select button in the upper right corner. You can also increase/decrease the font by simply holding Ctrl and scrolling your mouse wheel while over the grid - note, the font change can take a second or two for large tables so it is best to select a font while reviewing a session with fewer alerts to find a font that is comfortable.
The Response column is the actual text displayed by the Alert while the Message column is the original text from the incomming Chat message that triggered the alert.

Version 1.07
Restored Shared alerts and Custom Logs that were accidentally removed in 1.06
Added "message" to Custom Logs.
Note, Custom Logs are log files per client session that are stored at the account level, in the AllServers folder, as "Alerter_Log_YYYYMMDD_HHMMSS.plugindata" where YYYYMMDD is Year, Month and Day and HHMMSS is Hours, Minutes and Seconds. A log viewer is planned for a future version.

Version 1.06
Added "World" chat channel
Added support for Emote, Pet and Hobby quickslots in Responses
Changed default behavior of quickslots to display for Duration and added option to "Hide after Clicked"

Version 1.05
Fixed alert position bug for alerts using Mouse Position and a Delay time.
Fixed bug that could generate an error when displaying the "Alert Saved" or "Alert Deleted" message.
Fixed bug in language selection not immediately updating State radio button labels and selection list labels.

Version 1.04
Added separate tabs for Trigger settings and Result settings to help group settings and clean up the cluttered interface
Updated the DE and FR support. The whole interface should now support both German and French (although some translations may still be a bit literal).
Changed channel select boxes to automatically reorder alphabetically when language changes.
Added the new channels from Update 6 (Combat - Player and Combat - Enemy).
Changed Item quickslots to accept item instance IDs instead of generic IDs (the first part of the ID should not be 0). Use drag & drop to generate the ID. Note, for items with more than one stack, only the stack that is actually dragged to the control will work.
Implemented permanent fix for the version 1.03 infinite loop bug caused by ExaminationItemID tags containing byte data.
Added Delay setting for alerts - you can now trigger an alert to go off x number of seconds after the chat message which is great for knowing when to refresh certain skills, etc.
Added States (currently only "In Combat" and "Out of Combat") for triggers. You can choose to delay an alert until the state is no longer true or suppress he alert all together. This way you won't be bothered by social alerts while in combat (but you can choose to have them pop up once combat ends), etc.
Fixed a bug that could allow an alert Quickslot to continue to display even after the alert duration had expired.

Version 1.03
Modified Alerts so that more than one alert can be active simultaneously - alerts no longer override each other.
Added limits to the alert template when resizing with the mouse - you can still override the limits by manually entering lower values.
Re-added the Opacity slider
Added tinting to areas of the setup panel to indicate related fields and help a little with the clutter
Added Quickslot controls to alerts - these let you click on the alert to execute an alias, perform a skill or use an item
Added an option to display alert at the mouse position, overriding the Top and Left coordinates (mostly useful for Quickslot alerts)
Added an option to scroll the text vertically upwards within the defined alert box - the scroll rate is controlled by the duration

Version 1.02
Added Cooldown setting to alerts - allows setting a minimum time between alerts for the same trigger.
Added a graphical frame which is visible when the setup window is visible for graphically moving/resizing the alert panel in addition to left, top, width and height fields that can be manually entered.
Added the ability to use a graphic image with alerts. Save the image in the GaranStuff/Alerter/Resources folder and then just enter the image file name (without path). Alternately, you can use any of the built in resource IDs.
Added a chat log which displays the chat channel, sender and message arguments for the last 1000 incomming chat messages.
Altered the way that channels are selected - you will need to redefine any previously created alerts by reselecting the channels and resaving.
Added a "Custom" channel to allow users to match agains any previously undefined channel that they find in the log. Undefined channels will show up as a number, enter that number in the Custom Channel field. Note, undefined channels will still be matched by the "Any" channel category.
Added the ability to use "captures" in the Pattern which can be reproduced in the alert Message by inserting a %number where "number" is the iteration of the capture.
note that the captures do not need to be reproduced in the order in which they were captured, that is %2 can preceed %1 in the Message.
When creating patterns, note that the incomming message may not be quite what you expect, the built in chat window processes some of the text before adding it to the chat display. For instance, "Tells" do not include the sender's name or the words "tells you," in the message, those are added by the chat window.
The Message field can contain three special fields, %C for the Channel and %S for the Sender and %M for the original Message.
Added a chat command to Start, Stop and Show the Chat Log - "/Alerter Log Start","/Alerter Log Stop","/Alerter Log Show"
Added an "Enabled" checkbox. Clear this to temporarily disable an alert without having to delete the alert definition.

Version 1.01
Added a Delete button
Added French and German translations for most of the interface, Chat channels are not yet translated
Fixed incorrect label for the Font selection list
Fixed the mouse click-though bug (reported by Eldarian on LoTROInterface).
Archive List (Old Versions)
File Name
Version
Size
Author
Date
1.07
40.33 Kb
Garan
02-19-2016 11:23 AM
1.06
38.09 Kb
Garan
02-15-2016 10:25 PM
1.05
34.49 Kb
Garan
09-25-2012 02:19 PM
1.04
32.82 Kb
Garan
03-30-2012 10:42 AM
1.03a
28.21 Kb
Garan
02-29-2012 05:17 PM
1.02
21.70 Kb
Garan
02-22-2012 01:51 AM
1.01
13.12 Kb
Garan
10-01-2011 12:30 PM
1.0
11.79 Kb
Garan
09-30-2011 10:07 PM
File Statistics
User Rating:
5 out of 5 with 12 votes
Downloads: 41075
Views: 121028
Favorites: 57
Uploaded By:
 
Last Modified: N/A

View Pictures. Download Now! Post A Comment


Post A Reply
Author Comments Comment Options
Unread 07-27-2017, 08:19 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 236
File comments: 660
Uploads: 19
Quote:
Originally Posted by mattspencer
Thanks for the help...

The in game chat log reads "Character scored a critical hit with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Alerter Chat Log reads "Character scored a <rgb=#B22222>critical hit</rgb> with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Here is the screenshot of the Alerter Chat Log...

http://imgur.com/gallery/1vJo5

I would ideally like to have 2 or 3 different alerts, for Guardian's Bleed - 8 through 10, so I can see when 10 is almost there, and I will be using the cashout skill at tier 10 normally. If this isn't possible, and I have to show every tier that would be okay, if it will flash the alert up of what tier I am at.

Thanks again for your help with this.

P.S. I asked for some help on this in game forums and someone gave me a decent set of Message and Pattern to use here...
https://www.lotro.com/forums/showthr...ars-2-1-1-Help
Going to tweak it to 8/9/10 if possible, and add in delays or whatever to make it work without being annoying, but it is getting there.

P.P.S.

Looks like I have it working now. Here is the screenshot for Tier 10....

http://imgur.com/a/i0UMm

I changed Pattern = Guardian's Bleed - (.*.10) on (.*)
to
Pattern = Guardian's Bleed - (.*.9) on (.*)

for Tier 9, and did another alert for Tier 8.

I'll have to play with it in actual game play, but the Training dummies are feeling the pain lol.
Great to hear you worked most of it out. It looks as though the xml tag does not actually cause any problem, it is most likely the '-' character confusing the parser. You can try simplifying your patterns by stripping out the captures (the parenthesis aren't needed if you are using distinct alerts for each tier) and adding a percent sign in front of the '-' to tell the parser that it is a literal character and not part of a pattern range. For example:
Guardian's Bleed %- 10 .*
to match tier 10. Let me know if that works for you.

Putting the parenthesis around parts of the pattern allow capturing that part for use in the response. The parenthesis you had would capture the tier and the entire remainder after the 'on' but since you had separate alerts for each tier, capturing the tier was overkill. Using lua in the response, it should be possible to create a single alert that displays text for tiers 8 and 9 but a skill quickslot for tier 10 (I'd have to play around with that a bit to see if I can make it work). Meanwhile, you should be able to create three separate alerts, one for tier 8, one for 9 and one for 10 to do the same thing, just a tiny bit less efficiently.

Let me know if the percent sign works and I'll look into lua response snippets to make more efficient alerts.

EDIT: Further testing revealed a bug in the Trigger Lua functionality which prevents access to the captures (they work correctly in response snippets). Unfortunately, this bug fix won't get published for some time as there are other significant changes in the development copy that are not yet functional. So basically, you are better off creating several separate alerts, one for each tier, for the time being. I posted a more detailed solution on the SSG LotRO forum.

Last edited by Garan : 07-27-2017 at 09:31 AM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-26-2017, 10:42 PM  
mattspencer
The Wary

Forum posts: 0
File comments: 2
Uploads: 0
Thanks for the help...

The in game chat log reads "Character scored a critical hit with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Alerter Chat Log reads "Character scored a <rgb=#B22222>critical hit</rgb> with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Here is the screenshot of the Alerter Chat Log...

http://imgur.com/gallery/1vJo5

I would ideally like to have 2 or 3 different alerts, for Guardian's Bleed - 8 through 10, so I can see when 10 is almost there, and I will be using the cashout skill at tier 10 normally. If this isn't possible, and I have to show every tier that would be okay, if it will flash the alert up of what tier I am at.

Thanks again for your help with this.

P.S. I asked for some help on this in game forums and someone gave me a decent set of Message and Pattern to use here...
https://www.lotro.com/forums/showthread.php?596108-BuffBars-2-1-1-Help
Going to tweak it to 8/9/10 if possible, and add in delays or whatever to make it work without being annoying, but it is getting there.

P.P.S.

Looks like I have it working now. Here is the screenshot for Tier 10....

http://imgur.com/a/i0UMm

I changed Pattern = Guardian's Bleed - (.*.10) on (.*)
to
Pattern = Guardian's Bleed - (.*.9) on (.*)

for Tier 9, and did another alert for Tier 8.

I'll have to play with it in actual game play, but the Training dummies are feeling the pain lol.

Last edited by mattspencer : 07-26-2017 at 11:09 PM.
mattspencer is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-26-2017, 08:56 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 236
File comments: 660
Uploads: 19
Re: Guardian Bleed alert

Quote:
Originally Posted by mattspencer
I am trying to create an alert to notify me when my Guardian Bleed tiers to 10. I currently can get the alert to work when I use the Pattern "Guardian's Bleed - " but as soon as I put a number at the end it doesn't work. Any help with this please?
This should be fairly easy as long as the number appears in the text. It seems as though the number may be imbedded in an xml tag in the text so you will want to escape the extra characters in the tag since alerter matches against the raw text. To do this you must first determine what the actual raw text sent to the client was. To do that, first load the plugin and then turn on logging in the plugin by typing "/alerter log start". Then use the skill to generate the specific text. As soon as you see the text you want to match in the chat box, type "/alerter log stop" followed by "/alerter log show". That will display the log window with the raw text you are after as one of the most recently received messages. It would probably be best at that point to post a sceen shot of the log window so that I can see the exact text your are trying to match since the patterns for some of the special character sequences can get slightly complicated unless you are familiar with Lua patterns or at least RegEx patters (Lua doesn't use RegEx but it is very similar).
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-26-2017, 02:09 AM  
mattspencer
The Wary

Forum posts: 0
File comments: 2
Uploads: 0
Guardian Bleed alert

I am trying to create an alert to notify me when my Guardian Bleed tiers to 10. I currently can get the alert to work when I use the Pattern "Guardian's Bleed - " but as soon as I put a number at the end it doesn't work. Any help with this please?
mattspencer is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 08-30-2016, 04:20 PM  
Matsack
The Wary

Forum posts: 0
File comments: 5
Uploads: 0
Wow.. Thank you for the answer.. Everything served on a silverplate I'll try it out tomorrow..
Matsack is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 08-21-2016, 08:19 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 236
File comments: 660
Uploads: 19
Re: Feature or advice to do it with existing version

Quote:
Originally Posted by Matsack
I don't know if you're doing any updates anymore to the Alerter plugin, but I'll ask anyway

You added a quickslot to the alerter plugin, would it be possible to add another option?
A lot of people uses Alerter to show messages about refreshing skills when they are off cooldown.

It would be awesome to have a decreasing cooldown bar object to insert when you fire a skill on a fellowship member.

Got the idea from viewing the BuffBars plugin where all buffs on your character shows up as decreasing colour bars with buff name and timer inside.

But maybe it's already possible to add a message that show countdown in text (10 9 8 7... etc) In a fixed position on the screen??


I have used the Alerter with a LM Stun Immunity skill. I have a area with Scrolling SI text reaching top of screen when cooldown expires. That's the way I've done it atm..

Thank you for a very usefull plugin
One of the reasons I added code support for code snippets is so that users can implement custom responses without needing the plugin to be updated.

You can create a response code snippet that creates a window with a field with a background color that changes it's width based on a time value fairly easily. The most difficult part would be determining the correct time and remembering to clean up the window. I'll look at making one and publishing it in the FAQ examples.
EDIT: You can probably do it even easier by using a response code snippet to change the text and/or width of the built-in response text object.

EDIT: Here's a simple code snippet to add a blue bar behind the alert that shrinks in width as the duration expires
Code:
self=args.self;

args.width=tonumber(args.width);
if args.width==nil then args.width=100 end
args.height=tonumber(args.height);
if args.height==nil then args.height=100 end
self.backdrop=Turbine.UI.Control()
self.backdrop:SetSize(args.width*displayWidth,args.height*displayHeight)
self.OrigWidth=args.width
self.backdrop:SetParent(self)
-- change color to whatever color you like
self.backdrop:SetBackColor(Turbine.UI.Color.Blue)

newUpdate=function(sender)
 if sender.DelayTime==0 then
  sender.backdrop:SetWidth((1-(Turbine.Engine:GetGameTime()-sender.StartTime)/(sender.EndTime-sender.StartTime))*sender.OrigWidth/100*displayWidth)
 end
end

self.Update={self.Update,newUpdate}
Just copy that to the Response code snippet field in the alert definition and save it. Use the above sample as a starting point and modify it, such as changing the color or adding a line to change the message text, or whatever - for example, the message text can be updated in the above snippet using
sender.Message:SetText("some message")
where "some message" would be a string or variable that changes with the time value (from Turbine.Engine:GetGameTime())

Note, the test for sender.DelayTime==0 is needed as the start and end times get re-evaluated after the delay expires - this is only really important if you have a non-zero delay, but it's good practice to account for it anyway. Also, you'll note that I explicitly convert the Update handler to a table and add my new handler instead of using the AddCallback function. That is because AddCallback will generate an error due to how the code snippets are dynamically evaluated and executed.

FWIW, I did stumble across a minor bug in the args.width and args.height defaults in the SetAlert method of the plugin, left over from the change from fixed display widths to percentages but it shouldn't affect any users because alerts should always have a width and height anyway. That bug won't affect this code as the defaults are correctly applied in this snippet.

This code snippet is also now on the FAQ page:
http://www.lotrointerface.com/portal.php?id=35&a=faq&faqid=40

Last edited by Garan : 08-26-2016 at 12:59 PM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 08-21-2016, 06:29 AM  
Matsack
The Wary

Forum posts: 0
File comments: 5
Uploads: 0
Feature or advice to do it with existing version

I don't know if you're doing any updates anymore to the Alerter plugin, but I'll ask anyway

You added a quickslot to the alerter plugin, would it be possible to add another option?
A lot of people uses Alerter to show messages about refreshing skills when they are off cooldown.

It would be awesome to have a decreasing cooldown bar object to insert when you fire a skill on a fellowship member.

Got the idea from viewing the BuffBars plugin where all buffs on your character shows up as decreasing colour bars with buff name and timer inside.

But maybe it's already possible to add a message that show countdown in text (10 9 8 7... etc) In a fixed position on the screen??


I have used the Alerter with a LM Stun Immunity skill. I have a area with Scrolling SI text reaching top of screen when cooldown expires. That's the way I've done it atm..

Thank you for a very usefull plugin
Matsack is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-18-2016, 06:06 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 236
File comments: 660
Uploads: 19
Re: Re: Re: Question about a line of code

Quote:
Originally Posted by Earthsuit
Yeah. All that makes sense now. Still trying to get my head wrapped around the tables. Are there a lot of these "Turbinisms" or are they fairly isolated?
I believe the Turbinisms are fairly rare. Most of them are covered in my Noobs thread on the LotRO forums, such as issues with internationalization when saving/loading data or gracefully sharing event handlers with other plugins or the "plugin" object that only exists during initialization as a reference to Plugins[] table entry for a plugin. I'm sure there's a few others but that thread covers most of them.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-18-2016, 03:30 PM  
Earthsuit
The Wary

Forum posts: 2
File comments: 19
Uploads: 0
Re: Re: Question about a line of code

Quote:
Hi,

All that line does is gets the current environment's name as a string so that I can reuse modules and reference things like my Resources folder without hardcoding the plugin's name in the path. It makes it a lot easier to prototype new plugins as my "generic" plugin template can just be copied to a new folder and then I can get right to writing new code without worrying about hardcoded paths.

Executing getfenv(1) when a plugin is loading returns a table that Turbine creates which contains an entry "_" which points to a table with an entry named "Name" which is a string value that contains the namespace for the file currently being parsed and executed. This is just a side effect of how Turbine implemented lua and won't be documented anywhere. I found it simply by dumping the various environments as the plugin was loading, running and unloading to the script log and reviewing the results.

Due to the nature of lua, that entry could as easily be referenced as getfenv(1)["_"]["Name"]. The underscore is just a name like any other string - granted it looks a bit odd as though it should be part of something official but it's just a Turbinism. I suspect they used the underscore to try to avoid collisions with names that users would create for objects since theoretically users can reference anything by starting at _G so any name they used could conceivably be stomped on by a user.
Yeah. All that makes sense now. Still trying to get my head wrapped around the tables. Are there a lot of these "Turbinisms" or are they fairly isolated?
Earthsuit is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-18-2016, 10:24 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 236
File comments: 660
Uploads: 19
Re: Question about a line of code

Quote:
Greets.

Wasn't sure where to ask you about this. But you mentioned here would be as good a place as any.

In Main.lua for Alerter, as well as several other files, the first line is:

Code:
importPath=string.gsub(getfenv(1)._.Name,"%.Main","").."."
I'm fairly sure I understand WHAT this line does, but I'm not exactly sure HOW it does what it does. The part I have trouble with is "._.". I'm assuming that the single dots are a means of accessing indexed fields in the function's table, however, the underscore confuses me since I cannot find a reference to it in the lua documentation I've looked at.

Any help you can provide, or documentation you can point me to, would be very appreciated.

Thank you in advance.
Hi,

All that line does is gets the current environment's name as a string so that I can reuse modules and reference things like my Resources folder without hardcoding the plugin's name in the path. It makes it a lot easier to prototype new plugins as my "generic" plugin template can just be copied to a new folder and then I can get right to writing new code without worrying about hardcoded paths.

Executing getfenv(1) when a plugin is loading returns a table that Turbine creates which contains an entry "_" which points to a table with an entry named "Name" which is a string value that contains the namespace for the file currently being parsed and executed. This is just a side effect of how Turbine implemented lua and won't be documented anywhere. I found it simply by dumping the various environments as the plugin was loading, running and unloading to the script log and reviewing the results.

Due to the nature of lua, that entry could as easily be referenced as getfenv(1)["_"]["Name"]. The underscore is just a name like any other string - granted it looks a bit odd as though it should be part of something official but it's just a Turbinism. I suspect they used the underscore to try to avoid collisions with names that users would create for objects since theoretically users can reference anything by starting at _G so any name they used could conceivably be stomped on by a user.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 04-18-2016, 08:44 AM  
Earthsuit
The Wary

Forum posts: 2
File comments: 19
Uploads: 0
Question about a line of code

Greets.

Wasn't sure where to ask you about this. But you mentioned here would be as good a place as any.

In Main.lua for Alerter, as well as several other files, the first line is:

Code:
importPath=string.gsub(getfenv(1)._.Name,"%.Main","").."."
I'm fairly sure I understand WHAT this line does, but I'm not exactly sure HOW it does what it does. The part I have trouble with is "._.". I'm assuming that the single dots are a means of accessing indexed fields in the function's table, however, the underscore confuses me since I cannot find a reference to it in the lua documentation I've looked at.

Any help you can provide, or documentation you can point me to, would be very appreciated.

Thank you in advance.
Earthsuit is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 03-07-2016, 02:14 PM  
Earthsuit
The Wary

Forum posts: 2
File comments: 19
Uploads: 0
Re: Re: Cannot capture tells

Quote:
Originally Posted by garan
Hi.

There seem to be a couple of issues. Unfortunately, part of what you are trying to do can not currently be done because Turbine broke part of the Lua chat system - the incoming messages include a Sender argument which used to work for the /Tell channel and was broken (reported yourself as the Sender) for all other channels. It seems to be reporting yourself even for /Tells now. That being said, the text you are seeing in your chat window are not the values that are sent to Lua so things like the sender and time stamp are not part of the incoming message and should not be included in the Pattern. The third column of the Alerter Log window is the actual exact text of the incoming message which you should be matching with your pattern.

Your first example, trying to capture Tells includes what looks like an attempt to account for time stamps and the sender name which explains that issue. Unfortunately, since the args.Sender value is no longer valid even in Tells, there is actually no way to currently capture the name of the person sending you a tell. Otherwise, I was providing the args.Sender value (the second column of the Alter Log window) to the alert Message as the %S value - basically you would embed %S in your response message where you wanted the sender name to be but since it's broken at Turbine's end there isn't much point atm.

Your second example is due to the way that Turbine renders text enclosed by <Select> tags. If you look at the Alert Log entry you will see that your character name is enclosed by an object link tag (so that you can hover over the link and interact with the name as a player entity). Unfortunately, Lua text fields automatically render those links in a small font. You can eliminate the link (and Turbine's enforced font size) by removing the tag from the captured text. To eliminate the tag, change your pattern to:
Code:
%[Kinship%]%s<Select.*>(.*)<.Select>:(.*)
which will account for the Select tag and capture the name as the first capture and the message as the second capture. Note in the closing tag the use of the "." instead of the "\" character, there is some oddity that I don't recall off the top of my head that prevents matching the actual original text but the period accounts for it.

As to the Custom Logs, they are special log files for use with a future enhancement. By checking the "Save to Custom Log" (that will change to "Save to Alert Log" in 1.08) checkbox in the Response tab, the entry will be added to the current session log and saved when the plugin unloads. They are not for dynamic interaction, rather for later review to determine which alerts are triggered in a given session, etc. Ver 1.08 should include a viewer for reviewing the current log as well as past logs, until then they aren't particularly useful, especially since the data being saved in the logs will change significantly with 1.08. There are still some issues with the log display which will hopefully be ironed out soon.
Thanks for the very quick response. I can only imagine how frustrating it must be given Turbine's decision to not continue to support Lua API and the resultant deterioration of plugin effectiveness. The work that you and other authors have done, the knowledge you have accumulated, is very important to many of us. It is a shame, but what can be done? :shrug:

Beyond that, your explanation about what is happening on the Tell channel helped. I've modified the pattern to detect ANY activity and just alert me to that fact. Not as nifty and I would like, but it's something. I have also incorporated your enhanced pattern for the kinspeak channel. That works perfectly. As for the log, I only wanted to see if there were a clue there (that I might understand) of what was causing these behaviors.

As always, thank you for your labors and patient support.
Earthsuit is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 03-07-2016, 01:03 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 236
File comments: 660
Uploads: 19
Re: Cannot capture tells

Quote:
Originally Posted by earthsuit
Howdy. I'm trying to capture tells, but it just won't do it.

This is the pattern:
%[%d*:%d*%]%s(.*):

and the message:
%1 has told you something.

log entry (with Show Log):
Tell Garphorfiel greets

In an unrelated mistake, I am trying to capture kinship chat entries, but while it displays the message, the name is always in a smaller font than the rest. It all should be in [24] Trajan Pro Bold:

Pattern:
%[Kinship%]%s(.*):

Message:
%1 has said something.

log entry (with Show Log):
Kinship Garphorfiel [Kinship] <Select:IID:0x020A00000040C950>Reallycute<\Select> : Howdy

And another issue is that it does not create a custom log.

I'm sure these issues are my own doing somehow. I've tried removing the plugin and adding it back. I've tried deleting all definitions. It just doesn't do what I'm expecting. For instance, when someone posts in world chat, I get a log entry similar to the Kinship detection.
Hi.

There seem to be a couple of issues. Unfortunately, part of what you are trying to do can not currently be done because Turbine broke part of the Lua chat system - the incoming messages include a Sender argument which used to work for the /Tell channel and was broken (reported yourself as the Sender) for all other channels. It seems to be reporting yourself even for /Tells now. That being said, the text you are seeing in your chat window are not the values that are sent to Lua so things like the sender and time stamp are not part of the incoming message and should not be included in the Pattern. The third column of the Alerter Log window is the actual exact text of the incoming message which you should be matching with your pattern.

Your first example, trying to capture Tells includes what looks like an attempt to account for time stamps and the sender name which explains that issue. Unfortunately, since the args.Sender value is no longer valid even in Tells, there is actually no way to currently capture the name of the person sending you a tell. Otherwise, I was providing the args.Sender value (the second column of the Alter Log window) to the alert Message as the %S value - basically you would embed %S in your response message where you wanted the sender name to be but since it's broken at Turbine's end there isn't much point atm.

Your second example is due to the way that Turbine renders text enclosed by <Select> tags. If you look at the Alert Log entry you will see that your character name is enclosed by an object link tag (so that you can hover over the link and interact with the name as a player entity). Unfortunately, Lua text fields automatically render those links in a small font. You can eliminate the link (and Turbine's enforced font size) by removing the tag from the captured text. To eliminate the tag, change your pattern to:
Code:
%[Kinship%]%s<Select.*>(.*)<.Select>:(.*)
which will account for the Select tag and capture the name as the first capture and the message as the second capture. Note in the closing tag the use of the "." instead of the "\" character, there is some oddity that I don't recall off the top of my head that prevents matching the actual original text but the period accounts for it.

As to the Custom Logs, they are special log files for use with a future enhancement. By checking the "Save to Custom Log" (that will change to "Save to Alert Log" in 1.08) checkbox in the Response tab, the entry will be added to the current session log and saved when the plugin unloads. They are not for dynamic interaction, rather for later review to determine which alerts are triggered in a given session, etc. Ver 1.08 should include a viewer for reviewing the current log as well as past logs, until then they aren't particularly useful, especially since the data being saved in the logs will change significantly with 1.08. There are still some issues with the log display which will hopefully be ironed out soon.

Last edited by Garan : 03-07-2016 at 01:03 PM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 03-07-2016, 09:28 AM  
Earthsuit
The Wary

Forum posts: 2
File comments: 19
Uploads: 0
Cannot capture tells

Howdy. I'm trying to capture tells, but it just won't do it.

This is the pattern:
%[%d*:%d*%]%s(.*):

and the message:
%1 has told you something.

log entry (with Show Log):
Tell Garphorfiel greets

In an unrelated mistake, I am trying to capture kinship chat entries, but while it displays the message, the name is always in a smaller font than the rest. It all should be in [24] Trajan Pro Bold:

Pattern:
%[Kinship%]%s(.*):

Message:
%1 has said something.

log entry (with Show Log):
Kinship Garphorfiel [Kinship] <Select:IID:0x020A00000040C950>Reallycute<\Select> : Howdy

And another issue is that it does not create a custom log.

I'm sure these issues are my own doing somehow. I've tried removing the plugin and adding it back. I've tried deleting all definitions. It just doesn't do what I'm expecting. For instance, when someone posts in world chat, I get a log entry similar to the Kinship detection.
Earthsuit is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 03-02-2016, 07:36 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 236
File comments: 660
Uploads: 19
Re: Re: Re: Re: Alerts Saving Issue

Quote:
Originally Posted by joethemaster
I think my next step is just to unload EVERYTHING....create the Alerts that I want, then go back to using Bootstrap and all of my other plugins. Because as I said, even if I make alerts on the fly, they will continue to work until I log and I really enjoy the features of Bootstrap.

It may be a little inconvenient, but at least I now have a work around and it saves me from having to re-enter all of my alerts when I log in.

Thank you for your help again, I really appreciate your plugins and the amount of feedback and support you provide. I truly am grateful for your time and commitment you have for your tools that you have provided.
Well, after a bit of testing I found that the entire issue can be resolved by putting Bootstrap into its own Apartment - this will fix the conflict with Alerter as well as any other plugins that use Turbine's Class.lua file (Equendil provided a conflicting version of this file with his plugin). To fix this, simply copy the line:
<Configuration Apartment="Bootstrap"/>
directly after the line:
<Package>Equendil.PluginMng.Main</Package>
in the bootstrap.plugin file located in the Plugins\Equendil folder.
The entire bootstrap.plugin file should look like:

<?xml version="1.0"?>
<Plugin>
<Information>
<Name>Bootstrap</Name>
<Author>Equendil</Author>
<Version>1.4</Version>
</Information>
<Package>Equendil.PluginMng.Main</Package>
<Configuration Apartment="Bootstrap"/>
</Plugin>


I have noticed that Bootstrap won't even load with one of the versions of the Turbine samples installed, it just generates an error when loading but since that doesn't seem to be affecting you currently it shouldn't be an issue. I merely mention it since you may have to stop using Bootstrap altogether if you find that you want to load any of those plugins that use that particular version of the Turbine sample files.

FWIW, I have noted that my own Class.lua file could cause a similar conflict so I will be fixing that in a later update, however, fixing that will not fix all of the conflicts, including Bootstrap stomping on the Unload event handler so the separate apartment is still the best answer.

EDIT:
Bootstrap version 1.4 (current as of this post) also has a typo which prevents many plugins that share its apartment from exiting cleanly. Equendil overrode Turbine's RemoveCommand function but has a bug in his code so any plugin that shares Bootstrap's apartment (the generic apartment) and removes its commands prior to completing other unload event housekeeping such as saving data will never unload correctly. To fix this, you can simply change one line in Bootstrap. Change line 28 in Shell.lua from:
Code:
		self.commands[command] = nil;
to:
Code:
		self.commands[shellCommand] = nil;

Last edited by Garan : 04-23-2016 at 01:56 PM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Post A Reply

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 10:38 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | VGInterface | LoTROInterface | MMOInterface | Swtorui