This is what the RegEx patterns do for the Enchanting page:
Main idea: When an enchanting recipe is parsed by the Addon it tries to assign it a better 'Recipe_Type' then the default of 'Enchanting'.
It does this by looking at the Enchanting Recipe's name.
For english this works very well because all wands have the word 'wand' in them,
rods have the word 'rod' in them and oils have the word 'oil' in them.
The following RegEx does the above:
- Code: Select all
$wordings['enUS']['REGEX_WAND_ROD_OILS'] = '/\b(rod|wand|oil)\b/i';
When it finds the word rod, wand or oil it will change the recipe_type of that recipe to the corresponding value.
If the addon fails to find a Rod, Wand, or Oil it will try this RegEx:
- Code: Select all
$wordings['enUS']['REGEX_ENCHANTMENTS'] = '/\benchant\b\s([2a-z ]+)\s-\s.+/i';
That will match a line that looks like this:
Enchant Gloves - Greater Strength
It looks for the word 'Enchant' and returns a string upto a '-'.
In the above example it would return a value of 'Gloves' to the addon and it would assign a recipe_type of 'Gloves'.
If the addon fails to match both of the above RegEx it will assign a recipe_type of "Items"; ie enchantments like "Enchanted Thorium"
and "Smoking Heart of the Mountain" will get placed here.
So that is the logic. Let me know if this sort of logic will work for DE/FR.
I am also willing to "make it work" if I need too.. I just need to know what string(s) i need to look for and such.