Thread Tools Display Modes
09/16/15, 02:20 PM   #1
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Help With Item Name Changes

657815212341

Last edited by dopiate : 11/22/20 at 04:45 AM.
  Reply With Quote
09/16/15, 02:37 PM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Are those words ingame? I'm asking because "ashs", "beechs", "birchs" seem to be missing an "e". Not sure about flax, but I'd say that one as well.

Edit: I still think "3 lumps of sanded birch" would be better

Last edited by merlight : 09/16/15 at 02:41 PM.
  Reply With Quote
09/16/15, 02:51 PM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
It looks like results from zo_strformat("<<2[1/$d]>> <<tm:1>>", itemLink, count) -this will try to automatically convert item name to plural if count is greater then 1.

From EsoStrings:
"[eng] You bought <<2[1/$d]>> <<tm:1>> for <<3>>.", -- SI_BUY_RECEIPT_MONEY
"[eng] You sold <<2[1/$d]>> <<tm:1>> for <<3>>.", -- SI_SELL_RECEIPT_MONEY

Last edited by Garkin : 09/16/15 at 02:55 PM.
  Reply With Quote
09/16/15, 04:52 PM   #4
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
I think you're misinterpreting it. Characters beyond the caret ^ are attributes of the word/expression for zo_strformat, so that it uses the proper form. Thus "sanded beech^ns" is not "sanded beech^n"s, it's "sanded beech" with attributes 'n' (neuter gender) and 's' (not described in that post, maybe it means "don't append s for plural").

Lua Code:
  1. zo_strformat("<<2[1/$d]>> <<tm:1>>", "sanded beech^ns", 5)
  2. -- 5 Sanded Beech
  Reply With Quote
09/16/15, 05:04 PM   #5
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Originally Posted by merlight View Post
I think you're misinterpreting it. Characters beyond the caret ^ are attributes of the word/expression for zo_strformat, so that it uses the proper form. Thus "sanded beech^ns" is not "sanded beech^n"s, it's "sanded beech" with attributes 'n' (neuter gender) and 's' (not described in that post, maybe it means "don't append s for plural").

Lua Code:
  1. zo_strformat("<<2[1/$d]>> <<tm:1>>", "sanded beech^ns", 5)
  2. -- 5 Sanded Beech
I am talking strictly for how my addon handles data :-)

I do understand the item link string but I wrote a .Net routine more than a year ago and it handled that string just fine until I started seeing plurals in my offline database.

So I now had to address new incoming data and format it the old way and I used the ^ns as my way of knowing.

Keep in mind I'm parsing saved variables and then putting all of that data into a .NET database and the GUI is the viewer.

What I am saying should not be misinterpreted to be any insight into LUA or any in game code. For me the new format appended s to multiples and I had to deal with existing saved data with that already attached and format incoming data to match.

It's for my code in .NET specifically so when you do a drop down on items you don't see cotton and cottons.

I had to make code changes for consistency and for incoming new data the ^ns is actually a big help.

I appreciate you correcting me but I should have been more specific. This affects users of my program only and I was looking for more items so I could put that out with the release.

I just uploaded it now so to users of GSA it will make sense and fix any data inconsistency.

I can tell you with 100% certainty that ^ns does mean an item is multiples of that item. I have seen it nowhere else and it works for me perfectly. It seems to only apply to raw materials for crafting.

It seems I may have discovered what s is used for by accident but now you have confirmation. It's not on Garkins list but it should be now. After working on this for the last two days I can tell you it means an item is a multiple stack. So far that is everything on this list.

-d

Last edited by dopiate : 09/16/15 at 05:18 PM.
  Reply With Quote
09/16/15, 05:26 PM   #6
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by dopiate View Post
I am talking strictly for how my addon handles data :-)

I do understand the item link string but I wrote a .Net routine more than a year ago and it handled that string just fine until I started seeing plurals in my offline database.
You're not seeing plurals. You're seeing what's probably the result of wrongly removing "^n" and leaving the trailing "s" in place. Why not just use zo_strformat, you wouldn't even notice they changed something had you used that before saving the strings.

Originally Posted by dopiate View Post
I can tell you with 100% certainty that ^ns does mean an item is multiples of that item. I have seen it nowhere else and it works for me perfectly. It seems to only apply to raw materials for crafting.
I've just split a stack of sanded maple in my bank:
slot 204 ... 21 Sanded Maple ... GetItemLink(2, 204) returns "sanded maple^ns"
slot 236 ... 1 Sanded Maple ... GetItemLink(2, 236) returns "sanded maple^ns"

Item links don't carry information about quantity.


edit: tried it with and without the 's' flag out of curiosity:
Lua Code:
  1. zo_strformat("<<2[1/$d]>> <<tm:1>>", "sanded maple^ns", 5)
  2. -- 5 Sanded Maple
  3.  
  4. zo_strformat("<<2[1/$d]>> <<tm:1>>", "sanded maple^n", 5)
  5. -- 5 Sanded Maples

Last edited by merlight : 09/16/15 at 05:30 PM.
  Reply With Quote
09/16/15, 05:53 PM   #7
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Originally Posted by merlight View Post
You're not seeing plurals. You're seeing what's probably the result of wrongly removing "^n" and leaving the trailing "s" in place. Why not just use zo_strformat, you wouldn't even notice they changed something had you used that before saving the strings.
I wrote this program a year ago. Its .NET not LUA and I don't even generate the data anymore, I threw all in with Master Merchant.

What good would changing my working code?

Again, I'm not writing 1 line of LUA, just parsing it.

Originally Posted by merlight View Post
Item links don't carry information about quantity.
OK, I was wrong about it's use. As I said this is just for my code and I was just asking other users for items.

You are correct I do use replacement:

Code:
                    line = Replace(line, "^p", "", 1, -1)
                    line = Replace(line, "^ns", "", 1, -1)
                    line = Replace(line, "^n", "", 1, -1)
You are correct the middle line did not exist in the previous version and that's where I got my s from.

here is the only thing I can tell you for sure then, it works for me and my program so the data is consistent.

I said this has no bearing on ANY in game code and I thought maybe I found something (which you proved incorrect).

There is only ^ns on the type of items I showed you, you can draw your own conclusions, I just needed a marker to correct incoming data. For me the ^ns was a gift from the LUA gods.

Lua Code:
  1. ["itemLink"] = "|H0:item:533:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hsanded oak^ns|h"
  2. ["itemLink"] = "|H0:item:794:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hrawhide^ns|h"
  3. ["itemLink"] = "|H0:item:803:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hsanded maple^ns|h"
  4. ["itemLink"] = "|H0:item:818:30:46:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hrough birch^ns|h"
  5. ["itemLink"] = "|H0:item:46131:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hKresh Fiber^ns|h"

Feel free to draw your own conclusion - I just pointed out a pattern I saw and it works for me.

All I wanted to do was get a few more items from users of GSA before the update.

My new version works fine, I made the necessary changes and that's all I was looking to do.

Now maybe someone can figure out why only raw crafting items have that ^ns ... maybe it's useful for something. There is no denying there is a pattern.

-d
  Reply With Quote
09/16/15, 06:22 PM   #8
Wandamey
Guest
Posts: n/a
i'd say ^ns = neutral singular (forces singular form even with qtt > 1). kinda obvious for materials but there are others.

you can safely make a pattern to remove everything after ^ (lua or not) imo

these ^gendernumber are in almost every word in french and german, with more variations, so it wouldn't be a waste to do like that

Last edited by Wandamey : 09/16/15 at 06:29 PM.
  Reply With Quote
09/17/15, 12:01 AM   #9
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,567
Originally Posted by Wandamey View Post
i'd say ^ns = neutral singular (forces singular form even with qtt > 1). kinda obvious for materials but there are others.

you can safely make a pattern to remove everything after ^ (lua or not) imo

these ^gendernumber are in almost every word in french and german, with more variations, so it wouldn't be a waste to do like that
I second this. Instead of replacing specific formatting strings you should use a regex and strip it regardless of the format in use.

using System.Text.RegularExpressions;

...
string line = "|H0:item:533:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hsanded oak^ns|h";
Regex expr = new Regex(@"\^.*\|"); // match any number of characters between a caret and pipe
string result = expr.Replace(line, "|");
Console.WriteLine(result);
or if you already stripped the name you can simply write
string line = "sanded oak^ns";
Regex expr = new Regex(@"\^.*"); // match any number of characters after a caret
string result = expr.Replace(line, "");
  Reply With Quote
09/17/15, 03:19 AM   #10
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Whatever - thats great - I'm done with this.

Originally Posted by sirinsidiator View Post
I second this. Instead of replacing specific formatting strings you should use a regex and strip it regardless of the format in use.

or if you already stripped the name you can simply write
Guys, I didn't come here for programming advice :-)

I wrote GSA over a year ago. My routines work fine and all I am doing is supporting an addon for a game I hardly play anymore. I'm doing what an author should do, support your own work!

It survived Patch 6 with zero changes. This is the first time I HAVE EVER had to update the database format. Did you know I get the rarity of the item and change the color?

Please, now tell me how my code is wrong and how I could do it better without ever seeing what I wrote or knowing how I did it?

I came here looking to get a few more items to check for since in the offline database the items are already written incorrectly.

I easily fixed incoming data and I fixed the users existing database (most of them have 6 months of data or more) -- that was 10x harder than parsing the item link.

I came here to maybe get some more items from GSA users and I got none, so my post was a complete failure.

My code was already done.

The last thing I needed was tons of advice on something I don't need (how to parse a string) and LUA code for my VB.NET program.

I'm done with this thread, it's closed to me. It was actually more frustrating than useful.

You guys can argue the best way to write code to do something I never needed help with.

I'll go back to supporting my users. You know, the ones who put you on the top of their "Recommended Addons!" list.

That's who I code for. That's who I was trying to get more items for. The people who use my addon.

-d

Last edited by dopiate : 09/17/15 at 03:23 AM.
  Reply With Quote
09/17/15, 04:09 AM   #11
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,567
I don't believe your thread was a failure. After reading the posts I arrived at the conclusion that the item names did not get changed, but the parsing in your .NET program was not future proof enough to handle the latest changes to the formatting strings. If they did add a 'q' instead of an 's' you might have immediately seen that, but with the 's' thrown in you arrived at the conclusion that the names changed to plural when in fact they did not.

The code example was just something I threw together because I happened to have a visual studio with a c# application open at that moment. It was free advice which in no way was meant to offend you and I don't know why you think your code might be wrong because of it (I don't know your code). If you don't want to use it, then don't use it. Writing angry sounding responses might make me think about it twice before answering to your posts again in the future.
  Reply With Quote
09/17/15, 04:38 AM   #12
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
the tone was unintentional

Originally Posted by sirinsidiator View Post
If you don't want to use it, then don't use it. Writing angry sounding responses might make me think about it twice before answering to your posts again in the future.
I must correct something. I in no way meant that reply to sound angry (though re-reading it, I agree it doesn't sound very polite).

It's very early and I'm just getting ready for work so please do not take any of that post as angry or hostile.

I respect you and everyone you who replied.

After, getting some caffeine in me (and waking up more brain cells) I will say that I was disappointed I couldn't get anymore items before release but you are right it was not time wasted.

You and merlight helped me come to the conclusion that the s was not what I thought it was, even though I had dealt with it already, it's more satisfying to fully understand the changes to the item link string.

And I do appreciate the code suggestions. No one here has to help or get involved and I appreciate everyone who did.

The only emotion that should be read into that post was disappointment. First, for not getting more items but to be 100% honest after this thread I figured out a way to get all the items I needed without ANY user interaction and I think walking through it with you helped me realize that. So the biggest disappointment was personal in that I didn't think of that solution first. I'm very critical of my code, I have a PERL mindset. Do more with less and my fix doesn't do that, but the next release will.

If I offended you, I apologize completely.

There is no hostility from me and I thank everyone who replied.

Again, my apologies to you and anyone who might have taken offense to that post.

I even retract my conclusion because I now realize that everyone's insight (and code suggestions) helped me figure out a more elegant/efficient fix.

Thanks,
-d

PS the good news is so far no error reports!

Last edited by dopiate : 09/17/15 at 04:43 AM.
  Reply With Quote
09/17/15, 04:48 AM   #13
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,567
Good to hear.
I fully understand your frustration of not getting any reports from users of your addon. I also made the observation that - with the exception of a few - there won't be any interaction of any kind unless you actively talk to people in game and ask them to help you or there is an error message popping up on their end.
  Reply With Quote
09/17/15, 06:51 AM   #14
Wandamey
Guest
Posts: n/a
@Dopiate

don't forget it's a forum, you may not need all the answers related to your questions, but some others who will make a search for a similar problem may find something useful in them.

Never bad to cover all angles that come in mind when a topic is open.
  Reply With Quote
09/17/15, 09:03 AM   #15
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
after data mining

Originally Posted by Wandamey View Post
@Dopiate

don't forget it's a forum, you may not need all the answers related to your questions, but some others who will make a search for a similar problem may find something useful in them.

Never bad to cover all angles that come in mind when a topic is open.
I couldn't agree more :-)

Just to sum up my findings (I did a ton of data mining) this is the list of items that have the ^ns

keep in mind that list in the format for my program but all originally were listed as the normal full item link

Lua Code:
  1. ["itemLink"] = "|H0:item:533:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hsanded oak^ns|h"

Only these items -- I'm just giving this information out in case it proves helpful to someone.

it seems to apply only to cloth, leather and wood materials.

What the significance is, I am not sure.

I'm just sharing my findings.

thanks,
-d

Last edited by dopiate : 09/17/15 at 10:30 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Help With Item Name Changes

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off