------------------------------------------------------
Fizzwidget Feed-O-Matic
by Gazmik Fizzwidget
http://fizzwidget.com
gazmik@fizzwidget.com
------------------------------------------------------

As my Hunter friends can readily attest, keeping a wild pet can be a full-time job. Why, just feeding the critter when he gets hungry can throw off your routine -- you've got to rummage around in your bags, find a piece of food, make sure it's appropriate for his diet, and check your aim before tossing it to him (lest you accidentally destroy a tasty morsel). So inconvenient! Not to mention potentially dangerous... you don't want to spend so long digging through your bags that you or your pet become someone else's snack.

Never fear, Gazmik Fizzwidget is here with a new gadget to automate all your pet-food-management tasks! My incredible Feed-O-Matic features state-of-the-art nutritional analyzers to make sure your pet's hunger is satisfied with a minimum of fuss, advanced selective logic to make your pet doesn't eat anything you have another use for, and a weight optimizer to make sure the food in your bags stays well organized! You can have it automatically feed your pet when needed -- or, if you're worried about running out of food while you take a nap, you can opt to manually press the "Feed Now" button and it'll intelligently choose a food and accurately toss it to your pet. This is actually one of the first gizmos I started work on... but because I'm a perfectionist I haven't considered it ready for release until now.

------------------------------------------------------

INSTALLATION: Put this folder into your World Of Warcraft/Interface/AddOns folder and launch WoW.

USAGE:
Makes feeding your pet quick, easy, and fun:
	- Automatic feeding: Feeds your pet whenever his happiness falls below a certain level ("content" by default), automatically choosing an appropriate food. Makes sure not to try feeding your pet at times you can't (e.g. mounted, in combat, dead, flying, etc.). 
	- Manual feeding: Bind a key to "Feed Pet", and Feed-O-Matic will automatically choose an appropriate food and give it to the pet whenever you press it. 
	- Can use an emote to notify you when it's feeding your pet, with custom randomized messages. See FeedOMatic_Emotes.lua to customize them to your characters!

Helps you manage all the pet food in your inventory:
	- Keeps track of which foods your pet likes more, and prioritizes "better" foods when choosing what to feed the pet. Also remembers what foods your pet has "outgrown", and doesn't choose them in the future (unless you've switched to a pet who might have different tastes).
	- If you're on a quest to collect several of a certain item which also happens to be something your pet likes to eat, Feed-O-Matic can avoid consuming it. (Unless you're carrying more than is needed for the quest or there's nothing else for your pet to eat.) Type `/feedomatic savequest on` to enable this feature.
	- Feed-O-Matic can keep track of what foods are used by the Cooking recipes you know and avoid choosing food you'd rather cook. To enable this feature, type `/feedomatic saveforcook` followed by the difficulty color you want to save ingredients for. (For example, `/feedomatic saveforcook orange` will cause Feed-O-Matic to avoid choosing food items you're guaranteed to get a skillup from cooking; foods used in lower-level recipes won't be given special attention.)
	- If you'd prefer to save the better food (that is, those which provide a "well fed" bonus or other effect when eaten) for yourself, Feed-O-Matic can also avoid it when looking for pet food.
	- All other things being equal, Feed-O-Matic will try to pick foods from smaller stacks, making sure your food supply doesn't take up all your bag space. When your bags get close to full, Feed-O-Matic will start ignoring other criteria and always choosing the smallest stack so that you won't run out of inventory sooner.

CHAT COMMANDS:
	/feedomatic (or /fom or /feed) <command>
where <command> can be any of the following:
	`help` - Print this helplist.
	`status` - Check current settings.
	`reset` - Reset to default settings.
	`alert chat|emote|off` - Alert via chat window or emote channel when feeding.
	`on|off` - Turn automatic feeding on or off.
	`level content||happy` - Set happiness level for automatic feeding.
	`saveforcook orange|yellow|green|gray|off` - Avoid foods used in cooking recipes (based on their difficulty).
	`savequest on|off` - Avoid foods you need to collect for a quest.
	`savebonus on|off` - Avoid foods that provide a bonus efffect when consumed by a player.
	`fallback on|off` - If avoiding certain foods for one of the above reasons, fall back to such foods if no other foods are available.
	`keepopen <number>` - If you have more than *number* inventory slots open, Feed-O-Matic will prefer foods your pet likes more. If you have *number* or fewer slots left, Feed-O-Matic will always pull foods from the smallest stack (so space is freed up sooner).
	`feed` - Feed your pet (automatically finds an appropriate food).
	`feed <item link>` - Feed your pet a specific food.
	`add <diet> <item link>` - Add food to the list for a specific diet (meat, fish, fruit, etc).
	`remove <diet> <item link>` - Remove food from the list.
	`show <diet>` - Show food list for a specific diet (or for `all`).

CAVEATS, ETC.: 
	- Feed-O-Matic has a database of many known foods, but it's not guaranteed to be comprehensive. You can use the `add`, `remove`, and `show` commands noted above to manage these lists directly. (Please drop me a line if you find a food that should be on there, or discover that something on the list shouldn't be there.) 
	- Currently, Feed-O-Matic can only update its list of which foods you know how to cook when your Cooking window is open. (So if you read a new recipe, we won't know to preserve the ingredients until you open your Cooking window again.)
	- Only works in English, French, and German (for now).

------------------------------------------------------
VERSION HISTORY

v. 10900.5 - 2006/01/27
- Fixed an error that prevented adding, removing, or feeding specific foods via `/fom` commands.
- Fixed issue where a food not already known by Feed-O-Matic couldn't be properly removed from its listings.
- We no longer attempt to auto-feed if the loot window is open (as in some cases this can cause you to lose what loot is in it).
- Removed some code that caused us to avoid feeding the pet for several minutes if auto-feeding didn't produce a result; it was a workaround for WoW issue that's now fixed (feeding while swimming not doing anything to pet happiness). Common, recoverable cases of auto-feed failure should now result in another auto-feed happening soon after.
- Should now be more reliable about not auto-feeding while you or your pet is flagged as "in combat".
- Includes an update to tooltip-related code shared with other Fizzwidget addons, which should resolve an issue where having two or more addons with conflicting versions of said code could cause a "stack overflow" error.

v. 10900.4 - 2006/01/13
- Fixed additional errors some users were experiencing when feeding or accessing the Cooking window.
- The locale indpendence changes in 10900.1 broke our ability to parse debuff tooltips so as not to feed the pet while he's under a DOT effect... should be fixed now.
- More complete German localization thanks to Zindar from Blackhand (EU).

v. 10900.3 - 2006/01/09
- Fixed an error that could appear when accessing the Cooking window and under certain other conditions (line 1560 error).

v. 10900.2 - 2006/01/03
- Fixed a 1.9 compatibility issue. (Error message about GetBattlefieldStatus()).

v. 10900.1 - 2006/01/03
- Updated for WoW patch 1.9.
- Now localizable, with partial French and German translations now included. Many thanks to Graçi of Hyjal (EU), Jan-Paul, and other contributors to the comments thread of fizzwidget.com for helping get this up and running!
- Mostly locale-independent; now uses item link IDs to identify food instead of names. Unfortunately, Feed-O-Matic still requires one bit of locale-dependent information to work in ach language: the names of the six animal diets. Without translations for these, Feed-O-Matic can't look up foods in its list, which makes it pretty well broken. If you're not using WoW in English, French, or German, here's how you can help make it work for your language:
	- Tame a few pets of different creature families. (Minimally, a Bear or Boar will do -- they eat anything -- but taming pets of the other fifteen families will help me get more family names into the database.)
	- Use Feed-O-Matic to feed each one at least once. (Or at least type `/fom` once after taming each pet.)
	- Log out of WoW, and open your World of Warcraft -> WTF -> SavedVariables -> GFW_FeedOMatic.lua file in a text editor.
	- Copy the section that looks like `FOM_LocaleInfo = { ... }` and email it to gazmik@fizzwidget.com.
- The slash commands for adding, removing, and feeding specific foods now require an item link or the name of an item that exists in your inventory -- passing in just any old name won't work because we now index foods based on item ID.
- Includes refinements to code shared with other GFW mods.
- Knows its own version number -- it's present in startup and error messages and if you type `/fom help` or `/fom version`. Please include this version number when sending bug reports or help requests!

See http://fizzwidget.com/notes/feedomatic/ for older release notes.