User:Bennie/Bot Proposal

I noticed that with the introduction of new creatures which have a large loot list, sometimes 20 to 30 items, it is quite a tedious task to edit all those item pages to add this new creature. This seems like a good example of something a bot could do automatically.

Background information
If a creature drops loot, it this is noted in the loot parameter. Let's take a Bear as an example:
 * loot          =

It links to 4 item pages: Meat, Ham, Bear Paw and Honeycomb.

All those 4 item pages link back to the creature in their droppedby parameter. Let's take the Bear Paw as an example:
 * droppedby    =

As you can see the information "A Bear drops a Bear Paw" or "A Bear Paw is dropped by a Bear" is present in two places, on the Bear page and on the Bear Paw page. In some cases however, there are inconsistencies. If somebody places the information on one of the pages, it is not always placed in the other place as well.

Proposal
The bot will have to take two approaches.

First approach

 * Make a list of all Creatures.
 * Loop over every creature and check if it contains any Template:Loot Items.
 * If it does, make a list of the loot items.
 * Loop over every loot item and check if the creature name is present in the Template:DroppedBy of that page.
 * If not, add it.
 * Else, move on.

Second approach

 * Make a list of all Items.
 * Loop over every item and check if it contains a Template:DroppedBy.
 * If it does, make a list of creatures.
 * Loop over every creature and check if the item name is present in a Template:Loot Item on that page.
 * If not, add it.
 * Else, move on.