Log in

View Full Version : Determining "canonical name" for gems



JohnDoe
08-11-2010, 01:12 AM
I'm trying to determine the "canonical name" for gems so that I can script RUMMAGing for a jar of that particular gem accordingly. Explained a little bit on http://www.krakiipedia.org/wiki/Rummage_for_Alchemy_ingredients_%28saved_post%29.

Is there a consistent approach that can be used to determine it? Has anyone written any scripts that transform full gem name strings into it's canonical form?

thefarmer
08-11-2010, 03:04 AM
Just rummage <container> ingredient <gem name>. It's not that hard.

JohnDoe
08-11-2010, 05:28 AM
Maybe I'm overthinking this, but I haven't been able to successfully script all gems name strings yet. Few examples below:
dark blue mermaid's tear sapphire = rummage <container> ingredient mermaid sapphire
blue sapphire = rummage <container> ingredient blue sapphire
snake-head cowrie shell = rummage <container> ingredient cowrie shell
golden cowrie shell = rummage <container> ingredient golden shell

As far as I can tell, you can't use the full gem name to rummage, it's always a portion of that name. In some cases it's the 2nd to last and last word that make up the "canonical" name. In other cases, it's the 1st and last words. And so on.

Trying to understand if there's a consistent way to identify the "canonical" name. If not, I have a potential work around - it's just not 100% accurate, takes more code, and takes more time to process a match.

TheEschaton
08-11-2010, 09:53 AM
Are there any <adj1> <adj2> <noun> gems that don't use the <adj1> <noun> format as "canonical"? It seems to me if you have a one adjective phrase (blue sapphire), that's the name, if you have a two adjective phrase (golden cowrie shell), it's the first adjective and the noun.

thefarmer
08-11-2010, 10:03 AM
I haven't yet had an issue with any gems that I can think of.

Unless you're using your script to do something really strange, I find that just a macro of rummage backpack ingredient @@ works just fine. Granted I have several macros with the container noun changed appropriately.

Tordane
08-11-2010, 10:53 AM
Maybe I'm overthinking this, but I haven't been able to successfully script all gems name strings yet. Few examples below:
dark blue mermaid's tear sapphire = rummage <container> ingredient mermaid sapphire
blue sapphire = rummage <container> ingredient blue sapphire
snake-head cowrie shell = rummage <container> ingredient cowrie shell
golden cowrie shell = rummage <container> ingredient golden shell

As far as I can tell, you can't use the full gem name to rummage, it's always a portion of that name. In some cases it's the 2nd to last and last word that make up the "canonical" name. In other cases, it's the 1st and last words. And so on.

Trying to understand if there's a consistent way to identify the "canonical" name. If not, I have a potential work around - it's just not 100% accurate, takes more code, and takes more time to process a match.

Check out GameObj in the lich reference on krakiipedia. Has a few options for getting name, noun, id, etc. Just a heads up, some have to be hard coded(ie blue lapis lazuli).

Rolton-Sammich
08-11-2010, 11:14 AM
Just be aware that the rummage syntax does not provide a unique identifier. "rummage mermaid sapphire" will always get you deep blue mermaid sapphires, but "rummage blue sapphire" might get you a jar with blue sapphires and might get you a jar with deep blue mermaid's tear sapphires.

Izzy
08-11-2010, 11:32 AM
Are there any <adj1> <adj2> <noun> gems that don't use the <adj1> <noun> format as "canonical"? It seems to me if you have a one adjective phrase (blue sapphire), that's the name, if you have a two adjective phrase (golden cowrie shell), it's the first adjective and the noun.

Did you even look at his examples?



dark blue mermaid's tear sapphire = rummage <container> ingredient mermaid sapphire

<adj1> = blue
<adj2> = mermaid's tear
<noun> = sapphire

So it uses the second adjective and the noun. Same with the snake-head cowrie shell.

Also, multiple words also cause problems. How do you tell when the descriptor stops and the noun begins, reliably? Humans can, no problem. To the parser though, it's just a bunch of words.

TheEschaton
08-11-2010, 11:42 AM
Well, it seems to hold that the second one from the noun, counting backwards, is the descriptor ("golden cowrie shell" = golden shell, dark blue mermaid's tear sapphire = mermaid sapphire), I dunno. I quit GS years ago, before gem jars.

Deathravin
08-11-2010, 11:49 AM
Rummage is dumb. Don't Rummage.

the full 'Item.name' is extracted from the XML just fine. So simply check for the object name that has the same name as your gem. I did this...


def gemJars_fixName(name)
fixit = nil
startname = name
if name =~ /^(some|large|medium|small|tiny) / then name = name.sub(/^(some|large|medium|small|tiny) /,"") end
if name == "blue lapis lazuli" or name =~ / coral$/ then fixit = name
elsif name[-1..-1] == "y" then fixit = "#{name[0..-2]}ies"
elsif name[-1..-1] == "x" or name[-1..-1] == "z" then fixit = "#{name}es"
else ; fixit = "#{name}s"
end
echo "translated #{startname} into #{fixit}"
return fixit
end

I was slowly adding to it as I found gems that didn't work. If you find any, please IM me the gem name and gem plural and I'll look at it. I only used this for about a week while I was doing gem reps.

Deathravin
08-11-2010, 12:00 PM
Quickly quantify my 'rummage is dumb' comment. I just need 1 simple example...

You glance down at your uncut diamond.

Rummage #12345678 ingredient uncut diamond
You remove a jar containing uncut star-of-tazmarian diamonds
....
Rummage #12345678 ingredient uncut diamond
You remove a jar containing uncut blue diamonds
....
Rummage #12345678 ingredient uncut diamond
You remove a jar containing uncut maernerstrike diamonds
....
fuck you rummage.

JohnDoe
08-11-2010, 05:45 PM
Rummage is dumb. Don't Rummage.

the full 'Item.name' is extracted from the XML just fine. So simply check for the object name that has the same name as your gem. I did this...


def gemJars_fixName(name)
fixit = nil
startname = name
if name =~ /^(some|large|medium|small|tiny) / then name = name.sub(/^(some|large|medium|small|tiny) /,"") end
if name == "blue lapis lazuli" or name =~ / coral$/ then fixit = name
elsif name[-1..-1] == "y" then fixit = "#{name[0..-2]}ies"
elsif name[-1..-1] == "x" or name[-1..-1] == "z" then fixit = "#{name}es"
else ; fixit = "#{name}s"
end
echo "translated #{startname} into #{fixit}"
return fixit
end

I was slowly adding to it as I found gems that didn't work. If you find any, please IM me the gem name and gem plural and I'll look at it. I only used this for about a week while I was doing gem reps.

Much better approach than what I was attemping to do with RUMMAGE (maybe rubbish is a better verb name). Will give this a shot later. I stockpile quite a few gems and will grow that stockpile now (if this works) for some of the gems that wouldn't work with my system. So, I should be able to provide some more info back to you on gems that don't work with this system (if there are any). Thanks for the help.

Deathravin
08-11-2010, 06:15 PM
(if there are any)

There are


Btw. I hate blue lapis lazuli. They went in and mucked with it a few months ago and they DIDN'T just bloody fix it. pisses me off. If you're already going in there, then fix the noun in SF XML... grr

Tillmen
08-12-2010, 01:28 AM
If it makes you feel any better, GameObj reports the proper noun for lapis lazuli, even though it's wrong in the XML.