Quantcast
VGInterface.com
Search Downloads


Go Back   LoTROInterface > LotRO Stand-Alone Plugins > Other


Post A Reply
Author Comments Comment Options
Unread 12-17-2017, 02:08 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 240
File comments: 711
Uploads: 19
Quote:
Originally Posted by Thutallor
Quote:
Originally Posted by Garan
I suspect the problem isn't the "s" but rather that the message doesn't have the trailing new line character so stripping the last character is causing it to fail. I can double check before changing it, but I should be checking the last character before trimming it which will likely fix that one odd problem.
I remember one of the cool things about Perl was that it had numerous built-in features optimized for text processing. One of them was a function, chop(), whose only purpose was to truncate the last letter from a string. Of course people quickly realized that you often only want to truncate that character if it's a newline. So in the true spirit of Perl -- the more features the better -- they added another function, chomp() to do just that. In Lua, the functional (but less efficient) equivalent is gsub(str, "\n$", "").
Neat bit of trivia. After looking at it for a minute I realized that when I changed the comparison to a string.match I should have simply eliminated the truncation. The extra character was no longer relevant as long as the pattern is found within the string so the simplest solution (in this case) is to leave the string alone. But I do love trivia, especially when it has a story or purpose attached.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-17-2017, 01:01 PM  
Thurallor
The Undying
 
Thurallor's Avatar
Interface Author - Click to view interfaces

Forum posts: 126
File comments: 157
Uploads: 12
Quote:
Originally Posted by Garan
I suspect the problem isn't the "s" but rather that the message doesn't have the trailing new line character so stripping the last character is causing it to fail. I can double check before changing it, but I should be checking the last character before trimming it which will likely fix that one odd problem.
I remember one of the cool things about Perl was that it had numerous built-in features optimized for text processing. One of them was a function, chop(), whose only purpose was to truncate the last letter from a string. Of course people quickly realized that you often only want to truncate that character if it's a newline. So in the true spirit of Perl -- the more features the better -- they added another function, chomp() to do just that. In Lua, the functional (but less efficient) equivalent is gsub(str, "\n$", "").
Thurallor is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-17-2017, 12:28 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 240
File comments: 711
Uploads: 19
Quote:
Originally Posted by Interitus
You are not going to believe this.

This worked:
Completed:.*Thorin's Hall Task: Broken Daggers

This did not:
Completed: Thorin's Hall Task: Broken Daggers

So I think you nailed that part, and it was a carriage return or something (quest completion is harder to test over and over, so I didn't try to figure it out once I had your solution).

The part that might surprise you is the other part. It appears to be the "s" at the end for the new quests that is causing the problem.

This worked:
New Quest: Thorin's Hall Task: Broken Dagger

This did not:
New Quest: Thorin's Hall Task: Broken Daggers

The one that does not work is copied and pasted from the chat box, and is the same thing Alerter shows. The one that worked is exactly the same, except I deleted the "s".

I have no idea why, and I only stumbled on the solution by accident, but it appears to be the "s" at the end for New Quests. An "s" at the end of a Completed Quest seems to be fine though.

I can only imagine this is one of many LOTRO oddities you've seen.
I suspect the problem isn't the "s" but rather that the message doesn't have the trailing new line character so stripping the last character is causing it to fail. I can double check before changing it, but I should be checking the last character before trimming it which will likely fix that one odd problem.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-17-2017, 10:03 AM  
Interitus
The Indomitable

Forum posts: 11
File comments: 13
Uploads: 0
You are not going to believe this.

This worked:
Completed:.*Thorin's Hall Task: Broken Daggers

This did not:
Completed: Thorin's Hall Task: Broken Daggers

So I think you nailed that part, and it was a carriage return or something (quest completion is harder to test over and over, so I didn't try to figure it out once I had your solution).

The part that might surprise you is the other part. It appears to be the "s" at the end for the new quests that is causing the problem.

This worked:
New Quest: Thorin's Hall Task: Broken Dagger

This did not:
New Quest: Thorin's Hall Task: Broken Daggers

The one that does not work is copied and pasted from the chat box, and is the same thing Alerter shows. The one that worked is exactly the same, except I deleted the "s".

I have no idea why, and I only stumbled on the solution by accident, but it appears to be the "s" at the end for New Quests. An "s" at the end of a Completed Quest seems to be fine though.

I can only imagine this is one of many LOTRO oddities you've seen.
Interitus is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-17-2017, 06:43 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 240
File comments: 711
Uploads: 19
Quote:
Originally Posted by Interitus
I noticed something odd about RECEIVE CHAT, when you use the QUEST chat channel.

New quests and completed quests seem to show up in the quest chat channel differently.

For example:

New Quest: Thorin's Hall Task: Broken Daggers

Completed:
Thorin's Hall Task: Broken Daggers

"New Quest:" is always on the same line, and "Completed:" is always on a different line from the quest name.

What seems to happen is if I'm trying to pick up the new quest above, I need to put "Thorin's Hall Task", or "New Quest: Thorin's Hall Task" as the message

"Broken Dagger" doesn't work, nor does "Thorin's Hall Task: Broken Dagger", or "New Quest: Thorin's Hall Task: Broken Dagger").

However, it I'm trying to pick up the quest being turned in, then I believe "Thorin's Hall Task", "Thorin's Hall Task: Broken Daggers", or "Broken Daggers" will work.

It seems like if it hits a second colon in a single line, then it has a problem.
Welcome to Parsing 101 or "Not everything is as it appears".

Unfortunately, this is a matter of different text formatting being used by SSG when forming the two messages. If the message is on separate lines then SSG is inserting a "new line" character (ASCII character 10, represented in Lua as "\n" which may or may not be accompanied by a Carriage Return character ASCII character 13, represented in Lua as "\r" - I believe SSG follows common C practice which is to omit the carriage return) into the string. When trying to match a string, you need to be aware of any formatting or non-display characters like color codes or embedded item examination tags as well as "white space". White space is anything that shows up as space between words or characters (tabs, etc.). In the case where you are having trouble matching the lines with two colons, there is probably an extra space after one of the colons which is causing the comparison to fail. It helps to see the raw string - Lotro Alerts has a chat log feature that records and displays the incoming chat message with embedded tags displayed. I will probably add such a feature to Anthology to make identifying oddities easier but for now you can use Lotro Alerts to identify embedded characters if you are having trouble matching a string ("new lines" you have to spot yourself).

Anthology allows Lua "Patterns" to be used in the match string to make accounting for these situations a little easier but you need to learn how to use Lua patterns - they are very similar to RegEx or "Regular Expressions" used in other languages but not quite identical. To learn more, you can Google "Lua Patterns" or check out this link:
http://www.lua.org/manual/5.1/manual.html#5.4.1

For instance for the case above you can use the strings:
New Quest.*Thorin's Hall Task.*Broken Daggers
and
Completed.*Thorin's Hall Task.*Broken Daggers
The "." represents "any character" and the "*" means 0 or more repetitions, so the ".*" means 0 or more of any character (including the colon, "new line" characters and spaces). That way the new line and any extraneous spaces are accounted for. With a little work, you can get a pattern that matches all of the odd formatting but is also unique enough to match only the desired messages - the same issues encountered in Lotro Alerts when specifying a trigger message pattern.
Note, raw messages actually have a new line character at the end which is stripped by Anthology so you don't have to worry about matching that.

Last edited by Garan : 12-17-2017 at 06:47 AM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-17-2017, 01:17 AM  
Interitus
The Indomitable

Forum posts: 11
File comments: 13
Uploads: 0
I noticed something odd about RECEIVE CHAT, when you use the QUEST chat channel.

New quests and completed quests seem to show up in the quest chat channel differently.

For example:

New Quest: Thorin's Hall Task: Broken Daggers

Completed:
Thorin's Hall Task: Broken Daggers

"New Quest:" is always on the same line, and "Completed:" is always on a different line from the quest name.

What seems to happen is if I'm trying to pick up the new quest above, I need to put "Thorin's Hall Task", or "New Quest: Thorin's Hall Task" as the message

"Broken Dagger" doesn't work, nor does "Thorin's Hall Task: Broken Dagger", or "New Quest: Thorin's Hall Task: Broken Dagger").

However, it I'm trying to pick up the quest being turned in, then I believe "Thorin's Hall Task", "Thorin's Hall Task: Broken Daggers", or "Broken Daggers" will work.

It seems like if it hits a second colon in a single line, then it has a problem.
Interitus is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-15-2017, 10:14 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 240
File comments: 711
Uploads: 19
Quote:
Originally Posted by Interitus
Weird, I updated that line of code, and it appears it did save my choices, just wouldn't show them. It appears to be fixed now though.
Correct. The typo was in the code that refreshed the display when selecting an objective. Beta 0.4 should be available soon and is just a couple bug fixes (including this one) and the UI translations for FR and DE clients. While working on the FR version of the tutorial I realized that images need distinct versions for each language the same as text since some images will also contain text (such as screen shots of a UI for a tutorial ) so that will be updated as well in 0.4.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-15-2017, 02:54 PM  
Interitus
The Indomitable

Forum posts: 11
File comments: 13
Uploads: 0
Weird, I updated that line of code, and it appears it did save my choices, just wouldn't show them. It appears to be fixed now though.
Interitus is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-13-2017, 12:25 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 240
File comments: 711
Uploads: 19
Re: Bug?

Quote:
Originally Posted by Interitus
Either I found a bug, or I'm doing something wrong. What I've found is that for separate objectives in the same chapter for RECEIVE CHAT, if I set the channel for one objective, then it sets it the same for all objectives, also when I save, it defaults back to ADMIN (3).
Yep, a bug - or possibly two related bugs. Definitely not working as intended. Thanks for reporting them. Let me know if you run into anything else that doesn't seem to be working correctly.

EDIT: A simple typo appears to have caused both symptoms. This will be fixed in Beta 0.4
If anyone testing would like to fix their local copies before the next Beta, you can edit ChapterMaint.lua. At line 434, "ReceiveChat" is incorrectly spelled "RecieveChat". The line should be:
Code:
		elseif objective.Type=="SendChat" or objective.Type=="ReceiveChat" then

Last edited by Garan : 12-13-2017 at 10:23 AM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-12-2017, 11:49 PM  
Interitus
The Indomitable

Forum posts: 11
File comments: 13
Uploads: 0
Bug?

Either I found a bug, or I'm doing something wrong. What I've found is that for separate objectives in the same chapter for RECEIVE CHAT, if I set the channel for one objective, then it sets it the same for all objectives, also when I save, it defaults back to ADMIN (3).
Interitus is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-01-2017, 10:29 PM  
Interitus
The Indomitable

Forum posts: 11
File comments: 13
Uploads: 0
Amazing!
Interitus is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-23-2017, 09:31 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 240
File comments: 711
Uploads: 19
I forgot to mention one other annoying known issue I have, when entering text into a chapter content Text block, if you type enough text to cause the block to scroll the listbox it doesn't scroll correctly and makes it very hard to type. I'm looking into it. So far, the work around is to resize the window as large as possible and use multiple Text blocks once you've typed enough to cause the scrolling issue. This does not impact the Reader at all.

EDIT. Another bug located (and eradicated). Changing an objective name was not updating the name in Objectives (2) list in Chapter Maintenance window Transition tab. This is fixed for ver 0.3. The work around is to just close the Chapter Maintenance window and reopen it, the list will update correctly.
Another known issue, the Chapter Maintenance window does not retain its size and position correctly. Will be fixed in ver 0.3

EDIT2. While working on implementing the "Acquire X items" objective type, I just realized there were a couple extraneous statuses being saved dynamically during objective updates that were no longer necessary and can cause some minor hitching when changing targets if a Target type objective is active - these will be removed in ver 0.3

Last edited by Garan : 11-24-2017 at 09:24 PM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-23-2017, 06:51 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 240
File comments: 711
Uploads: 19
Quote:
Originally Posted by Gloradan
Hey there!
I'm up for translation (FR) of this when Beta will get to this point :-)
Quote:
Originally Posted by Galphoglas
Hey Glo!

I had already proposed for that, I could help you !

Ou te laisser tout le travail faire
Thanks for the offers. I generally do the French and German translations myself although my German translations can usually use some help (OK, in the case of German more than a little help :P ). If you spot anything in the French translations that are odd, especially with computer jargon, feel free to correct me. Sometimes I use the same translations as the game client even though they seem odd, just to stay consistent with the client.

For German translations, one of the nice things is I shouldn't have too many issues with translations not fitting (German phrasing is notorious for typically taking more space than the English and French counterparts) - the Anthology UI is designed from the ground up to resize for different sized fonts and phrasing when possible and should be far more forgiving than most plugins.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-23-2017, 03:12 PM  
Galphoglas
The Wary
 
Galphoglas's Avatar
Interface Author - Click to view interfaces

Forum posts: 3
File comments: 3
Uploads: 5
Hey Glo!

I had already proposed for that, I could help you !

Ou te laisser tout le travail faire
Galphoglas is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-23-2017, 02:15 PM  
Gloradan
The Indomitable
 
Gloradan's Avatar

Forum posts: 11
File comments: 10
Uploads: 0
Hey there!
I'm up for translation (FR) of this when Beta will get to this point :-)
Gloradan 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 12:37 PM.


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